Documentation

Conditionally Executed Subsystems

Control when a model component is executed

A conditionally executed subsystem runs when an external signal (control signal) enables or triggers its execution. For subsystems that run after evaluating a condition, see Logically Executed Subsystems.

Blocks

Enabled SubsystemSubsystem whose execution is enabled by external input
Triggered SubsystemSubsystem whose execution is triggered by external input
Enabled and Triggered SubsystemSubsystem whose execution is enabled and triggered by external input
EnableAdd enable port to subsystem or model
TriggerAdd trigger port to subsystem or model
Function-Call SubsystemSubsystem whose execution is triggered by external function call input
Function-Call GeneratorProvide function-call signal to control execution of a subsystem or model
Function-Call SplitProvide junction for splitting function-call signal
Function-Call Feedback LatchBreak feedback loop involving data signals between function-call blocks
TriggerAdd trigger port to subsystem or model
Initialize FunctionExecutes contents on a model initialize event
Reset FunctionExecutes contents on a model reset event
Terminate FunctionExecute contents on a model terminate event
Event ListenerAdd event port to a subsystem block
State ReaderRead a block state
State WriterWrite to a block state
Resettable Subsystem Subsystem whose block states reset with external trigger
ResetAdd reset port to subsystem

Topics

Introduction to Conditionally Executed Subsystems

Conditional Subsystems

Overview of conditionally executed subsystems.

Ensure output is virtual

Option on a conditional subsystem or root-level Outport block.

Enabled and Triggered Subsystems

Enabled Subsystems

Create a subsystem that executes when a control signal has a positive value.

Triggered Subsystems

Create a subsystem that executes with a trigger event.

Enabled and Triggered Subsystems

Create a subsystem that executes with a trigger event or control signal with a positive value.

Function-Call and Scheduled Subsystems

Using Function-Call Subsystems

Create a subsystem that executes with a function call.

Explicitly Schedule Execution of Subsystems and Models

Specify scheduling of subsystem or model.

Sorting Rules for Scheduled Components

Simulink determines the sorted order for model components (subsystems and referenced models).

Initialize, Reset, and Terminate Functions

Create Model to Initialize, Reset, and Terminate State

Set the state of a block with an initialize event. Save the state of a block with a terminate event.

Create Test Harness to Generate Function Calls

Schedule initialize and terminate event signals to test a model component.

Initialize, Reset, and Terminate Function Limitations

Initialize, Reset and Terminate Function Limitations

Resettable Subsystems

Create a subsystem that resets all block states with a trigger event.

Subsystem Output Initialization

Conditional Subsystem Initial Output Values

Specify initial output values for a conditional subsystem.

Conditional Subsystem Output Values When Disabled

Specify output behavior when conditional subsystem is disabled.

Simplified Initialization Mode

Control initial values for conditional subsystems.

Classic Initialization Mode

Control initial values for conditional subsystems.

Convert from Classic to Simplified Initialization Mode

Change the initialization mode.

Export Function Models

Export-Function Models

Overview of export-function models and requirements for building models.

Featured Examples

Was this topic helpful?