MathWorks Automotive Advisory Board Checks

MathWorks Automotive Advisory Board Checks Overview

MathWorks Automotive Advisory Board (MAAB) checks facilitate designing and troubleshooting models from which code is generated for automotive applications.

See Also

Check for blocks not using one-based indexing

Check for blocks that do not use one-based indexing.

Description

Use one-based indexing for:

See MAAB guideline db_0112: Indexing.

Results and Recommended Actions

ConditionRecommended Action
Blocks in your model are not configured for one-based indexing.Using block parameters, configure all blocks for one-based indexing.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB®, Simulink, and Stateflow®

Check for invalid file names

Check for files residing in the same directory as the model that have illegal file names.

Description

Use standard file names for:

See MAAB guideline ar_0001: Filenames.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for invalid model directory names

Checks model directory and subdirectory names for invalid characters.

Description

Use standard directory names for:

See MAAB guideline ar_0002: Directory names.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for nondiscrete blocks

Check for blocks that are not discrete.

Description

You must design controller models using discrete blocks. Continuous blocks are not allowed. Use discrete blocks for:

See MAAB guideline jm_0001: Prohibited Simulink standard blocks inside controllers.

Results and Recommended Actions

ConditionRecommended Action
Continuous blocks are not permitted in models representing discrete controllers.Replace continuous blocks with the corresponding discrete blocks. You might need to adjust parameter values in the block to take into account the change from continuous to discrete sample time.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for prohibited sink blocks

Check for prohibited Simulink sink blocks.

Description

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

See MAAB guideline hd_0001: Prohibited Simulink Sink blocks.

Results and Recommended Actions

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

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for invalid port positioning and configuration

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

Description

In models, the ports must comply with the following rules for the purpose of readability:

See MAAB guideline db_0042: Port block in Simulink models.

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

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for valid port block names

Check for mismatches between names of ports and their corresponding signals.

Description

Use matching names for ports and their corresponding signals for:

Results and Recommended Actions

ConditionRecommended Action
Ports have names that differ from their corresponding signals. (See MAAB guideline jm_0010: Port block names in Simulink models.)Revise the port names to match the naming rules.

Limitations

Prerequisite MAAB guidelines for this check are:

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check if name is not below block

Check if block names do not appear below blocks.

Description

If shown, the name of all blocks should appear below the blocks, for:

See MAAB guideline db_0142: Position of block names.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for systems with a mixture of primitive blocks and subsystems

Check for systems with a mixture of primitive blocks and subsystems.

Description

You must design every level of a model with building blocks of the same type, for example, only subsystems or only basic blocks, for:

See MAAB guideline db_0143: Similar block types on the model levels.

Results and Recommended Actions

ConditionRecommended Action
Systems are built from dissimilar blocks. Move nonvirtual blocks into the subsystem.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check if model has unconnected block inputs or outputs

Check for unconnected inputs and outputs.

Description

All unconnected inputs should be connected to ground blocks. All unconnected outputs should be connected to terminator blocks. Respecting the guideline eliminates error messages.

In Control Algorithm Modeling Guidelines for MATLAB, Simulink, and Stateflow – Version 1.0, see MAAB guideline jm_0008: Ground and Terminator Blocks.

Results and Recommended Actions

ConditionRecommended Action
Blocks have unconnected inputs or outputs. Connect the specified inputs and outputs.

Prerequisite

A prerequisite MAAB guideline for this check is db_0081: Unconnected signals.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for improper position of Trigger and Enable blocks

Check the location of Trigger, Enable, and Action Port blocks.

Description

Locate blocks that define subsystems as either conditional or iterative at the top of the subsystem diagram for:

See MAAB guideline db_0146: Triggered, enabled, conditional Subsystems.

Results and Recommended Actions

ConditionRecommended Action
Trigger , Enable, and Action Port blocks are not centered in the upper third of the model diagram. Move the Trigger, Enable, and Action Port blocks to the correct area of the model diagram.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check if annotations have drop shadows

Check annotations for dropped shadows.

Description

Annotations should not have a drop shadow for readability.

See MAAB guideline jm_0013: Annotations.

Results and Recommended Actions

ConditionRecommended Action
Annotations display drop shadows. Clear the Format > Show Drop Shadow menu option.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check if tunable parameters are used in expressions, data type conversions, or indexing operation

Check if tunable parameters specify expressions, data type conversions, and indexing operations.

Description

