Japan MATLAB Automotive Advisory Board Checks

Japan MATLAB Automotive Advisory Board Checks

Japan MATLAB® Automotive Advisory Board (JMAAB) checks facilitate designing and troubleshooting models from which code is generated for automotive applications.

The Model Advisor performs a checkout of the Simulink® Check™ license when you run JMAAB checks.

See Also

Check file names

Check ID: mathworks.maab.ar_0001

Checks the names of all files residing in the same folder as the model

Description

A file name conforms to constraints.

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
The file name contains illegal characters. Rename the file. Allowed characters are a–z, A–Z, 0–9. and underscore (_).
The file name starts with a number.Rename the file.
The file name starts with an underscore ("_"). Rename the file.
The file name ends with an underscore ("_"). Rename the file.
The file extension contains one (or more) underscores. Change the file extension.
The file name has consecutive underscores. Rename the file.
The file name contains more than one dot ("."). Rename the file.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag conflicts with MATLAB reserved keywords. (Sub ID: f)

    • The check does not flag identical file names on the MATLAB path. (Sub ID: g)

  • MAAB guideline, Version 3.0 limitation: The check does not flag conflicts with C++ keywords.

  • Runs on library models.

  • Does not allow exclusions of blocks or charts.

See Also

  • MAAB guideline, Version 3.0: ar_0001: Filenames in the Simulink documentation.

  • JMAAB guideline, Version 5.1: ar_0001: Usable characters for file names

Check folder names

Check ID: mathworks.maab.ar_0002

Checks model directory and subdirectory names for invalid characters.

Description

A directory name conforms to constraints.

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
The directory name contains illegal characters. Rename the directory. Allowed characters are a–z, A–Z, 0–9. and underscore (_).
The directory name starts with a number. Rename the directory.
The directory name starts with an underscore ("_"). Rename the directory.
The directory name ends with an underscore ("_").Rename the directory.
The directory name has consecutive underscores. Rename the directory.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag conflicts with MATLAB reserved keywords. (Sub ID: f)

  • Runs on library models.

  • Does not allow exclusions of blocks or charts.

  • Analyzes the full path of the model.

  • Analyzes subdirectories in the same directory as the model.

See Also

  • MAAB guideline, Version 3.0: ar_0002: Directory names in the Simulink documentation.

  • JMAAB guideline, Version 5.1: ar_0002: Usable characters for folder names

Check subsystem names

Check ID: mathworks.maab.jc_0201

Check whether subsystem block names include invalid characters.

Description

The names of all subsystem blocks that generate code are checked for invalid characters.

The check does not report invalid characters in subsystem names for:

  • Virtual subsystems

  • Atomic subsystems with Function Packaging set to Inline

Available with Simulink Check.

Input Parameters

To control the naming convention for blocks that the check flags, you can use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check port block names. In the Input Parameter pane:

    • Use Naming standard to select MAAB 3.0 or Custom. When you select MAAB 3.0, the check uses the regular expression ([^a-zA-Z_0-9])|(^\d)|(^ )|(__)|(^_)|(_$) to verify that names:

      • Use these characters: a-z, A-Z, 0-9, and the underscore (_).

      • Do not start with a number.

      • Do not use underscores at the beginning or end of a string.

      • Do not use more than one consecutive underscore.

      When you select Custom, you can enter your own Regular expression for prohibited names. For example, if you want to allow more than one consecutive underscore, enter ([^a-zA-Z_0-9])|(^\d)|(^ )|(^_)|(_$).

  2. Click Apply.

  3. Save the configuration. When you run the check using this configuration, the check uses the input parameters that you specified.

Results and Recommended Actions

ConditionRecommended Action

The subsystem names do not comply with the naming standard specified in the input parameters.

Update the subsystem names to comply with your own guidelines or the MAAB guidelines.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag conflicts with MATLAB reserved keywords. (Sub ID: f)

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

Tips

Use underscores to separate parts of a subsystem name instead of spaces.

See Also

Check port block names

Check ID: mathworks.maab.jc_0211

Check whether Inport and Outport block names include invalid characters.

Description

The names of all Inport and Outport blocks are checked for invalid characters.

Available with Simulink Check.

Input Parameters

To control the naming convention for blocks that the check flags, you can use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check port block names. In the Input Parameter pane:

    • Use Naming standard to select MAAB 3.0 or Custom. When you select MAAB 3.0, the check uses the regular expression ([^a-zA-Z_0-9])|(^\d)|(^ )|(__)|(^_)|(_$) to verify that names:

      • Use these characters: a-z, A-Z, 0-9, and the underscore (_).

      • Do not start with a number.

      • Do not use underscores at the beginning or end of a string.

      • Do not use more than one consecutive underscore.

      When you select Custom, you can enter your own Regular expression for prohibited names. For example, if you want to allow more than one consecutive underscore, enter ([^a-zA-Z_0-9])|(^\d)|(^ )|(^_)|(_$).

  2. Click Apply.

  3. Save the configuration. When you run the check using this configuration, the check uses the input parameters that you specified.

Results and Recommended Actions

ConditionRecommended Action

The block names do not comply with the naming standard specified in the input parameters.

Update the block names to comply with your own guidelines or the MAAB guidelines.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag conflicts with MATLAB reserved keywords. (Sub ID: f)

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

Tips

Use underscores to separate parts of a block name instead of spaces.

See Also

Check character usage in block names

Check ID: mathworks.maab.jc_0231

