フィルターのクリア

How to manage a simulink subsystem with high execution time?

1 回表示 (過去 30 日間)
grega
grega 2018 年 3 月 2 日
回答済み: Mark McBroom 2018 年 3 月 11 日
I have a simulink model connected to experimental rig and the model has sampling time of 1s.
Now I came across a problem where a subsystem in the simulink model has about 5s execution time. Is there a possibility to specify that the model is forcefully executing with 1s sampling rate and always takes the last available value of the "5s-subsystem"? Namely, the value of the subsystem does not change rapidly, so taking its value every ~5s would be totally fine.

採用された回答

Mark McBroom
Mark McBroom 2018 年 3 月 11 日
When simulating a Simulink model, a single thread is used to run all sample rates of the model. Even if the model is configured to have different sample rates ( in your case, 1s and 5s sample rates ), it is not possible to have these sample rates running concurrently. The best way to achieve concurrent execution from your Simulink model is to generate code from your model and run the generated code with Simulink Real-Time on a Speedgoat rapid prototyping system. It is also possible to generate code and run this code concurrently on your host computer by using the Concurrent Execution feature.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMulticore Processor Targets についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by