Model Advisor Checks for MAB and JMAAB Compliance

Modeling Standards for MAB — Compliance Checks

You can use the Model Advisor to verify compliance of your model with the MathWorks® Advisory Board (MAB) guidelines.

A Simulink® Check™ license is required to execute these MAB checks. Where applicable, additional license requirements are identified in the check-specific documentation.

To access the checks in the Model Advisor, see Accessing the MAB and JMAAB Model Advisor Checks. To run the Model Advisor checks, see Run Model Advisor Checks and Review Results.

When executing the checks by using the By Task folder, MAB checks are classified into the following groups:

Naming Conventions

Checks that verify compliance of the model with MAB naming conventions guidelines.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Simulink

Checks that verify compliance of the model with MAB guidelines for Simulink configuration parameters, diagram appearance, signals, block consistency, conditional subsystem relations, operation blocks, and other miscellaneous blocks.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Stateflow

Checks that verify compliance of the model with MAB guidelines for Stateflow® blocks/data/events, diagrams, conditional transition/Action, label descriptions, and other miscellaneous components.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

MATLAB

Checks that verify compliance of the model with MAB guidelines for MATLAB Functions.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Modeling Standards for JMAAB — Compliance Checks

You can use the Model Advisor to verify compliance of your model with the Japan MATLAB® Automotive Advisory Board (JMAAB) guidelines.

A Simulink Check license is required to execute these JMAAB checks. Where applicable, additional license requirements are identified in the check-specific documentation.

To access the checks in the Model Advisor, see Accessing the MAB and JMAAB Model Advisor Checks. To run the Model Advisor checks, see Run Model Advisor Checks and Review Results.

When executing the checks by using the By Task folder, JMAAB checks are classified into the following groups:

Naming Conventions

Checks related to the naming conventions.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Model Architecture

Checks that verify compliance of the model with JMAAB model architecture guidelines.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Model Configuration Options

Checks that verify compliance of the model with JMAAB configuration options guidelines.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Simulink

Checks that verify compliance of the model with JMAAB guidelines for Simulink blocks and components.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Stateflow

Checks that verify compliance of the model with JMAAB guidelines for Stateflow charts and components.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

MATLAB Functions

Checks that verify compliance of the model with JMAAB guidelines for MATLAB Functions.

For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.

Check file names

Check ID: mathworks.jmaab.ar_0001

Description

Checks weather the file names meet the guideline standards.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub-IDs that are 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
ar_0001_a: Characters allowed for file namesOne or more files have invalid names.Use alphanumeric characters and underscores in file names.
ar_0001_b: Number at the beginningOne or more files have numbers at the beginning of the file name.Use alphabetic characters at the beginning of the file names.
ar_0001_c: Underscore at the beginningOne or more files have underscores at the beginning of the file name.Use alphabetic characters at the beginning of the file names.
ar_0001_d: Underscore at the endOne or more files have underscores at the end of the file name.Do not end the file names with underscores.
ar_0001_e: Consecutive underscoresOne or more files have consecutive underscores in the file name.Do not use consecutive underscores in the file names.
ar_0001_f: Single Reserved MATLAB word One or more files have reserved MATLAB words as the file name.Do not use reserved MATLAB word as the file name.
ar_0001_g: Identical file names on pathOne or more files have names which are identical to files present in MATLAB path.Use unique file names.

Capabilities and Limitations

  • This check can be configured to run on the hidden folders by selecting the input parameter Check hidden folders in the Model Advisor Configuration Editor.

  • This check can be configured to check the file names with specific extensions from the input parameterFile Extension in the Model Advisor Configuration Editor.

  • The check does not flag conflicts with C++ keywords.

  • Runs on library models.

See Also

Check folder names

Check ID: mathworks.jmaab.ar_0002

Description

Checks folder names to meet the guideline standards.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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
ar_0002_a: Characters allowed for folder namesOne or more folders have invalid names.Use only alphanumeric characters and underscores in folder names.
ar_0002_b: Number at the beginningOne or more folders have numbers at the beginning of the folder name.Use alphabetic characters at the beginning of the folder names.
ar_0002_c: Underscore at the beginningOne or more folders have underscores at the beginning of the folder name.Use alphabetic characters at the beginning of the folder names.
ar_0002_d: Underscore at the endOne or more folders have underscores at the end of the folder name.Do not end the folder names with underscores.
ar_0002_e: Consecutive underscoresOne or more folders have consecutive underscores in the folder name.Do not use consecutive underscores in the folder names.
ar_0002_f: Single Reserved MATLAB word One or more folders have reserved MATLAB words as the folder name.Do not use reserved MATLAB word as the folder name.

Capabilities and Limitations

  • This check can be configured to check the file names with specific extensions from the input parameterFile Extension in the Model Advisor Configuration Editor.

  • This check can be configured to run on the hidden folders by selecting the input parameter Check hidden folders in the Model Advisor Configuration Editor.

  • Runs on library models.

  • This check also runs on the nested sub directories.

See Also

Check length of model file name

Check ID: mathworks.jmaab.jc_0241

Description

Checks if the length of the model file name adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Model file name does not adhere to the length restriction of 63 characters. Modify the model file name so that the length of the file name is not more than 63 characters.

See Also

Check length of folder name at every level of model path

Check ID: mathworks.jmaab.jc_0242

Description

Checks the length of the folder names at every level of the model path to see if all the folders in the path adhere to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Length of the folder names at every level of the model path does not adhere to the length restriction of 63 characters.Modify the folder names that do not meet the length restriction of 63 characters throughout the path.

See Also

Check Subsystem names

Check ID: mathworks.jmaab.jc_0201

Description

Identifies subsystem names with incorrect characters.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 subsystems have numbers at the beginning of the subsystem name.Use alphabetic characters at the beginning of the subsystem names.
jc_0201_c: Underscore at the beginningOne or more subsystems have underscores at the beginning of the subsystem name.Use alphabetic characters at the beginning of the subsystem names.
jc_0201_d: Underscore at the endOne or more subsystems have underscores at the end of the subsystem name.Do not end the subsystem names with underscores.
jc_0201_e: Consecutive underscoresOne or more subsystems have consecutive underscores in the subsystem name.Do not use consecutive underscores in the subsystem names.
jc_0201_f: Single Reserved MATLAB word One or more subsystems have reserved MATLAB words as the subsystem name.Do not use reserved MATLAB word as the subsystem name.

Capabilities and Limitations

  • This check is only applicable for Non-Virtual subsystems. 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.

See Also

Check character usage in block names

Check ID: mathworks.jmaab.jc_0231

Description

Identifies block names with incorrect characters.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 ID ConditionRecommended Action
jc_0231_a: Characters allowed for block namesOne or more blocks in the model have invalid names.Use only alphanumeric characters and underscores in block name.
jc_0231_b: Number at the beginningOne or more blocks in the model have numbers at the beginning of the block name.Use alphabetic characters at the beginning of the block name.
jc_0231_c: Underscore at the beginningOne or more blocks in the model have underscores at the beginning of the block name.Use alphabetic characters at the beginning of the block name.
jc_0231_d: Underscore at the endOne or more blocks in the model have underscores at the end of the block name.Do not end block names with underscores.
jc_0231_e: Consecutive underscoresOne or more blocks in the model have consecutive underscores in the block name.Do not use consecutive underscores in block name.
jc_0231_f: Single reserved MATLAB wordOne or more blocks in the model use reserved MATLAB words as the block name.Do not use reserved MATLAB word as block name.

Capabilities and Limitations

  • Supports selection of Guideline Sub IDs.

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Supports exclusions of blocks or charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check port block names

Check ID: mathworks.jmaab.jc_0211

Description

Identifies Inport or Outport block names with incorrect characters.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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_0211_a: Characters allowed for port block namesOne or more port blocks have invalid names.Use only alphanumeric characters and underscores in port block names.
jc_0211_b: Number at the beginningOne or more port blocks have numbers at the beginning of the port block name.Use alphabetic characters at the beginning of the port block names.
jc_0211_c: Underscore at the beginningOne or more port blocks have underscores at the beginning of the port block name.Use alphabetic characters at the beginning of the port block names.
jc_0211_d: Underscore at the endOne or more port blocks have underscores at the end of the port block name.Do not end the port block names with underscores.
jc_0211_e: Consecutive underscoresOne or more port blocks have consecutive underscores in the port block name.Do not use consecutive underscores in the port block names.
jc_0211_f: Single Reserved MATLAB word One or more port blocks have reserved MATLAB words as the port block name.Do not use reserved MATLAB word as the port block name.

Capabilities and Limitations

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

See Also

Check length of subsystem names

Check ID: mathworks.jmaab.jc_0243

Description

Checks if the length of the subsystem names in the model adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Subsystem names in the model does not adhere to the length restriction of 63 characters.Modify the subsystem block names so that the length of the subsystem name is not more than 63 characters.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check length of block names

Check ID: mathworks.jmaab.jc_0247

Description

Checks if the length of the block names in the model adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Block names in the model does not adhere to the length restriction of 63 characters.Modify the block names so that the length of the block names is not more than 63 characters.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check length of Inport and Outport names

Check ID: mathworks.jmaab.jc_0244

Description

Checks if the length of the inport and outport names adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Inport or outport block names in the Model does not adhere to the length restriction of 63 characters.Modify the inport or the outport block names so that the length of the block name is not more than 63 characters.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library-linked blocks.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usable characters for signal names and bus names

Check ID: mathworks.jmaab.jc_0222

Description

Checks the signal and bus names in the model.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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_0222_a: Characters allowed for subsystem namesSignal or bus names in the model have invalid names.Use only alphanumeric characters and underscores in signal names and bus names.
jc_0222_b: Number at the beginningSignal or bus names in the model have numbers at the beginning of the name.Use alphabetic characters at the beginning of the signal or bus names.
jc_0222_c: Underscore at the beginningSignal or bus names in the model have underscores at the beginning of the name.Use alphabetic characters at the beginning of the signal or bus names.
jc_0222_d: Underscore at the endSignal or bus names in the model have underscores at the end of the signal or bus name.Do not end the signal or bus names with underscores.
jc_0222_e: Consecutive underscoresSignal or bus names in the model have consecutive underscores in the name.Do not use consecutive underscores in the signal or bus names.
jc_0222_f: Single Reserved MATLAB word Signal or bus names in the model have reserved MATLAB words as the name.Do not use reserved MATLAB word as the signal or bus names.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check usable characters for parameter names

Check ID: mathworks.jmaab.jc_0232

Description

Checks the parameter names in the model.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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_0232_a: Characters allowed for parameter namesThe parameter name contains illegal characters. Use only alphanumeric characters and underscores in parameter names.
jc_0232_b: Number at the beginningThe parameter name starts with a number.Use alphabetic characters at the beginning of the parameter names.
jc_0232_c: Underscore at the beginningThe parameter name starts with an underscore ("_"). Use alphabetic characters at the beginning of the parameter names.
jc_0232_d: Underscore at the endThe parameter name ends with an underscore ("_"). Do not end parameter names with underscores.
jc_0232_e: Consecutive underscoresThe parameter name has consecutive underscores. Do not use consecutive underscores in the parameter names.
jc_0232_f: Single reserved MATLAB wordThe parameter name is a reserved MATLAB words.Do not use reserved MATLAB word as the parameter names.

Capabilities and Limitations

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

See Also

Check length of signal and bus names

Check ID: mathworks.jmaab.jc_0245

Description

Checks if the length of the signal or bus names adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Signal or bus name in the model does not adhere to the length restriction of 63 characters.Modify the signal or the bus names in the model so that the length of the names is not more than 63 characters.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check length of parameter names

Check ID: mathworks.jmaab.jc_0246

Description

Checks if the length of the parameter names in the model adheres to the maximum length restriction of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Parameter names in the model does not adhere to the length restriction of 63 characters.Modify the parameter names so that the length of the parameter names is not more than 63 characters.

Capabilities and Limitations

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked files.

  • Does not support exclusions of blocks or charts.

See Also

Check usable characters for Stateflow data names

Check ID: mathworks.jmaab.jc_0795

