活动听众
将事件端口添加到一个subsystem block
- Library:
Ports & Subsystems
Description
将事件端口添加到一个Subsystemblock.
Parameters
Event type
— Select event type for subsystem
Initialize
(默认)|Terminate
|重置
选择子系统的事件类型以执行初始化,重置或终止算法。
-
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' |
Event name
- 指定事件名称
重置
(默认)|事件名称
指定事件名称重置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' |
Enable variant condition
— Control activating the variant control (condition)
off (default) | on
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重置引用模型中的功能块。
Initialize和Terminateevent 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.
变体控制
- 指定变体控件(条件)表达式
Variant
(默认)|逻辑表达式
Specify variant control (condition) expression that executes a variantInitializefunction,重置function, orTerminate当表达式评估到真的
.
-
Variant
-
Default name for a logical (Boolean) 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
要启用此参数,请选择Enable variant conditionparameter.
Programmatic Use
Block Parameter:VariantControl |
Type:character vector |
Value:'Variant' |' |
Default:'Variant' |
Generate preprocessor conditionals
— Select if variant choices are enclosed within C preprocessor conditional statements
off (default) | on
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' |
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
欧洲
- Belgium(English)
- 丹麦(English)
- Deutschland(德意志)
- España(Español)
- Finland(English)
- 法国(Français)
- 爱尔兰(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- 挪威(English)
- Österreich(德意志)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)