Main Content

na_0009: Entry versus propagation of signal labels

Since R2020a

Guideline Publication

Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — Not supported

MATLAB Versions

All

Rule

Sub ID a

When a label is displayed for a signal, the following rules define whether that label is created there (entered directly on the signal) or propagated from its true source (inherited from elsewhere in the model by using the < character).

Signal labels shall be entered for signals that originate from:

  • The Inport block at the root (top) level of a model

  • Basic blocks that perform a transformative operation (For the purpose of interpreting this rule only, the Bus Creator, Mux, and Selector blocks also perform transformative operations.)

Signal labels shall be propagated for signals that originate from:

  • Inport block in a nested subsystem

  • Basic blocks that perform a non-transformative operation

  • Subsystem block or Stateflow Chart (Stateflow) block.

Exceptions

When the nested subsystem is a library subsystem, a label can be entered on the signal coming from the Inport block to accommodate reuse of the library block.

When the connection originates from the output of a library subsystem block, a new label can be entered on the signal to accommodate readability.

Custom Parameter

Not Applicable

Rationale

Sub ID a:

  • The result of executing a MATLAB command is reflected in the code, which makes consistency between the model and code difficult to maintain.

Verification

Model Advisor check: Check for propagated signal labels (Simulink Check)

Last Changed

R2020a

Version History

Introduced in R2020a