Description

Checks if the Stateflow data names in the model are using acceptable characters.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c, d

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0795_a: Underscore at the beginningThe Stateflow data name starts with an underscore ("_"). Rename the Stateflow data.
jc_0795_b: Underscore at the endThe Stateflow data name ends with an underscore ("_"). Rename the Stateflow data.
jc_0795_c: Consecutive underscoresThe Stateflow data name has consecutive underscores. Rename the Stateflow data.
jc_0795_d: Single reserved MATLAB wordThe Stateflow data name is solely a reserved MATLAB word. Consider using a different name for Stateflow data.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: This check does not flag the stateflow data names with underscore at the beginning of the name. (Sub ID: a)

  • Runs on library models.

  • Allows exclusions of charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check length of Stateflow data name

Check ID: mathworks.jmaab.jc_0796

Description

Checks if the length of Stateflow data names are within the limit of 63 characters.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Length of Stateflow data names are not within the limit of 63 characters.Consider using a different name for each Stateflow data name.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Allows exclusions of charts.

  • Analyzes content of library linked blocks.

See Also

Check duplication of Simulink data names

Check ID: mathworks.jmaab.jc_0791

Description

Checks for a duplicate definition of data names. Simulink data names must be unique across the base workspace, model workspace, and data dictionary.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0791_a: Check for repeated data names across base workspace and model workspaceSimulink data names are not unique across base workspace and model workspace.Rename the repeated data name either in the base workspace or the model workspace.
jc_0791_b: Check for repeated data names across base workspace and data dictionarySimulink data names are not unique across base workspace and data dictionary.Rename the repeated data name either in the base workspace or the data dictionary.
jc_0791_c: Check for repeated data names across model workspace and data dictionarySimulink data names are not unique across model workspace and data dictionary.Rename the repeated data name either in the model workspace or the data dictionary.

Capabilities and Limitations

  • Runs on library models.

  • Does not allow exclusions of blocks and charts.

See Also

Check unused data in Simulink Model

Check ID: mathworks.jmaab.jc_0792

Description

Identifies unused data in the model workspace and data dictionary.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0792_a: Check for unused data in Data DictionaryOne or more data variables in the data dictionary are unused.Consider removing the unused data variables.
jc_0792_b: Check for unused data in Model WorkspaceOne or more data variables in the model workspace are unused.Consider removing the unused data variables.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions of blocks or charts.

See Also

Check for unused data in Stateflow Charts

Check ID: mathworks.jmaab.jc_0700

Checks the state of the parameter Unused data, events, messages and functions.

Description

Identifies if the parameter Unused data, events, messages and functions is set to None. Unused data and events cannot exist in the Stateflow block.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
In a Stateflow block, the parameter Unused data, events, messages and functions is set to None.Make sure to set the parameter to either Warning or Error.

Capabilities and Limitations

  • Runs on library models.

See Also

Check usage of restricted variable names

Check ID: mathworks.maab.na_0019

Check for use of reserved keywords in MATLAB Function block variable names.

Description

Identifies variable names in MATLAB Function blocks that conflict with reserved C and C++ keywords. For a complete list of reserved keywords, see Reserved Keywords (Simulink Coder).

Avoid using variable names that conflict with MATLAB Functions, such as conv.

This check is case insensitive. For example, the check flags keywords true, True, TRUE, and tRue.

This check requires a Simulink Check license.

Results and Recommended Actions

ConditionRecommended Action
Variable name conflicts with reserved keyword.Consider using a different variable name that does not conflict with the reserved keywords.

Capabilities and Limitations

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

See Also

Check Implement logic signals as Boolean data (vs. double)

Check ID: mathworks.maab.jc_0011

Check the optimization parameter for Boolean data types.

Description

Optimization for Boolean data types is required.

This check requires a Simulink Check license.

Note

A prerequisite MAB guideline for this check is na_0002: Appropriate usage of basic logical and numerical operations.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Configuration setting for Implement logic signals as boolean data (vs. double) is not set. Select the Implement logic signals as boolean data (vs. double) check box in the Configuration Parameters dialog box.

Capabilities and Limitations

  • Does not run on library models.

  • Does not allow exclusions of blocks or charts.

See Also

Check Signed Integer Division Rounding mode

Check ID: mathworks.jmaab.jc_0642

Description

Identifies blocks whose parameter Integer Rounding Mode is set to Simplest when the configuration parameter Signed Integer Division Rounds is set to Undefined.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
If the parameter Integer Rounding Mode of the listed blocks is set to Simplest when the parameter Signed Integer Division Rounds is set to Undefined.Set the parameter Signed Integer Division Round to a value that describes the rounding behavior of your production target or changing the Integer Rounding Mode of the listed blocks to a value other than Simplest.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check diagnostic settings for incorrect calculation results

Check ID: mathworks.jmaab.jc_0806

Description

Identifies the status of the configuration parameters of the data validity diagnostic settings which detect incorrect calculation results.

This check requires a Simulink Check license.

Results and Recommended Actions

ConditionRecommended Action
The model configuration parameter Division by singular matrix (CheckMatrixSingularityMsg) is not set to error.Set the input parameter value to error.
The model configuration parameter Inf or NaN block output (SignalInfNanChecking) is not set to error.Set the input parameter value to error.
The model configuration parameter Wrap on overflow (IntegerOverflowMsg) is not set to error.Set the input parameter value to error.
The model configuration parameter Saturate on overflow (IntegerSaturationMsg) is not set to error.Set the input parameter value to error.

Capabilities and Limitations

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not allow exclusions of blocks or charts.

See Also

Check model diagnostic parameters

Check ID: mathworks.maab.jc_0021

Check the model diagnostic configuration parameter settings.

Description

Model Advisor checks that these diagnostics configuration parameters are set as defined in the Results and Recommended Actions section below:

  • Algebraic loop

  • Multitask rate transition

  • Minimize algebraic loop

  • Inf or NaN block output

  • Duplicate data store names

  • Unconnected block input ports

  • Unconnected block output ports

  • Unconnected line

  • Unspecified bus object at root Outport block

  • Element name mismatch

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks.

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

  • JMAAB — Not supported

Results and Recommended Actions

ConditionRecommended Action
Algebraic loop is set to none.Set Algebraic loop to error or warning. Otherwise, Simulink might attempt to automatically break the algebraic loops, which can impact the execution order of the blocks.
Minimize algebraic loop is set to none. Set Minimize algebraic loop to error or warning. Otherwise, Simulink might attempt to automatically break the algebraic loops for reference models and atomic subsystems, which can impact the execution order for those models or subsystems.
Inf or NaN block output is set to noneSet Inf or NaN block output to error or warning. Otherwise, numerical exceptions occur in the generated code
Duplicate data store names is set to none. Set Duplicate data store names to error or warning. Otherwise, non-unique variable names exist in the generated code.
Unconnected block input ports is set to none. Set Unconnected block input ports to error or warning. Otherwise, code cannot be generated.
Unconnected block output ports is set to none. Set Unconnected block output ports to error or warning. Otherwise, dead code results.
Unconnected line is set to none. Set Unconnected line to error or warning. Otherwise, code cannot be generated.
Unspecified bus object at root Outport block is set to none.Set Unspecified bus object at root Outport block to error or warning. Otherwise, the result is an unspecified interface when the model is referenced from another model.
Element name mismatch is set to none. Set Element name mismatch to error or warning. Otherwise, the result is an unintended interface in the generated code.

Capabilities and Limitations

  • Does not run on library models.

  • Does not allow exclusions of blocks or charts.

See Also

Check for Simulink diagrams using nonstandard display attributes

Check ID: mathworks.maab.na_0004

Check model appearance setting attributes.

Description

Model appearance settings are required to conform to the guidelines when the model is released.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The toolbar is not visible. Select Modeling > Environment > Toolstrip.
The status bar is not visible. Select Modeling > Environment > Status Bar.
Sample Time > Colors is selected. Clear Debug > Information Overlays > Colors.
Wide Nonscalar Lines is cleared. Select Debug > Information Overlays > Nonscalar Signals.
Viewer Indicators is cleared. Select Debug > Information Overlays > Viewers.
Testpoint Indicators is cleared. Select Debug > Information Overlays > Log & Testpoint.
Port Data Types is selected. Clear Debug > Information Overlays > Port Data Type.
Storage Class is selected. Clear Debug > Information Overlays > Storage Class.
Signal Dimensions is selected. Clear Debug > Information Overlays > Signal Dimensions.
Execution Context Indicator is selected. Clear Debug > Information Overlays > Signal Data Ranges.
Model Browser is selected. Clear Modeling > Environment > Model Browser.
Sorted Execution Order is selected. Clear Debug > Information Overlays > Execution Order.
Model Block Version is selected. Clear Debug > Information Overlays > Ref. Model Version.
Model Block I/O Mismatch is selected. Clear Debug > Information Overlays > Ref. Model I/O Mismatch.
Library Links is set Disabled, User Defined, or All. Select Debug > Information Overlays > Show All Links.
Linearization Indicators is cleared. Select Debug > Information Overlays > Linearization Indicators.
Block backgrounds are not white. For each listed diagram, click the block and select Format > Background and select color from the drop-down list.
Block foregrounds are not black.Select Format > Foreground and select color from the drop-down list.
Diagrams do not have white backgrounds. Select Format > Background and select color from the drop-down list.
Diagrams do not have zoom factor set to 100%. For each listed diagram, select Modeling > Environment > Zoom > Normal View (100%).

Action Results

Clicking Modify updates the display attributes to conform to the guideline.

Capabilities and Limitations

  • Does not run 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 that have no workspaces and no dialogs. By default, the input parameter Look under masks is set to graphical.

  • Does not allow exclusions of blocks or charts.

See Also

Check Model font settings

Check ID: mathworks.jmaab.db_0043

Description

Check for difference in font and font sizes.

Available with Simulink Check.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c, d

To customize the text elements in your model, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID db_0043.

  2. Use the lists under Input Parameters to customize the font elements in your Simulink models and Stateflow charts. Note that when you select Default, the check flags different fonts/styles/size that are used in your model.

  3. Click Apply and save the configuration.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0043_a: Check font and font style in Simulink block and signal namesFont settings of one or more Simulink blocks or signal names are different from input parameters.Change font settings of block and signal names as per input parameters.
db_0043_b: Check font size in Simulink block and signal namesFont settings of one or more Simulink blocks or signal names are different from input parameters.Change font size of block and signal names as per input parameters.
db_0043_c: Check font and font style in Stateflow objectsFont settings of one or more Stateflow objects are different from input parameters.Change font settings of Stateflow objects as per input parameters.
db_0043_d: Check font size in Stateflow objectsFont settings of one or more Stateflow objects are different from input parameters.Change font size of Stateflow objects as per input parameters.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs.

  • Allows exclusions of blocks and charts.

Action Results

Click Modify all Fonts to change the font and font size of text elements in the model to the values selected in the input parameters.

For the input parameters, if you specify Common, clicking Modify all Fonts changes the font and font sizes of text elements in the model to the most commonly used fonts, font sizes, or font styles.

See Also

Check whether block names appear below blocks

Check ID: mathworks.maab.db_0142

Check whether block names appear below blocks.

Description

If shown, the name of the block should appear below the block.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Blocks have names that do not appear below the blocks. Set the name of the block to appear below the blocks.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check the display attributes of block names

Check ID: mathworks.maab.jc_0061

Check the display attributes of subsystem and block names.

Description

Display the name of a block or subsystem when it provides a description that is used to identify its function.

Otherwise, when the function of a block is easily identified from its visual appearance, do not display the name. Such blocks include:

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

To customize the blocks and masks that are checked during the analysis, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID jc_0061.

  2. Under Input Parameters, select Custom from the Standards list.

  3. Use the Block Types list table to delete or add a block and/or mask type.

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action

Name is displayed and obvious from the block appearance.

Hide the block name by selecting Format > Hide Automatic Block Name.

Name is not descriptive. Specifically, the block name is:

  • Not obvious from the block appearance.

  • The default name appended with an integer.

