How to give control to GUI while GUI is executing simulink model in a for loop

,And wen i press start button i have given a control to execute the simulink model for 1000 seconds in real time,,now i want to stop my simulation started after 20 seconds,,,but i don ave control to my gui until m simulink model finishes

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2013 年 1 月 4 日

0 投票

Perhaps you can create a Pause block in your model?

1 件のコメント

Arun Badigannavar
Arun Badigannavar 2013 年 1 月 7 日
I dont want to pause my simulink model,,any other way?

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

Anthony Poulin
Anthony Poulin 2013 年 1 月 7 日
Hy,
I don't really understand what you want to do but you can strat, stop or pause your model excution with this command lines.
set_param('modelname', 'SimulationCommand','start');
set_param('modelname', 'SimulationCommand','continue');
set_param('modelname', 'SimulationCommand','pause');
set_param('modelname', 'SimulationCommand','stop');
If you to stop the model after 20s of simulution you can use get_param('modelname', 'SimulationTime'); Or using the clock for stopping in real time...

3 件のコメント

Arun Badigannavar
Arun Badigannavar 2013 年 1 月 7 日
Thanks for the response,,but my requirment is like i have to run and stop whenver i want using GUI
Kaustubha Govind
Kaustubha Govind 2013 年 1 月 7 日
Arun: If you want to use GUI callbacks, you should use Poulin's suggested commands in those callbacks.
Arun Badigannavar
Arun Badigannavar 2013 年 1 月 11 日
i am able to use it thanks

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

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

製品

タグ

質問済み:

2013 年 1 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by