配置 MATLAB S-Function 的模块功能
在 S-Function 中实现采样时间、输入和输出函数
MATLAB® S-Function 允许您通过各种 S-Function API 配置扩展的模块功能。
创建和配置输入/输出端口。
指定基于模块和基于端口的采样时间。
使用 DWork 向量分配内存
将参数传递给 S-Function。
创建运行时参数
方法
类
Simulink.BlockPreCompInputPortData | Provide precompilation information about block input port |
Simulink.BlockPreCompOutputPortData | Provide precompilation information about block output port |
Simulink.MSFcnRunTimeBlock | 获取有关 2 级 MATLAB S-Function 模块的运行时信息 |
Simulink.RunTimeBlock | 允许 2 级 MATLAB S-Function 和其他 MATLAB 程序在仿真运行时获取有关模块的信息 |
Simulink.BlockData | Provide run-time information about block-related data, such as block parameters |
Simulink.BlockPortData | Describe block input or output port |
Simulink.BlockCompDworkData | Provide postcompilation information about block's DWork vector |
Simulink.BlockCompInputPortData | Provide postcompilation information about block input port |
Simulink.BlockCompOutputPortData | Provide postcompilation information about block output port |
主题
- Create Input and Output Ports
Create input and output ports on a MATLAB S-function block.
- Specify S-Function Sample Times
How to specify the rate or rates at which your block operates in MATLAB S-functions.
- Use DWork Vectors in S-Functions
Use DWork vectors to allocate block data to memory.
- Inherit Custom Data Types
Inherit custom data types for the values of a block's signals and parameters in MATLAB S-functions.
- Pass Dialog Parameters to S-Functions
Process parameters passed via the MATLAB S-function block dialog box.
- Create and Update S-Function Run-Time Parameters
Create and use run-time parameters in MATLAB S-functions.
- Use MATLAB S-Functions as Sim Viewing Devices in External Mode
Specify MATLAB S-function as a sim viewing device for use in external mode.