Main Content

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:

  1. Open the dialog box for an Outport block in a conditional subsystem.

  2. From the Source of initial output value drop-down list, select Dialog.

  3. 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.

    Note

    If you are connecting the output of a conditionally executed subsystem to a Merge block, set Output when disabled to held to ensure consistent simulation results.

    If you are using simplified initialization mode, you must select held when connecting a conditionally executed subsystem to a Merge block. For more information, see Underspecified initialization detection.

  4. In the Initial output box, enter the initial value.

Note

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.

Related Topics