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.

禁用时指定输出值:

  1. Open the dialog box for anOutportblock in a conditional subsystem.

  2. From theSource of initial output valuedrop-down list, selectDialog.

  3. From theOutput when disableddrop-down list, select one of these options:

    • 举行— 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 aMergeblock, setOutput when disabledto举行to ensure consistent simulation results.

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

  4. In theInitial outputbox, enter the initial value.

Note

If anOutportblock in anEnabled Subsystemresets 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