Main Content

Check position of Inport and Outport blocks

Check ID: mathworks.jmaab.db_0042

Guideline: db_0042: Usage of Inport and Outport blocks

Description

Check whether the model contains ports with invalid position and configuration.

In models, ports must comply with the following rules:

  • Place Inport blocks for a subsystem on the left side of the diagram compared to all other blocks and lines connected to the subsystem. You can move the Inport blocks to the right only to prevent signal crossings.

  • Place Inport blocks for a subsystem on the left side of the diagram compared with all other blocks and lines connected to the subsystem. You can move the Inport block to the right only to prevent signal crossings.

  • Avoid using duplicate Inport blocks at the subsystem level if possible.

  • Do not use duplicate Inport blocks at the root level.

Available with Simulink® Check™.

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, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0042_a: Check positions of Inport blocksInport blocks are not placed to left side of the diagram.Place the Inport blocks to the left side of the diagram. Block placement causing signal overlaps can be excluded.
db_0042_b: Check positions of Outport blocksOutport blocks are not placed to right side of the diagram.Place the Outport blocks to the right side of the diagram. Block placement causing signal overlaps can be excluded.
db_0042_c: Check usage of Duplicate Inport blocksPorts are duplicate Inport blocks.
  • If the duplicate Inport blocks are in a subsystem, remove them where possible.

  • If the duplicate Inport blocks are at the root level, remove them.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • In models with multiple subsystems, does not flag all Inport and Outport blocks not aligned in a straight line.

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