事件函数
自定义默认模型初始化和终止方法
通过向默认模型初始化和终止方法中添加自定义例程,对动态启动和关闭行为进行建模。在仿真过程中,用事件控制方法何时执行。创建用初始值重新初始化(重置)模块的函数。
模块
Initialize Function | 在发生模型初始化事件时执行子系统 |
Reset Function | Execute subsystem on model reset event |
Terminate Function | Execute subsystem on model terminate event |
State Reader | Read a block state |
State Writer | Write to a block state |
Parameter Writer | Write to block parameter or model workspace variable |
主题
- 使用初始化、重置和终止函数
用初始化函数调用事件设置模块的状态。用终止函数调用事件保存模块的状态。
- Create Test Harness to Generate Function Calls
Schedule initialize, reset, and terminate function-call events.
- Initialize and Reset Parameter Values
Use the Parameter Writer block to change block parameter values during model simulation.
- Initialize, Reinitialize, Reset, and Terminate Function Limitations
List of unsupported blocks and features.