A subsystem is a set of blocks that have been replaced by a single block called a Subsystem block. This chapter describes a special kind of subsystem for which execution can be externally controlled. For information that applies to all subsystems, see Create a Subsystem.
A conditional subsystem, also known as a conditionally executed subsystem, is a subsystem whose execution depends on the value of an input signal. The signal that controls whether a subsystem executes is called the control signal. The signal enters a subsystem block at the control input.
Conditional subsystems can be very useful when you are building complex models that contain components whose execution depends on other components. Simulink® supports the following types of conditional subsystems:
An enabled subsystem executes while the control signal is positive. It starts execution at the time step where the control signal crosses zero (from the negative to the positive direction) and continues execution as long as the control signal remains positive. For a more detailed discussion, see Create an Enabled Subsystem.
A triggered subsystem executes once each time a trigger event occurs. A trigger event can occur on the rising or falling edge of a trigger signal, which can be continuous or discrete. For more information about triggered subsystems, see Create a Triggered Subsystem.
A triggered and enabled subsystem executes once at the time step for which a trigger event occurs if the enable control signal has a positive value at that step. See Create a Triggered and Enabled Subsystem for more information.
A control flow subsystem executes one or more times at the current time step when enabled by a control flow block. A control flow block implements control logic similar to that expressed by control flow statements of programming languages (e.g., if-then, while, do, and for). See Use Control Flow Logic for more information.
Note The Simulink software imposes restrictions on connecting blocks with a constant sample time to the output port of a conditional subsystem. See Using Blocks with Constant Sample Times in Enabled Subsystems for more information.
For examples of conditional subsystems, see: