有条件地执行的子系统概述
一种有条件地执行的子系统is a nonvirtual subsystem that allows you to control its execution with an external signal. The external signal, called the控制信号,附属于控制输入港口。创建包含其执行取决于其他组件的组件的复杂模型时,条件子系统非常有用。
金宝app®金宝app支持这些类型的条件子系统:
启用子系统— Executes at each time step while the control signal is positive. Execution starts at the time step when the control signal crosses zero from the negative to the positive direction. See使用已启用的子系统。
触发的子系统 - 当控制信号升高或落到零或交叉零时时执行在每次步骤。看使用触发子系统。
启用和触发的子系统— Executes at the time step when the enable control signal has a positive value and the trigger control signal rises or falls to zero. See使用启用和触发的子系统。
消息触发的子系统 - 使用消息作为控制信号,每当消息在控制端口可用时执行,无关,无关,无关。看使用消息轮询和消息触发子系统。
消息轮询子系统 - 使用消息作为控制信号,并在控制端口处提供消息时执行每次步骤。看使用消息轮询和消息触发子系统。
函数呼叫子系统 - 当控制信号接收到函数调用事件时执行。事件可以在时间步骤中发生一个或多个时间。州流®chart,功能呼叫生成器堵塞,S函数块,或者击球block can provide function-call events. See使用函数呼叫子系统。
有条件地执行的子系统或有条件执行的引用模型运行:
一次在当前时间步骤启用时,由控制块启用。控制块实现类似于由编程语言语句表示的控制逻辑,例如
if-thel-else
orswitch
。一次在当前时间步骤启用或由控制信号或动作信号触发时。
在接收函数呼叫事件时,在时间步长一次或多次。