Modify the block name to provide descriptive information, or hide the block name by selecting Format > Hide Automatic Block Name.

Name is descriptive and not displayed. Descriptive names are:

  • Provided for blocks that are not obvious from the block appearance.

  • Not a default name appended with an integer.

Modify the blocks to show the block name by deselecting Format > Hide Automatic Block Name.
Check does not evaluate my custom blocks and masks.Use the Model Configuration Editor to add your custom checks and blocks.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check for nondefault block attributes

Check ID: mathworks.maab.db_0140

Identify blocks that use nondefault block parameter values that are not displayed in the model diagram.

Description

Model diagrams should display block parameters that have values other than default values. One way of displaying this information is by using the Block Annotation tab in the Block Properties dialog box.

For a list of block parameter default values, see Block-Specific Parameters

Tip

If you use the add_block function with 'built-in/blocktype' as a source block path name for Simulink built-in blocks, some default parameter values of some blocks are different from the defaults that you get if you added those blocks interactively by using Simulink.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

To customize the nondefault block parameters for this check, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID db_0140.

  2. Under Input Parameters, select Custom from the Standards list.

  3. Use the List of Block Types table to delete or add a parameter for the block.

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
Block parameters that have values other than default values, and the values are not in the model display.In the Block Properties dialog box, use the Block Annotation tab to add block parameter annotations.

Action Results

You can use the Add nondefault values into block annotation button to add an annotation to the block display that specifies the nondefault block parameter that was flagged in the analysis. Rerun the check; the block is no longer flagged.

Capabilities and Limitations

  • Only customizable for block parameters in IntrinsicDialogParameters. See Common Block Properties

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialog boxes.

  • Allows exclusions of blocks and charts.

See Also

Check Model Description

Check ID: mathworks.jmaab.jc_0603

Description

Identifies the layers in a model that have inconsistent description formatting for the following model elements:

  • Annotations

  • Model Info Block

  • DocBlock Block

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b

You can select the description block type and configure the description tags from the Description Block Type and Description Tags input parameters. The format for the Description Tags should be of a string type with comma separated tags.

By default, the Description Block Type is set to Annotation and the Description Tags parameter is Input:,Description:,Output:.

For example, considering the default values (Input:, Description:, Output:), each of the layer in the model should have the description format as following:

Input: <input information>

Description: <model description>

Output: <output information>

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0603_a: Check for layer description at each layerOne or more layers in the model do not have model descriptions.Add model descriptions at all the layers in the model.
jc_0603_b: Check for consistent layer descriptionOne or more layers in the model do not have consistent model description formatting.Make sure to have consistent format for the model descriptions at all the layers in the model.

Capabilities and Limitations

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

See Also

Check if blocks are shaded in the model

Check ID: mathworks.jmaab.jc_0604

Description

Checks if block shading is used in the model.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Block shading is turned on.Consider turning off the DropShadow property in blocks for better readability.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check for unconnected signal lines and blocks

Check ID: mathworks.jmaab.db_0081

Check whether model has unconnected input ports, output ports, or signal lines.

Description

Unconnected blocks and signal lines should be connected to Terminator or Ground blocks.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0081_a: Check for unconnected signal linesOne or more signal lines in the model are not connected.Connect the signal lines to the correct source or destination block. If the destination block is not known, use a Terminator or Ground block to terminate the line.
db_0081_b: Check for unconnected subsystems and basic blocksOne or more blocks in the model are not connected.Connect the blocks to the correct source or destination block. If the destination block is not known, use a Terminator or Ground block to terminate the line.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check signal line connections

Check ID: mathworks.jmaab.db_0032

Description

Checks if the Simulink signals that are intersecting and overlapping adhere to recommended guidelines.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2, b, c, e

  • JMAAB — a1/a2, b, c, d, e

Note

Subchecks db_0032_a1, db_0032_b, db_0032_c, db_0032_d, and db_0032_e are selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0032_a1: Check signal intersectionsSimulink signals intersect each other.Make sure that the signals do not intersect with each other.
db_0032_a2: Check if Line crossing style is set to "Line hop"Line crossing style preference is not set to "Line hop".Set Line crossing style preference to "Line hop".
db_0032_b: Check signal overlapsSimulink signals overlap each other.Make sure that the signals do not overlap with each other.
db_0032_c: Check if signals are intersecting blocks</entry>Simulink signals are drawn over a Simulink block.Make sure that the signals are not drawn over any Simulink blocks.
db_0032_d: Check if signal lines are split into multiple sublinesSignal lines are split into multiple sublines.Reposition the signals to avoid splitting of signal lines.
db_0032_e: Check if signals are drawn as slanting linesSignals are drawn as slanting lines in the diagram.Make sure to draw signals as vertical or horizontal lines.

Capabilities and Limitations

  • Signal hop preference is considered.

  • Block label overlaps are not analyzed.

  • Simulink signals that split into more than two signals at a single branch are considered.

  • Runs on library models.

  • Allows exclusions of subsystems.

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

See Also

Check signal flow in model

Check ID: mathworks.maab.db_0141

Description

Identify subsystems with inappropriate signal flow. The signal flow in the models and subsystems should be from left to right.

This check requires a Simulink Check license.

Results and Recommended Actions

ConditionRecommended Action
The placement of blocks in subsystems is distorted.

Ensure that the signal flow in the mentioned subsystems is from left to right.

All sequential blocks, except the blocks on feedback path, must be placed from left to right.

All blocks, except the blocks on feedback path, should be oriented to the right.

One or more groups of blocks are not arranged from top to bottom.Arrange the groups of blocks or subsystems vertically from top to bottom.
Signal lines in the model bend multiple times unnecessarily.Redraw the signal lines to avoid unnecessary bends.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Allows exclusions of blocks and charts.

See Also

Check usage of tunable parameters in blocks

Check ID: mathworks.maab.db_0110

Check whether tunable parameters specify expressions, data type conversions, or indexing operations.

Description

To make a parameter tunable, you must enter the basic block without the use of MATLAB calculations or scripting. For example, omit:

  • Expressions

  • Data type conversions

  • Selections of rows or columns

Supported blocks include:

Available with Simulink Check.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Blocks have a tunable parameter that specifies an expression, data type conversion, or indexing operation. In each case, move the calculation outside of the block, for example, by performing the calculation with a series of Simulink blocks, or precompute the value as a new variable.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not evaluate mask parameters.

  • Allows exclusions of blocks and charts.

See Also

Check connections between structural subsystems

Check ID: mathworks.jmaab.jc_0171

Description

Checks the signal flow when using Goto and From blocks.

This check identifies the subsystems connected to each other that use Goto and From blocks in feed-forward and feedback loops that do not have at least one signal line for each direction.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0171_a: Check direct connections between structural subsystemsOne or more structural subsystems do not have direct connections between them.Consider making at least one direct connection between the listed subsystems in the given direction (Subsystem 1 to Subsystem 2) with the exception of memory, delay and bus creator/selector blocks.
jc_0171_b: Check for unused inputs inside structural subsystemsOne or more structural subsystems have unused inputs.

Consider removing the unused inputs inside the structural subsystems. Reducing the number of unnecessary connections makes connection relationships clearer.

Capabilities and Limitations

  • The check allows the connections made from the referenced subsystems with in another subsystem.

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check for consistency in model element names

Check ID: mathworks.jmaab.jc_0602

Description

Checks if the model elements connected to a signal are following consistent naming.

The following names must be matched exactly when directly connected with signal lines:

  • Inport block name

  • Outport block name

  • Structural subsystem input port label name

  • Structural subsystem output port label name

  • From tag name

  • Goto tag name

  • Signal line signal name

Exception 1: The name of a signal line connected to one of the below subsystems can have a different name to that of the subsystem port label name:

  • Reusable subsystems

  • Subsystems linked to a library

Exception 2: If a combination of Inport blocks, Outport blocks, and other blocks have the same block name, use a suffix or prefix for the Inport and Outport blocks for consistent naming. This can be configured through Model Advisor Configuration Editor.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more model elements are not consistent with the connected signal name.

Consider renaming the deviating model elements to match the signal name or to be consistent with Inport/Outport blocks.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks or charts.

See Also

Check trigger signal names

Check ID: mathworks.jmaab.jc_0281

Description

Identify trigger blocks where the origin of the trigger signal and the destination have dissimilar names.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a1/a2/a3/a4, b1/b2/b3/b4

Note

Sub-checks jc_0281_a1 and jc_0281_b1 are selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0281_a1: Check names of the origin of the trigger signal and the conditional input blockThe name of the block at the origin of the trigger signal and the conditional input block name at the destination are dissimilar.The name of the block at the origin of the trigger signal and the conditional input block name at the destination must include the same name.
jc_0281_a2: Check names of the trigger signal and the conditional subsystemThe name of the block at the origin of the trigger signal and the conditional subsystem name at the destination are dissimilar.The name of the block at the origin of the trigger signal and the conditional subsystem name at the destination must include the same name.
jc_0281_a3: Check names of the origin of the trigger signal and the conditional input blockThe name of the trigger signal and the conditional input block name at the destination are dissimilar.The name of the trigger signal and the conditional input block name at the destination must include the same name.
jc_0281_a4: Check names of the trigger signal and the conditional subsystemThe name of the trigger signal and the conditional subsystem name at the destination must include the same name.The name of the trigger signal and the conditional subsystem name at the destination are dissimilar.
jc_0281_b1: Check names of the origin of the trigger signal and the Stateflow block eventThe name of the block at the origin of the trigger signal and the Stateflow block event name at the destination are dissimilar.The name of the block at the origin of the trigger signal and the Stateflow block event name at the destination must include the same name.
jc_0281_b2: Check names of the origin of the trigger signal and the Chart nameThe name of the block at the origin of the trigger signal and the Chart name at the destination are dissimilar.The name of the block at the origin of the trigger signal and the Chart name at the destination must include the same name.
jc_0281_b3: Check names of trigger signal and the Stateflow block eventThe name of the trigger signal and the Stateflow block event name at the destination are dissimilar.The name of the trigger signal and the Stateflow block event name at the destination must include the same name.
jc_0281_b4: Check names of the trigger signal and the ChartThe name of the trigger signal and the Chart name at the destination are dissimilar.The name of the trigger signal and the Chart name at the destination must include the same name.

Capabilities and Limitations

  • This check flags Trigger and Enable block names only.

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

See Also

Check for mixing basic blocks and subsystems

Check ID: mathworks.maab.db_0143

Check for systems that mix primitive blocks and subsystems.

Description

You must design each level of a model with building blocks of the same type, for example, only subsystems or only primitive (basic) blocks. If you mask your subsystem and set MaskType to a nonempty string, the Model Advisor treats the subsystem as a basic block.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

To customize the blocks and masks that are checked during the analysis, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID db_0143.

  2. Under Input Parameters, select Custom from the Standards list.

  3. In the Treat blocktype list as list, select Allowed to include the blocks/masks in the analysis or Prohibited to exclude the blocks/masks from the analysis.

  4. Use the Block Types list table to delete or add a block and/or mask type.

  5. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
A level in the model includes subsystem blocks and primitive blocks.

Move nonvirtual blocks into the subsystem.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check for avoiding algebraic loops between subsystems

Check ID: mathworks.jmaab.jc_0653

Description

Checks the placement of the Delay blocks in algebraic loops between subsystems.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Delay blocks in feedback loops are placed inside subsystem.Delay blocks in feedback loops must be placed outside of their parent subsystem.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check for prohibited sink blocks

Check ID: mathworks.maab.hd_0001

Check for prohibited Simulink sink blocks.

Description

You must design controller models from discrete blocks. Sink blocks, such as the Scope block, are not allowed in controller models.

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

To customize the blocks and masks that are checked during the analysis, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID hd_0001.

  2. Under Input Parameters, select Custom from the Standards list.

  3. In the Treat blocktype list as list, select Allowed to include the blocks/masks in the analysis or Prohibited to exclude the blocks/masks from the analysis.

  4. Use the Block Types list table to delete or add a block and/or mask type.

  5. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
Sink blocks are not permitted in discrete controllers. Remove sink blocks from the model.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of vector and bus signals

