| Using Simulink | ![]() |
Creating Conditionally Executed Subsystems
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 you are building complex models that contain components whose execution depends on other components.
Simulink supports the following types of conditionally executed subsystems:
if-then, while, do, and for. See Modeling with Control Flow Blocks for more information.
| Note Simulink displays an error if you connect a Constant, Model, or S-Function block with constant sample time (see Constant Sample Time) to the output port of a conditionally executed subsystem. To avoid the error, either change the sample time of the block to a nonconstant sample time or insert a Signal Conversion block between the block with constant sample time and the output port. |
| Controlling Access to Subsystems | Enabled Subsystems | ![]() |
© 1994-2005 The MathWorks, Inc.