Check whether block names include invalid characters.

Description

The check reports invalid characters in all block names, except:

  • Inports and Outports

  • Unmasked subsystems

MAAB guideline, Version 3.0, jc_0231: Usable characters for block names does not apply to subsystem blocks.

Available with Simulink Check.

Prerequisite

A prerequisite MAAB guideline, Version 3.0, for this check is jc_0201: Usable characters for Subsystem names.

Input Parameters

To control the naming convention for blocks that the check flags, you can use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check character usage in block names. In the Input Parameter pane:

    • Use Naming standard to select MAAB 3.0 or Custom. When you select MAAB 3.0, the check uses the regular expression ([^a-zA-Z_0-9\n\r ])|(^\d)|(^ ) to verify that names:

      • Use these characters: a-z, A-Z, 0-9, underscore (_), and blank space.

      • Do not start with a number or blank space.

      • Do not have double byte characters.

      When you select Custom, you can enter your own Regular expression for prohibited names. For example, if you do not want to allow underscores (_) in a block name, enter ([^a-zA-Z0-9\r])|(^\d)|(^ ).

  2. Click Apply.

  3. Save the configuration. When you run the check using this configuration, the check uses the input parameters that you specified.

Results and Recommended Actions

ConditionRecommended Action

The block names do not comply with the naming standard specified in the input parameters.

Update the block names to comply with your own guidelines or the MAAB guidelines.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag the Basic block names, apart from [Inport] and [Outport], that use underscores at the beginning. (Sub ID: a)

    • The check does not flag the Basic block names, apart from [Inport] and [Outport], that use underscores at the end. (Sub ID: b)

    • The check does not flag the Basic block names, apart from [Inport] and [Outport], that use consecutive underscores. (Sub ID: c)

    • The check does not flag the Basic block names, apart from [Inport] and [Outport], that solely consists of a single reserved MATLAB word. (Sub ID: d)

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

Tips

Carriage returns are allowed in block names.

See Also

Check for mixing basic blocks and subsystems

Check ID: mathworks.maab.db_0143

Check for systems that mix primitive blocks and subsystems.

Description

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

Available with Simulink Check.

Input Parameters

To change the list of blocks that the check flags, you can use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check for mixing basic blocks and subsystems.

  2. In the Input Parameters pane, to:

    • Allow the blocks specified by MAAB 3.0, from Standard, select MAAB 3.0. The Block type list table provides the blocks that MAAB 3.0 allows at any model level.

    • To specify blocks to either allow or prohibit, from Standard, select Custom. In Treat blocktype list as, select Allowed or Prohibited. In the Block type list table, you can add or remove blocks.

  3. Click Apply.

  4. Save the configuration. When you run the check using this configuration, the check uses the specified input parameters.

Results and Recommended Actions

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

Move nonvirtual blocks into the subsystem.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

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

Check ID: mathworks.maab.jc_0011

Check the optimization parameter for Boolean data types.

Description

Optimization for Boolean data types is required

Available with Simulink Check.

Prerequisite

A prerequisite MAAB guideline, Version 3.0, for this check is na_0002: Appropriate implementation of fundamental logical and numerical operations.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Does not allow exclusions of blocks or charts.

See Also

Check for Simulink diagrams using nonstandard display attributes

Check ID: mathworks.maab.na_0004

Check model appearance setting attributes.

Description

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
The toolbar is not visible. Select View > Toolbar.
The status bar is not visible. Select View > Status Bar.
Sample Time > Colors is selected. Clear Sample Time > Colors.
Wide Nonscalar Lines is cleared. Select Display > Signals & Ports > Wide Nonscalar Lines.
Viewer Indicators is cleared. Select Display > Signals & Ports > Viewer Indicators.
Testpoint Indicators is cleared. Select Display > Signals & Ports > Testpoint & Logging Indicators.
Port Data Types is selected. Clear Display > Signals & Ports > Port Data Types.
Storage Class is selected. Clear Display > Signals & Ports > Storage Class.
Signal Dimensions is selected. Clear Display > Signals & Ports > Signal Dimensions.
Execution Context Indicator is selected. Clear Display > Signals & Ports > Execution Context Indicator.
Model Browser is selected. Clear View > Model Browser > Show Model Browser.
Sorted Execution Order is selected. Clear Display > Blocks > Sorted Execution Order.
Model Block Version is selected. Clear Display > Blocks > Block Version for Referenced Models.
Model Block I/O Mismatch is selected. Clear Display > Blocks > Block I/O Mismatch for Referenced Models.
Library Links is set Disabled, User Defined, or All. Select Display > Library Links > None.
Linearization Indicators is cleared. Select Display > Signals & Ports > Linearization Indicators.
Block backgrounds are not white. Select Format > Background Color > White.
Block foregrounds are not black.Select Format > Foreground Color > Black.
Diagrams do not have white backgrounds. Select Diagram > Format > Canvas Color > White.
Diagrams do not have zoom factor set to 100%. Select View > Zoom > Normal (100%).

Action Results

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

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

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

  • Does not allow exclusions of blocks or charts.

See Also

Check font formatting

Check ID: mathworks.maab.db_0043

Check for difference in font and font sizes.

Description

With the exception of free text annotations within a model, text elements, such as block names, block annotations, and signal labels, must have the same font style and font size. Select a font style and font size that is legible and portable (convertible between platforms), such as Arial or Times New Roman 12 point. To specify font rules for a Simulink session, from the Simulink editor select Diagram > Format > Font Styles for Model.

