Main Content

Check usage of Simulink function in Stateflow

Check ID: mathworks.jmaab.na_0042

Guideline: na_0042: Usage of Simulink® functions

Description

Checks the usage of Simulink functions in Stateflow.

This check requires Simulink Check™ and Stateflow® licenses.

Check Parameterization

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

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — a

  • JMAAB — a

Results and Recommended Actions

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

Capabilities and Limitations

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

  • Runs on library models.

  • Allows exclusions of blocks and charts.

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

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