jc_0753: Condition actions and transition actions in Stateflow
Since R2020a
Guideline Publication
Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®
Sub ID Recommendations
NA-MAAB — a, b
JMAAB — a, b
MATLAB Versions
All
Rule
Sub ID a
Transition actions shall not be used in a Stateflow Chart (Stateflow).
Not Applicable
Only a condition action is used.
A transition action is used.
Sub ID b
Condition actions and transition actions shall not be combined in the same Stateflow Chart (Stateflow).
Not Applicable
Either a condition action or a transition action can be used. (The following diagram illustrates a transition action.)
Includes both a condition action and a transition action.
Rationale
Sub ID a:
Prevents confusion with a condition action, thus improving readability.
Sub ID b:
A condition action executes upon entering a transition. A transition action executes after determining whether it can transition to the next state. Adherence to the rule prevents confusion between a conditional action and a transition action.
Verification
Model Advisor check: Check condition actions and transition actions in Stateflow (Simulink Check)
Last Changed
R2024b
See Also
Version History
Introduced in R2020a