Available with Simulink Check.

Input Parameters

Font Name

Apply the specified font to all text elements. When you specify Common (default), the check identifies different fonts used in your model. Although you can specify other fonts, the fonts available from the drop-down list are Arial, Courier New, Georgia, Times New Roman, Arial Black, and Verdana.

Font Size

Apply the specified font size to all text elements. When you specify Common (default), the check identifies different font sizes used in your model. Although you can specify other font sizes, the font sizes available from the drop-down list are 6, 8, 9, 10, 12, 14, 16.

Font Style

Apply the specified font style to all text elements. When you specify Common (default), the check identifies different font styles used in your model. The font styles available from the drop-down list are normal, bold, italic, and bold italic.

Results and Recommended Actions

ConditionRecommended Action
The fonts or font sizes for text elements in the model are not consistent or portable.Specify values for the font parameters and in the right pane of the Model Advisor, click Modify all Fonts, or manually change the fonts and font sizes of text elements in the model so they are consistent and portable.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag Stateflow state labels and box name font and font style settings. (Sub ID: c)

    • The check does not flag Stateflow state labels and box name font size settings. (Sub ID: d)

  • Runs on library models.

  • Does not analyze content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

Action Results

In the right pane of the Model Advisor, clicking Modify all Fonts changes the font and font size of all text elements in the model according to the values you specify in the input parameters.

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

See Also

Check positioning and configuration of ports

Check ID: mathworks.maab.db_0042

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

Description

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.

Results and Recommended Actions

ConditionRecommended Action
Inport blocks are too far to the right and result in left-flowing signals. Move the specified Inport blocks to the left.
Outport blocks are too far to the left and result in left-flowing signals. Move the specified Output blocks to the right.
Ports do not have the default orientation. Modify the model diagram such that signal lines for output ports enter the side of the block and signal lines for input ports exit the right side of the block.
Ports are duplicate Inport blocks.
  • If the duplicate Inport blocks are in a subsystem, remove them where possible.

  • If the duplicate Inport blocks are at the root level, remove them.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag when Inports are not placed on the left side of the diagram. (Sub ID: a)

    • The check does not flag when Outports are not placed on the right side of the diagram. (Sub ID: b)

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Does not analyze signal crossings

See Also

Check whether block names appear below blocks

Check ID: mathworks.maab.db_0142

Check whether block names appear below blocks.

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

Check the display attributes of block names

Check ID: mathworks.maab.jc_0061

Check the display attributes of subsystem and block names.

Description

When the subsystem and block names provide descriptive information, display the names. If the block function is known from its appearance, do not display the name. Blocks with names that are obvious from the block appearance:

  • From

  • Goto

  • Ground

  • Logic

  • MinMax

  • ModelReference

  • MultiPortSwitch

  • Product

  • Relational Operator

  • Saturate

  • Switch

  • Terminator

  • Trigonometry

  • Unit Delay

  • Sum

  • Compare To Constant

  • Compare To Zero

Available with Simulink Check.

Input Parameters.  To specify the custom blocks and masks to include in this check, use the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and navigate to Check the display attributes of block names. In the Input Parameters pane, select Custom.

  2. Use the Block type list table to include or exclude blocks and masks from the check.

  3. Click Apply.

  4. Save the configuration. When you run the check using this configuration, the check uses the input parameters that you specified.

Results and Recommended Actions

ConditionRecommended Action

Name is displayed and obvious from the block appearance.

Hide name by clearing Diagram > Format > Show Block Name.

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

  • Not obvious from the block appearance.

  • The default name appended with an integer.

Modify the name to be more descriptive or hide the name by clearing Diagram > Format > Show Block Name.

Name is descriptive and not displayed. Descriptive names are:

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

  • Not a default name appended with an integer.

Display the name by selecting Diagram > Format > Show Block Name
Check does not evaluate my custom blocks and masks.Use the Model Configuration Editor to specify your custom checks and blocks.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

See Also

Check position of Trigger and Enable blocks

Check ID: mathworks.maab.db_0146

Check the position of Trigger and Enable blocks.

Description

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
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.
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.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not verify that For Each or For Iterator blocks are uniformly located.

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Does not analyze content in masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for nondefault block attributes

Check ID: mathworks.maab.db_0140

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

Description

Model diagrams should display block parameters that have values other than default values. One way of displaying this information is by using the Block Annotation tab in the Block Properties dialog box. To automatically fix warnings associated with this check, see Automatically Fix Display of Nondefault Block Parameters.

To customize the list of nondefault block parameters that are flagged by the check, see Customize Model Advisor Check for Nondefault Block Attributes.

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

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

  • JMAAB guideline, Version 5.1 limitation: The check flags masked blocks that display parameter information but do not use block annotations. JMAAB 5.1 guidelines allow masked blocks to display parameter information.

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

Tip

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

See Also

Check for unconnected ports and signal lines

Check ID: mathworks.maab.db_0081

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

Description

Unconnected inputs should be connected to ground blocks. Unconnected outputs should be connected to terminator blocks.

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
Blocks have unconnected inputs or outputs. Connect unconnected lines to blocks specified by the design or to Ground or Terminator blocks.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check usage of Switch blocks

Check ID: mathworks.maab.jc_0141

Check usage of Switch blocks.

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

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

See Also

Check usage of Relational Operator blocks

