Simulink model does not "continue" after a "pause" by using set_param commands.

10 ビュー (過去 30 日間)
Don Brohaugh
Don Brohaugh 2015 年 12 月 12 日
コメント済み: Don Brohaugh 2015 年 12 月 22 日
Attached are files for test13.zip, loadvar.m and CurrentTransfer13.m, which are simplified versions of a model I have been working with. An assertion block in the model calls for execution of CurrentTransfer13, preceded by a set_param command to "pause" and followed by a command to "continue". The problem is that the execution does pause, does execute CurrentTransfer13, but then refuses to continue without manually depressing the "run" button on the model screen. Several pros have tried to help me fix this with no success. We have tried to move the "continue" command, to add "update" commands, to remove and add the "return" command, all without success. Can anyone tell us how to properly code this model so it automatically executes the .m script file and then continues with the Simulink simulation, until the end of the established time interval?

回答 (1 件)

John Petersen
John Petersen 2015 年 12 月 21 日
Your sim stops because of the pause. When you press play, it continues for one cycle and then is told to pause again in your assertion block. Just remove the pause and continue, you don't need them.
  1 件のコメント
Don Brohaugh
Don Brohaugh 2015 年 12 月 22 日
John, Thank you very much for your input, but it has been tried and does not work!
Try it on the simple model and you will see that the simulation does continue to the end of the 0.03 second interval, but that the calls to Current Transfer13 are not executed at all!

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

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by