To ensure that a parameter is tunable, you must enter the basic block:

This type of tunable parameter is required for:

See MAAB guideline db_0110: Tunable parameters in basic blocks.

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 in the base workspace as a new variable.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check if Stateflow data objects with local scope are not defined at the chart level or below

Check if local data of a Stateflow block are not defined at the chart level or below.

Description

You must define all 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. This guideline is required for:

See MAAB guideline db_0125: Scope of internal signals and local auxiliary variables.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check interface signals and parameters

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 for:

See MAAB guideline db_0122: Stateflow and Simulink interface signals and parameters.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for exclusive states, default states, and substate validity

Check states in state machines.

Description

In state machines:

This is required for:

See MAAB guideline db_0137: States in state machines.

Results and Recommended Actions

ConditionRecommended Action
Chart has only one exclusive (OR) state. Make the state a parallel state, or add another exclusive (OR) state.
Chart does not have a default state defined.Define a default state.
Chart has multiple default states defined. Define only one default state. Make the others nondefault.
State has only one exclusive (OR) substate. Make the state a parallel state, or add another exclusive (OR) state.
State does not have a default substate defined. Define a default substate.
State has multiple default substates defined. Define only one default substate, make the others nondefault.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Prerequisite

A prerequisite MAAB guideline for this check is db_0149: Flowchart patterns for conditional actions.

Check optimization parameters for Boolean data types

Check the optimization parameter for Boolean data types.

Description

Optimization for Boolean data types is required for:

See MAAB guideline jc_0011: Optimization parameters for Boolean data types.

Results and Recommended Actions

ConditionRecommended Action
Configuration setting for Implement logic signals as boolean data (vs. double) is incorrect. Select the Implement logic signals as boolean data (vs. double) check box in the Configuration Parameters > Optimization pane.

Prerequisite

A prerequisite MAAB guideline for this check is na_0002: Appropriate implementation of fundamental logic and numerical operations.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check model diagnostic settings

Check the model diagnostics configuration parameter settings.

Description

Enabling diagnostics is required for:

See MAAB guideline jc_0021: Model diagnostic settings.

Results and Recommended Actions

ConditionRecommended Action
Algebraic loop is set to none. Otherwise, Simulink might attempt to automatically break the algebraic loops, which can affect execution order of the blocks. Set the Configuration Parameter > Diagnostics > Solver > Algebraic loop parameter to error or warning.
Minimize algebraic loop is set to none. Otherwise, Simulink might attempt to automatically break the algebraic loops for reference models and atomic subsystems, which can affect the execution order for those models or subsystems. Set the Configuration Parameter > Diagnostics > Solver > Minimize algebraic loop parameter to error or warning.
Inf or NaN block output is set to none, which can result in numerical exceptions in the generated code. Set the Configuration Parameter > Diagnostics > Data Validity > Signals > Inf or NaN block output parameter to error or warning.
Duplicate data store names is set to none, which can result in nonunique variable naming in the generated code. Set the Configuration Parameters > Diagnostics > Data Validity > Data Store Memory Block > Duplicate data store names parameter to error or warning.
Unconnected block input ports is set to none, which prevents code generation. Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected block input ports parameter to error or warning.
Unconnected block output ports is set to none, which can lead to dead code. Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected block output ports parameter to error or warning.
Unconnected line is set to none, which prevents code generation. Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected line parameter to error or warning.
Unspecified bus object at root Outport block is set to none, which can lead to an unspecified interface if the model is referenced from another model. Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Unspecified bus object at root Outport block parameter to error or warning.
Mux blocks used to create bus signals is set to none, which can lead to an unintended bus being created in the model. Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Mux blocks used to create bus signals parameter to error or warning.
Element name mismatch is set to none, which can lead to an incorrect interface in the generated code. Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Element name mismatch parameter to error or warning.
Invalid function-call connection is set to none, which can lead to an error in the operation of the generated code. Set the Configuration Parameters > Diagnostics > Connectivity > Function Calls > Invalid function-call connection to error or warning, since this condition can lead to an error in the operation of the generated code.

Tip

Diagnostics not listed in the Results and Recommended Actions section can be set to any value.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check the display attributes of block names

Check the display attributes of block names.

Description

Block names should be displayed when providing descriptive information. Block names should not be displayed if the block function is known from its appearance. This guideline is required for readability.

See MAAB guideline jc_0061: Display of block names.

Results and Recommended Actions

