How to know, in a MatLab GUI, if the simulation in Simulink is over?

Hello,
I have a MatLab GUI that is used to run a Simulink model in external mode, and with infinite stop time. This model is unloaded or stopped when a sinal from a torque transducer reaches the maximum value. Now I want to have a message box, in my GUI, that says something like: "Simulation is OVER".
How do I do this?
Thank you very much

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 5 月 17 日

0 投票

I think get_param('modelname', 'SimulationStatus') would return stopped when the simulation is over. I'm not sure what the best polling mechanism in MATLAB is (perhaps you can start another question for MATLAB experts to give you advice on that), but a while loop should do it, I guess.

カテゴリ

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

製品

質問済み:

2013 年 5 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by