添加触发器或功能端口子系统或模型
Simulink / Ports & Subsystems
HDL编码器/端口和子系统
该Triggerblock adds an external signal to control the execution of a subsystem or a model. To enable this functionality, add this block to a子系统块或在模型的根级别是在引用模型块。
然后,配置Trigger块以执行子系统或模型:
Once at each time step, when the value of the control signal changes in a way that you specify.
Multiple times during a time step, when the control signal is a function-call event from a Stateflow®图表,函数调用发生器块,或S-Function块。
PORT_1
- 值描述控制信号值,该值标识的控制信号,返回为标量或矢量。对于输入信号中的每个元素,在给定的时间步长的值是:
1
为导致上升触发的信号
-1
为导致下降触发的信号
2
一个函数调用事件
0
在所有其他情况
要启用该端口,请选择显示输出端口。
数据类型:双
|int8
触发类型
— Select the type control signalrising
(默认)|Falling
|或
|函数调用
选择the type of control signal that executes a subsystem or model.
rising
当控制信号从负值或零值到正值上升子系统或模型的触发器执行。如果初始值是负的,上升信号到零触发执行。
Falling
触发器的执行中高tem or model when the control signal falls from a positive or a zero value to a negative value. If the initial value is positive, a falling signal to zero triggers execution.
或
触发器的执行中高tem or model when the control signal is either rising or falling.
函数调用
执行子系统或当控制信号从一个状态流图表接收函数调用事件建模,函数调用发生器块,或S-功能块。
块参数:TriggerType |
类型:特征向量 |
价值观:'rising' |“下降” |'either' |“函数调用” |
默认:'rising' |
请作为Simuli万博1manbetxnk的功能
— Create Simulink Function blockCreate a万博1manbetxSimulink的功能通过配置方框子系统block that is callable with arguments from a function caller.
删除配置。
配置一子系统块作为万博1manbetxSimulink的功能块。该Trigger块必须驻留在子系统内。
您可以编辑功能的原型,在块面显示为块指定输入和输出参数。
To display and enable this parameter, select函数调用
来自触发类型list.
块参数:Is万博1manbetxSimulinkFunction |
类型:特征向量 |
价值观:“关” |'上' |
默认:“关” |
功能名称
- 指定的Simulink功能块函数名万博1manbetxF
(默认)|函数名指定一个函数名万博1manbetxSimulink的功能块。或者,您可以通过编辑块面的函数原型指定的名称。
F
对于默认名称万博1manbetxSimulink的功能块。
函数名称在面对显示器万博1manbetxSimulink的功能块。
To display and enable this parameter, select函数调用
来自触发类型列表,并选择当作一个Simulin万博1manbetxk的功能复选框。
块参数:FunctionName |
类型:特征向量 |
价值观:'F' |' |
默认:'F' |
启用变种条件
- 控制激活所述变体控制(条件)Control activating the variant control (condition) defined with the控制变异参数。
子系统的停用变形控制。
Activate variant control of subsystem. Selecting this parameter:
启用Variant control参数。
显示变体徽章上指示变体的条件块的面被启用。
To display and enable this parameter, select函数调用
来自触发类型列表,并选择当作一个Simulin万博1manbetxk的功能勾选..
块参数:Variant |
类型:特征向量 |
价值观:“关” |'上' |
默认:“关” |
Variant control
- 指定变体控制(条件)的表达(继承)
(默认)|<逻辑表达式>
指定变体控制(条件)的表达,其执行一个变型万博1manbetxSimulink的功能方框当表达式求true
。
(继承)
对于变异控制默认值。继承了对应所述变体的条件Function Caller块模型。什么时候控制变异is set as(继承)
the value for生成预处理条件is inherited automatically from theFunction Caller块在模型中。
逻辑(布尔)表达或万博1manbetxSimulink.Variant
对象表示的逻辑表达式。
该Function is activated when the expression evaluates totrue
。
如果你想为你的模型生成代码,在表达式定义变量万博1manbetxSimulink.Parameter
对象。
To display and enable this parameter, select函数调用
来自触发类型list, select the当作一个Simulin万博1manbetxk的功能check box and then select the启用变种条件复选框。
块参数:VariantControl |
类型:特征向量 |
价值观:'(继承)' |<逻辑表达式> |万博1manbetxSimulink.Variantobject |
默认:'(继承)' |
生成预处理条件
- 控制封闭变型的选择控制范围内的C预处理器的条件语句封闭变型的选择。
Do not enclose variant choices within C preprocessor conditional statements.
当用于ERT目标,内C预处理条件语句(的#if)围变体的选择生成代码。
要显示并启用此参数,请选择启用变种条件复选框。
块参数:GeneratePreprocessorConditionals |
类型:特征向量 |
价值观:“关” |'上' |
默认:“关” |
功能可见性
- 功能选择范围的知名度scoped
(默认)|全球
选择scope of万博1manbetxSimulink的功能block within subsystem or model.
scoped
Limit accessibility of function to:
Hierarchic level containing the万博1manbetxSimulink的功能block and levels below.
一个层级以上资质。
全球
Function accessible from any part of the model hierarchy.
To display and enable this parameter, select函数调用
来自触发类型列表,然后选择当作一个Simulin万博1manbetxk的功能勾选..
块参数:FunctionVisibility |
类型:特征向量 |
价值观:“作用域” |'全球' |
默认:“作用域” |
启用时指出
— Select how to set block state values保持
(默认)|重启
|继承
选择如何设置块的状态值时,子系统或模型被禁用。
保持
在它们的当前值保留块的状态。
重启
重置块的状态值。
继承
使用保持
or重启
从启动函数调用父子系统设置。如果引发剂的父是模型根,继承的设定是保持
。如果触发了多个启动,将所有引发剂的家长要么保持
or重启
。
要启用此参数,请函数调用
来自触发类型list.
此参数设定只适用于该模型明确地启用和禁用的函数调用子系统。例如:
函数调用子系统驻留在启用的子系统。在这种情况下,该模型能够与父子系统一起禁用函数调用子系统。
函数调用引发剂,其控制函数调用子系统驻留在支持子系统。在这种情况下,该模型使得能够并用含有所述功能呼叫发起者启用子系统沿禁用函数调用子系统。
函数调用引发剂是绑定到特定状态的状态流事件。看到Control Function-Call Subsystems by Using bind Actions(Stateflow的)。
该函数调用initiator is an S-function that explicitly enables and disables the function-call subsystem. SeessEnableSystemWithTid
的一个例子。
块参数:StatesWhenEnabling |
类型:特征向量 |
价值观:'保持' |'重启' |'继承' |
默认:'保持' |
传播尺寸大小可变的信号的
- 选择当传播可变大小的信号在执行过程中
(默认)|只有当启用
选择当传播可变大小的信号。
在执行过程中
传播的可变大小的信号在每个时间步。
只有当启用
Propagate variable-size signals when executing a子系统块或模型块含有启用port,Triggerport with触发类型设置功能 - 通话
, 要么港口行动块。当您选择此选项,采样时间必须是周期性的。
显示和启用此参数用于Trigger端口块,选择函数调用
来自触发类型list.
块参数:PropagateVarSize |
类型:特征向量 |
价值观:'During execution' |“只有当启用” |
默认:'During execution' |
显示输出端口
— Control display of output port用于将信号识别触发信号或函数调用事件信号的输出端口的控制显示。
取出输出端口。
Display the output port and determine which signal caused the trigger signal or function-call event. The width of the output port signal is the width of the control signal. The signal value is:
1
为导致上升触发的信号
-1
为导致下降触发的信号
2
一个函数调用事件
0
在所有其他情况
块参数:ShowOutputPort |
类型:特征向量 |
价值观:“关” |'上' |
默认:“关” |
输出数据类型
- 选择输出端口的数据类型auto
(默认)|双
|int8
选择output port data type for the signal that identifies the trigger signal or function-call event signal.
auto
数据类型是一样的连接到所述输出端口。
双
双重价值。
int8
整数值
要启用此参数,请选择显示输出端口复选框。
该Trigger块忽略数据类型覆盖设置定点工具。
块参数:OutputDataType |
类型:特征向量 |
值:'汽车' |'double' |'INT8' |
Default:'汽车' |
采样时间type
- 选择呼叫率触发
(默认)|定期
选择一个子系统或模型呼叫率。
触发
适用于不具有周期性的函数调用频率的应用。甲函数呼叫发起者可以执行一个触发(非周期性)函数调用子系统的一个或每时间步多次,并且可以提供一系列非周期性函数调用事件。
定期
A function-call initiator can execute a periodic function-call system only once per time step and must provide a series of periodic function-call events.. A Stateflow chart is an example of a function-call initiator.
要启用此参数,请函数调用
来自触发类型list.
块参数:SampleTimeType |
类型:特征向量 |
值:'triggered' |“周期性” |
Default:'triggered' |
采样时间
— Specify time interval-1
(默认)|TS
|[TS,为了]
Specify the time interval between function calls to a subsystem or model containing thisTrigger端口块。如果间隔此参数指定,Simulink中实际呼叫率为子系统或模型不同于时间万博1manbetx®显示错误。
-1
Inherit time interval from the control signal.
TS
标量,其中T s是时间间隔。
[TS,为了]
向量,其中T s是所述时间间隔和To是初始时间偏移。
要启用此参数,请函数调用
来自触发类型列表定期
来自采样时间typelist.
块参数:采样时间 |
类型:特征向量 |
值:'-1' |'TS' |'[Ts时,为了]' |
Default:'-1' |
启用零-crossing detection
- 控制过零检测Control .
检测过零点。
不检测过零点。
要启用此参数,请rising
,Falling
, 要么或
来自触发类型list.
块参数:ZeroCross |
类型:特征向量 |
价值观:'上' |“关” |
默认:'上' |
初始触发信号状态
— Select the initial state of the trigger signal兼容性(在第一评价无触发)
(默认)|零
|positive
|负
选择触发控制信号的初始状态。
兼容性(在第一评价无触发)
没有触发的触发信号的第一评价。如果您选择此选项和Trigger块是一个子系统,其中状态是复位时,块不复位。
零
零。有助于评估在第一时间步骤中的上升沿或下降沿触发信号。
positive
正值。有助于评估在第一时间步长下降触发信号。
负
负值。有助于评估在第一时间步上升触发信号。
要显示并激活此参数,请rising
,Falling
, 要么或
来自触发类型list.
块参数:InitialTriggerSignalState |
类型:特征向量 |
值:“相容性(没有关于第一评估触发)” |'零' |'positive' |'负' |
Default:“相容性(没有关于第一评估触发)” |
端口尺寸
- 指定触发信号维度1
(默认)|[n]的
|[M n]的
指定尺寸用于在外部附接一个触发信号模型块并传递给块的内部。
1
标量信号。
[n]的
宽度的矢量信号ñ
。
[M n]的
Matrix signal having米
行ñ
columns.
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:PortDimensions |
类型:特征向量 |
值:'1' |'[n]的' |'[m n]' |
Default:'1' |
Trigger signal sample time
— Specify time interval-1
(默认)|TS
|[TS,为了]
指定用于块驱动触发信号块的方法执行之间的时间间隔。
-1
继承的时间间隔。
TS
标量,其中T s是时间间隔。
[TS,为了]
向量,其中T s是所述时间间隔和To是初始时间偏移。
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:TriggerSignalSampleTime |
类型:特征向量 |
值:'-1' |'TS' |'[Ts时,为了]' |
Default:'-1' |
Minimum
- 为对触发信号指定最小输出值[]
(默认)|实标用于外部连接到所述触发信号指定最小值模型块并传递给块的内部。
Simulink uses this value to perform:
模拟范围检查。看到指定信号范围。
定点数据类型的自动缩放。
生成的代码优化。这种优化可以删除的算法代码和影响的一些模拟模式,如SIL或外部模式的结果。看到使用指定的最小值和最大值优化(嵌入式编码)。
[]
未指定的最小值。
真正的标量值。
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:OutMin |
类型:特征向量 |
值:'[]' |“<实数标量>” |
Default:'[]' |
最大
- 为对触发信号指定最大输出值[]
(默认)|实标用于外部连接到所述触发信号指定最大值模型块并传递给块的内部。
Simulink uses this value to perform:
模拟范围检查。看到指定信号范围。
定点数据类型的自动缩放。
生成的代码优化。这种优化可以删除的算法代码和影响的一些模拟模式,如SIL或外部模式的结果。看到使用指定的最小值和最大值优化(嵌入式编码)。
[]
未指定的最大值。
真正的标量值。
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:OutMax |
类型:特征向量 |
值:'[]' |“<实数标量>” |
Default:'[]' |
数据类型
— Select output data type for the trigger signal双
(默认)|单
|int8
|UINT8
|INT16
|UINT16
|INT32
|UINT32
|Int64的
|UINT64
|布尔
|fixdt(1,16)
|fixdt(1,16,0)
|fixdt(1,16,2 ^,0)
|<数据类型表达式>
选择data type for the trigger signal attached externally to a模型块并传递给块的内部。
双
双精度浮点运算。
单
Single-precision floating point.
int8
符号的8位整数。
UINT8
无符号的8位整数。
INT16
Signed 16-bit integer.
UINT16
16位无符号整数。
INT32
符号的32位整数。
UINT32
无符号的32位整数。
Int64的
符号的64位整数。
UINT64
无符号的64位整数。
布尔
用一个布尔值true
or假
。
fixdt(1,16)
二进制点符号的16位定点数不确定的。
fixdt(1,16,0)
用二进制点设定为零符号的16位定点数。
fixdt(1,16,2 ^,0)
Signed 16-bit fixed point number with slope set to2 ^ 0
and bias set to0
。
<数据类型表达式>
数据类型的对象,例如万博1manbetxSimulink.NumericType
。不要指定一个总线对象的表达。
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:OutDataTypeStr |
类型:特征向量 |
值:'double' |'单' |'INT8' |'uint8' |'INT16' |'UINT16' |'INT32' |'UINT32' |'int64' |'UINT64' |“布尔” |'fixdt(1,16)' |'fixdt(1,16,0)' |'fixdt(1,16,2 ^ 0,0)' |“<数据类型表达>” |
Default:'double' |
Mode
- 选择数据类型类别内置
(默认)|固定点
|Expression
选择数据类型类别,显示下拉列表来帮助你定义的数据类型。
内置
数据类型显示下拉列表和数据类型覆盖。
固定点
显示下拉列表符号类型,缩放,and数据类型覆盖。
Expression
显示文本框用于输入的表达式。
要启用此参数,选择显示数据类型助手按钮。
无等效命令行参数。
数据插值
- 控制如何丢失工作区数据估计控制如何丢失的工作区数据,估计当从MATLAB加载数据®工作区。
在针对不存在对应的工作区数据的时间步线性插入的输出。
在时间步骤不插值输出。电流输出等于在为其数据存在的最近时间步长的输出。
显示和启用此参数用于Triggerport block at the root-level of a model, selectrising
,Falling
, 要么或
来自触发类型list.
块参数:插 |
类型:特征向量 |
值:'上' |“关” |
Default:'上' |
数据类型 |
|
Direct Feedthrough |
|
多维信号 |
|
可变大小信号 |
|
过零检测 |
|
HDL编码器™提供了影响HDL实现并合成逻辑额外配置选项。也可以看看HDL代码生成。
This block has a single, default HDL architecture.
您单击对应于该MATLAB命令的链接:
在MATLAB命令窗口中输入它运行的命令。Web浏览器不支持MATLAB的命令。万博1manbetx
You can also select a web site from the following list:
选择最佳的网站性能的中国网站(在中国或英文)。其他MathWorks的国家网站都没有从您的位置访问进行了优化。