Logical Conditionally Executed Subsystems

Control when a subsystem is executed

A logically executed subsystem runs one or more times at the current time step when enabled by a control block. A control block implements control logic similar to that expressed by a programming language statement (e.g., if-then, switch, while, for).

Blocks

expand all

IfSelect subsystem execution using logic similar to if-else statement
If Action SubsystemSubsystem whose execution is enabled by an If block
Switch CaseSelect subsystem execution using logic similar to a switch statement
Switch Case Action SubsystemSubsystem whose execution is enabled by a Switch Case block
Action PortAdd control port for action signal to subsystem
While IteratorRepeat execution of a subsystem while a logical expression is true
While Iterator SubsystemSubsystem that repeats execution during a simulation time step
For IteratorRepeat execution of a subsystem during a time step for a specified number of iterations
For Iterator SubsystemSubsystem that repeats execution during a simulation time step
For EachProcess elements or subarrays of an input signal or mask parameter independently
For Each SubsystemSubsystem that repeats execution on each element or subarray of input signals or mask parameters and concatenates results

Topics

Select Subsystem Execution

Execute subsystem once during a time step in response to an action signal.

Iterate Subsystem Execution

Execute subsystem multiple times during a time step in response to a control block.

Repeat an Algorithm Using a For Each Subsystem

Iterate an algorithm over groups of signals, subsystems, and parameters.

Log Signals in For Each Subsystems

Use signal logging in For Each subsystems.

Featured Examples