Action subsystems are subsystems that execute in response to a conditional output from an If block or a Switch Case block. In essence, they are subsystems with an Action port, which allow for block execution based on conditional inputs from an If block or Switch Case block.
Simulink® has two types of action subsystems, based on the type of block they receive conditional input from.
An If Action Subsystem is preconfigured to serve as a starting point for creating a subsystem whose execution is triggered by an If block. To implement an if-else condition, connect If Action Subsystem blocks to the outputs of an If block.
The Switch Case Action Subsystem is preconfigured to serve as a starting point for creating a subsystem whose execution is triggered by a Switch Case block. To implement a switch condition, connect Switch Case Action Subsystem blocks to the outputs of a Switch Case block.
When an action subsystem is triggered to execute, you can choose whether to hold the subsystem states at their previous values or reset them to their initial conditions.
Open the Action Port block inside the action subsystem.
Select one of the following for the States when execution is resumed parameter:
held if you want the states
to maintain their most recent values
reset if you want the states
to revert to their initial conditions
For nested subsystems whose Action Port blocks have different parameter settings, the settings on the child subsystem dialog box override those setting inherited from the parent subsystem.