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:
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.
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.
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.
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.
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:
Checks related to the naming conventions.
For more information, see Modeling Guidelines and Model Advisor Checks for MAB and JMAAB.
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.
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.
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.
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.
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 ID:
mathworks.jmaab.ar_0001
Checks weather the file names meet the guideline standards.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
ar_0001_a: Characters allowed for file names | One or more files have invalid names. | Use alphanumeric characters and underscores in file names. |
ar_0001_b: Number at the beginning | One 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 beginning | One 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 end | One or more files have underscores at the end of the file name. | Do not end the file names with underscores. |
ar_0001_e: Consecutive underscores | One 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 path | One or more files have names which are identical to files present in MATLAB path. | Use unique file names. |
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.
MAB guideline ar_0001: Usable characters for file names
JMAAB guideline ar_0001
Check ID:
mathworks.jmaab.ar_0002
Checks folder names to meet the guideline standards.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
ar_0002_a: Characters allowed for folder names | One or more folders have invalid names. | Use only alphanumeric characters and underscores in folder names. |
ar_0002_b: Number at the beginning | One 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 beginning | One 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 end | One or more folders have underscores at the end of the folder name. | Do not end the folder names with underscores. |
ar_0002_e: Consecutive underscores | One 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. |
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.
MAB guideline ar_0002: Usable characters for folder names
JMAAB guideline ar_0002
Check ID:
mathworks.jmaab.jc_0241
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.
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
Condition | Recommended 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. |
MAB guideline jc_0241: Length restriction for model file names
JMAAB guideline jc_0241
Check ID:
mathworks.jmaab.jc_0242
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.
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
Condition | Recommended 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. |
MAB guideline jc_0242: Length restriction for folder names
JMAAB guideline jc_0242
Check ID:
mathworks.jmaab.jc_0201
Identifies subsystem names with incorrect characters.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0201_a: Characters allowed for subsystem names | One or more subsystems have invalid names. | Use only alphanumeric characters and underscores in subsystem names. |
jc_0201_b: Number at the beginning | One 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 beginning | One 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 end | One or more subsystems have underscores at the end of the subsystem name. | Do not end the subsystem names with underscores. |
jc_0201_e: Consecutive underscores | One 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0201: Usable characters for subsystem names
JMAAB guideline jc_0201
Check ID:
mathworks.jmaab.jc_0231
Identifies block names with incorrect characters.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0231_a: Characters allowed for block names | One or more blocks in the model have invalid names. | Use only alphanumeric characters and underscores in block name. |
jc_0231_b: Number at the beginning | One 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 beginning | One 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 end | One 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 underscores | One 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 word | One or more blocks in the model use reserved MATLAB words as the block name. | Do not use reserved MATLAB word as block name. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0231: Usable characters for block names
JMAAB guideline jc_0231
Check ID:
mathworks.jmaab.jc_0211
Identifies Inport or Outport block names with incorrect characters.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0211_a: Characters allowed for port block names | One or more port blocks have invalid names. | Use only alphanumeric characters and underscores in port block names. |
jc_0211_b: Number at the beginning | One 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 beginning | One 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 end | One 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 underscores | One 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0211: Usable characters for Inport blocks and Outport block
JMAAB guideline jc_0211
Check ID:
mathworks.jmaab.jc_0243
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.
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
Condition | Recommended 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0243: Length restriction for subsystem names
JMAAB guidline jc_0243
Check ID:
mathworks.jmaab.jc_0247
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.
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
Condition | Recommended 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0247: Length restriction for block names
JMAAB guideline jc_0247
Check ID:
mathworks.jmaab.jc_0244
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.
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
Condition | Recommended 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0244: Length restriction for Inport and Outport names
JMAAB guideline jc_0244
Check ID:
mathworks.jmaab.jc_0222
Checks the signal and bus names in the model.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0222_a: Characters allowed for subsystem names | Signal 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 beginning | Signal 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 beginning | Signal 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 end | Signal 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 underscores | Signal 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. |
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
.
MAB guideline jc_0222: Usable characters for signal and bus names
JMAAB guideline jc_0222
Check ID:
mathworks.jmaab.jc_0232
Checks the parameter names in the model.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0232_a: Characters allowed for parameter names | The parameter name contains illegal characters. | Use only alphanumeric characters and underscores in parameter names. |
jc_0232_b: Number at the beginning | The parameter name starts with a number. | Use alphabetic characters at the beginning of the parameter names. |
jc_0232_c: Underscore at the beginning | The parameter name starts with an underscore ("_"). | Use alphabetic characters at the beginning of the parameter names. |
jc_0232_d: Underscore at the end | The parameter name ends with an underscore ("_"). | Do not end parameter names with underscores. |
jc_0232_e: Consecutive underscores | The parameter name has consecutive underscores. | Do not use consecutive underscores in the parameter names. |
jc_0232_f: Single reserved MATLAB word | The parameter name is a reserved MATLAB words. | Do not use reserved MATLAB word as the parameter names. |
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.
MAB guideline jc_0232: Usable characters for parameter names
JMAAB guideline jc_0232
Check ID:
mathworks.jmaab.jc_0245
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0245: Length restriction for signal and bus names
JMAAB guideline jc_0245
Check ID:
mathworks.jmaab.jc_0246
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.
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
Condition | Recommended 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. |
Analyzes content of library linked blocks.
Analyzes content in all masked files.
Does not support exclusions of blocks or charts.
MAB guideline jc_0246: Length restriction for parameter name
JMAAB guideline jc_0246
Check ID:
mathworks.jmaab.jc_0795
Checks if the Stateflow data names in the model are using acceptable characters.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0795_a: Underscore at the beginning | The Stateflow data name starts with an underscore ("_"). | Rename the Stateflow data. |
jc_0795_b: Underscore at the end | The Stateflow data name ends with an underscore ("_"). | Rename the Stateflow data. |
jc_0795_c: Consecutive underscores | The Stateflow data name has consecutive underscores. | Rename the Stateflow data. |
jc_0795_d: Single reserved MATLAB word | The Stateflow data name is solely a reserved MATLAB word. | Consider using a different name for Stateflow data. |
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
.
MAB guideline jc_0795: Usable characters for Stateflow data names
JMAAB guideline jc_0795
Check ID:
mathworks.jmaab.jc_0796
Checks if the length of Stateflow data names are within the limit of 63 characters.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Length of Stateflow data names are not within the limit of 63 characters. | Consider using a different name for each Stateflow data name. |
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.
MAB guideline jc_0796: Length restriction for Stateflow data names
JMAAB guideline jc_0796
Check ID:
mathworks.jmaab.jc_0791
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0791_a: Check for repeated data names across base workspace and model workspace | Simulink 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 dictionary | Simulink 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 dictionary | Simulink 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. |
Runs on library models.
Does not allow exclusions of blocks and charts.
MAB guideline jc_0791: Duplicate data name definitions
JMAAB guideline jc_0791
Check ID:
mathworks.jmaab.jc_0792
Identifies unused data in the model workspace and data dictionary.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0792_a: Check for unused data in Data Dictionary | One 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 Workspace | One or more data variables in the model workspace are unused. | Consider removing the unused data variables. |
Does not run on library models.
Allows exclusions of blocks or charts.
MAB guideline jc_0792: Unused Data
JMAAB guideline jc_0792
Check ID:
mathworks.jmaab.jc_0700
Checks the state of the parameter Unused data, events, messages and functions.
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.
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
Condition | Recommended 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. |
Runs on library models.
MAB guideline jc_0700: Unused data in Stateflow block
JMAAB guideline jc_0700
Check ID:
mathworks.maab.na_0019
Check for use of reserved keywords in MATLAB Function block variable names.
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.
Condition | Recommended Action |
---|---|
Variable name conflicts with reserved keyword. | Consider using a different variable name that does not conflict with the reserved keywords. |
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
.
MAB guideline na_0019: Restricted variable names
Check ID: mathworks.maab.jc_0011
Check the optimization parameter for Boolean data types.
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.
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
Condition | Recommended 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. |
Does not run on library models.
Does not allow exclusions of blocks or charts.
MAB guideline jc_0011: Optimization parameters for Boolean data types
JMAAB guideline jc_0011
Check ID:
mathworks.jmaab.jc_0642
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0642: Integer rounding mode setting
JMAAB guideline jc_0642
Check ID:
mathworks.jmaab.jc_0806
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.
Condition | Recommended 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. |
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Does not allow exclusions of blocks or charts.
MAB guideline jc_0806: Detecting incorrect calculation results
JMAAB guideline jc_0806
Check ID: mathworks.maab.jc_0021
Check the model diagnostic configuration parameter settings.
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.
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
Condition | Recommended 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
none | Set 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. |
Does not run on library models.
Does not allow exclusions of blocks or charts.
MAB guideline jc_0021: Model diagnostic settings
Check ID: mathworks.maab.na_0004
Check model appearance setting attributes.
Model appearance settings are required to conform to the guidelines when the model is released.
This check requires a Simulink Check license.
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
Condition | Recommended 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%). |
Clicking Modify updates the display attributes to conform to the guideline.
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.
MAB guideline: na_0004: Simulink model appearance settings
JMAAB guideline: na_0004
Check ID:
mathworks.jmaab.db_0043
Check for difference in font and font sizes.
Available with Simulink Check.
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.
Open the Model Configuration Editor and search for
check ID db_0043
.
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.
Click Apply and save the configuration.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0043_a: Check font and font style in Simulink block and signal names | Font 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 names | Font 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 objects | Font 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 objects | Font settings of one or more Stateflow objects are different from input parameters. | Change font size of Stateflow objects as per input parameters. |
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.
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.
MAB guideline db_0043: Model font and font size
JMAAB guideline db_0043
Check ID: mathworks.maab.db_0142
Check whether block names appear below blocks.
If shown, the name of the block should appear below the block.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Blocks have names that do not appear below the blocks. | Set the name of the block to appear below the blocks. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
This check is supported by edit-time checking.
MAB guideline db_0142: Position of block names in the Simulink documentation.
JMAAB guideline db_0142
Check ID: mathworks.maab.jc_0061
Check the display attributes of subsystem and block names.
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:
ModelReference
Logic
Trigonometry
Sum
Merge
This check requires a Simulink Check license.
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.
Open the Model Configuration Editor and search for check ID
jc_0061
.
Under Input Parameters, select
Custom
from the Standards list.
Use the Block Types list table to delete or add a block and/or mask type.
Click Apply and save the configuration.
Condition | Recommended 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:
| 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:
| 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. |
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.
MAB guideline jc_0061: Display of block names
JMAAB guideline jc_0061
Check ID: mathworks.maab.db_0140
Identify blocks that use nondefault block parameter values that are not displayed in the model diagram.
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/
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.blocktype
'
This check requires a Simulink Check license.
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.
Open the Model Configuration Editor and search for check ID
db_0140
.
Under Input Parameters, select
Custom
from the Standards list.
Use the List of Block Types table to delete or add a parameter for the block.
Click Apply and save the configuration.
Condition | Recommended 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. |
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.
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.
MAB guideline db_0140: Display of block parameters
JMAAB guideline: db_0140
Check ID:
mathworks.jmaab.jc_0603
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.
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>
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0603_a: Check for layer description at each layer | One 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 description | One 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. |
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.
MAB guideline jc_0603: Model description
JMAAB guideline jc_0603
Check ID:
mathworks.jmaab.jc_0604
Checks if block shading is used in the model.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Block shading is turned on. | Consider turning off the DropShadow property in blocks for better readability. |
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.
MAB guidelines jc_0604: Using block shadow
JMAAB guideline jc_0604
Check ID:
mathworks.jmaab.db_0081
Check whether model has unconnected input ports, output ports, or signal lines.
Unconnected blocks and signal lines should be connected to Terminator or Ground blocks.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0081_a: Check for unconnected signal lines | One 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 blocks | One 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. |
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.
MAB guideline db_0081: Unconnected signals and blocks
JMAAB guideline db_0081
Check ID:
mathworks.jmaab.db_0032
Checks if the Simulink signals that are intersecting and overlapping adhere to recommended guidelines.
This check requires a Simulink Check license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0032_a1: Check signal intersections | Simulink 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 overlaps | Simulink 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 sublines | Signal 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 lines | Signals are drawn as slanting lines in the diagram. | Make sure to draw signals as vertical or horizontal lines. |
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
.
MAB guideline db_0032: Signal line connections
JMAAB guideline db_0032
Check ID:
mathworks.maab.db_0141
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.
Condition | Recommended 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. |
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.
MAB guideline db_0141: Signal flow in Simulink models
JMAAB guideline db_0141
Check ID: mathworks.maab.db_0110
Check whether tunable parameters specify expressions, data type conversions, or indexing operations.
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.
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
Condition | Recommended 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. |
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.
MAB guideline db_0110: Block parameters
JMAAB guideline db_0110
Check ID:
mathworks.jmaab.jc_0171
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0171_a: Check direct connections between structural subsystems | One 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 subsystems | One 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. |
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.
MAB guideline jc_0171: Clarification of connections between structural subsystems
JMAAB guideline jc_0171
Check ID:
mathworks.jmaab.jc_0602
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.
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
Condition | Recommended 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. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks or charts.
MAB guideline jc_0602: Consistency in model element names
JMAAB guideline jc_0602
Check ID:
mathworks.jmaab.jc_0281
Identify trigger blocks where the origin of the trigger signal and the destination have dissimilar names.
This check requires a Simulink Check license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0281_a1: Check names of the origin of the trigger signal and the conditional input block | The 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 subsystem | The 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 block | The 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 subsystem | The 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 event | The 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 name | The 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 event | The 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 Chart | The 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. |
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.
MAB guideline jc_0281: Trigger signal names
JMAAB guideline jc_0281
Check ID: mathworks.maab.db_0143
Check for systems that mix primitive blocks and subsystems.
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.
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.
Open the Model Configuration Editor and search for check ID
db_0143
.
Under Input Parameters, select
Custom
from the Standards list.
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.
Use the Block Types list table to delete or add a block and/or mask type.
Click Apply and save the configuration.
Condition | Recommended Action |
---|---|
A level in the model includes subsystem blocks and primitive blocks. | Move nonvirtual blocks into the subsystem. |
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.
MAB guideline db_0143: Usable block types in model hierarchy
JMAAB guideline db_0143
Check ID:
mathworks.jmaab.jc_0653
Checks the placement of the Delay blocks in algebraic loops between subsystems.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Delay blocks in feedback loops are placed inside subsystem. | Delay blocks in feedback loops must be placed outside of their parent subsystem. |
Runs on library models.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
Analyzes content of library linked blocks.
MAB guideline jc_0653: Delay block layout in feedback loops
JMAAB guideline jc_0653
Check ID: mathworks.maab.hd_0001
Check for prohibited Simulink sink blocks.
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.
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.
Open the Model Configuration Editor and search for
check ID hd_0001
.
Under Input Parameters, select
Custom
from the
Standards list.
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.
Use the Block Types list table to delete or add a block and/or mask type.
Click Apply and save the configuration.
Condition | Recommended Action |
---|---|
Sink blocks are not permitted in discrete controllers. | Remove sink blocks from the model. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
This check is supported by edit-time checking.
MAB guideline: hd_0001: Prohibited Simulink sinks
Check ID:
mathworks.jmaab.na_0010
Check usage of buses and Mux blocks.
This check verifies the usage of buses and Mux blocks.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
na_0010_a: Check usage of Mux and Demux blocks | Mux 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 blocks | Mux 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 vectors | One or more configuration parameters are set inappropriately. | Set the configuration parameters to the recommended value. |
na_0010_d: Check usage of bus signals | One or more blocks are not supported for use with bus signals. | Use buses only with bus-supported blocks. |
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
.
MAB guideline na_0010: Usage of vector and bus signals
JMAAB guideline na_0010
Check ID:
mathworks.jmaab.jc_0008
Check the labeling on signal lines.
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.
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
Condition | Recommended Action |
---|---|
Signals coming from Bus Selector, Chart, Constant, Data Store Read, Demux, From, Inport, or Selector blocks are not labeled. | Label the signal. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in masked subsystems that have no workspaces and no dialogs.
Allows exclusions.
MAB guideline jc_0008: Definition of signal names
JMAAB guideline jc_0008
Check ID:
mathworks.jmaab.jc_0009
Check for propagated labels on signal lines.
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0009_a: Check Signal name propagation for subsystems | The 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 blocks | One 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. |
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.
MAB guideline jc_0009: Signal name propagation
JMAAB guideline jc_0009
Check ID:
mathworks.jmaab.db_0097
Identify inappropriately placed signal labels for signals and buses.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0097_a: Check overlap of signal labels | One 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 labels | One 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 labels | One 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. |
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.
MAB guideline db_0097: Position of labels for signals and buses
JMAAB guideline db_0097
Check ID:
mathworks.maab.na_0008
Check the labeling on signal lines.
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.
To customize the blocks and masks for this check, use the Model Advisor Configuration Editor.
Open the Model Configuration Editor and search for check ID
na_0008
.
Under Input Parameters, select
Custom
from the Standards list.
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.
Click Apply and save the configuration.
Condition | Recommended 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. |
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
.
MAB guideline: na_0008: Display of labels on signals
Check ID:
mathworks.maab.na_0009
Check for propagated labels on signal lines.
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.
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
Condition | Recommended 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. |
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.
Check ID:
mathworks.jmaab.jc_0110
Checks blocks with changed orientation.
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.
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
Condition | Recommended Action |
---|---|
Some blocks in the model have rotated or reversed orientation. | Flip or rotate these blocks to be oriented toward the right. |
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.
MAB guideline jc_0110: Direction of block
JMAAB guideline jc_0110
Check ID:
mathworks.jmaab.db_0112
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0112_a1: Check for Zero-Based Indexing Mode | One 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. |
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
.
MAB guideline db_0112: Usage of index
JMAAB guideline db_0112
Check ID:
mathworks.jmaab.jc_0645
Checks if the tunable block parameters are defined as named constants.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Improper usage of tunable block parameter values. | Change the tunable block parameter literal values to named constants. |
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.
MAB guideline jc_0645: Parameter definition for calibration
JMAAB guideline jc_0645
Check ID:
mathworks.jmaab.jc_0641
Check if the sample time property of a block is set to -1 (inherited).
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Sample time property of a block is not set to -1 (inherited). | Change the sample time to -1 (inherited). |
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.
MAB guideline jc_0641: Sample time setting
JMAAB guideline jc_0641
Check ID:
mathworks.jmaab.jc_0643
Check blocks with whose output signal data type is fixed-point and bias is not zero.
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.
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
Condition | Recommended Action |
---|---|
In the Data Type Assistant, Mode is set to
| Change block parameter Bias to
0 . |
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
.
MAB guideline jc_0643: Fixed-point setting
JMAAB guideline jc_0643
Check ID:
mathworks.jmaab.jc_0644
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.
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
Condition | Recommended 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. |
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
.
MAB guideline jc_0644: Type setting
JMAAB guideline jc_0644
Check ID:
mathworks.jmaab.db_0146
Check the position of Trigger and Enable blocks.
Locate blocks that define subsystems as conditional or iterative at the top of the subsystem diagram.
This check requires a Simulink Check license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0146_a: Block layout in conditional subsystem | Trigger, 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 subsystem | For 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. |
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
.
MAB guideline db_0146: Block layout in conditional subsystems
JMAAB guideline db_0146
Check ID:
mathworks.jmaab.jc_0640
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0640: Initial value settings for Outport blocks in conditional subsystems
JMAAB guideline jc_0640
Check ID:
mathworks.jmaab.jc_0659
Checks if there are any blocks present in between a conditional subsystem and a merge block.
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0659: Usage restrictions of signal lines input to Merge blocks
JMAAB guideline jc_0659
Check ID: mathworks.maab.na_0003
Check If blocks for inappropriate construct of primary expressions in a logical expression.
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 Expression | Reasoning |
---|---|
| Too many primary expressions. |
| Unacceptable operator within primary expression. |
| Too many primary expressions that are not inputs. |
| 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.
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
Condition | Recommended Action |
---|---|
Logical expression contains more than two primary expressions that consist of a constant, constant parameter, and input. | Consider one of the following:
|
Logical expression contains more than two parenthesized expressions that use multiple relational operators | Consider one of the following:
|
Parenthesized expression includes a relational operator other than
zero or < , > ,
>= , <= ,
== , ~= , | ,
& , or ~ . | Consider one of the following:
|
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.
MAB guideline na_0003: Usage of If blocks
JMAAB guideline na_0003
Check ID:
mathworks.jmaab.jc_0656
Checks the default/else case in Switch Case blocks and If blocks.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Improper usage of Switch and If blocks. | Consider setting the default/else case option in Switch Case blocks and If blocks to on. |
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.
MAB guideline jc_0656: Usage of Conditional Control blocks
JMAAB guideline jc_0656
Check ID:
mathworks.jmaab.na_0002
Checks data types in numerical and logic blocks.
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.
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.
Open the Model Configuration Editor and search for check ID
na_0002
.
Under Input Parameters, add or remove blocks and/or masks from the Blocks for Numerical Operations table or Blocks for Logical Operations table.
Click Apply and save the configuration.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
na_0002_a: Check input data types of blocks meant for logical operations | Data 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 operations | Data type for a numerical operation blocks is Boolean. | Consider having non-boolean inputs for the numerical operation blocks. |
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
.
MAB guideline na_0002: Appropriate usage of basic logical and numerical operations
JMAAB guideline na_0002
Check ID:
mathworks.jmaab.jc_0121
Identifies the violations of the guideline found with the usage of the Sum block.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0121_a: Check shape of Sum block | One 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 block | One 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 block | One or more Sum blocks have more than two inputs. | Set Sum block to have no more than two inputs. |
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
.
MAB guideline jc_0121: Usage of add and subtraction blocks
JMAAB guideline jc_0121
Check ID:
mathworks.jmaab.jc_0610
Checks the operator order of product blocks.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0610_a: Check first input to Product block | Improper 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0610: Operator order for multiplication and division block
JMAAB guideline jc_0610
Check ID:
mathworks.jmaab.jc_0611
Check the sign bit for the input signal data types in product blocks with division operators.
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.
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
Condition | Recommended Action |
---|---|
Input signal data types have different sign bits. | Update the production block so the sign bit for the input signal data types match. |
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.
MAB guideline jc_0611: Input sign for multiplication and division blocks
JMAAB guideline jc_0611
Check ID:
mathworks.jmaab.jc_0622
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.
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
Condition | Recommended Action |
---|---|
Improper usage of Fcn block expressions. | Resolve the operator precedence in Fcn block expressions by adding parentheses. |
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.
MAB guideline jc_0622: Usage of Fcn blocks
JMAAB guideline jc_0622
Check ID:
mathworks.jmaab.jc_0621
Checks icon shape of Logical Operator blocks. Icon shape of Logical Operator should be rectangular.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
Improper setting of icon shape for Logical Operator blocks. | Change the icon shape of Logical Operator blocks to rectangular for readability. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0621: Usage of Logical Operator blocks
JMAAB guideline jc_0621
Check ID: mathworks.maab.jc_0131
Check the position of Constant blocks used in Relational Operator blocks.
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.
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
Condition | Recommended Action |
---|---|
Relational Operator blocks have a Constant block on the first, upper input. | Move the Constant block to the second, lower input. |
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.
MAB guideline jc_0131: Usage of Relational Operator blocks
JMAAB guideline jc_0131
Check ID:
mathworks.jmaab.jc_0800
Checks if equivalence comparison is done on floating-point numbers.
This check requires a Simulink Check license.
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
Condition | Recommended 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. |
Does not run on library models.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
Analyzes content of library linked blocks.
MAB guideline jc_0800: Comparing floating-point types in Simulink
JMAAB guideline jc_0800
Check ID:
mathworks.jmaab.jc_0626
Checks for the correct parameter settings in Lookup Tables to prevent unexpected results.
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0626_a: Check Lookup Method settings for Dynamic Lookup table blocks | The 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 blocks | The parameter InterpMethod in the n-D lookup table is set to Cubic spline. | Update the parameter settings with one of the following recommended values
|
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. |
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.
MAB guideline jc_0626: Usage of Lookup Table blocks
JMAAB guideline jc_0626
Check ID:
mathworks.jmaab.jc_0623
Checks Memory and Unit Delay blocks with inappropriate sample time.
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0623: Usage of continuous-time Delay blocks and discrete-time Delay blocks
JMAAB guideline jc_0623
Check ID:
mathworks.jmaab.jc_0624
Identifies cascaded and tapped pattern of Unit Delay blocks.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0624_a: Check Delay blocks usage in tapped pattern | Set 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 blocks | Set of Delay blocks can be replaced by a single Delay block. | Consider replacing cascaded Delay blocks with a Delay block. |
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
.
MAB guideline jc_0624: Usage of Tapped Delay blocks/Delay blocks
JMAAB guideline jc_0624
Check ID:
mathworks.jmaab.jc_0627
Check usage of Discrete-Time Integrator block.
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0627_a: Check Saturation limit settings of Discrete-Time Integrator blocks | Block parameter Limit output is cleared | Select the Discrete-Time Integrator block parameter Limit output. |
jc_0627_b: Check Saturation limit settings of Discrete-Time Integrator blocks | Saturation limit is defined by a Parameter object whose data type is
not auto | Change the data type for the Parameter object to
auto . |
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
.
MAB guideline jc_0627: Usage of Discrete-Time Integrator blocks
JMAAB guideline jc_0627
Check ID:
mathworks.jmaab.jc_0628
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.
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
Condition | Recommended 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. |
|
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.
MAB guideline jc_0628: Usage of Saturation blocks
JMAAB guideline jc_0628
Check ID:
mathworks.jmaab.jc_0651
Checks if the model adheres to the guidelines for implementing type conversion.
This check requires a Simulink Check license.
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
Condition | Recommended 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. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks or charts.
MAB guideline jc_0651: Implementing a type conversion
JMAAB guideline jc_0651
Check ID:
mathworks.jmaab.db_0042
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0042_a: Check positions of Inport blocks | Inport 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 blocks | Outport 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 blocks | Ports are duplicate Inport blocks. |
|
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
.
MAB guideline db_0042: Usage of Inport and Outport blocks
JMAAB guideline db_0042
Check ID: mathworks.maab.jc_0081
Check the Icon display setting for Inport and Outport blocks.
The Icon display setting is required.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
The Icon display setting is not set. | Set the Icon display to Port number for the specified Inport and Outport blocks. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0081: Inport and Outport block icon display
JMAAB guideline jc_0081
Check ID:
mathworks.maab.na_0011
Check the scope of From and Goto blocks.
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.
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
Condition | Recommended Action |
---|---|
From and Goto blocks are not configured with local scope. |
|
Does not run on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
MAB guideline na_0011: Scope of Goto and From blocks
JMAAB guideline na_0011
Check ID:
mathworks.jmaab.jc_0161
Identifies the usage of Data Store Memory blocks.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0161_a: Check Data Store Memory block definition | One 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 block | Data 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. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked files.
Allows exclusions.
MAB guideline jc_0161: Definition of Data Store Memory blocks
JMAAB guideline jc_0161
Check ID: mathworks.maab.jc_0141
Check usage of Switch blocks.
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.
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
Condition | Recommended 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. |
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.
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.
MAB guideline jc_0141: Usage of the Switch blocks
JMAAB guideline jc_0141
Check ID:
mathworks.jmaab.jc_0650
Check whether the input and output data types for data ports are the same for switching function blocks.
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.
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
Condition | Recommended 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. |
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
.
MAB guideline jc_0650: Block input/output data type with switching function
JMAAB guideline jc_0650
Check ID: mathworks.jmaab.jc_0630
Identifies the Multiport Switch blocks that violate data port settings.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0630_a: Check number of inputs to Multiport Switch block | Switch 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 block | Data 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 block | Multiport 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. |
Runs on library models.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
Analyzes content of library linked blocks.
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.
MAB guideline jc_0630: Usage of Multiport Switch blocks
JMAAB guideline jc_0630
Check ID:
mathworks.jmaab.na_0020
Checks for number of inputs/outputs to a Variant Subsystem.
This check requires a Simulink Check license.
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.
Condition | Recommended 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. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked files.
Allows exclusions of blocks or charts.
MAB guideline na_0020: Number of inputs to variant subsystems
JMAAB guideline na_0020
Check ID:
mathworks.maab.na_0036
Check use of default variants in a variant subsystem.
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.
To set the active variant as the default variant, use the Model Advisor Configuration Editor.
Open the Model Configuration Editor and search for check ID
na_0036
.
Under Input Parameters, select Check use of 'Allow zero active variant controls' option.
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
Click Apply and save the configuration.
Condition | Recommended Action |
---|---|
The subsystem does not contain a default variant. | Set block parameter Variant control to
|
Block parameter Variant Control is set to
Variant . | To set the active variant as the default variant.
|
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
MAB guideline na_0036: Default variant
JMAAB guideline na_0036
Check ID:
mathworks.maab.na_0037
Check use of single variables in conditional expressions
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.
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
Condition | Recommended Action |
---|---|
Conditional expression contains more than one condition variable. | Consider updating your model so that only one variant is used. |
Conditional expression variable or | 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. |
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.
MAB guideline na_0037: Use of single variable for variant condition
JMAAB guideline na_0037
Check ID:
mathworks.jmaab.db_0122
Check whether labeled Stateflow and Simulink input and output signals are strongly typed.
Strong data typing between Stateflow and Simulink input and output signals is required.
Available with Simulink Check.
This check requires a Stateflow license.
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
Condition | Recommended 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. |
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
.
MAB guideline db_0122: Stateflow and Simulink interface signals and parameters
JMAAB guideline db_0122
Syntax for States and Transitions (Stateflow)
Check ID: mathworks.maab.db_0123
Check for mismatches between Stateflow ports and associated signal names.
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.
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
Condition | Recommended Action |
---|---|
Signals have names that differ from the corresponding Stateflow ports. | Change the names of either the signals or the Stateflow ports. |
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.
MAB guideline db_0123: Stateflow port names
Check ID:
mathworks.jmaab.db_0125
Identifies the Scope value set on Stateflow data defined at machine level.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0125_a: Check for Stateflow data with Scope set to Local at machine level | Stateflow data with Local Scope defined at machine level | Consider not defining data with Local Scope at machine level. |
db_0125_b: Check for Stateflow data with Scope set to Constant at machine level | Stateflow data with Constant Scope defined machine level | Consider not defining data with Constant Scope at machine level. |
db_0125_c: Check for Stateflow data with Scope set to Parameter at machine level | Stateflow data with Parameter Scope defined at machine level | Consider 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 hierarchy | Stateflow data defined in a chart have multiple definition on the same Stateflow block hierarchy | Consider using unique Stateflow data names in the hierarchy. |
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.
MAB guideline db_0125: Stateflow local data
JMAAB guideline db_0125
Check ID:
mathworks.jmaab.db_0126
Stateflow events should be defined at the smallest possible scope of usage.
This check requires a Simulink Check license.
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
Condition | Recommended 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. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked files.
Does not support exclusions of blocks or charts.
MAB guideline db_0126: Defining Stateflow events
JMAAB guideline db_0126
Check ID:
mathworks.jmaab.jc_0701
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.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0701_a1: Check if first index of Stateflow data is set to 0 | One 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 1 | One or more Stateflow data have first index set to a value other than 1. | Make Sure to set the first index value to 1. |
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.
MAB guideline jc_0701: Usable number for first index
JMAAB guideline jc_0701
Check ID:
mathworks.jmaab.jc_0712
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.
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
Condition | Recommended Action |
---|---|
The parameter Execute (enter) Chart At Initialization is selected. | Make sure to clear the selection. |
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.
MAB guideline jc_0712: Execution timing for default transition path
JMAAB guideline jc_0712
Check ID:
mathworks.jmaab.jc_0722
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0722: Local data definition in parallel states
JMAAB guideline jc_0722
Check ID:
mathworks.jmaab.jc_0797
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0797_a: Check unconnected transitions | One or more transitions in the chart are unconnected. | Consider remodeling to connect the dangling transitions. |
jc_0797_b: Check unconnected states and junctions | One or more states and junctions are unconnected. | Consider remodeling to connect the unconnected States and Junctions. |
Runs on library models.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
Analyzes content of library linked blocks.
MAB guideline jc_0797: Unconnected transitions / states / connective junctions
JMAAB guideline jc_0797
Check ID:
mathworks.jmaab.db_0137
Identifies states with OR(exclusive) type decomposition with only one sub-state.
This check requires a Simulink Check and Stateflow license.
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
Condition | Recommended 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. |
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
.
This check is supported by edit-time checking.
MAB guideline db_0137: States in state machines
JMAAB guideline db_0137
Check ID:
mathworks.jmaab.jc_0721
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.
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
Condition | Recommended Action |
---|---|
Parallel states are only for grouping. | Substates of the parallel states must not be parallel (do not use for grouping). |
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.
This check is supported by edit-time checking.
MAB guideline jc_0721: Usage of parallel states
JMAAB guideline jc_0721
Check ID:
mathworks.jmaab.db_0129
Checks and reports Stateflow transitions that are visually overlapping other Stateflow objects.
This check requires a Simulink Check and Stateflow license.
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
Guideline Sub IDs | Condition | Recommended Action |
---|---|---|
db_0129_a: Check for transition lines that cross over one another | Transition 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 another | Transition 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 objects | Transition 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 lines | Transitions 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 junctions | One or more charts use unnecessary connective junctions. | Consider avoiding unnecessary connective junctions. |
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.
MAB guideline db_0129: Stateflow transition appearance
JMAAB guideline db_0129
Check ID:
mathworks.jmaab.jc_0531
Checks the default transition placement in Stateflow charts.
This check requires a Simulink Check and Stateflow license.
Condition | Recommended 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. |
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
.
MAB guideline jc_0531: Default transition
JMAAB guideline jc_0531
Syntax for States and Transitions (Stateflow)
Check ID:
mathworks.jmaab.jc_0723
Identifies transitions in Stateflow Charts that end on external child states.
This check requires a Simulink Check license.
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
Condition | Recommended Action |
---|---|
One or more transitions end on external child states. | Consider remodeling to avoid use of transitions ending on external child states. |
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Supports exclusions of charts.
This check is supported by edit-time checking.
MAB guideline jc_0723: Prohibited direct transition from external state to child state
JMAAB guideline jc_0723
Check ID:
mathworks.jmaab.jc_0751
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.
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
Condition | Recommended Action |
---|---|
Backtracking is undetected during the state transition. | Set configuration parameter for Unexpected backtracking (SFUnexpectedBacktrackingDiag) to error. |
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.
MAB guideline jc_0751: Backtracking prevention in state transition
JMAAB guideline jc_0751
Check ID:
mathworks.jmaab.jc_0760
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.
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
Condition | Recommended 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. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0760: Starting point of internal transition
JMAAB guideline jc_0760
Check ID:
mathworks.jmaab.jc_0763
Identifies the Stateflow states that uses multiple internal transitions.
This check requires a Simulink Check and Stateflow license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0763_a1: Check for multiple internal transitions | One 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 transitions | One 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. |
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.
MAB guideline jc_0763: Usage of multiple internal transitions
JMAAB guideline jc_0763
Check ID:
mathworks.jmaab.jc_0762
Checks if state actions within states and flow chart statements are used in combination.
This check requires a Simulink Check and Stateflow license.
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
Condition | Recommended Action |
---|---|
Stateflow states combine state action and flow chart. | Separate state actions and flow chart statements into different states. |
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.
This check is supported by edit-time checking.
MAB guideline jc_0762: Prohibition of state action and flow chart combination
JMAAB guideline jc_0762
Check ID:
mathworks.jmaab.db_0132
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0132_a: Check usage of transition actions in Stateflow Flow charts | One 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 charts | One 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. |
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.
This check is supported by edit-time checking.
MAB guideline db_0132: Transitions in flow charts
JMAAB guideline db_0132
Check ID:
mathworks.jmaab.jc_0773
Identifies unconditional transitions in flow charts.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0773_a: Check for the presence of unconditional transition originating from a Stateflow junction with conditional transition | One 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 transitions | One 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. |
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
.
MAB guideline jc_0773: Unconditional transition of a flow chart
JMAAB guideline jc_0773
Check ID:
mathworks.jmaab.jc_0775
Identifies the usage of terminal junctions in flow charts.
This check requires a Simulink Check license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0775_a1: Check for usage of only one terminal junction | One 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 input | One 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. |
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
.
MAB guideline jc_0775: Terminating junctions in flow charts
JMAAB guideline jc_0775
Check ID:
mathworks.jmaab.jc_0738
Identifies the comments that contains newline(s) or nested in the middle in Stateflow.
This check requires a Simulink Check and Stateflow license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0738_a: If the action language is "C", comment nesting must not be used | On 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 middle | One or more comments in Stateflow objects contain newline(s) in the middle. | Comments in Stateflow must not contain newline(s) in the middle. |
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
.
MAB guideline jc_0738: Usage of Stateflow comments
JMAAB guideline jc_0738
Check ID:
mathworks.jmaab.jc_0790
Checks if the action language of Stateflow charts is set to C.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended Action |
---|---|
Action language of one or more Stateflow charts is not set to C. | Set all Stateflow charts action language to C. |
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
.
This check is supported by edit-time checking.
MAB guideline jc_0790: Action language of Chart block
JMAAB guideline jc_0790
Check ID:
mathworks.jmaab.jc_0702
Identifies the use of numeric literals in Stateflow states and transitions.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended 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. |
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
.
MAB guideline jc_0702: Use of named Stateflow parameters and constants
JMAAB guideline jc_0702
Check ID: mathworks.maab.jm_0011
Identify pointer operations on custom code variables.
Pointers to custom code variables are not allowed.
This check requires a Simulink Check and Stateflow license.
This check requires a license.
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
Condition | Recommended Action |
---|---|
Custom code variables use pointer operations. | Modify the specified chart to remove the dependency on pointer operations. |
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.
MAB guideline jm_0011: Pointers in Stateflow
JMAAB guideline jm_0011
Check ID:
mathworks.jmaab.jm_0012
Identify undirected event broadcasts that might cause recursion during simulation and generate inefficient code.
Event broadcasts in Stateflow charts must be directed.
This check requires a Simulink Check and Stateflow license.
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.
Guideline Sub IDs | Condition | Recommended Action |
---|---|---|
jm_0012_a1: Check if Stateflow events are used only in the output of Stateflow blocks | Stateflow 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" syntax | Stateflow 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 name | Stateflow events are not directed using qualified event name. | Use "send(state_name.event_name)" syntax to broadcast Stateflow events. |
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.
MAB guideline jm_0012: Usage restrictions of events and broadcasting events
JMAAB guideline jm_0012
Broadcast Local Events to Synchronize Parallel States (Stateflow)
Check ID:
mathworks.jmaab.jc_0733
Identifies state actions that are out of order in Stateflow states.
This check requires a Simulink Check license.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0733_a: Check basic state action types | One 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 types | One 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). |
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
.
MAB guideline jc_0733: Order of state action types
JMAAB guideline jc_0733
Check ID:
mathworks.jmaab.jc_0734
Identifies repeated Action types in a Stateflow state.
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.
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
Condition | Recommended 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.
MAB guideline jc_0734: Number of state action types
JMAAB guideline jc_0734
Check ID:
mathworks.jmaab.jc_0740
Checks if Stateflow exit actions are used in the model.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended Action |
---|---|
One or more Stateflow states use exit action type. | Consider removing state action type exit in Stateflow states. |
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
.
MAB guideline jc_0740: Limitation on use of exit state action
JMAAB guideline jc_0740
Check ID:
mathworks.jmaab.jc_0741
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0741: Timing to update data used in state chart transition conditions
JMAAB guideline jc_0741
Check ID:
mathworks.jmaab.jc_0772
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.
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
Condition | Recommended Action |
---|---|
Stateflow transitions found with higher priority than conditional transitions. | Change the execution order of the transitions or add an execution condition. |
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.
MAB guideline jc_0772: Execution order and transition conditions of transition lines
JMAAB guideline jc_0772
Check ID:
mathworks.jmaab.jc_0753
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.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0753_a1: Check transition actions in Stateflow charts | The 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 chart | Condition actions and transition actions are mixed within the same chart. | Use of condition actions or transition actions must be uniform within the same chart. |
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.
MAB guideline jc_0753: Condition actions and transition actions in Stateflow
JMAAB guideline jc_0753
Check ID:
mathworks.jmaab.db_0127
Identifies the Stateflow objects that use MATLAB expressions that are not suitable for code generation.
This check requires a Simulink Check license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
db_0127_a1: Check for MATLAB expressions in Stateflow charts | One 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 function | One 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. |
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
.
This check is supported by edit-time checking.
MAB guideline db_0127: Limitation on MATLAB commands in Stateflow blocks
JMAAB guideline db_0127
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.
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0481: Use of hard equality comparisons for floating point numbers in Stateflow
JMAAB guideline jc_0481
Check ID:
mathworks.jmaab.na_0001
Identifies the usage of operators in Stateflow.
This check requires a Simulink Check and Stateflow license.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
na_0001_a: Usage of bitwise operators in Stateflow | One 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 Stateflow | One or more expressions have incorrect usage of inequality operators. | Consider using '~=' for inequality operations. |
na_0001_b2: Usage of inequality operator (!=) in Stateflow | One or more expressions have incorrect usage of inequality operators. | Consider using '!=' for inequality operations. |
na_0001_b3: Usage of inequality operator (<>) in Stateflow | One or more expressions have incorrect usage of inequality operators. | Consider using '<>' for inequality operations. |
na_0001_c: Usage of logical negation operator in Stateflow | One or more scenarios have incorrect usage of logical negation operator. | Consider using '!' for logical negation operations |
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.
MAB guideline na_0001: Standard usage of Stateflow operators
JMAAB guideline na_0001
Check ID:
mathworks.jmaab.jc_0655
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.
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
Condition | Recommended 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. |
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
.
MAB guideline jc_0655: Prohibition of logical value comparison in Stateflow
JMAAB guideline jc_0655
Check ID: mathworks.maab.jc_0451
Identify unary minus operations applied to unsigned integers in Stateflow objects.
Do not perform unary minus operations on unsigned integers in Stateflow objects.
This check requires a Simulink Check and Stateflow license.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0451: Use of unary minus on unsigned integers
JMAAB guideline jc_0451
Check ID:
mathworks.jmaab.jc_0802
Identifies implicit type casting in Stateflow.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended 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. |
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
.
MAB guideline jc_0802: Prohibited use of implicit type casting in Stateflow
JMAAB guideline jc_0802
Check ID:
mathworks.jmaab.jc_0732
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0732: Distinction between state names, data names, and event names
JMAAB guideline jc_0732
Check ID:
mathworks.jmaab.jc_0730
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0730: Unique state name in Stateflow blocks
JMAAB guideline jc_0730
Check ID:
mathworks.jmaab.jc_0731
Checks for slashes (/) in the state names.
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.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0731: State name format
JMAAB guideline jc_0731
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.
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.
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
Condition | Recommended 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. |
Runs on library models.
Does not analyze content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
This check is supported by edit-time checking.
MAB guideline jc_0501: Format of entries in a State block
JMAAB guideline jc_0501
Check ID:
mathworks.jmaab.jc_0736
Check for uniform indentation of label Strings in Stateflow States and Transitions.
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.
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
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0736_a: Check for uniform indentation of action language in Stateflow states | One 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 types | One 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 actions | One 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. |
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.
MAB guideline jc_0736: Uniform indentations in Stateflow blocks
JMAAB guideline jc_0736
Check ID:
mathworks.jmaab.jc_0739
Identifies the Stateflow states with text exceeding the boundary of the state.
This check requires a Simulink Check and Stateflow license.
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
Condition | Recommended 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. |
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.
MAB guideline jc_0739: Describing text inside states
JMAAB guideline jc_0739
Check ID:
mathworks.jmaab.jc_0770
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.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0770_a1: Transition labels should be placed near the point of origin of the transition | One 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 transition | One 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. |
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
.
MAB guideline jc_0770: Position of transition label
JMAAB guideline jc_0770
Check ID:
mathworks.jmaab.jc_0771
Identifies comments in transition labels that are not positioned uniformly.
This check requires Simulink Check and Stateflow licenses.
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.
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0771_a1: Comments in transition labels must be uniformly positioned on top | One 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 bottom | One 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. |
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
.
MAB guideline jc_0771: Comment position in transition labels
JMAAB guideline jc_0771
Check ID:
mathworks.jmaab.jc_0752
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.
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
Condition | Recommended Action |
---|---|
Condition actions in Stateflow transitions are written beside parenthesis. | Start new line before and after parentheses for condition actions in Stateflow transitions. |
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.
MAB guideline jc_0752: Condition action in transition label
JMAAB guideline jc_0752
Check ID:
mathworks.jmaab.jc_0774
Identifies the comments in unconditional transitions without action statements.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended Action |
---|---|
One or more unconditional transitions without action statements do not have comments. | Consider adding a comment explaining the unconditional transition. |
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
.
MAB guideline jc_0774: Comments for through transition
JMAAB guideline jc_0774
Check ID: mathworks.maab.jc_0511
Identify graphical functions with multiple assignments of return values in Stateflow charts.
The return value from a Stateflow graphical function must be set in only one place.
This check requires a Simulink Check and Stateflow license.
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
Condition | Recommended 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. |
Runs on library models.
Does not analyze content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
MAB guideline jc_0511: Return values from a graphical function
JMAAB guideline jc_0511
Reusable Functions in Charts (Stateflow).
Check ID:
mathworks.jmaab.na_0042
Checks the usage of Simulink functions in Stateflow.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended 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. |
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
.
MAB guideline na_0042: Usage of Simulink functions
JMAAB guideline na_0042
Check ID:
mathworks.maab.na_0039
Checks for Stateflow charts that are nested in Simulink functions used in the root Stateflow chart.
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.
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
Condition | Recommended 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. |
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
.
MAB guideline na_0039: Limitation on Simulink functions in Chart blocks
JMAAB guideline na_0039
Check ID: mathworks.maab.himl_0003
Display complexity and code metrics for MATLAB Functions. Report metric violations.
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.
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.
Open the Model Configuration Editor and search for check ID
himl_0003
.
Under Input Parameters, select Check .m
files referenced in the model to include files with a
.m
extension in the analysis.
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.
Click Apply and save the configuration.
Condition | Recommended Action |
---|---|
MATLAB Function violates the complexity input parameters. | For the MATLAB Function:
|
Runs on library models.
Does not analyze content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
MAB guideline na_0016: Source lines of MATLAB Functions
MAB guideline na_0018: Number of nested if/else and case statement
Check ID: mathworks.maab.na_0024
Check for global variables in MATLAB code.
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.
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
Condition | Recommended Action |
---|---|
Global variables are used in one or more of the following:
| Replace global variables with signal lines, function arguments, or persistent data. |
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.
MAB guideline na_0024: Shared data in MATLAB functions
JMAAB guideline na_0024
Check ID:
mathworks.maab.na_0031
Identifies the enumeration classes used in the model without a default value specification.
This check requires a Simulink Check license.
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
Condition | Recommended 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. |
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.
MAB guideline na_0031: Definition of default enumerated value
JMAAB guideline na_0031
Check ID: mathworks.maab.na_0034
Identify MATLAB Functions that have inputs, outputs or parameters with inherited complexity or data type properties.
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.
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
Condition | Recommended 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:
|
Runs on library models.
Does not analyze content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
MAB guideline na_0034: MATLAB Function block input/output settings
JMAAB guideline na_0034
Check ID:
mathworks.maab.na_0017
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.
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
Condition | Recommended 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. |
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
.
MAB guideline na_0017: Number of called function levels
Check ID:
mathworks.maab.na_0021
Check for use of character vectors in MATLAB Function blocks.
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.
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
Condition | Recommended Action |
---|---|
MATLAB Function block contains a character vector. | Consider using enumerations instead of character vectors. |
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
.
MAB guideline na_0021: Strings in MATLAB functions
JMAAB guideline na_0021
Check ID:
mathworks.maab.na_0022
Check for use of non-constant variables in Switch/Case statements.
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.
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
Condition | Recommended Action |
---|---|
Non-constant variables are used in the Switch/Case statement. | Consider defining the input variable as a constant. |
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
.
MAB guideline: na_0022: Recommended patterns for Switch/Case statements
Check ID:
mathworks.jmaab.jc_0801
Identifies the usage of C-style (/* and */) comments in CGT files and MPT objects.
This check requires Simulink Check and Stateflow licenses.
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
Condition | Recommended Action |
---|---|
One or more entities use C-style comments. | Consider removing C-style comments in CGT files and MPT objects. |
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.
MAB guideline jc_0801: Prohibited use of the /* and */ comment symbols
JMAAB guideline jc_0801