필터 지우기
필터 지우기

Stepping through sorted order of Simulink model

조회 수: 2 (최근 30일)
K E
K E 2012년 3월 16일
I have a Simulink model that may be executing blocks in a different order than I expect. So, I would like to check the order that the blocks are executed. The information returned by Format > Block Displays > Sort Order is not intuitive. I would prefer to "step" through the model and highlight each block as it is being executed, pulling up whatever subsystem that the block resides in. I don't need to go through the entire simulation; just a couple of loops through should be enough.
Is it possible to step through blocks in their order of execution?

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 3월 16일
Yes, you can do that with the Simulink Debugger.
  댓글 수: 2
K E
K E 2012년 3월 19일
Thanks, very helpful. I learned that it is possible to list the sort order of blocks as follows,
sldebug 'myModelNameNoExtension'
slist
And then you can highlight the relevant block using
hilite_system('nameOfBlockFromSlist', 'find')
if you manually cut & paste in one of the block names that slist outputs.
K E
K E 2012년 3월 19일
How to step through the blocks with the debugger, in case it is useful to another beginner,
* Open model and load any workspace variables
* Tools > Simulink Debugger
* 'Play' button to start simulation (will stop at first block)
* 'Go to the next block method' button (2 squares) to step forward one block
* Or, choose 'Animate' button then 'Play' button to see blocks executed in order. Unfortunately, will not open up the subsystems as they are executed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by