Documentation

Event Listener

Add event port to a subsystem block

  • Library:
  • Ports & Subsystems

Description

Add event port to a Subsystem block.

Parameters

expand all

Select event type for subsystem to execute initialize, reset, or terminate algorithms.

Initialize

Select to trigger the execution of an Initialize Function block with an initialize event.

Terminate

Select to trigger the execution of a Terminate Function block with a terminate event.

Reset

Select to trigger the execution of an Initialize Function block reconfigured as a Reset Function block with a reset event.

Programmatic Use

Parameter:EventType
Type: character vector
Value: 'Initialize' | 'Terminate' | 'Reset'
Default: 'Initialize'

Specify event name for Reset Function block

Reset

Default name on the face of the Reset Function block.

event name

User entered name displayed on the face of the Reset Function block, and the name of the reset event port on the Model block containing the Reset Function block.

When tying the name for a reset function, the auto-completion list provides some suggestions. The list is not complete.

Dependency

To enable this parameter, set the Event parameter to Reset.

Programmatic Use

Parameter: EventName
Type: character vector
Value: 'reset' | '<event name>'
Default: 'reset'

Control activating the variant control (condition) defined with the Variant Control parameter.

off

Deactivate variant control of subsystem.

on

Activate variant control of subsystem.

Dependency

Selecting this parameter, enables the Variant control and Generate preprocessor conditionals parameters.

Programmatic Use

Parameter: Variant
Type: character vector
Value: 'off' | 'on'
Default: 'off'

Specify variant control (condition) expression that executes a variant Initialize function, Reset function, or Terminate function block when the expression evaluates to true.

Variant

Default name for a logical (Boolean) expression.

logical expression

A logical (Boolean) expression or a Simulink.Variant object representing a boolean expression.

If you want to generate code for your model, define the variables in the expression as Simulink.Parameter objects.

Dependency

To enable this parameter, select the Enable variant condition parameter.

Programmatic Use

Parameter: VariantControl
Type: character vector
Value: 'Variant' | '<logical expression>'
Default: 'Variant'

Select if variant choices are enclosed within C preprocessor conditional statements.

off

Does not enclose variant choices within C preprocessor conditional statements.

on

When generating code for an ERT target, encloses variant choices within C preprocessor conditional statements (#if).

Dependency

To enable this parameter, select the Enable variant condition parameter.

Programmatic Use

Parameter: GeneratePreprocessorConditionals
Type: character vector
Value: 'off' | 'on'
Default: 'off'
Was this topic helpful?