Action Port

Add control port for action signal to subsystem

  • Library:
  • Ports & Subsystems

Description

The Action Port block controls the execution of these subsystem blocks:

Parameters

expand all

Select how to handle internal states when a subsystem with an Action Port block reenables.

held

When the subsystem reenables, retain the previous state values of the subsystem. Previous state values between calls are retained even if you call other subsystem blocks connected to the If or Switch Case block.

reset

When the subsystem reenables, reinitialize the state values.

A subsystem reenables when the logical expression for its action port evaluates to true after having been previously false. In the following example, the Action Port blocks for both subsystems A and B have the States when execution is resumed parameter set to reset.

When case[1] is true, subsystem A is executed. Repeated calls to subsystem A while case [1] continues to be true, does not reset its state values. The same behavior applies to subsystem B.

Programmatic Use

Block Parameter: InitializeStates
Type: character vector
Value: 'held' | 'reset'
Default: 'held'

Select when to propagate a variable-size signal.

Only when execution is resumed

Propagate variable-size signals only when reenabling the subsystem containing the Action Port block.

During execution

Propagate variable-size signals at each time step.

Programmatic Use

Block Parameter: PropagateVarSize
Type: character vector
Values: 'Only when execution is resumed' | 'During execution'
Default: 'Only when execution is resumed'

Introduced before R2006a