Check ID: mathworks.maab.jc_0131

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

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Allows exclusions of blocks and charts.

See Also

Check for indexing in blocks

Check ID: mathworks.maab.db_0112

Check that blocks use consistent vector indexing.

Description

Check that blocks use consistent vector indexing. When possible, use zero-based indexing to improve code efficiency.

Available with Simulink Check.

This check requires a Stateflow® license.

The check verifies consistent indexing for the following objects:

ObjectIndexing
  • Assignment block

  • For Iterator block

  • Find block

  • Multiport Switch block

  • Selector block

  • Zero-based indexing ([0, 1, 2, ...])

  • One-based indexing ([1, 2, 3,...])

  • Stateflow charts with C action language

Zero-based indexing ([0, 1, 2, ...])
  • MATLAB Function block

  • Fcn block

  • MATLAB System blocks

  • Truth tables

  • State transition tables

  • Stateflow charts with MATLAB action language

  • MATLAB functions inside Stateflow charts

One-based indexing ([1, 2, 3,...])

Results and Recommended Actions

ConditionRecommended Action
Objects in your model use one-based indexing, but can be configured for zero-based indexing.Configure objects for zero-based indexing.
Objects in your model use inconsistent indexing.If possible, configure objects for zero-based indexing. If your model contains objects that cannot be configured for zero-based indexing, configure objects for one-based indexing.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: This check cannot be configured to support one-based indexing. (Sub ID: a2)

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

  • MAAB guideline, Version 3.0: db_0112: Indexing in the Simulink documentation.

  • JMAAB guideline, Version 5.1: db_0112: Usage of index

Check usage of tunable parameters in blocks

Check ID: mathworks.maab.db_0110

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

Description

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

  • Expressions

  • Data type conversions

  • Selections of rows or columns

Supported blocks include:

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not evaluate mask parameters.

  • Allows exclusions of blocks and charts.

See Also

Check usage of Discrete-Time Integrator block

Check ID: mathworks.jmaab.jc_0627

Check usage of Discrete-Time Integrator block.

Description

For Discrete-Time Integrator blocks, check:

  • Block parameter Limit output is selected.

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
Block parameter Limit output is clearedSelect the Discrete-Time Integrator block parameter Limit output.
Saturation limit is defined by a Parameter object whose data type is not autoChange the data type for the Parameter object to auto.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

See Also

  • JMAAB guideline, Version 5.1: jc_0627: Guideline for using the Discrete-Time Integrator block

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

Check ID: mathworks.jmaab.jc_0643

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

Description

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action

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

Change block parameter Bias to 0.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

See Also

  • JMAAB guideline, Version 5.1: jc_0643: Fixed-point setting

Check input and output datatype for Switch blocks

Check ID: mathworks.jmaab.jc_0650

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

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Analyzes content in all masked subsystems.

See Also

  • JMAAB guideline, Version 5.1: jc_0650: Block input/output data type with switching function

Check signs of input signals in product blocks

Check ID: mathworks.jmaab.jc_0611

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

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

See Also

  • JMAAB guideline, Version 5.1: jc_0611: Input signal for multiplication and division blocks

Check transition orientations in flow charts

Check ID: mathworks.maab.db_0132

Check transition orientations in flow charts.

Description

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.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
The model includes a transition with a condition that is not drawn horizontally or a transition action that is not drawn vertically.Modify the model.
Junction does not have a default exit transitionAdd a default exit transition to the junction.
Transition has condition and actionSplit up condition and action into separate transitions

Capabilities and Limitations

  • MAAB guideline, Version 3.0 limitation: Although db_0132: Transitions in flow charts has an exception for loop constructs, the check does flag flow charts containing loop constructs if the transition violates the orientation rule.

  • JMAAB guideline, Version 5.1 limitation: The check only flags flow charts containing loop constructs if the transition violates the orientation rule.

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

Check return value assignments in Stateflow graphical functions

Check ID: mathworks.maab.jc_0511

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

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for Strong Data Typing with Simulink I/O

Check ID: mathworks.maab.db_0122

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

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks and charts.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check Stateflow data objects with local scope

Check ID: mathworks.maab.db_0125

Check whether Stateflow data objects with local scope are defined at the chart level or below.

Description

This check flags Stateflow data whose local scope is not defined at the Chart level or below, regardless of whether the data is used or not.

You must define local data of a Stateflow block on the chart level or below in the object hierarchy. You cannot define local variables on the machine level; however, parameters and constants are allowed at the machine level.

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
Local data is not defined in the Stateflow hierarchy at the chart level or below. Define local data at the chart level or below.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag Constant local data defined at the machine level. (Sub ID: b)

    • The check does not flag duplicate data definition and usage within a parent-child relationships. (Sub ID: c)

    • The check does not flag Parameter local data defined at the machine level. (Sub ID: d)

    • The check does not detect if local data has the same name within charts or states that have parent-child relationships.

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not allow exclusions of blocks or charts.

See Also

Check usage of return values from Stateflow graphical functions

Check ID: mathworks.maab.jc_0521

Identify calls to graphical functions in conditional expressions.

Description

Do not use the return value of a graphical function in a comparison operation.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Conditional expressions contain calls to graphical functions.Assign return values of graphical functions to intermediate variables. Use these intermediate variables in the specified conditional expressions.

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for MATLAB expressions in Stateflow charts

Check ID: mathworks.maab.db_0127

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

Description

