how to do Serial and Parrarell computing, multiple simulink models in a loop?
1 view (last 30 days)
Show older comments
Hi all,
I have two simulink files that need to run in a loop.
I have the first file sim1.slx that should run for some time and provide an output which is the input for sim2.slx. Then sim2.slx runs and afterwards it should get back to the first file sim1.slx and do this untill a counter reaches a limit.
I know that this is easy in codes and Matlab scripts, but my platform is only based on simulink.
has anyone any clues how to do this?
best regards
Mona
0 Comments
Answers (1)
Nicolas B.
on 5 Sep 2019
Hi Mona,
I would recommend you to take a look at the parsim command. Its documentation is very well done and give multiple examples.
Hope it helps.
Regards
6 Comments
Nicolas B.
on 6 Sep 2019
The risk with what you are trying to do is that you will end up in an infinite loop because model A call model B and model B call model A.
However, if you really want to go that way, I would simply do the same thing in model B to call model A.
See Also
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!