Contents

jm_0010: Port block names in Simulink models

ID: Title

jm_0010: Port block names in Simulink® models

Priority

Strongly recommended

Scope

MAAB

MATLAB Versions

All

Description

For some items, though you may not be able to define a single approach for internal processes of all organizations, within a given organization, try to follow a single, consistent approach. An organization applying the guidelines must enforce one of the following options:

  • Names of Inport and Outport blocks must match corresponding signal or bus names.

    Exceptions:

    • When any combination of an Inport block, an Outport block, and any other block have the same block name, use a suffix or prefix on the Inport and Outport blocks.

    • One common suffix / prefix is _in for Inport blocks and _out for Outport blocks.

    • You may use any suffix or prefix on the ports, however, the prefix that you select must be consistent.

    • Library blocks and reusable subsystems that encapsulate generic functionality.

  • When names of Inport and Outport blocks are hidden, apply a consistent naming practice for the blocks. Suggested practices include leaving the default names (for example, Out1), giving them the same name as the associated signal, or giving them a shortened or mangled version of the name of the associated signal.

Rationale

  • Readability

  • Workflow

  • Code Generation

  • Simulation

Last Changed

V2.0

Model Advisor Check

By Task > Modeling Standards for MAAB > Simulink > Check for matching port and signal names

Was this topic helpful?