Conditional Subsystem Output Values When Disabled
Although a conditional subsystem does not execute while it is disabled, the output signal is still available to other blocks. When a conditional subsystem is disabled and you have specified not to inherit initial conditions from an input signal, you can hold the subsystem outputs at their previous values or reset them to their initial conditions.
To specify output values when disabled:
Open the dialog box for an Outport block in a conditional subsystem.
From the Source of initial output value drop-down list, select
From the Output when disabled drop-down list, select one of these options:
held— Maintain the most recent value.
reset— Use the initial condition when enabled.
If you are connecting the output of a conditionally executed subsystem to a Merge block, set Output when disabled to
heldto ensure consistent simulation results.
If you are using simplified initialization mode, you must select
heldwhen connecting a conditionally executed subsystem to a Merge block. For more information, see Underspecified initialization detection.
In the Initial output box, enter the initial value.
If an Outport block in an Enabled Subsystem resets its output when disabled at a different rate from the execution of the subsystem contents, both the disabled and execution outputs write to the subsystem output. This behavior can cause unexpected results.