필터 지우기
필터 지우기

Simulink Run Dashboard and App designer query

조회 수: 6 (최근 30일)
Amit Patankar
Amit Patankar 2021년 6월 22일
편집: Rena Berman 2024년 7월 16일 16:59
I am working on MATLAB App designer.
Whenever I initiate the run directly through simulink model, I can see the Run Dashboard and all options like 'Pause', 'Stop' etc. as shown below. I can click them and Pause or stop the simulation If I wish.
But when I run the Same simulink model through my developed GUI in app designer, I see the 'Pause, 'Stop' options disabled in simulink model dashboard.
In short when I initiate the run from GUI, I can no longer control the Simulink model run (Stop/Pause/Resume)
Please see the snapshot below.
Is there an option using which, I can initiate a run through GUI and still control the 'Stop' and ' Pasue' function of simulink model ?
Inline with above question,
I also observed that, the StopFcn defined inside the Model Properties option of Simulink model is not getting executed. So I am unable to obtain few outputs.
Also,
When I initiate the Simulink Run from GUI, I do not see the Progress bar at the bottom of my model. I can see only 'Running' tag, but no Time Bar.
But When I initiate the model through Simulink, I can see the progress bar of simulation.

답변 (1개)

Tejas
Tejas 2024년 3월 1일
편집: Rena Berman 2024년 7월 16일 16:59
Hello Amit,
When executing a Simulink model via command, the pause, resume, and stop options become inactive within Simulink(when using MATLAB R2017a). To address this, I suggest updating MATLAB to the latest version, where these buttons remain active.
Furthermore, to manage Simulink operations through commands, Simulink does offer specific commands for pause, resume, and stop that can be used to control the model programmatically.
Here is the documentation on commands for "Controlling Simulink Programmatically", which are applicable for use within App Designer:
I have replicated the issue using MATLAB R2017a, and in my experience, the code within the StopFcn did execute. I recommend reviewing the code in your StopFcn for any potential errors.
Additionally, in my tests, the Simulink progress bar was visible when the model was executed using the set_param command. If you continue to encounter issues, please examine your Simulink model for errors. Should the problem persist, here is a link to a MATLAB Answer that provides a suitable workaround using “Simulink Waitbar, which can be customized to act like the original progress bar: https://www.mathworks.com/matlabcentral/answers/168954-view-progress-of-simulation-when-using-sim-command .
Regards,
Tejas.

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by