db_0137: States in state machines
Sub ID Recommendations
NA-MAAB — a
JMAAB — a
MATLAB Versions
All
Rule
Sub ID a
When the Decomposition for the Chart block or
State is set to OR (Exclusive)
, there shall be at least
two states in the hierarchy.
Not Applicable
The hierarchy contains only one state when the
Decomposition option is set to OR
(Exclusive)
Rationale
Sub ID a:
Redundant descriptions impair readability.
Generated code includes unnecessary state variables.
Verification
Model Advisor check: Check for state in state machines (Simulink Check)
Last Changed
R2020a
See Also
JMAAB guideline db_0137, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Represent Operating Modes by Using States (Stateflow)
Define Exclusive and Parallel Modes by Using State Decomposition (Stateflow)
Version History
Introduced in R2020a