A mask is a custom user interface for a block that hides the block's contents, making it appear to the user as an atomic block with its own icon and parameter dialog box. The Mask Editor, helps you to:
Design mask dialog box containing any of the Parameter, Display, and Action dialog controls.
Promote all or some of the block parameters from underlying blocks.
Add custom icons to a block mask. The mask icon can change dynamically based on changes in parameter values.
Add initialization code and initialize variables. Variables initialized by the mask can be passed along to the underlying block parameters.
Create mask callbacks that run MATLAB® code when mask dialog is opened, parameters are changed, you do an update diagram, or simulate a model.
Provide mask documentation and set mask block type.
For information on creating or editing masks in Simulink®, see Masking.
You can open the Mask Editor for a block, in one of following ways:
To create a new mask, select the block to be masked, and from the Diagram menu, select Mask > Create Mask. You can also right click the block context menu, and select Mask > Create Mask.
To edit an existing mask, select the masked block, and from the Diagram menu, select Mask > Edit Mask. You can also right click the block context menu, and select Mask > Edit Mask.
You can also open the Mask Editor using the keyboard shortcut Ctrl+M (on all platforms, including Macintosh).
The Mask Editor opens, looking similar to the figure below. If the block is already masked the mask definition appears on the editor. You can change the mask as needed.
The Mask > Look Under Mask option shows the following:
For a subsystem block, shows the blocks inside the masked subsystem.
For regular masked block, shows the built-in block dialog box.
For linked masked blocks, shows the base mask dialog box.
The Mask Editor contains a set of tabbed panes, each of which enables you to define a feature of the mask:
The Icon & Ports pane enables you to define the block icon. See Icon & Ports Pane.
The Parameters & Dialog pane enables you to design the mask dialog box. See Parameters & Dialog Pane.
The Initialization pane enables you to specify the initialization commands. See Initialization Pane.
The Documentation pane enables you to define the mask type, mask description, and the mask help. See Documentation Pane.
Following buttons appear on the Mask Editor: