slist
Display sorted list of blocks in model during simulation debugging session
Syntax
Description
slist
displays in the MATLAB® Command Window the sorted list of blocks in the root
system and each nonvirtual subsystem or referenced model in the root
system. For the root system, each nonvirtual subsystem, and each
referenced model, the returned information includes:
A title line that indicates the name of the system, the number of nonvirtual blocks in the system, and the number of blocks in the system that have ports with direct feedthrough
An entry for each block in the system in the order in which the blocks appear in the sorted list
Each block entry includes:
The block ID in the form of
(t)s:b
, wheret
is the task index,s
is the system index, andb
is the block index.The number and indices of input ports on the block.
The number and indices of output ports on the block.
The slist
function displays only nonvirtual
blocks in the model. Virtual blocks do not appear in the sorted
list.
When a block is part of an algebraic loop, the sorted list information
also includes the algebraic loop identifier for the block. The
algebraic loop identifier has the form algID=s#n
,
where s
is the index of the subsystem that
contains the algebraic loop and n
is the index of
the algebraic loop within the system. During a simulation debugging
session, you can use the ashow
function to highlight the blocks in an algebraic loop.
The software uses the sorted list to create block method execution lists for the root system, each nonvirtual subsystem, and each referenced model. Typically, the block methods are invoked in the same order that they appear in the sorted list. In some cases, the execution order does differ from the order in the sorted list. For example, in models that group blocks that execute at the same rate into separate tasks, the block execution order can differ from the order of blocks in the sorted list.
You can use this function in a simulation debugging session started:
Note
This function is available only for simulation debugging sessions started programmatically and for interactive simulation debugging sessions while paused within a time step.
Examples
Tips
To start a simulation debugging session interactively, add one
or more breakpoints to your model, and in the Breakpoints List,
check that Pause within time step is selected. When the simulation pauses
on a breakpoint, some of the programmatic debugging commands, such as the
stop
command, are available for use in the MATLAB Command Window.