Do not use MATLAB functions, instructions, and operators in Stateflow objects.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Stateflow objects use MATLAB expressions.Replace MATLAB expressions in Stateflow objects.

Capabilities and Limitations

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

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

Check for pointers in Stateflow charts

Check ID: mathworks.maab.jm_0011

Identify pointer operations on custom code variables.

Description

Pointers to custom code variables are not allowed.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

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

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

  • MAAB guideline, Version 3.0: jm_0011: Pointers in Stateflow in the Simulink documentation.

  • JMAAB guideline, Version 5.1: jm_0011: Pointers in Stateflow

Check for event broadcasts in Stateflow charts

Check ID: mathworks.maab.jm_0012

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

Description

Event broadcasts in Stateflow charts must be directed.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Event broadcasts are undirected.Rearchitect the diagram to use directed event broadcasting. Use the send syntax or qualified event names to direct the event to a particular state. Use multiple send statements to direct an event to more than one state.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check cannot be configured to flag event used other than a Stateflow chart output. (Sub ID: a1)

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for bitwise operations in Stateflow charts

Check ID: mathworks.maab.na_0001

Identify bitwise operators (&, |, and ^) in Stateflow charts. If you select Enable C-bit operations for a chart, only bitwise operators in expressions containing Boolean data types are reported. Otherwise, all bitwise operators are reported for the chart.

Description

Do not use bitwise operators in Stateflow charts, unless you enable bitwise operations.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Stateflow charts with Enable C-bit operations selected use bitwise operators (&, |, and ^) in expressions containing Boolean data types.Do not use Boolean data types in the specified expressions.
The Model Advisor could not determine the data types in expressions with bitwise operations.To allow Model Advisor to determine the data types, consider explicitly typecasting the specified expressions.
Stateflow charts with Enable C-bit operations cleared use bitwise operators (&, |, and ^).

To fix this issue, do either of the following:

  • Modify the expressions to replace bitwise operators.

  • If not using Boolean data types, consider enabling bitwise operations. In the Chart properties dialog box, select Enable C-bit operations.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitations:

    • The check does not flag when operators other than "!" are used for logical negation. (Sub ID: a)

    • The check cannot be configured to select between "~=", "!=", and "<>" for inequality operations. (Sub ID: b1, b2, b3)

    • The check does not detect when the "^" and "~" bitwise operators are used for Boolean operations. (Sub ID: c)

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

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check usage of unary minus operations in Stateflow charts

Check ID: mathworks.maab.jc_0451

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

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check for names of Stateflow ports and associated signals

Check ID: mathworks.maab.db_0123

Check for mismatches between Stateflow ports and associated signal names.

Description

The name of Stateflow input and output should be the same as the corresponding signal. The check does not flag:

  • Name mismatches for reusable Stateflow charts in libraries.

  • Stateflow ports if the corresponding signal does not have a label.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

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

See Also

Check input and output settings of MATLAB Functions

Check ID: mathworks.maab.na_0034

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

Description

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
MATLAB Functions have inherited interfaces.

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

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

  • Change Complexity from Inherited to On or Off.

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

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

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

Check MATLAB code for global variables

Check ID: mathworks.maab.na_0024

Check for global variables in MATLAB code.

Description

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

  • MATLAB code in MATLAB Function blocks

  • MATLAB functions defined in Stateflow charts

  • Called MATLAB functions

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action

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

  • MATLAB code in MATLAB Function blocks

  • MATLAB functions defined in Stateflow charts

  • Called MATLAB functions

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

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Does not allow exclusions of blocks or charts.

See Also

  • MAAB guideline, Version 3.0: na_0024: Global Variables in the Simulink documentation.

  • JMAAB guideline, Version 5.1: na_0024: Shared data in MATLAB functions

Check usage of Memory and Unit Delay blocks

Check ID: mathworks.jmaab.jc_0623

Checks Memory and Unit Delay blocks with inappropriate sample time.

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0623: Use of continuous-time delay blocks and discrete-time blocks

Check block orientation

Check ID: mathworks.jmaab.jc_0110

Checks blocks with changed orientation.

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0110: Direction of block

Check usage of internal transitions in Stateflow states

Check ID: mathworks.jmaab.jc_0763

Description

Identifies the Stateflow states that source multiple internal transitions.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
One or more Stateflow states have multiple internal transitions.Remodel to avoid the use of multiple internal transitions.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag the top to bottom execution order of multiple internal transitions. (Sub ID: a2)

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0763: Usage of multiple internal transitions

Check usage of transition conditions in Stateflow transitions

Check ID: mathworks.jmaab.jc_0772

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0772: Execution order and transition conditions of transition lines

Check usable characters for signal names and bus names

Check ID: mathworks.jmaab.jc_0222

Description

Checks the signal and bus names in the model.

Results and Recommended Actions

ConditionRecommended Action
The file name starts with a number.Rename the file.
The file name starts with an underscore ("_"). Rename the file.
The file name ends with an underscore ("_"). Rename the file.
The file extension contains one (or more) underscores. Change the file extension.
The file name has consecutive underscores. Rename the file.
The file name contains more than one dot ("."). Rename the file.
The file name contains illegal characters. Rename the file. Allowed characters are a–z, A–Z, 0–9. and underscore (_).

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0222: Usable characters for signal/bus names

Check usable characters for parameter names

Check ID: mathworks.jmaab.jc_0232

Description

Checks the parameter names in the model.

Results and Recommended Actions

