A logically executed subsystem runs one or more times at the current time step when enabled by the signal from a control block. A control block implements control logic similar to that expressed by a programming language statement (e.g., if-then, while-do, switch, for).
|If Action Subsystem||Subsystem whose execution is triggered by If block|
|If||Model if-else control flow|
|Switch Case Action Subsystem||Subsystem whose execution is triggered by Switch Case block|
|Switch Case||Implement C-like switch control flow statement|
|Action Port||Implement Action subsystems used in if and switch control flow statements|
|While Iterator Subsystem||Subsystem that repeats execution during a simulation time step|
|While Iterator||Repeat execution of a subsystem while a logical condition signal is true|
|For Iterator Subsystem||Subsystem that repeats execution during a simulation time step|
|For Iterator||Repeatedly execute contents of subsystem at current time step until iteration variable exceeds specified iteration limit|
How to use control flow blocks to model control logic.
Create a subsystem that executes with a conditional control signal.
Iterate an algorithm over groups of signals, subsystems, and parameters.
Use signal logging in For Each subsystems.