Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Run Simulink models in parallel while sharing data stores
3 ビュー (過去 30 日間)
古いコメントを表示
I am looking to run two different Simulink models in parallel in a main model. The two models need to share 2 data store memory variables. One of the models is computationally expensive and is executed only when a certain condition on one of the data store variables is met. The other model needs to run continuously while writing to the data store variables. I have implemented task parallelism as described in the following example: https://www.mathworks.com/help/simulink/ug/implement-task-parallelism-in-simulink.html

However, I could not share the data store variables across models as task parallelism requires all blocks to be in sub-models and global data store sharing requires variables to be defined in the main model, if I understood it correctly
1. How could I share data store memory globally across models while running models in parallel?
2. How could I run the fast executing model at the same rate without being affected by the fact that the slow executing model is running or not?
I would appreciate any advice in this regard. Thanks!
0 件のコメント
回答 (1 件)
Prashant Arora
2017 年 3 月 8 日
Hi Priyanshu,
Regarding your question about global data stores, you can use Simulink.Signal objects to define data stores in base workspace. A data store defined in the base workspace with a signal object is a global data store. Global data stores are accessible to every model, including all referenced models.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!