ConditionRecommended Action
The parameter name starts with a number.Rename the parameter.
The parameter name starts with an underscore ("_"). Rename the parameter.
The parameter name ends with an underscore ("_"). Rename the parameter.
The parameter name has consecutive underscores. Rename the parameter.
The parameter name contains illegal characters. Rename the parameter. Allowed characters are a–z, A–Z, 0–9. and underscore (_).

Capabilities and Limitations

  • Does not analyze content in masked subsystems.

See Also

  • JMAAB guideline, Version 5.1: jc_0232: Usable characters for parameter names

Check length of model file name

Check ID: mathworks.jmaab.jc_0241

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not analyze content of library-linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0241: Length restrictions for model file names

Check length of folder name at every level of model path

Check ID: mathworks.jmaab.jc_0242

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not analyze content of library-linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0242: Length restrictions for folder names

Check length of subsystem names

Check ID: mathworks.jmaab.jc_0243

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

  • JMAAB guideline, Version 5.1: jc_0243: Length restrictions for subsystem names

Check length of Inport and Outport names

Check ID: mathworks.jmaab.jc_0244

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library-linked blocks.

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

  • JMAAB guideline, Version 5.1: jc_0244: Length restrictions for Inport and Outport names

Check length of signal and bus names

Check ID: mathworks.jmaab.jc_0245

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0245: Length restrictions for signal and bus names

Check length of parameter names

Check ID: mathworks.jmaab.jc_0246

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not analyze content of library-linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0246: Length restrictions for parameter names

Check length of block names

Check ID: mathworks.jmaab.jc_0247

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

  • JMAAB guideline, Version 5.1: jc_0247: Length restrictions for block names

Check if blocks are shaded in the model

Check ID: mathworks.jmaab.jc_0604

Description

Checks if block shading is used in the model.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0604: Block shading

Check operator order of Product blocks

Check ID: mathworks.jmaab.jc_0610

Description

Checks the operator order of product blocks.

Results and Recommended Actions

ConditionRecommended Action
Improper usage of operator order of Product blocks.Change the first input in Product block to multiplication('*').

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag Product blocks with more than 2 inputs. (Sub ID: b)

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

  • JMAAB guideline, Version 5.1: jc_0610: Operator order for multiplication and division blocks

Check icon shape of Logical Operator blocks

Check ID: mathworks.jmaab.jc_0621

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Edit-Time Checking.  This check is supported by edit-time checking.

See Also

  • JMAAB guideline, Version 5.1: jc_0621: Guideline for using the Logical Operator block

Check if tunable block parameters are defined as named constants

Check ID: mathworks.jmaab.jc_0645

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0645: Parameter definition for calibration

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

Check ID: mathworks.jmaab.jc_0656

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0656: Usage of Conditional Control block

Check if each action in state label ends with a semicolon

Check ID: mathworks.jmaab.jc_0735

Description

Checks if each action in state label ends with a semicolon.

Results and Recommended Actions

ConditionRecommended Action
One or more State labels in the Stateflow charts does not end with a semicolon.Make sure to add semicolons at the end of all the state labels in the Stateflow charts.

Capabilities and Limitations

  • Action types (entry(en), during(du), and exit(ex)) are excluded from the check.

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

Check for parentheses in Fcn block expressions

Check ID: mathworks.jmaab.jc_0622

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0622: Guideline for using the Fcn block

    .

Check undefined initial output for conditional subsystems

Check ID: mathworks.jmaab.jc_0640

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0640: Initial value settings for Outport blocks in conditional subsystems

Check usage of the Saturation blocks

Check ID: mathworks.jmaab.jc_0628

Description

This check identifies:

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

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

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

Results and Recommended Actions

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

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0628: Guideline for using the Saturation Block

Check type setting by data objects

Check ID: mathworks.jmaab.jc_0644

Description

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

This check exempts:

  • Data type conversion block.

  • Type setting using fixdt.

  • Double and Boolean types.

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

  • Block output data type set to Inherit via backpropagation.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0644: Guideline for type setting

Check prohibited comparison operation of logical type signals

Check ID: mathworks.jmaab.jc_0655

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Negation operators are used variably in the model.The negation operator must be used consistently in the model.
Boolean type transactions are compared with numbers or logical values (true or false).Make sure that the Boolean type transactions are not compared with numbers or logical values.

Capabilities and Limitations

  • Runs on library models.

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

  • Does not analyze content in masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0655: Prohibition of logical value comparison in Stateflow

Check uniform spaces before and after operators

Check ID: mathworks.jmaab.jc_0737

Description

Identifies states and transitions in Stateflow that violate the uniform spaces requirement around operators.

Results and Recommended Actions

ConditionRecommended Action
Inappropriate use of spaces in stateflow for unary operators.Do not insert a space between the operators and operands.
Inappropriate use of spaces in stateflow for binary operators.Insert one or more spaces between the operators and operand.

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Check comments in state actions

Check ID: mathworks.jmaab.jc_0738

Description

Identifies state actions in Stateflow that have line feed (new line) in the comments that start with /* and end with */.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Stateflow consists of a line feed (new line) in the comments that start with /* and end with */.Each line in the comments section must start with /* and end with */.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag nesting of comments in Stateflow. (Sub ID: a)

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0738: Usage of Stateflow comments

Check updates to variables used in state transition conditions

Check ID: mathworks.jmaab.jc_0741

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0741: Timing to update data used in state chart transition conditions

