Check fundamental logical and numerical operations
Guideline: na_0002: Appropriate usage of basic logical and numerical operations
Checks the data types for logical and numerical blocks and identifies when the data type is not appropriate for the operation.
The data type for logical blocks should be Boolean. Logic blocks include:
The data type for numerical blocks should be non-Boolean. Numerical blocks include:
This check requires a Simulink® Check™ license.
This check contains sub-checks that correspond to the sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.
For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:
NA-MAAB — a, b
JMAAB — a, b
To customize the blocks and masks to include in the analysis for this check, use the Model Advisor Configuration Editor.
Open the Model Configuration Editor and search for check ID
Under Input Parameters, add or remove blocks and/or masks from the Blocks for Numerical Operations table or Blocks for Logical Operations table.
Click Apply and save the configuration.
Results and Recommended Actions
|Guideline Sub ID||Condition||Recommended Action|
|na_0002_a: Check input data types of blocks meant for numerical operations.||Data type for a numerical operation blocks is Boolean.||Consider having non-Boolean inputs for the numerical operation blocks.|
|na_0002_b: Check input data types of blocks meant for logical operations.||Data type for a logical operation blocks is not Boolean.||Consider having Boolean inputs for the logical operation blocks.|
Capabilities and Limitations
Does not run on library models.
Allows exclusions of blocks and charts.
Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to
Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to