Mask a Linked Block

This example shows the steps for creating masks on linked blocks. To view the example model, click Mask Linked BlocksMask Linked Blocks.

Create a Custom Library With Mask on Link Block

  1. From the Simulink Library Browser, select File > New > Library .

  2. Drag the Ramp block to the Library editor window.

  3. Right-click the Ramp block and select Mask > Create Mask.

    The Mask Editor opens.

  4. In the Icons & Ports tab, enter the following command in the Icon drawing commands pane:

    plot ([0:10],[0,1:10])
  5. Click the Promote underlying block parameter(s) to this mask parameter button.

    Add Slope and Initial Output to the promoted parameters list, and click OK. Add a custom parameter Company Notes.

  6. Rename the block to Derived Ramp Block.

Add a Mask to the Masked, Link Block

  1. From the Simulink® Library Browser, select File > New > Model.

  2. Drag the Derived Ramp Block to the Model.

The Derived Ramp Block in the model has multiple masks on it. You can set parameters of the derived mask.

View Masks Below the Top Mask

  • Right click the Derived Ramp Block in the model and select Mask > View Base Mask. This opens the Mask Editor displaying the base mask definition.

Was this topic helpful?