Documentation

Conditional Subsystem Initial Output Values

To initialize the output values of a conditional subsystem, initialize itsOutportblocks by using one of these methods:

  • Inherit initial output values from input signals.

  • Specify initial output values usingOutportblock parameters.

Note

If the conditional subsystem is driving a Merge block in the same model, you do not need to specify an initial condition for the subsystemOutportblock.

Inherit Initial Output Values from Input Signals

By default, Simulink®uses subsystem input signals to initialize output values toOutportblocks. Other valid sources for initial output values are:

  • Output ports from another conditionally executed subsystem

  • Output ports from aModelblock with aTriggerblock set to function-call

  • Merge blocks

  • Constant blocks

  • IC(initial condition) blocks

  • Simulink signal object attached to the signal line connected to the Output block. If theInitialValueparameter is defined, Simulink uses this value.

  • Stateflow®chart

If the input signal is from a block that is not listed here, theOutportblock uses the default initial value of the output data type.

To Specify output values with input signals:

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

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

Note

If you are using classic initialization mode, selectingInput signalcauses an error. To inherit the initial output value from an input signal, set theSource of initial output valueparameter toDialog, setOutput when disabledtoheld, and setInitial outputto the empty matrix[].

Specify Initial Output Values

Explicitly set the initial output values in cases where you want to:

  • Test the behavior of a model with various initial values.

  • Set initial values to steady state and reduce simulation time.

  • Eliminate having to trace input signals to determine the initial output values.

To specify initial output values:

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

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

  3. In theInitial outputbox, enter the initial value.

Related Topics

Was this topic helpful?