主要内容

活动听众

将事件端口添加到一个subsystem block

  • Library:
  • Ports & Subsystems

  • 活动听众block

Description

将事件端口添加到一个Subsystemblock.

Parameters

expand all

选择子系统的事件类型以执行初始化,重置或终止算法。

Initialize

选择触发执行初始化函数block with an initialize event.

Terminate

Select to trigger the execution of aTerminate Function带有终止事件的块。

重置

选择触发执行初始化函数block reconfigured as a重置Functionblock with a reset event.

Programmatic Use

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

指定事件名称重置Functionblock

重置

Default name on the face of the重置Functionblock.

事件名称

用户输入的名称显示在face of the Reset Functionblock, and the name of the reset event port on theModel包含重置Functionblock.

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 theEventparameter to重置.

Programmatic Use

Block Parameter:EventName
Type:character vector
Value:'reset'|''
Default:'reset'

Control activating the variant control (condition) defined with theVariant Controlparameter.

off

Deactivate variant control of subsystem.

Activate variant control of subsystem.

Dependency

Selecting this parameter, enables the变体控制Generate preprocessor conditionalsparameters.

当您选择时Enable variant conditionparameter, the badge indicates the change.

Programmatic Use

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

Note

  • The重置event port of aModelblock can be conditional and propagates the net Variant conditions defined on the corresponding重置引用模型中的功能块。

  • InitializeTerminateevent ports are always unconditional because they control both the model default and block-specific initialize and terminate events of the referenced model. If you define an Initialize function block in the referenced model, it corresponds to an explicit initialize event.

Specify variant control (condition) expression that executes a variantInitializefunction,重置function, orTerminate当表达式评估到真的.

Variant

Default name for a logical (Boolean) expression.

逻辑表达式

A logical (Boolean) expression or aSimulink.Variantobject representing a boolean expression.

If you want to generate code for your model, define the variables in the expression asSimulink.Parameterobjects.

Dependency

要启用此参数,请选择Enable variant conditionparameter.

Programmatic Use

Block Parameter:VariantControl
Type:character vector
Value:'Variant'|''
Default:'Variant'

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

off

Does not enclose variant choices within C preprocessor conditional statements.

在为ERT目标生成代码时,会在C预处理器条件语句(#if)中包含变体选择。

Dependency

要启用此参数,请选择Enable variant conditionparameter.

当您选择时Generate preprocessor conditionalsparameter, the badge indicates the change.

Programmatic Use

Block Parameter:GeneratePreprocessorConditionals
Type:character vector
Value:'off'|'on'
Default:'off'