Simulink Desktop Real-Time parallel simulations and communicate between simulations
2 次查看(过去 30 天)
显示 更早的评论
I know that parsim command could be used to run parallel simulations in Simulink. However, I want to run simulations real-time. Therefore, does anyone have any experience using parsim to run parallel simulations (hardware in the loop) real-time? Can I use Simulink Desktop Real-Time for this? Please note that I want to run simulations on a single computer, and I want to communicate signals between simulations.
0 个评论
采纳的回答
Jan Houska
2022-7-26
Hi Abdülhamit,
it is not possible to run parallel simulations using Simulink Desktop Real-Time using parsim or any similar approach. Simulink Desktop Real-Time uses built-in real-time scheduler that is responsible for scheduling individual real-time tasks so that real-time criteria are met.
Instead of trying to run several simulations in parallel, you can try to run all the models together using model referencing. That is, you create an empty top model, reference all the models that should be run from this top model, then run the top model in real time. This also solves the issue of communication between the models - you can connect the input and output signals of the submodels at the top model level.
Good Luck, Jan
3 个评论
Jan Houska
2022-7-28
Hi Abdülhamit,
it is currently not possible to have the I/O device blocks inside the referenced submodels. The recommended way is to have these blocks in the top-level model and to communicate the signals to the submodels using the inport/outport blocks.
Good Luck, Jan
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Real-Time Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!