| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
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 whose execution can be externally controlled. For information that applies to all subsystems, see Creating Subsystems.
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 the 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. The following types of conditional subsystems are supported:
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 in 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 in 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.
A control flow subsystem executes one or more times at the current time step when enabled by a control flow block that implements control logic similar to that expressed by programming language control flow statements (e.g., if-then, while, do, and for. See Modeling 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:
![]() | Creating Conditional Subsystems | Enabled Subsystems | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |