Main Content

Introduction to System Mask

A system mask can be applied to a model or a subsystem block diagram. A model consists of multiple blocks, with each block containing its own parameter and block dialog box.

The advantages of using a system mask are:

  1. A system mask allows you to customize the appearance and behavior of a block to specific requirements or modeling scenarios.

  2. Enable the parameterization of Simulink® blocks by exposing key parameters through the mask interface.

  3. Enhance the reusability of Simulink blocks by encapsulating custom functionality and parameters within a system mask. You can create blocks with predefined behaviors that can be easily reused in different models or projects. This reusability not only saves time but also promotes consistency and standardization across different simulations.

When you reference a masked model from a Model block, a mask is generated automatically on the Model block. The generated mask on the Model block is a copy of the model mask that it is referencing. You can reference a masked model from multiple Model block instances.

Consider a model that represents the DC motor equation. Plant in this model is a Model block that references a masked model, simplifying the user interface.

Create a system mask

The Plant block contains the same mask as that of the masked model and the mask is uneditable. The mask can only be edited from the Mask Editor dialog box of the masked model.

Limitations

Mask initialization code is not supported for system mask on a model. This is to prevent any direct modification of the referenced model from the Model block.

Related Topics