Check boolean operations in condition labels

Check ID: mathworks.jmaab.jc_0742

Description

Checks if the Boolean operations in condition labels in the stateflow transitions adhere to these conditions:

  • Each line in condition labels must not contain more than the number of conditions specified in the input parameter (default is 3).

  • If there are two or more types of Boolean operations, priorities must be described by using parentheses.

  • If two or more types of Boolean operations are described in more than one line, position of those operations must be uniform in each logical expression within a Transition, that is either before or after the conditions.

  • In the transition label condition, write an expression that returns a logical value.

Results and Recommended Actions

ConditionRecommended Action
Maximum number of conditions that can be described in one line is higher than the set threshold (default is 3, set through the Input parameter). Make sure that the number of conditions described in one line is not higher than the set threshold.
Use of more than two Boolean(logical) operations yields undesired results.Make sure to set the priorities of the operations by describing them using parentheses.
Logical operators on multiple lines are placed at different positions (before and after newline).Make sure that the position of operations (before conditions or after conditions) are uniformly used in the chart.
Transition label conditions returns a value that is not logical.Make sure that the transition labels returns a logical value.

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Check condition actions in Stateflow transitions

Check ID: mathworks.jmaab.jc_0743

Description

Checks for the following conditions in Stateflow transitions:

  • State condition action ends with a semicolon.

  • Each state condition action is described in a separate line.

Results and Recommended Actions

ConditionRecommended Action
Improper use of conditions in Stateflow transitions yields undesired results.
  • End a state condition action with a semicolon.

  • Each state condition action is described in a separate line.

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Check for unexpected backtracking in state transitions

Check ID: mathworks.jmaab.jc_0751

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Does not analyze content of library-linked blocks.

  • Does not analyze content in masked subsystems.

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0751: Backtracking prevention in state transition

Check usage of parentheses in Stateflow transitions

Check ID: mathworks.jmaab.jc_0752

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0752: Format of condition action in transition label

Check condition actions and transition actions in Stateflow

Check ID: mathworks.jmaab.jc_0753

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
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.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check cannot be configured to only allow condition actions within a Stateflow chart. (Sub ID: a1)

  • This check does not flag the transition actions used in state charts.

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0753: Condition actions and transition actions in Stateflow

Check prohibited use of operation expressions in array indices

Check ID: mathworks.jmaab.jc_0756

Description

Identifies if sequence numbers are calculated inside the array indices.

Results and Recommended Actions

ConditionRecommended Action
Sequence numbers are calculated inside the array indices.Make sure that the sequence numbers are not calculated in the array indices.

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

Check starting point of internal transition in Stateflow

Check ID: mathworks.jmaab.jc_0760

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0760: Starting point of internal transition

Check prohibited combination of state action and flow chart

Check ID: mathworks.jmaab.jc_0762

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0762: Prohibited of state action and flow chart combination

Check usage of Lookup Tables

Check ID: mathworks.jmaab.jc_0626

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

Description

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

  • InterpMethod

  • ExtrapMethod

  • UseLastTableValue

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

Available with Simulink Check.

Results and Recommended Actions

ConditionRecommended Action
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

  • Flat

  • Nearest

  • Linear point-slope

  • Linear Lagrange.

The parameter ExtrapMethod in the n-D lookup table is set to Cubic spline or Linear.Set the parameter to the recommended value Clip.
The parameter UseLastTableValue in the n-D lookup table is set to off.Set the parameter to the recommended value on.
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.

Capabilities and Limitations

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0626: Guideline for using the Lookup Table block

Check Signed Integer Division Rounding mode

Check ID: mathworks.jmaab.jc_0642

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0642: Integer rounding mode setting

Check usage of Merge block

Check ID: mathworks.jmaab.jc_0659

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

Description

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

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

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0659: Usage restrictions of signal lines inputted to Merge block

Check for unused data in Stateflow Charts

Check ID: mathworks.jmaab.jc_0700

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

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

See Also

  • JMAAB guideline, Version 5.1: jc_0700: Unused data in Stateflow block

Check first index of arrays in Stateflow

Check ID: mathworks.jmaab.jc_0701

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
The first index of arrays in Stateflow is not set to either 0 or 1.Make the first index of arrays as 0 or 1.

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0701: Usable number for first index

Check execution timing for default transition path

Check ID: mathworks.jmaab.jc_0712

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0712: Execution timing for default transition path

Check for parallel Stateflow state used for grouping

Check ID: mathworks.jmaab.jc_0721

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of blocks and charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0721: Usage of parallel states

Check scope of data in parallel states

Check ID: mathworks.jmaab.jc_0722

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0722: Local data definition in parallel states

Check uniqueness of State names

Check ID: mathworks.jmaab.jc_0730

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0730: Unique state name in Stateflow blocks

Check usage of State names

Check ID: mathworks.jmaab.jc_0731

Checks for slashes (/) in the state names.

Description

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

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0731: State name format

Check uniqueness of Stateflow State and Data names

Check ID: mathworks.jmaab.jc_0732

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0732: Distinction between state names, data names, and event names

Check repetition of Action types

Check ID: mathworks.jmaab.jc_0734

Identifies repeated Action types in a Stateflow state.

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
One or more action types is used multiple times in a Stateflow state.Merge the actions types so that each of the action types is defined only once in a Stateflow state.
  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0734: Number of state action types

Check indentation of Stateflow blocks

Check ID: mathworks.jmaab.jc_0736

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

