Using Simulink | ![]() ![]() |
Displaying Information About the Model
In addition to providing information about a simulation, the debugger can provide you with information about the model that underlies the simulation.
Displaying a Model's Block Execution Order
Simulink determines the order in which to execute blocks at the beginning of a simulation run, during model initialization. During simulation, Simulink maintains a list of blocks sorted by execution order. This list is called the sorted list. In GUI mode, the debugger displays the sorted list in its Execution Order panel. In command-line mode, the slist
command displays the model's block execution order in the MATLAB command window. The list includes the block index for each command.
---- Sorted list for 'vdp' [12 blocks, 9 nonvirtual blocks, directFeed=0] 0:0 'vdp/Integrator1' (Integrator) 0:1 'vdp/Out1' (Outport) 0:2 'vdp/Integrator2' (Integrator) 0:3 'vdp/Out2' (Outport) 0:4 'vdp/Fcn' (Fcn) 0:5 'vdp/Product' (Product) 0:6 'vdp/Mu' (Gain) 0:7 'vdp/Scope' (Scope) 0:8 'vdp/Sum' (Sum)
Identifying Blocks in Algebraic Loops
If a block belongs to an algebraic list, the slist
command displays an algebraic loop identifier in the entry for the block in the sorted list. The identifier has the form
where s
is the index of the subsystem containing the algebraic loop and n
is the index of the algebraic loop in the subsystem. For example, the following entry for an Integrator block indicates that it participates in the first algebraic loop at the root level of the model.
You can use the debugger's ashow
command to highlight the blocks and lines that make up an algebraric loop. See Displaying Algebraic Loops for more information.
![]() | Displaying Integration Information | Displaying a Block | ![]() |