Main Content

Check subsystem names

Check ID: mathworks.jmaab.jc_0201

Guideline: jc_0201: Usable characters for subsystem names

Description

Checks if subsystem names adhere to the following guideline standards.

  • Do not begin with a number.

  • Do not begin or end with an underscore.

  • Do not contain consecutive underscores.

  • Do not coincide with reserved MATLAB® words.

  • Contain only alphanumeric characters and underscores.

Note

Reserved MATLAB words include the following:

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, c, d, e, f

  • JMAAB — a, b, c, d, e, f

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0201_a: Characters allowed for subsystem namesOne or more subsystems have invalid names.Use only alphanumeric characters and underscores in subsystem names.
jc_0201_b: Number at the beginningOne or more subsystem names begin with a number.Use alphabetic characters at the beginning of subsystem names.
jc_0201_c: Underscore at the beginningOne or more subsystem names begin with an underscore.Use alphabetic characters at the beginning of subsystem names.
jc_0201_d: Underscore at the endOne or more subsystem names end with an underscore.Do not end subsystem names with underscores.
jc_0201_e: Consecutive underscoresOne or more subsystem names have consecutive underscores.Do not use consecutive underscores in subsystem names.
jc_0201_f: Single reserved MATLAB word The subsystem name is a reserved MATLAB word.Do not use reserved MATLAB words as subsystem names.

Capabilities and Limitations

  • Applicable to Non-Virtual subsystems, only. If you want to run this check on Virtual Subsystems, select the input parameter Check Virtual Subsystems from the Model Advisor Configuration Editor.

  • Runs on library models.

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

  • Supports exclusions of blocks or charts.

Edit-Time Checking

This check is supported by edit-time checking.