Description

Checks if the Indentations in the Stateflow blocks are described uniformly and have adhered to the following recommendations.

  1. State label rules

    • No spaces in front of action types (entry (en), during (du), and exit (ex) ).

    • One space for other statements.

  2. Transition-condition and action rules

    • No spaces before [ ].

  3. Transition-action rules

    • Always insert one space.

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
In State label rules, if there is a space in front of action types (entry (en), during (du), and exit (ex).Remove the space in front of action types (entry (en), during (du), and exit (ex) ).
In State label rules, if there is no space before all the other statements except action types.Insert a space before all the other statements.
In Transition-condition and action rules, if there is a space before [ ].Do not insert a space before [ ].
In transition-action rules, if there is more than one space inserted anywhere.Make sure you always insert one space.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not verify the number of spaces after the "/" of a transition action. (Sub ID: c)

  • Runs on library models.

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

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

  • Allows exclusions of charts.

See Also

  • JMAAB guideline, Version 5.1: jc_0736: Uniform indentations in Stateflow blocks

Check placement of Label String in Transitions

Check ID: mathworks.jmaab.jc_0770

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
Stateflow label inserted in an inappropriate position.Make sure to place the Stateflow labels either at the origin of the signal or at the midpoint of the signal transition line.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check cannot be configured to check that label placement is closest to the point of origin of the transition. (Sub ID: a1)

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0770: Transition label layout

Check duplication of Simulink data names

Check ID: mathworks.jmaab.jc_0791

Description

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

Results and Recommended Actions

ConditionRecommended Action
One or more Simulink data names have duplicate definitions.Make sure that all the defined Simulink data names are unique.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0791: Duplicate data names

Comparing floating point types in Simulink

Check ID: mathworks.jmaab.jc_0800

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0800: Comparing floating-point types in Simulink

Check for avoiding algebraic loops between subsystems

Check ID: mathworks.jmaab.jc_0653

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0653: Delay block layout in feedback loops

Check default transition placement in Stateflow charts (JMAAB)

Check ID: mathworks.jmaab.jc_0531

Description

Checks the default transition placement in Stateflow charts.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0531: Default transition

Check settings for data ports in Multiport Switch blocks

Check ID: mathworks.jmaab.jc_0630

Description

Identifies the Multiport Switch blocks that violate data port settings.

Results and Recommended Actions

ConditionRecommended Action
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.
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.
Multiport Switch block setting Data port for default case is not set to Additional data port.Set the Multiport Switch block setting Data port for default case to Additional data port.
Switch block setting Diagnostics for default case to None.Set the Switch block setting Diagnostics for default case to None.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

Edit-Time Checking.  This check is supported by edit-time checking. However, edit-time checking for this check does not verify compliance with JMAAB guideline (v5.0) jc_0630 Sub ID b: Set the Input to the [Multiport Switch] control port to an unassigned integer.

See Also

  • JMAAB guideline, Version 5.1: jc_0630: Usage of Multiport Switch block

Check for usage of text inside states

Check ID: mathworks.jmaab.jc_0739

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

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

Capabilities and Limitations

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

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0739: Guidelines for describing texts inside states

Check for unconnected objects in Stateflow Charts

Check ID: mathworks.jmaab.jc_0797

Description

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

Available with Simulink Check.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
One or more unconnected transitions, states, or junctions are found in Stateflow Charts.Remodel to connect the dangling transitions and unconnected states and junctions.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0797: Unconnected transition lines / states / connective junctions

Check Stateflow chart action language

Check ID: mathworks.jmaab.jc_0790

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0790: Chart action language

Check usable characters for Stateflow data names

Check ID: mathworks.jmaab.jc_0795

Description

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

Results and Recommended Actions

ConditionRecommended Action
The Stateflow data name starts with an underscore ("_"). Rename the Stateflow data.
The Stateflow data name ends with an underscore ("_"). Rename the Stateflow data.
The Stateflow data name has consecutive underscores. Rename the Stateflow data.
The Stateflow data name is solely a reserved MATLAB word. Consider using a different name for Stateflow data.

Capabilities and Limitations

  • JMAAB guideline, Version 5.1 limitation: The check does not flag when a Name starts with underscore. (Sub ID: a)

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0795: Usable characters for Stateflow data names

Check length of Stateflow data name

Check ID: mathworks.jmaab.jc_0796

Description

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

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

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

  • Allows exclusions of charts.

  • Analyzes content of library linked blocks.

See Also

  • JMAAB guideline, Version 5.1: jc_0796: Length restriction for Stateflow data names

Check signal line labels (JMAAB)

Check ID: mathworks.jmaab.jc_0008

Check the labeling on signal lines.

Description

Use a label to identify:

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

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Constant block

    • Data Store Read block

    • Demux block

    • From block

    • Inport block

    • Selector block

    • Subsystem block

    Block Icon Exception

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

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

    • Bus Selector block (tool forces labeling)

    • Chart block (Stateflow)

    • Data Store Write block

    • Goto block

    • Mux block

    • Outport block

    • Subsystem block

  • Any signal of interest.

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

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

  • Does not allow exclusions of blocks or charts.

See Also

Check for propagated signal labels

Check ID: mathworks.jmaab.jc_0009

Check for propagated labels on signal lines.

Description

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

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

  • A basic block that performs a 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.

Available with Simulink Check.

Results and Recommended Actions

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

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

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

  • Does not allow exclusions of blocks or charts.

See Also