创建块面具
Create customized appearance, create user–defined interface, encapsulate logic, and hide data for subsystems and custom blocks
金宝app®enables you to create block masks. A mask is a custom user interface for a block.
By masking a block you encapsulate the block diagram to have its own parameter dialog box with its own block description, parameter prompts, and help texts.
You can mask an independent custom block that you can reuse as unique blocks like those defined in Simulink.
To know about creating a block mask, seeCreate a Simple Mask.
Classes
Simulink.Mask |
Control masks programmatically |
Simulink.Mask.Constraints |
创建掩码约束 |
Simulink.Mask.PortConstraints |
通过编程创建掩码端口约束 |
Simulink.Mask.ParameterCondition |
创建掩码参数条件 |
Simulink.Mask.PortConstraintRule |
创建一个实例Simulink.Mask.PortConstraintRule 定义端口约束的规则 |
Simulink.Mask.PortIdentifier |
创建端口标识符以识别蒙版对象中块的端口 |
Simulink.MaskParameter |
Control mask parameters programmatically |
Simulink.Mask.EnumerationBase |
Derive an enumeration class to hold numeric values of any datatype |
金宝appsimulink.mask.enumerationTypeoptions |
Parse information from enumeration file derived from金宝appsimulink.intenumtype 和Simulink.Mask.EnumerationBase |
金宝appsimulink.dialog.control |
创建对话控件的实例 |
金宝appsimulink.dialog.parameter.customtable |
Create custom tables programmatically |
金宝appsimulink.dialog.listboxcontrol |
控制列表框以编程方式 |
金宝appsimulink.dialog.treecontrol |
以编程的方式控制树控件 |
Simulink.dialog.LookupTableControl |
Control mask lookup tables programmatically |
Simulink.dialog.LookupTableControl.Table |
蒙版查找表的控制表数据 |
金宝appsimulink.dialog |
掩码查找表的控制断点数据集 |
Topics
掩盖简介
- 掩盖基本面
Learn the basics about masking and when to mask blocks. - Create a Simple Mask
Create and customize a block mask. - 管理现有的口罩
查看或编辑现有的块蒙版。
蒙版编辑器用户界面
- 蒙版编辑概述
Create and customize masks using the Mask Editor interface. - 使用DatatyPest参数指定数据类型
为编辑掩码参数添加数据类型约束。 - Design a Mask Dialog Box
Try this example to create a mask dialog box and understand the use of some Mask Editor features. - Handling Large Number of Mask Parameters
通过编程表中的表中添加大量掩码参数。 - 自定义蒙版块的表
Add custom tables to mask dialog box. - 通过编程控制自定义表
Use a programmatic interface to control custom tables.
Masking Features
- 使用约束验证蒙版参数
Add validation to mask parameters using constraints. - 自定义蒙版参数约束
A mask can contain parameters that accept user input values. - 在多个块掩码上共享参数约束
此示例向您展示了如何创建参数约束并在多个块蒙版或模型上共享它。 - Validate Input and Output Port Signals Using Port Constraints
You can validate compile-time signal attributes on the input and output ports of a masked block by using port constraints. - 蒙版回调代码
Add and execute mask callback code. - 初始化蒙版
使用MATLAB®code to initialize a block mask. - Promote Block Parameters on a Mask
块和子系统可以具有与之关联的多个参数。 - 通过编程控制掩码
Simulink® defines a set of parameters that help in setting and editing masks. - Pass Values to Blocks Under the Mask
Specify input values using the mask dialog box. - Mask Linked Blocks
Add custom interface to linked blocks. - 使用蒙版或模型工作区控制变体块的主动变体选择的方法
This example shows different approaches to control the active choice of inline variant and Variant Subsystem blocks from a mask or a model workspace. - 定义蒙版块的测量单元
Set measurement units for output and input ports of a masked block. - 在面具中添加图像
将图像添加为掩码图标,然后将它们保存在SLX文件中。 - Create Hierarchical List in Mask Dialog
在掩码上创建数据层次列表。 - Tune Mask Popup Parameters by Referencing an External Enumeration File
Reference external enumeration file to assign numerical values to popup parameter. - 使用Mask Lookup表控件可视化和编辑N维数据
You can visualize and edit N-dimensional lookup table data in mask dialog using the lookup table control.
Mask Callbacks
- Dynamic Mask Dialog Box
Change the mask dialog box based on user - input. - 动态蒙版子系统
Create masked library blocks that can modify their structural contents. - Debug Masks That Use MATLAB Code
Troubleshoot errors in the mask initialization code.
System Mask
- 系统面具简介
Learn about masking a model. - 创建并引用蒙版模型
交互式掩盖模型。 - Control System Mask Programmatically
Simulink® defines a set of parameters to configure and edit a system mask.
Example Models
- Masking Example Models
View Simulink models that demonstrate masking capabilities.