本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。
Simulink® 允许您创建模块封装。封装是用于模块的一种自定义用户界面。
通过封装模块,可以将模块图封装起来,使其拥有自己的参数对话框,以及自己的模块说明、参数提示和帮助文本。
您可以封装独立的自定义模块以作为独特模块重复使用,就像 Simulink 中定义的模块一样。
要了解如何创建模块封装,请参阅创建简单封装。
Simulink.Mask | 以编程方式控制封装 |
Simulink.Mask.Constraints | Create Mask Constraint |
Simulink.MaskParameter | 以编程方式控制封装参数 |
Simulink.dialog.Control | Create instances of dialog control |
Simulink.dialog.parameter.CustomTable | Create custom tables programmatically |
Simulink.dialog.ListboxControl | Control listbox programmatically |
Simulink.dialog.TreeControl | Control Tree control programmatically |
了解有关封装和何时封装模块的基础知识。
创建和自定义模块封装。
View or edit an existing block mask.
使用 Mask Editor 界面创建和自定义封装。
为 Edit 封装参数添加数据类型约束。
使用 Parameters & Dialog 窗格设计封装对话框
尝试此示例以创建一个封装对话框并了解某些 Mask Editor 功能的用途。
Handling Large Number of Mask Parameters
Add large number of mask parameters in a Table programmatically.
Customize Tables for Masked Blocks
Add custom tables to mask dialog box.
Control Custom Tables Programmatically
Use Command Line Interface to control custom tables.
Validating Mask Parameters Using Constraints
Add validation to mask parameters using constraints.
Create custom constraints using MATLAB logical expressions.
添加并执行封装回调代码。
使用 MATLAB® 代码初始化模块封装。
Expose specific block parameters to the mask.
从 MATLAB 命令行创建和编辑模块封装。
使用封装对话框指定输入值。
Add custom interface to linked blocks.
Recommended way to mask a Variant Subsystem block.
Define Measurement Units for Masked Blocks
Set measurement units for output and input ports of a masked block.
Add images as mask icons and save them in the SLX file.
Create Hierarchical List in Mask Dialog
Create a hierarchical list of data on a mask.
基于用户输入更改封装对话框。
创建可以修改其结构性内容的封装库模块。
Debug Masks That Use MATLAB Code
Troubleshoot errors in the mask initialization code.
Learn about masking a model.
Create and Reference a Masked Model
How to mask a model interactively.
Control Model Mask Programmatically
How to mask a model programmatically.
View Simulink models that demonstrate masking capabilities.
Create icons on mask using drawing commands.
Create a Custom Table in the Mask Dialog
Create a custom table on a mask dialog box.