Check ID: mathworks.jmaab.na_0010

Check usage of buses and Mux blocks.

Description

This check verifies the usage of buses and Mux blocks.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub-IDs that are 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

  • JMAAB — a, b, c, d

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
na_0010_a: Check usage of Mux and Demux blocksMux and Demux blocks are not used to generate and decompose vectors.Use Mux and Demux blocks to generate and decompose vectors respectively.
na_0010_b: Check inputs to Mux blocksMux blocks have inputs which are not scalars or vectors.Use only scalar or vector signals as inputs to Mux blocks.
na_0010_c: Check bus signals treated as vectorsOne or more configuration parameters are set inappropriately.Set the configuration parameters to the recommended value.
na_0010_d: Check usage of bus signalsOne or more blocks are not supported for use with bus signals.Use buses only with bus-supported blocks.

Capabilities and Limitations

  • The check does not flag when blocks other than Demux and Mux are used to generate or decompose a vector. For example, a Selector block used instead of Demux or a Vector Concatenate used instead of Mux block. (Sub ID: a)

  • This check supports auto fix mechanism, you can now click on the Modify button to fix the errors displayed in the report.

  • Does not run on library models.

  • Allows exclusions of blocks or charts.

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

See Also

Check signal line labels

Check ID: mathworks.jmaab.jc_0008

Check the labeling on signal lines.

Description

Use a label to identify:

  • Signals originating from the following blocks (the block icon exception noted below applies to all blocks listed, except Inport, Bus Selector, Demux, and Selector):

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Constant block

    • Data Store Read block

    • Demux block

    • From block

    • Inport block

    • Selector block

    • Subsystem block

    Block Icon Exception

    If a signal label is visible in the display of the icon for the originating block, you do not have to display a label for the connected signal unless the signal label is required elsewhere due to a rule for signal destinations.

  • Signals connected to one of the following destination blocks (directly or indirectly with a basic block that performs an operation that is not transformative):

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Data Store Write block

    • Goto block

    • Mux block

    • Outport block

    • Subsystem block

  • Any signal of interest.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Signals coming from Bus Selector, Chart, Constant, Data Store Read, Demux, From, Inport, or Selector blocks are not labeled.Label the signal.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs.

  • Allows exclusions.

See Also

Check for propagated signal labels

Check ID: mathworks.jmaab.jc_0009

Check for propagated labels on signal lines.

Description

You should propagate a signal label from its source rather than enter the signal label explicitly (manually) if the signal originates from:

  • An Inport block in a nested subsystem. However, if the nested subsystem is a library subsystem, you can explicitly label the signal coming from the Inport block to accommodate reuse of the library block.

  • A basic block that performs a non-transformative operation.

  • A Subsystem or Stateflow Chart block. However, if the connection originates from the output of an instance of the library block, you can explicitly label the signal to accommodate reuse of the library block.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a,b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0009_a: Check Signal name propagation for subsystemsThe model includes subsystems that do not have propagated signal labels. Add labels and enable signal propagation by selecting Show propagated signal parameter for signals.
One or more subsystems in the model display empty propagated signals.Disable signal propagation by un-selecting Show propagated signal parameter, or if required, add a new label.
One or more subsystems in the model do not display propagated signals but have signal names.Remove labels and enable signal propagation by selecting Show propagated signal parameter for signals.
jc_0009_b: Check Signal name propagation for connection blocksOne or more connection blocks in the model do not propagate signals even when source block has labels.Enable signal propagation by selecting Show propagated signal parameter for signals.
One or more connection blocks in the model display empty propagated signals.Disable signal propagation by un-selecting Show propagated signal parameter, or if required, add a new label.
One or more connection blocks in the model do not display propagated signals but have signal names.Remove labels and enable signal propagation by selecting Show propagated signal parameter for signals.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions.

See Also

Check position of signal labels

Check ID: mathworks.jmaab.db_0097

Identify inappropriately placed signal labels for signals and buses.

Description

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0097_a: Check overlap of signal labelsOne or more signals in the model have labels which overlap other objects.Place the signal labels so that it is readable.
db_0097_b: Check position of signal labelsOne or more signals in the model have labels placed at the top of signal line.Place the signal labels underneath the signal lines.
db_0097_c: Check location of signal labelsOne or more signals in the model do not have labels located at the origin of the signal line.Place the signal labels at the origin of the signal line.

Capabilities and Limitations

  • The modify action for this check currently addresses the issue by changing the location and correcting the flip format of the signal label. This action will not modify the position of the signal line to correct the overlap of signal labels.

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked files.

  • Support exclusions of blocks or charts.

See Also

Check signal line labels

Check ID: mathworks.maab.na_0008

Check the labeling on signal lines.

Description

Use a label to identify:

  • Signals originating from the following blocks (the block icon exception noted below applies to all blocks listed, except Inport, Bus Selector, Demux, and Selector):

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Constant block

    • Data Store Read block

    • Demux block

    • From block

    • Inport block

    • Selector block

    • Subsystem block

    Block Icon Exception

    If a signal label is visible in the display of the icon for the originating block, you do not have to display a label for the connected signal unless the signal label is required elsewhere due to a rule for signal destinations.

  • Signals connected to one of the following destination blocks (directly or indirectly with a basic block that performs an operation that is not transformative):

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Data Store Write block

    • Goto block

    • Mux block

    • Outport block

    • Subsystem block

  • Any signal of interest.

This check requires a Simulink Check license.

Check Parameterization

To customize the blocks and masks for this check, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID na_0008.

  2. Under Input Parameters, select Custom from the Standards list.

  3. Add or delete the blocks and/or masks from the List of block types to check output signal labels and List of block types to check input signal labels tables.

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
Signals coming from Bus Selector, Chart, Constant, Data Store Read, Demux, From, Inport, or Selector blocks are not labeled.Label the signal.
Blocks from the list below that receive signals are not labeled: Outport, Goto, DataStore, BusCreator, Mux, or SubSystem.Label the signal.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks or charts.

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

See Also

Check for propagated signal labels

Check ID: mathworks.maab.na_0009

Check for propagated labels on signal lines.

Description

You should propagate a signal label from its source rather than enter the signal label explicitly (manually) if the signal originates from:

  • An Inport block in a nested subsystem. However, if the nested subsystem is a library subsystem, you can explicitly label the signal coming from the Inport block to accommodate reuse of the library block.

  • A basic block that performs a nontransformative operation.

  • A Subsystem or Stateflow Chart block. However, if the connection originates from the output of an instance of the library block, you can explicitly label the signal to accommodate reuse of the library block.

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

Results and Recommended Actions

ConditionRecommended Action
The model includes signal labels that were entered explicitly, but should be propagated. Use the open angle bracket (<) character to mark signal labels that should be propagated and remove the labels that were entered explicitly.

Capabilities and Limitations

  • This check should not be run on models for AUTOSAR.

  • Does not run on library models.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks or charts.

See Also

Check block orientation

Check ID: mathworks.jmaab.jc_0110

Checks blocks with changed orientation.

Description

Identifies the blocks that are reversed or with rotated orientation. This check excludes Unit Delay or Delay blocks.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Some blocks in the model have rotated or reversed orientation.Flip or rotate these blocks to be oriented toward the right.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check Indexing Mode

Check ID: mathworks.jmaab.db_0112

Description

Identifies blocks and charts with inconsistent Indexing mode.

Blocks with either 0 or 1 based indexing:

  • Assignment

  • ForIterator

  • Find

  • MultiPortSwitch

  • Selector

Blocks with default 1 based indexing:

  • MATLAB Function

  • Fcn

  • MATLABSystem

  • Truth Table

  • State Transition Table

  • Test Sequence

Note

For chart, when action language is set to MATLAB, its 1 based indexing. When action language is set to C its 0 based indexing.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check db_0112_a1 is selected as the default

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0112_a1: Check for Zero-Based Indexing ModeOne or more blocks or charts in the model have One-Based Indexing mode or Specify indices mode.Consider remodeling by using Zero-Based Indexing.
db_0112_a2: Check for One-Based Indexing Mode.One or more blocks or charts in the model have Zero-Based Indexing mode or Specify indices mode.Consider remodeling by using One-Based Indexing.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions.

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

See Also

Check if tunable block parameters are defined as named constants

Check ID: mathworks.jmaab.jc_0645

Description

Checks if the tunable block parameters are defined as named constants.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Improper usage of tunable block parameter values.Change the tunable block parameter literal values to named constants.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check for sample time setting

Check ID: mathworks.jmaab.jc_0641

Description

Check if the sample time property of a block is set to -1 (inherited).

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Sample time property of a block is not set to -1 (inherited).Change the sample time to -1 (inherited).

Capabilities and Limitations

  • This check allows you to use the Auto-Fix option to update the sample time of the flagged blocks to -1(inherited).

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

  • Allows exclusions of blocks and charts.

See Also

Check usage of fixed-point data type with non-zero bias

Check ID: mathworks.jmaab.jc_0643

Check blocks with whose output signal data type is fixed-point and bias is not zero.

Description

For blocks that have a fixed-point data type for their output signals, check that block parameter Bias is set to 0.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action

In the Data Type Assistant, Mode is set to Fixed Point but the value for Bias is not 0.

Change block parameter Bias to 0.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions.

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

See Also

Check type setting by data objects

Check ID: mathworks.jmaab.jc_0644

Description

Identifies the blocks in Simulink that violate the type setting if the signal objects are used (if signal data type is set in signal object, then it must not be set on the block side).

This check exempts:

  • Data type conversion block.

  • Type setting using fixdt.

  • Double and Boolean types.

  • Reusable internal part of a function (atomic subsystem).

  • Block output data type set to Inherit via backpropagation.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Signal data type is set to different types in signal objects and in the block. Set the output data type of the blocks either to auto or Inherit via back propagation.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check position of conditional blocks and iterator blocks

Check ID: mathworks.jmaab.db_0146

Check the position of Trigger and Enable blocks.

Description

Locate blocks that define subsystems as conditional or iterative at the top of the subsystem diagram.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

The default block position can be configured by using the parameter Block Position in the Model Advisor Configuration Editor.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0146_a: Block layout in conditional subsystemTrigger, Enable, and Action Port blocks are not at the top of the subsystem diagram. Move the Trigger, Enable, and Action Port blocks to the top of the subsystem diagram.
db_0146_b: Block layout in iterative subsystemFor Each, For Iterator, and While Iterator blocks are not in the same location on the subsystem diagram.Move the For Each, For Iterator, and While Iterator blocks so they are at a uniform location on the subsystem diagram.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check undefined initial output for conditional subsystems

Check ID: mathworks.jmaab.jc_0640

Description

Checks that the initial output value for all Outports and Merge blocks connected to a Conditional subsystem are explicitly defined.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The initial output for all Outports and Merge blocks connected to a Conditional subsystem are not explicitly defined.For a Conditional subsystem, explicitly define the initial output value for all Outports and Merge blocks connected to the Conditional subsystem.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check usage of Merge block

Check ID: mathworks.jmaab.jc_0659

Checks if there are any blocks present in between a conditional subsystem and a merge block.

Description

Merge blocks must have direct connections from conditionally executed subsystems. While using a Merge block take the following into consideration:

  • No blocks must be present in between the Merge and Conditionally executed subsystem blocks, including a virtual subsystem that does not affect the function of Merge block.

  • The Merge block can be nested inside any number of subsystems, if the preceding condition is satisfied.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more blocks inserted in between a Merge and a Conditional Subsystem block.Make direct connections from Conditional Subsystem blocks to Merge blocks.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check logical expressions in If blocks

Check ID: mathworks.maab.na_0003

Check If blocks for inappropriate construct of primary expressions in a logical expression.

Description

Identifies instances in an If block where primary expressions are complex.

Primary expressions are defined as:

  • An input

  • A constant

  • A constant parameter

  • A parenthesized expression containing no operators other than zero or <, >, >=, <=, ==, ~=, |, &, and ~

Examples of primary expressions include:

  • u1

  • 5

  • K

  • (u1 > 0)

  • (u1 <= G)

  • (u1 > U2)

  • (~u1)

