Main Content

Customize Tables for Masked Blocks

The Custom Table parameter allows you to add customized table with structured data on a mask dialog box without writing custom codes. As a mask parameter, the custom table widget supports parameter promotion unlike the tables created using custom block dialog code.

You can provide input to the Custom Table parameter as a string in the cell array format.

Adding a Custom Table Parameter

  1. Open a Simulink® model.

  2. Select any block and on the Block tab, in the Mask group, click Create Mask. The Mask Editor opens.

  3. In the Parameters & Dialog tab, click Custom Table to add it to the mask as a parameter. Specify a name and prompt for the parameter, as required.

  4. In the Property Editor pane, click the Edit icon in the Columns field to specify the column properties like the number of columns, name of each column, and type of column. The available column types are edit, checkbox, and popup. Use the Add button to add a column and Remove button to remove an existing column.

  5. Enter the values for the table in the Value field of Property Editor as a string in the cell array format. For example, if the value is given as:

    { 'sig1', 'Input', 'Inherit', 'Inherit', 'on', 'Inherit';...
     'sig2', 'Input', 'Inherit', 'Inherit', 'on', 'Inherit';...
     'sig3', 'Output', '10', 'Inherit', 'off', 'Inherit';...
     'sig4', 'Output', '10', 'Inherit', 'off', 'Inherit' }
    The table created is:

  6. Click Apply to save the changes to the mask. If you want to edit the table, right click and select Mask > Edit Mask.

Related Topics