Masking Example Models

The Simulink® Masking example models help you to understand and configure mask parameters, properties, and features. The examples are grouped by type. In an example model:

  • To view the mask definition, double-click the View Mask block.

  • To view the mask dialog box, double-click the block.

Goals

Example Models

Related Topics

Add Parameters control type to mask dialog box. For example, Evaluate, Tune, Add Image, Pop-up, Combo-box, Slider and Dial, Slider Range

Mask Parameters

Mask Editor Overview

  • Add an opaque mask with visible port labels (Icon Transparency).

  • Specify Run Initialization instructions

Mask Icon Drawing

Mask Editor Overview

Use dialog layout options to:

  • Add horizontal stretch on mask dialog box

  • Group multiple parameters in to tabs

  • Create a dynamic pop-up parameter

  • Create a collapsible content panel in a mask dialog box

  • Create a table container to group multiple parameters

Dialog Layout Options

 

Promote parameters to a mask

Mask Parameter Promotion

Promote Parameter to Mask

Execute Mask Callback

Mask Callbacks

Mask Callback Code

Display an Image as icon on a mask

Mask Display and Initialization

Add Image to Block Icon
  • Make a parameter invisible in the mask

  • Disable a mask parameter

Dynamic Mask Dialog

 

Set a mask to be self-modifying

Self-Modifying Library Masks

Create Self-Modifying Mask

Use MATLAB graphics to create a MATLAB GUI and use it as mask dialog

Handle Graphics in Masking

 

Mask a variant subsystem

Masking Variant Blocks

 

Create a self-modifiable interface block

Self-Modifiable Interface Blocks

 

There are certain bad practices, which when followed may result in unexpected behavior of the masking features. The following table shows some of the bad practices.

Bad Practice

Example Models

Use of Mask callbacks, where the callback modifies entities outside of its scope may result in unexpected behavior

Unsafe Mask Callback Error

Setting parameters outside of the hierarchical boundary in nested masks may lead to unexpected behavior

Nested Mask Error

Related Topics