Examples of acceptable logical expressions exceptions include:

  • u1 | u2

  • ((u1 > 0) & (u1 < 20)

  • (u1 > 0) & (u2 < u3)

  • (u1 > 0) & (~u2)

This table provides examples of unacceptable logical expressions.

Primary ExpressionReasoning

u1 & u2 | u3

Too many primary expressions.

u1 & (u2 | u3)

Unacceptable operator within primary expression.

(u1 > 0) & (u1 < 20) & (u2 > 5)

Too many primary expressions that are not inputs.

(u1 > 0) & ((2* u2) > 6)

Unacceptable operator within primary expression.

Exception

A logical expression can contain more than two primary expressions when both these conditions are met:

  • The primary expressions are all inputs.

  • Only one type of logical operator is present.

Examples of acceptable exceptions include:

  • u1 | u2 | u3 | u4 | u5

  • u1 & u2 & u3 & u4

Simple "If" Expressions

In the literal interpretation of guideline na_0003, expression u1 < u2 is a violation. However, the expression follows the commonly used "If" expression template (<Primary Expression><Operator><Primary Expression>). So, when logical operators are not used and only one relational operator is present, the expression satisfies guideline na_0003 and u1 < u2 is NOT a violation.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Logical expression contains more than two primary expressions that consist of a constant, constant parameter, and input.

Consider one of the following:

  • Make primary expressions an input and either:

    • Use parenthesized expressions with one relational operator type

    • Construct a simple "If" express using template
      <Primary Expression><Logical Operator><Primary Expression>

  • Reduce the number of primary expressions to two or less.

  • Construct the logical expression using logical blocks other than the If block.

Logical expression contains more than two parenthesized expressions that use multiple relational operators

Consider one of the following:

  • Use only one type of relational operator. Acceptable logical operators include <, >, >=, <=, ==, ~=, |, &, and ~. The primary expression must consist of inputs only.

  • Reduce the number of parenthesized expressions to two or less.

  • Construct the logical expression using logical blocks other than the If block.

Parenthesized expression includes a relational operator other than zero or <, >, >=, <=, ==, ~=, |, &, or ~.

Consider one of the following:

  • Use relational operator <, >, >=, <=, ==, ~=, |, &, or ~ within the parenthesized expression.

  • Construct the logical expression using logical blocks other than the If block.

Capabilities and Limitations

  • Does not flag logical expressions that use only one of these relative operators <, >, >=, <=, ==, ~=, |, &, and ~

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

See Also

Check default/else case in Switch Case blocks and If blocks

Check ID: mathworks.jmaab.jc_0656

Description

Checks the default/else case in Switch Case blocks and If blocks.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Improper usage of Switch and If blocks. Consider setting the default/else case option in Switch Case blocks and If blocks to on.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check fundamental logical and numerical operations

Check ID: mathworks.jmaab.na_0002

Checks data types in numerical and logic blocks.

Description

Checks the data types for logical and numerical blocks and identifies when the data type is not appropriate for the operation.

The data type for logical blocks should be Boolean. Logic blocks include:

The data type for numerical blocks should be non-boolean. Numerical blocks include:

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

To customize the blocks and masks to include in the analysis for this check, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID na_0002.

  2. Under Input Parameters, add or remove blocks and/or masks from the Blocks for Numerical Operations table or Blocks for Logical Operations table.

  3. Click Apply and save the configuration.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
na_0002_a: Check input data types of blocks meant for logical operationsData type for a logical operation blocks is not Boolean.Consider having boolean inputs for the logical operation blocks.
na_0002_b: Check input data types of blocks meant for numerical operationsData type for a numerical operation blocks is Boolean.Consider having non-boolean inputs for the numerical operation blocks.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check usage of Sum blocks

Check ID: mathworks.jmaab.jc_0121

Description

Identifies the violations of the guideline found with the usage of the Sum block.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0121_a: Check shape of Sum blockOne or more Sum blocks are "round" shaped but are not part of a feedback loop.Set the shape of Sum block to "rectangular".
jc_0121_b: Check first input of Sum blockOne or more Sum blocks don't have '+' sign as first input and are not part of a feedback loop.Set first input to Sum block to '+' sign.
jc_0121_c: Check number of inputs for Sum blockOne or more Sum blocks have more than two inputs.Set Sum block to have no more than two inputs.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check operator order of Product blocks

Check ID: mathworks.jmaab.jc_0610

Description

Checks the operator order of product blocks.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0610_a: Check first input to Product blockImproper usage of operator order of Product blocks.Change the first input in Product block to multiplication('*').
jc_0610_b: Check number of inputs to Product blocks Product blocks have invalid number of inputs.Consider having not more than two inputs for the Product blocks.

Capabilities and Limitations

  • Supports selection of Guideline Sub IDs.

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check signs of input signals in product blocks

Check ID: mathworks.jmaab.jc_0611

Check the sign bit for the input signal data types in product blocks with division operators.

Description

For product blocks with division operators, check that the same sign bit is used for input signal data types. Sign bits are either signed or unsigned.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Input signal data types have different sign bits.Update the production block so the sign bit for the input signal data types match.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check for parentheses in Fcn block expressions

Check ID: mathworks.jmaab.jc_0622

Description

Checks the use of parentheses in Fcn block expressions. Parentheses must be used to define the operator precedence.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Improper usage of Fcn block expressions.Resolve the operator precedence in Fcn block expressions by adding parentheses.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Does not allow exclusions of blocks and charts.

See Also

Check icon shape of Logical Operator blocks

Check ID: mathworks.jmaab.jc_0621

Description

Checks icon shape of Logical Operator blocks. Icon shape of Logical Operator should be rectangular.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Improper setting of icon shape for Logical Operator blocks.Change the icon shape of Logical Operator blocks to rectangular for readability.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of Relational Operator blocks

Check ID: mathworks.maab.jc_0131

Check the position of Constant blocks used in Relational Operator blocks.

Description

When the relational operator is used to compare a signal to a constant value, the constant input should be the second, lower input.

This check requires a Simulink Check license.

Available with Simulink Check.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Relational Operator blocks have a Constant block on the first, upper input. Move the Constant block to the second, lower input.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs.

  • Allows exclusions of blocks and charts.

See Also

Comparing floating point types in Simulink

Check ID: mathworks.jmaab.jc_0800

Description

Checks if equivalence comparison is done on floating-point numbers.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more instances of equivalence comparison for floating-point numbers is observed.Make sure to avoid the use of equivalence comparisons for floating-point numbers.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check usage of Lookup Tables

Check ID: mathworks.jmaab.jc_0626

Checks for the correct parameter settings in Lookup Tables to prevent unexpected results.

Description

Checks n-D Lookup (1-D,2-D, and n-D) tables for the following parameters to ensure that the values adhere to the corresponding recommendations.

  • InterpMethod

  • ExtrapMethod

  • UseLastTableValue

Checks Dynamic Lookup Tables for the parameter LookUpMeth and ensures that the values adhere to the recommendation.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0626_a: Check Lookup Method settings for Dynamic Lookup table blocksThe parameter LookUpMeth in the dynamic lookup table is set to other than Interpolation-Use End Values.Set the parameter to the recommended value Interpolation-Use End Values.
jc_0626_b: Check Lookup Method settings for n-D Lookup table blocksThe parameter InterpMethod in the n-D lookup table is set to Cubic spline.

Update the parameter settings with one of the following recommended values

  • Flat

  • Nearest

  • Linear point-slope

  • Linear Lagrange.

The parameter ExtrapMethod in the n-D lookup table is set to Cubic spline or Linear.Set the parameter to the recommended value Clip.
The parameter UseLastTableValue in the n-D lookup table is set to off.Set the parameter to the recommended value on.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check usage of Memory and Unit Delay blocks

Check ID: mathworks.jmaab.jc_0623

Checks Memory and Unit Delay blocks with inappropriate sample time.

Description

Identifies the Memory blocks with discrete sample time and Unit Delay blocks with a nondiscrete sample time.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Memory blocks have sample time that is not continuous.Use Unit Delay block instead of Memory block.
Unit Delay blocks have nondiscrete sample time.Use Memory block instead of Unit Delay block.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check for cascaded Unit Delay blocks

Check ID: mathworks.jmaab.jc_0624

Description

Identifies cascaded and tapped pattern of Unit Delay blocks.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0624_a: Check Delay blocks usage in tapped patternSet of Unit Delay blocks in the model can be replaced by Tapped Delay block.Consider replacing cascaded Unit Delay blocks with Tapped Delay block.
jc_0624_b: Check usage of cascaded Delay blocksSet of Delay blocks can be replaced by a single Delay block.Consider replacing cascaded Delay blocks with a Delay block.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check usage of Discrete-Time Integrator block

Check ID: mathworks.jmaab.jc_0627

Check usage of Discrete-Time Integrator block.

Description

For Discrete-Time Integrator blocks, check:

  • Block parameter Limit output is selected.

  • Saturation limits is defined using a Simulink.Parameter or MPT.Parameter object whose data type is auto.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0627_a: Check Saturation limit settings of Discrete-Time Integrator blocksBlock parameter Limit output is clearedSelect the Discrete-Time Integrator block parameter Limit output.
jc_0627_b: Check Saturation limit settings of Discrete-Time Integrator blocksSaturation limit is defined by a Parameter object whose data type is not autoChange the data type for the Parameter object to auto.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions.

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

See Also

Check usage of the Saturation blocks

Check ID: mathworks.jmaab.jc_0628

Description

This check identifies:

  • The Saturation or Saturation Dynamic blocks with any type casting operations. The check compares that the compiled input and output data types match or checks that Output data type is set to Inherit: Same as input and Inherit: Same as second input for Saturation and Saturation Dynamic blocks respectively.

  • If the upper limit is set to the maximum value of the output data type (intmax, realmax).

  • If the lower limit is set to the minimum value of the output data type (intmin, -realmax).

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The input and output data types are different.Make sure that the Output data type is set to Inherit: Same as input and Inherit: Same as second input for Saturation and Saturation Dynamic blocks respectively.
The upper limit and lower limit values of the blocks are not set to adhered values.
  • Set the upper limit of the output data type to less than the maximum value.

  • Set the lower limit of the output data type to less than the minimum value.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check output data type of operation blocks

Check ID: mathworks.jmaab.jc_0651

Description

Checks if the model adheres to the guidelines for implementing type conversion.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more Operation blocks found that explicitly specify output data type.Instead of explicitly specifying output data type on operation blocks, use Data Type Conversion block when changing the data type of the block output signal.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks or charts.

See Also

Check position of Inport and Outport blocks

Check ID: mathworks.jmaab.db_0042

Description

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

In models, ports must comply with the following rules:

  • Place Inport blocks on the left side of the diagram. It is acceptable to move the Inport block to the right only to prevent signal crossings.

  • Place Outport blocks on the right side of the diagram. It is acceptable to move the Outport block to the left 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 the sub IDs that are 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.

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

See Also

Check display for port blocks

Check ID: mathworks.maab.jc_0081

Check the Icon display setting for Inport and Outport blocks.

Description

The Icon display setting is required.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The Icon display setting is not set. Set the Icon display to Port number for the specified Inport and Outport blocks.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check scope of From and Goto blocks

Check ID: mathworks.maab.na_0011

Check the scope of From and Goto blocks.

Description

You can use global scope for controlling flow. However, From and Goto blocks must use local scope for signal flows.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
From and Goto blocks are not configured with local scope.
  • Make sure that the ports are connected.

  • Change the scope of the specified blocks to local.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for usage of Data Store Memory blocks

Check ID: mathworks.jmaab.jc_0161

Description

Identifies the usage of Data Store Memory blocks.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0161_a: Check Data Store Memory block definitionOne or more Data Store Memory blocks in the model are not defined at smallest scope level.Consider moving the Data Store Memory blocks to smallest scope level.
jc_0161_b: Check usage of data in Data Store Memory blockData in some Data Store Memory blocks in the model are not used for execution and code generation.Use Data Store Memory blocks only if its data is used for code generation or execution.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked files.

  • Allows exclusions.

See Also

Check usage of Switch blocks

Check ID: mathworks.maab.jc_0141

Check usage of Switch blocks.

Description

Verifies that the Switch block control input (the second input) is a Boolean value and that the block is configured to pass the first input when the control input is nonzero.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The Switch block control input (second input) is not a Boolean value.Change the data type of the control input to Boolean.
The Switch block is not configured to pass the first input when the control input is nonzero. Set the block parameter Criteria for passing first input to u2 ~=0.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking. However, edit-time checking for this check does not verify that the data type of the control input is a Boolean value.

See Also

Check input and output datatype for Switch blocks

Check ID: mathworks.jmaab.jc_0650

Check whether the input and output data types for data ports are the same for switching function blocks.

Description

For Switch, Multiport Switch, and Index Vector blocks, check that the input and output data ports have the same data type.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Input and output data ports have different data types.Change the input or output data port so the data type is the same for both.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions.

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

See Also

Check settings for data ports in Multiport Switch blocks

Check ID: mathworks.jmaab.jc_0630

Description

Identifies the Multiport Switch blocks that violate data port settings.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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, c

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0630_a: Check number of inputs to Multiport Switch blockSwitch block or a Multiport Switch block in the model have fewer than two data ports.Make sure that the Switch blocks or a Multiport Switch block in the model have data ports that are greater than two.
jc_0630_b: Check input type to Multiport Switch blockData type of control port on the Multiport Switch is not set to unsigned integer.Change the data type of the control port on the Multiport Switch to unsigned integer.
jc_0630_c: Check data port order of Multiport Switch blockMultiport Switch blocks have incorrect settings.Set the Multiport Switch block setting Data port for default case to Additional data port, and Diagnostics for default case to None.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

Edit-Time Checking

This check is supported by edit-time checking. However, edit-time checking for this check does not verify compliance with jc_0630 Sub ID b.

See Also

Check for missing ports in Variant Subsystems

Check ID: mathworks.jmaab.na_0020

Description

Checks for number of inputs/outputs to a Variant Subsystem.

This check requires a Simulink Check license.

Check Parameterization

You can configure the check to allow the Variant Subsystem to have different number of outports than the Choice Subsystems by selecting the input parameter Check for parameter 'Specify output when unconnected' on Variant Subsystem outports in Model Advisor Configuration Editor.

Note: The outports of Variant Subsystem must have the input parameter specify output when unconnected selected.

Results and Recommended Actions

ConditionRecommended Action
One or more Variant Subsystems have different number of inputs/outputs on their subordinate subsystems.Consider having same number of inputs/outputs on Variant Subsystems and their subordinate subsystems.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked files.

  • Allows exclusions of blocks or charts.

See Also

Check use of default variants

Check ID: mathworks.maab.na_0036

Check use of default variants in a variant subsystem.

Description

Checks Variant Subsystem, Variant Source, Variant Sink, and variant Model blocks in a variant subsystem for a default variant.

This check requires a Simulink Check license.

Check Parameterization

To set the active variant as the default variant, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID na_0036.

  2. Under Input Parameters, select Check use of 'Allow zero active variant controls' option.

  3. For each Output ports of the variant subsystem, set the following block parameters:

    • Select Specify output when source is unconnected

    • Enter a Constant value

    • Set the output block parameter Data type to Inherit: auto

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
The subsystem does not contain a default variant.

Set block parameter Variant control to (default).

Block parameter Variant Control is set to Variant.

To set the active variant as the default variant.

  1. Variant Control is set to Variant

  2. Open the variant block and select block parameter Allow zero active variant controls.

  3. For output ports of the variant subsystem:

    • Set Specify output when source is unconnected to true

    • Provide a valid value in Constant value

    • Set Output Data type to Inherit: auto

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts

  • Allows syntax highlighting

See Also

Check use of single variable variant conditionals

Check ID: mathworks.maab.na_0037

Check use of single variables in conditional expressions

Description

Checks Variant Subsystem, Variant Source, Variant Sink, and variant Model blocks for conditional expressions that have more than one variable.

Note

Guideline na_0037 states that default variants are an exception to the recommendation of writing variant conditional expressions using multiple variable with a single condition. You can define a default by:

  • Selecting (default) in the block parameter Variant control.

  • Specifying an exhaustive condition.

This check cannot differentiate between defaults that are defined using an exhaustive condition.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Conditional expression contains more than one condition variable.Consider updating your model so that only one variant is used.

Conditional expression variable or Simulink.Variant object is not found in the workspace.

Consider defining a variant in your model.
Check does not execute on my variant subsystem. Clear Override variant conditions and use following variant for the variant subsystem.

Capabilities and Limitations

  • Does not check default variants.

  • Does not run on the Variant subsystem when you select Override variant conditions and use following variant

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

See Also

Check for Strong Data Typing with Simulink I/O

Check ID: mathworks.jmaab.db_0122

Check whether labeled Stateflow and Simulink input and output signals are strongly typed.

Description

Strong data typing between Stateflow and Simulink input and output signals is required.

Available with Simulink Check.

This check requires a Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
A Stateflow chart does not use strong data typing with Simulink. Select the Use Strong Data Typing with Simulink I/O check box for the specified block.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check for names of Stateflow ports and associated signals

Check ID: mathworks.maab.db_0123

Check for mismatches between Stateflow ports and associated signal names.

Description

The name of Stateflow input and output should be the same as the corresponding signal.

Available with Simulink Check.

This check requires a Stateflow license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

Results and Recommended Actions

ConditionRecommended Action
Signals have names that differ from the corresponding Stateflow ports. Change the names of either the signals or the Stateflow ports.

Capabilities and Limitations

  • Does not flag name mismatches for reusable Stateflow charts in libraries.

  • Does not flagStateflow ports when the corresponding signal does not have a label.

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts. Exclusions will not work for library linked charts.

See Also

Check definition of Stateflow data

Check ID: mathworks.jmaab.db_0125

Description

Identifies the Scope value set on Stateflow data defined at machine level.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b, c, d

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0125_a: Check for Stateflow data with Scope set to Local at machine levelStateflow data with Local Scope defined at machine levelConsider not defining data with Local Scope at machine level.
db_0125_b: Check for Stateflow data with Scope set to Constant at machine levelStateflow data with Constant Scope defined machine levelConsider not defining data with Constant Scope at machine level.
db_0125_c: Check for Stateflow data with Scope set to Parameter at machine levelStateflow data with Parameter Scope defined at machine levelConsider not defining data with Parameter Scope at machine level.
db_0125_d: Check for duplicate Stateflow Data names with Scope set to Local on a Stateflow block hierarchyStateflow data defined in a chart have multiple definition on the same Stateflow block hierarchyConsider using unique Stateflow data names in the hierarchy.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions.

See Also

Check definition of Stateflow events

Check ID: mathworks.jmaab.db_0126

Description

Stateflow events should be defined at the smallest possible scope of usage.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more Stateflow events used in a chart are not defined at the same level in the hierarchy.Consider defining the Stateflow events at the smallest scope of usage.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked files.

  • Does not support exclusions of blocks or charts.

See Also

Check usable number for first index

Check ID: mathworks.jmaab.jc_0701

Description

Identifies if the first index of arrays in Stateflow is not set to either 0 or 1.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check jc_0701_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0701_a1: Check if first index of Stateflow data is set to 0One or more Stateflow data have first index set to a value other than 0.Make Sure to set the first index value to 0.
jc_0701_a2: Check if first index of Stateflow data is set to 1One or more Stateflow data have first index set to a value other than 1.Make Sure to set the first index value to 1.

Capabilities and Limitations

  • Supports selection of Guideline Sub IDs.

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

  • Allows exclusions of charts.

See Also

Check execution timing for default transition path

Check ID: mathworks.jmaab.jc_0712

Description

Identifies the state of the parameter Execute (enter) Chart At Initialization. This parameter requires many other considerations to produce consistent results.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The parameter Execute (enter) Chart At Initialization is selected.Make sure to clear the selection.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check scope of data in parallel states

Check ID: mathworks.jmaab.jc_0722

Description

The scope of local variables must be set as restricted to one parallel state unless that same data is required by two or more parallel states.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The scope of Stateflow data (local variables) is not restricted to a parallel state when the same data is not required by multiple parallel states.Restrict the scope of Stateflow data (local variables) to only one parallel state.

Capabilities and Limitations

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

  • Allows exclusions of charts.

See Also

Check for unconnected objects in Stateflow Charts

Check ID: mathworks.jmaab.jc_0797

Description

Checks for unconnected objects in Stateflow Charts and Identifies dangling transitions and unconnected Stateflow States and Junctions in Stateflow Charts.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0797_a: Check unconnected transitionsOne or more transitions in the chart are unconnected.Consider remodeling to connect the dangling transitions.
jc_0797_b: Check unconnected states and junctionsOne or more states and junctions are unconnected.Consider remodeling to connect the unconnected States and Junctions.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check for state in state machines

Check ID: mathworks.jmaab.db_0137

Description

Identifies states with OR(exclusive) type decomposition with only one sub-state.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more states with OR(exclusive) type decomposition have only one sub-state in the model.Remove the sub-state or add another state.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of parallel states

Check ID: mathworks.jmaab.jc_0721

Description

Parallel states must not be used for the purpose of grouping that is the substates of parallel states must not be parallel states.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Parallel states are only for grouping.Substates of the parallel states must not be parallel (do not use for grouping).

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check for Stateflow transition appearance

Check ID: mathworks.jmaab.db_0129

Description

Checks and reports Stateflow transitions that are visually overlapping other Stateflow objects.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

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

Results and Recommended Actions

Guideline Sub IDsConditionRecommended Action
db_0129_a: Check for transition lines that cross over one anotherTransition lines cross over one another.Consider remodeling so that transition lines do not cross over one another.
db_0129_b: Check for transition lines that overlap one anotherTransition lines overlap with other transition lines.Consider remodeling so that transition lines do not overlap with other transition lines.
db_0129_c: Check transition lines that cross over other Stateflow objectsTransition lines cross over other Stateflow objects.Consider remodeling so that transitions do not cross over other Stateflow objects.
db_0129_d: Check orientation of transition linesTransitions are not vertical or horizontal and/or diagonal for flow chart loops.Consider remodeling using either horizontal or vertical transitions only and diagonal transitions for flow chart loops.
db_0129_e: Check for unnecessary connective junctionsOne or more charts use unnecessary connective junctions.Consider avoiding unnecessary connective junctions.

Capabilities and Limitations

  • This check does not flag the transitions that are overlapped by the state labels exceeding the boundary of the state.

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check default transition placement in Stateflow charts

Check ID: mathworks.jmaab.jc_0531

Description

Checks the default transition placement in Stateflow charts.

This check requires a Simulink Check and Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Parallel states in the model have default transitions.Default transitions must not be used for parallel states.
One or more Stateflow states in the model do not have default transitions.Make sure that there is a default transition at every level.
One or more Stateflow states in the model have multiple default transitions at the same level.Multiple default transitions must not be included in the same level.
One or more default transitions in the model are not connected to the top state or junction.Make sure that the default transitions are directly connected to the upper part of the state or junction.
One or more destination states or junctions of default transitions are not on the top.Make sure that the transition destination state or transition destination junction for the default transition is positioned in the far upper left within the same level.
One or more default transitions in the model exceeds state boundaries.Make sure that the default transition does not exceed state boundaries.
The parameter No unconditional default transitions in Configuration > Diagnostics > Stateflow is not set to error.Set the parameter No unconditional default transitions to error.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check usage of transitions to external states

Check ID: mathworks.jmaab.jc_0723

Description

Identifies transitions in Stateflow Charts that end on external child states.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more transitions end on external child states.Consider remodeling to avoid use of transitions ending on external child states.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Supports exclusions of charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check for unexpected backtracking in state transitions

Check ID: mathworks.jmaab.jc_0751

Description

Checks unexpected backtracking in state transitions. Configuration parameter for Unexpected backtracking (SFUnexpectedBacktrackingDiag) must be set to error.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Backtracking is undetected during the state transition. Set configuration parameter for Unexpected backtracking (SFUnexpectedBacktrackingDiag) to error.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library-linked blocks.

  • Does not analyze content in masked subsystems.

  • Does not allow exclusions of blocks and charts.

See Also

Check starting point of internal transition in Stateflow

Check ID: mathworks.jmaab.jc_0760

Description

Identifies if in all state charts and flow charts, internal transitions from state boundaries must start from the left edge of the state.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Starting point of one or more internal transitions from state boundaries of state charts or flow charts does not start from the left edge of the state.Make sure that in all the state charts and flow charts, internal transitions from state boundaries must start from the left edge of the state.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of internal transitions in Stateflow states

Check ID: mathworks.jmaab.jc_0763

Description

Identifies the Stateflow states that uses multiple internal transitions.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check jc_0763_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0763_a1: Check for multiple internal transitionsOne or more Stateflow states have multiple internal transitions.Remodel to avoid the use of multiple internal transitions.
jc_0763_a2: Check order of multiple internal transitionsOne or more Stateflow states have multiple internal transitions not placed in order of execution.Consider placing internal transitions from top to bottom in the order of execution.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check prohibited combination of state action and flow chart

Check ID: mathworks.jmaab.jc_0762

Description

Checks if state actions within states and flow chart statements are used in combination.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Stateflow states combine state action and flow chart.Separate state actions and flow chart statements into different states.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check transitions in Stateflow Flow charts

Check ID: mathworks.jmaab.db_0132

Description

Check transition orientations in flow charts.

The following rules apply to transitions in flow charts:

  • Draw transition conditions horizontally.

  • Draw transitions with a condition action vertically.

  • Junctions in flow charts should have a default exit transition.

  • Transitions in flow charts should not combine condition and action.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0132_a: Check usage of transition actions in Stateflow Flow chartsOne or more transition actions are used in flow charts in the model.Do not use transition actions in flow charts.
db_0132_b: Check for transition orientation in Flow chartsOne or more transitions with condition expressions are not drawn horizontally.Make sure to draw transitions with condition expressions horizontally.
One or more transitions with condition actions are not drawn vertically.Make sure to draw transitions with condition actions vertically.
One or more transitions have both condition expressions and condition actions.Do not use condition expressions and condition actions in the same transition.

Capabilities and Limitations

  • The check only flags flow charts containing loop constructs if the transition violates the orientation rule.

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of unconditional transitions in flow charts

Check ID: mathworks.jmaab.jc_0773

Description

Identifies unconditional transitions in flow charts.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0773_a: Check for the presence of unconditional transition originating from a Stateflow junction with conditional transitionOne or more Stateflow junctions do not have unconditional transitions originating from them.Consider adding an unconditional transition to the junction.
jc_0773_b: Check execution order of unconditional transitionsOne or more Stateflow junctions have unconditional transitions that are not executed last.Consider setting the order of execution of the unconditional transition from the junction to the highest value.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check terminal junctions in Stateflow

Check ID: mathworks.jmaab.jc_0775

Description

Identifies the usage of terminal junctions in flow charts.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check jc_0775_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0775_a1: Check for usage of only one terminal junctionOne or more Stateflow containers have more than one terminal junction.Consider using only one terminal junction.
jc_0775_a2: Check for usage of one terminal junction with one unconditional transition as inputOne or more Stateflow containers have either more than one terminal junction or a terminal junction without one unconditional transition.Consider using only one terminal junction with one unconditional transition as input.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check usage of Stateflow comments

Check ID: mathworks.jmaab.jc_0738

Description

Identifies the comments that contains newline(s) or nested in the middle in Stateflow.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0738_a: If the action language is "C", comment nesting must not be usedOn or more comments in Stateflow objects are nested.Comments in Stateflow must not be nested.
jc_0738_b: If the action language is "C", comments must not contain newline(s) in the middleOne or more comments in Stateflow objects contain newline(s) in the middle.Comments in Stateflow must not contain newline(s) in the middle.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check Stateflow chart action language

Check ID: mathworks.jmaab.jc_0790

Description

Checks if the action language of Stateflow charts is set to C.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Action language of one or more Stateflow charts is not set to C.Set all Stateflow charts action language to C.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of charts.

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

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of numeric literals in Stateflow

Check ID: mathworks.jmaab.jc_0702

Description

Identifies the use of numeric literals in Stateflow states and transitions.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more expressions in Stateflow states and Stateflow transitions contain numeric literals.Consider remodeling to use named parameters and constants instead of numeric literals.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check for pointers in Stateflow charts

Check ID: mathworks.maab.jm_0011

Identify pointer operations on custom code variables.

Description

Pointers to custom code variables are not allowed.

This check requires a Simulink Check and Stateflow license.

This check requires a license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Custom code variables use pointer operations.Modify the specified chart to remove the dependency on pointer operations.

Capabilities and Limitations

  • Applies only to Stateflow charts that use C as the action language.

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for usage of events and broadcasting events in Stateflow charts

Check ID: mathworks.jmaab.jm_0012

Identify undirected event broadcasts that might cause recursion during simulation and generate inefficient code.

Description

Event broadcasts in Stateflow charts must be directed.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a1/a2/a3

Note

Sub-check jm_0012_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDsConditionRecommended Action
jm_0012_a1: Check if Stateflow events are used only in the output of Stateflow blocksStateflow events are not used in the output of Stateflow blocks.Change the scope of above listed Stateflow events to output.
jm_0012_a2: Check if Stateflow broadcast events are directed using "send" syntaxStateflow broadcast events are not directed using "send" syntax.Use "send(event_name, state_name)" syntax to broadcast Stateflow events.
jm_0012_a3: Check if Stateflow broadcast events are directed using qualified event nameStateflow events are not directed using qualified event name.Use "send(state_name.event_name)" syntax to broadcast Stateflow events.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to all.

  • Allows exclusions of blocks and charts.

See Also

Check order of state action types

Check ID: mathworks.jmaab.jc_0733

Description

Identifies state actions that are out of order in Stateflow states.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0733_a: Check basic state action typesOne or more Stateflow states have basic state action types written out of order.Consider ordering the state actions in the order of entry (en), during (du), and exit (ex).
jc_0733_b: Check combined state action typesOne or more Stateflow states have combined state action types written out of order.Consider ordering the state actions in the order of entry (en), during (du), and exit (ex).

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of charts.

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

See Also

Check repetition of Action types

Check ID: mathworks.jmaab.jc_0734

Identifies repeated Action types in a Stateflow state.

Description

The action types (entry (en), during (du), exit (ex), en, du:, du, ex:, en, ex:, en, du, ex: ) must not be described two or more times in a Stateflow state.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more action types is used multiple times in a Stateflow state.Merge the actions types so that each of the action types is defined only once in a Stateflow state.
  • 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.

  • Allows exclusions of charts.

See Also

Check if state action type 'exit' is used in the model

Check ID: mathworks.jmaab.jc_0740

Description

Checks if Stateflow exit actions are used in the model.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more Stateflow states use exit action type.Consider removing state action type exit in Stateflow states.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of charts.

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

See Also

Check updates to variables used in state transition conditions

Check ID: mathworks.jmaab.jc_0741

Description

Checks if the variables used in state transition conditions perform an update by "during" state action type.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more variables in the state transition condition performs an update by "during" state action type. Make sure that the variables used in state transition conditions do not perform an update by "during" state action type.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check usage of transition conditions in Stateflow transitions

Check ID: mathworks.jmaab.jc_0772

Description

Identifies the transitions sourced from a state and unconditional Stateflow transitions with higher priority than conditional transitions.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Stateflow transitions found with higher priority than conditional transitions.Change the execution order of the transitions or add an execution condition.

Capabilities and Limitations

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

  • Allows exclusions of blocks and charts.

See Also

Check condition actions and transition actions in Stateflow

Check ID: mathworks.jmaab.jc_0753

Description

Checks if the use of condition actions or transition actions are uniform within the same chart.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check jc_0753_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0753_a1: Check transition actions in Stateflow chartsThe following Stateflow charts use transition actions.Do not use transition actions in Stateflow charts.
jc_0753_a2: Check usage of condition actions and transition actions within same Stateflow chartCondition actions and transition actions are mixed within the same chart.Use of condition actions or transition actions must be uniform within the same chart.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check for MATLAB expressions in Stateflow charts

Check ID: mathworks.jmaab.db_0127

Description

Identifies the Stateflow objects that use MATLAB expressions that are not suitable for code generation.

This check requires a Simulink Check license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check db_0127_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0127_a1: Check for MATLAB expressions in Stateflow chartsOne or more Stateflow objects in the model use MATLAB expressions.Consider remodelling by replacing all MATLAB expressions in Stateflow objects.
db_0127_a2: Check for MATLAB expressions in Stateflow charts not accessed through MATLAB functionOne or more Stateflow objects in the model use MATLAB expressions that are not accessed through MATLAB function.Consider remodelling so that MATLAB expressions are accessed through MATLAB functions in Stateflow objects.

Capabilities and Limitations

  • Applies only to Stateflow charts that use C as the action language.

  • Runs on library models.

  • Allows exclusions.

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

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check usage of floating-point expressions in Stateflow charts

Check ID: mathworks.maab.jc_0481

Identify equal to operations (==) in expressions where at least one side of the expression is a floating-point variable or constant.

Description

Do not use equal to operations with floating-point data types. You can use equal to operations with integer data types.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Expressions use equal to operations (==) where at least one side of the expression is a floating-point variable or constant.Modify the specified expressions to avoid equal to operations between floating-point expressions. If an equal to operation is required, a margin of error should be defined and used in the operation.
The Model Advisor could not determine the data types in expressions with equality operations.To allow Model Advisor to determine the data types, consider explicitly typecasting the specified expressions.

Capabilities and Limitations

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check Stateflow operators

Check ID: mathworks.jmaab.na_0001

Description

Identifies the usage of operators in Stateflow.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b1/b2/b3, c

Note

Sub-checks na_0001_a, na_0001_b1, and na_0001_c are selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
na_0001_a: Usage of bitwise operators in StateflowOne or more expressions have incorrect usage of bitwise operators.Consider using bitwise operators ('&', '|', '^', '~') for bit operations only.
na_0001_b1: Usage of inequality operator (~=) in StateflowOne or more expressions have incorrect usage of inequality operators.Consider using '~=' for inequality operations.
na_0001_b2: Usage of inequality operator (!=) in StateflowOne or more expressions have incorrect usage of inequality operators.Consider using '!=' for inequality operations.
na_0001_b3: Usage of inequality operator (<>) in StateflowOne or more expressions have incorrect usage of inequality operators.Consider using '<>' for inequality operations.
na_0001_c: Usage of logical negation operator in StateflowOne or more scenarios have incorrect usage of logical negation operator.Consider using '!' for logical negation operations

Capabilities and Limitations

  • Applies only to charts that use C as the action language.

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check prohibited comparison operation of logical type signals

Check ID: mathworks.jmaab.jc_0655

Description

Identifies the Boolean type transitions in Stateflow charts that use either comparison with numbers or logical values (true or false), or use negation operators (! or ~) variably in the model.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Boolean type transactions are compared with numbers or logical values (true or false).Make sure that the Boolean type transactions are not compared with numbers or logical values.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check usage of unary minus operations in Stateflow charts

Check ID: mathworks.maab.jc_0451

Identify unary minus operations applied to unsigned integers in Stateflow objects.

Description

Do not perform unary minus operations on unsigned integers in Stateflow objects.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Unary minus operations are applied to unsigned integers in Stateflow objects.Modify the specified objects to remove dependency on unary minus operations.
The Model Advisor could not determine the data types in expressions with unary minus operations.To allow Model Advisor to determine the data types, consider explicitly typecasting the specified expressions.

Capabilities and Limitations

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for implicit type casting in Stateflow

Check ID: mathworks.jmaab.jc_0802

Description

Identifies implicit type casting in Stateflow.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more operations and/or function calls in Stateflow charts have data type mismatch.All operations and function calls must be made between variables of the same data type. If the data types are different, the variables need to be explicitly type casted to match data types.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions of blocks or charts.

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

See Also

Check uniqueness of Stateflow State and Data names

Check ID: mathworks.jmaab.jc_0732

Description

Checks if in a single Stateflow chart, the Stateflow Data name and the Stateflow State name are the same.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
If the Stateflow Data name and the Stateflow State name have the same name in a Stateflow Chart.Rename either of the Stateflow Data name or Stateflow State name to not to be identical names.

Capabilities and Limitations

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

  • Allows exclusions of charts.

See Also

Check uniqueness of State names

Check ID: mathworks.jmaab.jc_0730

Description

State names must be unique in charts, with the exception of Atomic subcharts. I.e. Atomic Subcharts are treated as different container so they can share State Names with other states outside of the subchart.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
In a Stateflow chart, two or more Stateflow states have the same name.Rename the Stateflow states so that there are no identical names in the Stateflow chart.

Capabilities and Limitations

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

  • Allows exclusions of charts.

See Also

Check usage of State names

Check ID: mathworks.jmaab.jc_0731

Checks for slashes (/) in the state names.

Description

Checks if slashes (/) are included in state names. After the state name is defined, add a new line for describing any executable statements. A slash (/) is required only when describing executable statements in continuation after state names.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Slash is in the state name.Remove the slash from the state name and make sure to start a new line for any executable statements.

Capabilities and Limitations

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

  • Allows exclusions of charts.

See Also

Check entry formatting in State blocks in Stateflow charts

Check ID: mathworks.jmaab.jc_0501

Identify missing line breaks between entry action (en), during action (du), and exit action (ex) entries in states. Identify missing line breaks after semicolons (;) in statements.

Description

Start a new line after the entry, during, and exit entries, and after the completion of a statement “;”.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
An entry (en) is not on a new line.Add a new line after the entry.
A during (du) is not on a new line. Add a new line after the during.
An exit (ex) is not on a new line.Add a new line after the exit.
Multiple statements found on one line.Add a new line after each statement.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also

Check indentation of code in Stateflow states

Check ID: mathworks.jmaab.jc_0736

Check for uniform indentation of label Strings in Stateflow States and Transitions.

Description

Checks if the indentations in the Stateflow blocks are described uniformly and adhere to the following recommendations:

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0736_a: Check for uniform indentation of action language in Stateflow statesOne or more Stateflow states in the model do not have uniform indentation.Consider deleting the blank spaces before state action types and adding the exact number of single-byte spaces as defined in the input parameter before executable statements.
jc_0736_b: Check for uniform spacing of transition action typesOne or more Stateflow transitions in the model do not have uniform spacing.Consider not adding blank spaces before '[' of a transition condition, '{' of a transition action and '/' of the event in a transition.
jc_0736_c: Check for uniform spacing of transition actionsOne or more Stateflow transitions in the model do not have uniform spacing.Consider adding the exact number of single-byte spaces as defined in the input parameter after the '/' of a transition action.

Capabilities and Limitations

  • Supports selection of Guideline Sub IDs.

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

  • Allows exclusions of charts.

See Also

Check for usage of text inside states

Check ID: mathworks.jmaab.jc_0739

Description

Identifies the Stateflow states with text exceeding the boundary of the state.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more Stateflow states in the model have text exceeding the boundary of the state.Make sure that the text inside the Stateflow state does not go outside the boundary of the state.

Capabilities and Limitations

  • This check flags all the Stateflow states in the model that have a newline character in the text. This flag happens even if the text inside the Stateflow state is contained within the boundary of the state.

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check placement of Label String in Transitions

Check ID: mathworks.jmaab.jc_0770

Description

Checks the placement of the Stateflow Transition labels. The Stateflow signal label must always be at the origin of the signal or at the midpoint of the signal transition line.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — No recommendations

  • JMAAB — a1/a2

Note

Sub-check jc_0770_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0770_a1: Transition labels should be placed near the point of origin of the transitionOne or more Stateflow transitions do not have label string placed near the origin of the transition.Make sure to place the Stateflow labels near the point of origin of the transition.
jc_0770_a2: Transition labels should be placed near center of the transitionOne or more Stateflow transitions do not have label string placed near the center of the transition.Make sure to place the Stateflow labels near the mid-point (center) of the transition.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check position of comments in transition labels

Check ID: mathworks.jmaab.jc_0771

Description

Identifies comments in transition labels that are not positioned uniformly.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs that are 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 — a1/a2

  • JMAAB — a1/a2

Note

Sub-check jc_0771_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0771_a1: Comments in transition labels must be uniformly positioned on topOne or more comments in transition labels are not positioned at the top.Comments in transition labels must be positioned above transition conditions, condition actions, transition actions, and Stateflow events.
jc_0771_a2: Comments in transition labels must be uniformly positioned at the bottomOne or more comments in transition labels are not positioned at the bottom.Comments in transition labels must be positioned below transition conditions, condition actions, transition actions, and Stateflow events.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

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

See Also

Check usage of parentheses in Stateflow transitions

Check ID: mathworks.jmaab.jc_0752

Description

Checks if a new line is started before and after parentheses for condition actions in Stateflow transitions.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Condition actions in Stateflow transitions are written beside parenthesis.Start new line before and after parentheses for condition actions in Stateflow transitions.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also

Check for comments in unconditional transitions

Check ID: mathworks.jmaab.jc_0774

Description

Identifies the comments in unconditional transitions without action statements.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more unconditional transitions without action statements do not have comments.Consider adding a comment explaining the unconditional transition.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check return value assignments in Stateflow graphical functions

Check ID: mathworks.maab.jc_0511

Identify graphical functions with multiple assignments of return values in Stateflow charts.

Description

The return value from a Stateflow graphical function must be set in only one place.

This check requires a Simulink Check and Stateflow license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The return value from a Stateflow graphical function is assigned in multiple places.Modify the specified graphical function so that its return value is set in one place.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check usage of Simulink function in Stateflow

Check ID: mathworks.jmaab.na_0042

Description

Checks the usage of Simulink functions in Stateflow.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Input arguments passed to Simulink Functions should be data of 'Local' scope.Modify the chat data scope to 'Local'.
Input arguments passed to Simulink Functions use data other than a mixture of 'Input' scope and 'Local' scope. Input arguments passed to Simulink Functions should be a mixture of data of 'Local' scope and 'Input' scope.
Simulink functions are not called from multiple locations within the chart.Make sure Simulink functions are reused.

Capabilities and Limitations

  • This check does not analyze if Simulink functions are called every time step.

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

See Also

Check use of Simulink in Stateflow charts

Check ID: mathworks.maab.na_0039

Checks for Stateflow charts that are nested in Simulink functions used in the root Stateflow chart.

Description

Checks Simulink functions in the root Stateflow chart and identifies Stateflow charts that are nested within these functions.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
The Simulink function has a nested Stateflow chart.Consider modifying your root Stateflow chart so the Simulink function does not contain a nested Stateflow chart.

Capabilities and Limitations

  • Does not check Stateflow states.

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • Allows syntax highlighting.

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

See Also

Check MATLAB Function metrics

Check ID: mathworks.maab.himl_0003

Display complexity and code metrics for MATLAB Functions. Report metric violations.

Description

This check provides complexity and code metrics for MATLAB Functions. The check additionally reports metric violations.

A results table provides links to MATLAB Functions that violate the complexity input parameters.

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

To specify the complexity thresholds, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID himl_0003.

  2. Under Input Parameters, select Check .m files referenced in the model to include files with a .m extension in the analysis.

  3. Define these complexity metrics:

    • Maximum effective lines of code per function — Provide the maximum effective lines of code per function. Effective lines do not include empty lines, comment lines, or lines with a function end keyword.

    • Minimum density of comments — Provide minimum density of comments. Density is ratio of comment lines to total lines of code.

    • Maximum cyclomatic complexity per function — Provide maximum cyclomatic complexity per function. Cyclomatic complexity is the number of linearly independent paths through the source code.

  4. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
MATLAB Function violates the complexity input parameters.

For the MATLAB Function:

  • If effective lines of code is too high, further divide the MATLAB Function.

  • If comment density is too low, add comment lines.

  • If cyclomatic complexity per function is too high, further divide the MATLAB Function.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check MATLAB code for global variables

Check ID: mathworks.maab.na_0024

Check for global variables in MATLAB code.

Description

Verifies that global variables are not used in any of the following:

  • MATLAB code in MATLAB Function blocks

  • MATLAB functions defined in Stateflow charts

  • Called MATLAB functions

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action

Global variables are used in one or more of the following:

  • MATLAB code in MATLAB Function blocks

  • MATLAB functions defined in Stateflow charts

  • Called MATLAB functions

Replace global variables with signal lines, function arguments, or persistent data.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not allow exclusions of blocks or charts.

See Also

Check usage of enumerated values

Check ID: mathworks.maab.na_0031

Description

Identifies the enumeration classes used in the model without a default value specification.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Enumeration classes in the model do not have a default value specification.Make sure that the enumeration classes used in the model have a getDefaultValue method implementation as a static method of the class.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content in all masked subsystems.

  • Does not allow exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

Check input and output settings of MATLAB Functions

Check ID: mathworks.maab.na_0034

Identify MATLAB Functions that have inputs, outputs or parameters with inherited complexity or data type properties.

Description

The check identifies MATLAB Functions with inherited complexity or data type properties. A results table provides links to MATLAB Functions that do not pass the check, along with conditions triggering the warning.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
MATLAB Functions have inherited interfaces.

Explicitly define complexity and data type properties for inports, outports, and parameters of MATLAB Function identified in the results.

If applicable, using the MATLAB Function Block Editor, make the following modifications in the Ports and Data Manager:

  • Change Complexity from Inherited to On or Off.

  • Change Type from Inherit: Same as Simulink to an explicit type.

  • Change Size from —1 (Inherited) to an explicit size.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check the number of function calls in MATLAB Function blocks

Check ID: mathworks.maab.na_0017

Description

Checks whether number of function calls in MATLAB Function blocks is less than the set threshold. By default, the limit is set to three.

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

Results and Recommended Actions

ConditionRecommended Action
Number of function calls in MATLAB Function blocks is greater than the set threshold. by default the set threshold is three. The set threshold can be modified by using the input parameter Function Call Level in the configuration editor.Reduce the number of function calls from MATLAB Function blocks to be less than the set threshold.

Capabilities and Limitations

  • Recursive function calls are only counted once.

  • Inline class methods are not analyzed.

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check usage of character vector inside MATLAB Function block

Check ID: mathworks.maab.na_0021

Check for use of character vectors in MATLAB Function blocks.

Description

Identifies character vectors that are used in MATLAB Function blocks.

MATLAB Functions store strings as character arrays. Due to lack of dynamic memory allocation, the arrays cannot be re-sized to accommodate a string value of different length. Strings are not a supported data type in Simulink, so MATLAB Function blocks cannot pass the string data outside the block.

This check requires a Simulink Check license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
MATLAB Function block contains a character vector.Consider using enumerations instead of character vectors.

Capabilities and Limitations

  • Does not flag strings in MATLAB

  • Does not flag character vectors that are hard-coded into the class definition.

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check usage of recommended patterns for Switch/Case statements

Check ID: mathworks.maab.na_0022

Check for use of non-constant variables in Switch/Case statements.

Description

In generated code, MATLAB Function block inputs are passed as functional arguments. This check evaluates the Switch/Case statements in the generated code to determine if non-constant values are being used in the Case argument.

This check requires a Simulink Check license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

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

  • JMAAB — Not supported

Results and Recommended Actions

ConditionRecommended Action
Non-constant variables are used in the Switch/Case statement.Consider defining the input variable as a constant.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also

Check for use of C-style comment symbols

Check ID: mathworks.jmaab.jc_0801

Description

Identifies the usage of C-style (/* and */) comments in CGT files and MPT objects.

This check requires Simulink Check and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more entities use C-style comments.Consider removing C-style comments in CGT files and MPT objects.

Capabilities and Limitations

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Does not analyze content in all masked subsystems.

  • Does not allow exclusions of blocks or charts.

See Also