Why is my simulink model recompiling endlessly when I run it from a script file?
Show older comments
I have a script file, and a simulink model.
The script file contains variables included in the simulink model. There are a couple of if statements in there.
The simulink model contains mostly built in functions (rapid accelerator compatible) and an s-function that calls to a library (ra not compatible).
Recently I have made a change to convert some functions in the model which where s-functions to built in functions. Prior to this change, I had no problems, and could run the code from the script file. However, whenever I run the code from the script file now, on the bottom right corner of the screen on the simulink model window, it never shows the progress of the simulation- the green bar with the 'T=' label indicating the simulation step. Instead, it says Running, then shows the compiling bar, and after it compiles, it brings up the simulink profiler report. On the matlab script window, it keeps on saying busy, and after a couple of seconds,it starts running the model again, recompiling, and so on. Interestingly, if I let it do this process once and then run the model from the simulink window instead from the script, it does not do it.
I have disabled a couple of options which I thought may be causing this issue. In model configuration parameters, i've set the rebuild option to never under model referencing. I've also set simulation target build mode to 'incremental build'.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!