Filter löschen
Filter löschen

Stepping through sorted order of Simulink model

4 Ansichten (letzte 30 Tage)
K E
K E am 16 Mär. 2012
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?

Akzeptierte Antwort

Kaustubha Govind
Kaustubha Govind am 16 Mär. 2012
Yes, you can do that with the Simulink Debugger.
  2 Kommentare
K E
K E am 19 Mär. 2012
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 am 19 Mär. 2012
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by