Mask Blocks and Promote Parameters

Mask Built-In Blocks Directly and Within Subsystems

You can directly mask built-in blocks with the Mask Editor to provide custom icons and dialog boxes. In the Mask Editor, you can choose to promote any underlying parameter of any block to the mask. For subsystems, you can choose to promote parameters from any child blocks. For a subsystem block, you can associate a single mask parameter with multiple promoted parameters if they are of the same type. Changing the value of the mask parameter also sets the value of the associated promoted parameters.

You can use masking in the following use cases:

  • You can directly mask a built-in block to simplify the interface and add custom parameters.

  • You can promote multiple parameters from child blocks to a single mask parameter for a subsystem block.

  • You can promote all parameters for a directly masked built-in block, and then choose a subset of the parameters to keep in the mask.

Create Custom Interface for Multiple Parameters in Subsystem

You can promote multiple parameters from child blocks to a single mask parameter for a subsystem block. This enables you to use a simplified single setting in the mask to set multiple child block parameters (of the same type) in the subsystem.

The following example demonstrates this capability. It recreates the functions of the Ramp block by using other blocks in a subsystem, and then masking the subsystem to create a simplified custom interface.

The Mask Editor contains a selection of promoted parameters from underlying blocks within the subsystem. The selected parameter has three underlying parameters of the same type promoted to the same mask parameter.

The Promoted parameter selector dialog shown next demonstrates how to specify this setup. Three parameters of the same type, from different child blocks, are added to the Promoted parameters list to promote to the currently selected mask parameter.

The mask shows the four parameters specified in the Mask Editor.

When you select the Interpret vector parameters as 1-D check box on the mask, you also set the underlying promoted parameters in the three child blocks.

Was this topic helpful?