Main Content

Check for display of block parameter

Check ID: mathworks.maab.db_0140

Guideline: db_0140: Display of block parameters

Description

Identify block parameters that are not displayed in the model.

Model diagrams should display block parameters that have values other than default values. One way of displaying this information is by using the Block Annotation tab in the Block Properties dialog box.

For a list of block parameter default values, see Programmatically Specify Block Parameters and Properties.

Tip

If you use the add_block function with 'built-in/blocktype' as a source block path name for Simulink® built-in blocks, some default parameter values of some blocks are different from the defaults that you get if you added those blocks interactively by using Simulink.

This check requires a Simulink Check™ license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline provides only one sub ID.

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — No recommendations

  • JMAAB — a

To customize the block parameters for this check, use the Model Advisor Configuration Editor.

  1. Open the Model Advisor Configuration Editor and search for check ID db_0140.

  2. Use the List of Block Types table to delete or add a parameter for the block.

  3. Select the Flag only if Default Values are changed checkbox to flag only if the default values are modified and this adheres to JMAAB v3.0. By default, it is not selected and this adheres to JMAAB v5.0.

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
Block parameters that are not displayed in the model.In the Block Properties dialog box, use the Block Annotation tab to add block parameters.

Action Results

You can use the Add non-default values into block annotation button to add an annotation to the block display that specifies the nondefault block parameter that was flagged in the analysis. Rerun the check; the block is no longer flagged.

Capabilities and Limitations

  • Only customizable for block-specific parameters, see Programmatically Specify Block Parameters and Properties.

  • Runs on library models.

  • Analyzes content of library linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.