Main Content

jc_0901: Length restriction for Bus and Enumeration data type names

Since R2024b

Guideline Publication

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

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — a

MATLAB Versions

All

Rule

Sub ID a

The number of characters in a bus object name, enumeration class name, or enumeration member name shall be less than or equal to the configured limit. The default is 63.

Custom Parameter

  • Maximum number of characters for bus object names

  • Maximum number of characters for enumeration class names

  • Maximum number of characters for enumeration member names

Note

The MATLAB limit for the number of characters you can use bus object names, enumeration class names, or enumeration member names is 2048.

Example — Incorrect

When the maximum number of characters is set to 31. The bus object, enumeration class, and enumeration member names are longer than 31 characters.

Rationale

Sub ID a:

  • Deviation reduces readability.

  • Deviation makes it difficult to maintain the integrity of the model and code.

Verification

Model Advisor check: Check length of bus and enumeration data type names (Simulink Check)

Last Changed

R2024b

Version History

Introduced in R2024b