Force update scope window when running rapid accelerator mode from command line

6 ビュー (過去 30 日間)
As stated in Design Your Model for Effective Acceleration, Simulink does not allow the update of scope unless the rapid accelerator model is run from Simulink menu, for whatever reason. However, I am using a GUI to call the Simulink model and I wish to see real-time output using the scope, but the scopes won't update.
I wonder if there is a way to change this Simulink behaviour (this restriction really seems artificial to me). Alternatively, I wonder if there is a way to pretend (using command line code) that I am running the model from Simulink menu.

採用された回答

TAB
TAB 2018 年 10 月 5 日
編集済み: TAB 2018 年 10 月 5 日
Scope will not update with sim command, but it works with SimulationCommand (please dont ask why :P)
set_param('MyModel', 'SimulationCommand', 'start')
SimulationCommand can take one of following value:
'start' | 'stop' | 'pause' | 'continue' | 'step' | 'update' | 'WriteDataLogs' | 'SimParamDialog' | 'connect' | 'disconnect' | 'WriteExtModeParamVect' | 'AccelBuild'
  3 件のコメント
Kaixiang Wang
Kaixiang Wang 2018 年 10 月 5 日
Thanks for your prompt reply. I thought about this but I doubt this is an efficient solution (in the sense that simulation runs slower). I did a few tests and I think this would increase the simulation time by roughly two or three times.
In the end it might be just a design decision to make. The other option is for me to kindly ask the GUI user to hit the Run Simulation button...

サインインしてコメントする。

その他の回答 (1 件)

Qiaoli Ji
Qiaoli Ji 2018 年 12 月 19 日
Hi, Kaixiang Wang , I have met a question about matlab compiler installation. So could you help me? Thanks
QQ:1069994175

カテゴリ

Find more on Simulink Environment Customization 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!

Translated by