Main Content

Check position of conditional blocks and iterator blocks

Check ID: mathworks.jmaab.db_0146

Guideline: db_0146: Block layout in conditional subsystems

Description

Locate blocks that define subsystems as conditional or iterative at the top of the subsystem diagram.

This check requires a Simulink® Check™ license.

Check Parameterization

This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

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 — a, b

  • JMAAB — a, b

The default block position can be configured by using the parameter Block Position from the Model Advisor Configuration Editor.

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

  2. Enter the position of the block to check in the Block Position field.

    By default, this parameter is set to Top.

  3. Click Apply and save the configuration.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0146_a: Block layout in conditional subsystemTrigger, Enable, and Action Port blocks are not at the top of the subsystem diagram. Move the Trigger, Enable, and Action Port blocks to the top of the subsystem diagram.
db_0146_b: Block layout in iterative subsystemFor Each, For Iterator, and While Iterator blocks are not in the same location on the subsystem diagram.Move the For Each, For Iterator, and While Iterator blocks so they are at a uniform location on the subsystem diagram.

Capabilities and Limitations

  • Sub ID b does not flag the For Each Subsystem, For Iterator Subsystem, and While Iterator Subsystem blocks when they have Inports or Outport blocks.

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • 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.

See Also