Implementing multiple simulation state /group of parameters for Simulink model (Embedded coder)
Show older comments
Good morning,
I have a model for which I require a standalone executable. I generated it using the embedded coder, but, It works just for one working point, corresponding to the workspace available when generating the code.
My issue is that, the code should stop when a certain condition is met, and restart other 2 times, with a different set of parameters.
I achieved that in pure simulation using a matlab script to set the parameters using a for each and starting the simulation using matlab command.
How could I handle that without relying on matlab, but just on simulink?
3 Comments
Raghava S N
on 7 Apr 2025
Could you share the model file so that this issue can be accurately reproduced? Also, you can consider implementing the different working points as independent resettable subsystems.
This link describes an example model which uses resettable subsystems - https://www.mathworks.com/help/simulink/slref/resettable-subsystems.html.
Here is more information about resettable subsystems - https://www.mathworks.com/help/simulink/ug/reset-block-states-in-a-subsystem.html.
Hope this helps!
Antimo
on 7 Apr 2025
Antimo
on 15 Apr 2025
Answers (0)
Categories
Find more on Deployment, Integration, and Supported Hardware 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!