| Using Simulink |
 |
Introduction
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 the Subsystem block at the control input.
Conditionally executed subsystems can be very useful when building complex models that contain components whose execution depends on other components.
Simulink supports three types of conditionally executed 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 while the control signal remains positive. Enabled subsystems are described in more detail on Enabled Subsystems.
- 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. Triggered subsystems are described in more detail on Triggered Subsystems.
- A triggered and enabled subsystem executes once on the time step when a trigger event occurs if the enable control signal has a positive value at that step. See Triggered and Enabled Subsystems for more information.
| Conditionally Executed Subsystems | | Enabled Subsystems |  |