Conditional Subsystem Initial Output Values

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

  • Inherit initial output values from input signals.

  • Specify initial output values using Outport block parameters.


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

Inherit Initial Output Values from Input Signals

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

  • Output ports from another conditionally executed subsystem

  • Output ports from a Model block with a Trigger block 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 the InitialValue parameter is defined, Simulink uses this value.

  • Stateflow® chart

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

To Specify output values with input signals:

  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 Input signal.


If you are using classic initialization mode, selecting Input signal causes an error. To inherit the initial output value from an input signal, set the Source of initial output value parameter to Dialog, set Outut when disabled to held, and set Initial output to 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 an Output block in a conditional subsystem.

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

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

Related Topics

Was this topic helpful?