NA-MAAB — a
JMAAB — a
All
When using a Simulink Function block in a Stateflow® Chart, one or more of the following conditions shall be met:
Input/output variables shall use only local StateflowChart data in the Simulink Function block.
Input/output variables shall use only local StateflowChart data and input data in the Simulink Function block.
The Simulink Function block shall be called from multiple places in the StateflowChart.
The Simulink Function block shall not be called at every time step.
Not Applicable
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)
R2020a
JMAAB guideline na_0042, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Simulink functions: Simulink Function block, exported Stateflow graphical and MATLAB functions