ConditionRecommended Action
Block name is not descriptive. These block names should be modified to be more descriptive or not be shown.
Block name is not displayed. These block names should be shown since they appear to have a descriptive name.
Block name is obvious. These block names should not be displayed.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check icon display attributes for Port blocks

Check the Icon display setting for Inport and Outport blocks.

Description

The Icon display setting is required for readability.

See MAAB guideline jc_0081: Icon display for port block.

Results and Recommended Actions

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

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for usable characters in subsystem block names

Check subsystem block names for usable characters.

Description

The names of all subsystem blocks are required to conform for:

See MAAB guideline jc_0201: Usable characters for Subsystem name.

Results and Recommended Actions

ConditionRecommended Action
The subsystem name contains illegal characters. Rename the subsystem. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.).
The subsystem name starts with a number. Rename the subsystem.
The subsystem name starts with an underscore ("_").Rename the subsystem.
The subsystem name ends with an underscore ("_"). Rename the subsystem.
The subsystem name contains one (or more) underscores. Rename the subsystem.
The subsystem name has consecutive underscores. Rename the subsystem.
The subsystem name has blank spaces. Rename the subsystem.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Tip

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

Check for usable characters in Inport and Outport block names

Check Inport and Outport block names for usable characters.

Description

The names of all Inport and Outport blocks are required to conform for:

See MAAB guideline jc_0211: Usable character for Inport block and Outport block.

Results and Recommended Actions

ConditionRecommended Action
The block name contains illegal characters. Rename the block. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.).
The block name starts with a number. Rename the block.
The block name starts with an underscore ("_"). Rename the block.
The block name ends with an underscore ("_"). Rename the block.
The block name contains one (or more) underscores. Rename the block.
The block name has consecutive underscores. Rename the block.
The block name has blank spaces. Rename the block.

Tips

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

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for usable characters in signal line names

Check signal line names for usable characters.

Description

The names of all signal lines are required to conform for:

See MAAB guideline jc_0221: Usable characters for signal line name.

Results and Recommended Actions

ConditionRecommended Action
The signal line name contains illegal characters. Rename the signal line. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.).
The signal line name starts with a number. Rename the signal line.
The signal line name starts with an underscore ("_"). Rename the signal line.
The signal line name ends with an underscore ("_"). Rename the signal line.
The signal line name contains one (or more) underscores. Rename the signal line.
The signal line name has consecutive underscores. Rename the signal line.
The signal line name has blank spaces. Rename the signal line.
The signal line name has control characters. Rename the signal line.

Tip

Use underscores to separate parts of a signal line name instead of spaces.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for usable characters in block names

Check block names for usable characters.

Description

The names of all blocks are required to conform for:

This guideline does not apply to subsystem blocks.

See MAAB guideline jc_0221: Usable characters for signal line name.

Results and Recommended Actions

ConditionRecommended Action
The block name contains illegal characters. Rename the block. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.).
The block name starts with a number. Rename the block.
The block name has blank spaces. Rename the block.
The block name has double byte characters. Rename the block.

Prerequisite

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

Tip

Carriage returns are allowed in block names.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check Trigger and Enable block port names

Check Trigger and Enable block port names.

Description

Block port names should match the name of the signal triggering the subsystem. This guideline is required for readability.

Results and Recommended Actions

ConditionRecommended Action
Trigger block does not match the name of the signal to which it is connected. Match Trigger block names to the connecting signal.
Enable block does not match the name of the signal to which it is connected. Match Enable block names to the connecting signal.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for Simulink diagrams that have nonstandard appearance attributes

Check model appearance setting attributes.

Description

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

See MAAB guideline na_0004: Simulink model appearance.

Results and Recommended Actions

