jc_0722: Local data definition in parallel states
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
Sub ID a
Local variables that are completed in one state shall be defined in that state.
Local variables are defined in the state being used.
Local variables are not defined in the state being used.
Sub ID a:
Readability and maintainability can be improved by explicitly limiting the valid range of the variables, thereby avoiding unintended references and changes.
Model Advisor check: Check scope of data in parallel states (Simulink Check)
JMAAB guideline jc_0722, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Represent Operating Modes by Using States (Stateflow)
Parallel and Exclusive States (Stateflow)
Introduced in R2020a