Using Simulink    

Creating Mask Dialog Box Prompts

To create the mask for this subsystem, select the Subsystem block and choose Mask Subsystem from the Edit menu.

The mask dialog box shown at the beginning of this section is created largely on the Initialization pane of the Mask Editor. For this sample model, the pane looks like this.

The Mask Editor enables you to specify these attributes of a mask parameter:

Generally, it is convenient to refer to masked parameters by their prompts. In this example, the parameter associated with slope is referred to as the Slope parameter, and the parameter associated with intercept is referred to as the Intercept parameter.

The slope and intercept are defined as edit controls. This means that the user types values into edit fields in the mask dialog box. These values are stored in variables in the mask workspace (see The Mask Workspace). Masked blocks can access variables only in the mask workspace. In this example, the value entered for the slope is assigned to the variable m. The Slope block in the masked subsystem gets the value for the slope parameter from the mask workspace. This figure shows how the slope parameter definitions in the Mask Editor map to the actual mask dialog box parameters.

After you have created the mask parameters for slope and intercept, press the OK button. Then, double-click on the Subsystem block to open the newly constructed dialog box. Enter 3 for the Slope and 2 for the Intercept parameter.


 A Sample Masked Subsystem Creating the Block Description and Help Text