ConditionRecommended Action
Diagrams do not have white backgrounds. Select Format > Screen Color > Automatic.
Diagrams do not have zoom factor set to 100%. Select View > Normal (100%).
The toolbar is not visible. Select View > Toolbar.
The status bar is not visible. Select View > Status Bar.
Block backgrounds are not white. Blocks should have black foregrounds with white backgrounds. Click the specified block and select Format > Foreground Color > Black and Format > Background Color > White.
Wide Nonscalar Lines is cleared. Select Format > Port/Signal Displays > Wide Nonscalar Lines.
Viewer Indicators is cleared. Select Format > Port/Signal Displays > Viewer Indicators.
Testpoint Indicators is cleared. Select Format > Port/Signal Displays > Testpoint Indicators.
Port Data Types is selected. Clear Format > Port/Signal Displays > Port Data Types.
Storage Class is selected. Clear Format > Port/Signal Displays > Storage Class.
Signal Dimensions is selected. Clear Format > Port/Signal Displays > Signal Dimensions.
Model Browser is selected. Clear View > Model Browser Options > Model Browser.
Sorted Order is selected. Clear Format > Block Displays > Sorted Order.
Model Block Version is selected. Clear Format > Block Displays > Model Block Version.
Model Block I/O Mismatch is selected. Clear Format > Block Displays > Model Block I/O Mismatch.
Execution Context Indicator is selected.Clear Format > Block Displays > Execution Context Indicator.
Sample Time Colors is selected. Clear Format > Port/Signal Displays > Sample Time Colors.
Library Link Display is set to User or All. Select Format > Library Link Display > None.
Linearization Indicators is cleared. Select Format > Port/Signal Displays > Linearization Indicators.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check visibility of port block names

Check the visibility of port block names.

Description

An organization applying the MAAB guidelines must select one of the following alternatives to enforce:

This guideline is required for readability.

See MAAB guideline na_0005: Port block name visibility in Simulink models.

Input Parameters

All Port names should be shown (Format/Show Name)

Select this check box if all ports should show the name, including subsystems.

Results and Recommended Actions

ConditionRecommended Action
Blocks do not show their name and the All Port names should be shown (Format/Show Name) check box is selected. Change the format of the specified blocks to show names according to the input requirement.
Blocks show their name and the All Port names should be shown (Format/Show Name) check box is cleared. Change the format of the specified blocks to hide names according to the input requirement.
Subsystem blocks do not show their port names. Set the subsystem parameter Show port labels to a value other than none.
Subsystem blocks show their port names. Set the subsystem parameter Show port labels to none.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for direction of subsystem blocks

Check the orientation of subsystem blocks.

Description

Subsystem inputs must be located on the left side of the block, and outputs must be located on the right side of the block. This guideline is required for readability.

See MAAB guideline jc_0111: Direction of Subsystem.

Results and Recommended Actions

ConditionRecommended Action
Subsystem blocks are not in the correct orientation. Change the subsystem blocks to have the correct orientation, with inports on the left and outports on the right.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for proper position of constants used in Relational Operator blocks

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

Description

When the relational operator is used to compare a signal to a constant value, the constant input should be the second, lower input. This guideline is required for:

See MAAB guideline jc_0131: Use of Relational Operator block.

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.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for entry format in state blocks

Check the format of entries in state blocks.

Description

A new line should be started after the entry, during, and exit action statements and after the completion of an assignment statement ";". This guideline is required for readability.

See MAAB guideline jc_0501: Format of entries in a State block.

Results and Recommended Actions

ConditionRecommended Action
An entry action statement is not by itself. Add a new line.
Multiple entry action statements found on one line. Add a new line between entry action statements.
An during action statement is not by itself. Add a new line.
Multiple during action statements found on one line. Add a new line between during action statements.
An exit action statement is not by itself. Add a new line.
Multiple exit action statements found on one line. Add a new line between exit action statements.
Multiple action statements found on one line. Add a new line between action statements.
Potential misuse of semicolon (;) on a line. Correct the use of the semicolon where specified.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for use of tunable parameters in Stateflow

Check for use of tunable parameters in Stateflow charts.

Description

Include tunable parameters in a Stateflow chart as inputs from the Simulink model. This guideline is required for:

See MAAB guideline jc_0541: Use of tunable parameters in Stateflow.

Results and Recommended Actions

ConditionRecommended Action
Stateflow charts reference Simulink data objects, which should be used as inputs from the Simulink model. Make the Simulink data objects inputs from the Simulink model to the specified Stateflow chart.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for mismatches between Stateflow ports and associated signal names

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. This guideline is required for:

See MAAB guideline db_0123: Stateflow port names.

Results and Recommended Actions

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

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

Check for proper scope of From and Goto blocks

Check the scope of From and Goto blocks.

Description

You can use global scope for controlling flow. However, From and Goto blocks must use local scope for signal flows. This guideline is required for:

See MAAB guideline na_0011: Scope of Goto and From blocks.

Results and Recommended Actions

ConditionRecommended Action
From and Goto blocks are not configured with local scope.Change the scope of the specified blocks to local.

See Also

The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS