na_0042: Usage of Simulink functions
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
Sub ID a
Input/output variables shall use only local Stateflow Chart data in the Simulink Function block.
Input/output variables shall use only local Stateflow Chart data and input data in the Simulink Function block.
The Simulink Function block shall be called from multiple places in the Stateflow Chart.
The Simulink Function block shall not be called at every time step.
The Simulink Function block lookup1D is not called from every time step and, therefore, can be used.
The Simulink Function block lookup1D is called from every time step and, therefore, cannot be used (out is the Stateflow output data)
Sub ID a:
To improve model readability, the use of the Simulink Function block should be used with caution in charts.
Model Advisor check: Check usage of Simulink function in Stateflow (Simulink Check)
JMAAB guideline na_0042, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.