Pause and play simulink in programming
조회 수: 2 (최근 30일)
이전 댓글 표시
Is it possible to pause and play again Simulink block diagram through programming? For more clarification I have to say that I want to pause (not stop) my Simulink which is run with sim command in a script file. Is it possible and if so how?
댓글 수: 2
채택된 답변
Kaustubha Govind
2012년 11월 26일
set_param('modename','SimulationCommand','start')
set_param('modename','SimulationCommand','pause')
set_param('modename','SimulationCommand','continue')
set_param('modename','SimulationCommand','stop')
댓글 수: 10
Kaustubha Govind
2012년 12월 27일
Sorry, I was away on vacation. Before you run the SIM command, could you run get_param(Name, 'StopTime') and make sure that the time returned is larger than the Pause block setting?
추가 답변 (1개)
Nadir BOUTASSETA
2013년 2월 10일
I think that the problem you are facing can be solved by using S-Functions such that at each iteration you change reference values and compute your cost function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!