jc_0753: Condition actions and transition actions in Stateflow
Sub ID Recommendations
NA-MAAB — a1/a2
JMAAB — a1/a2
MATLAB Versions
All
Rule
Sub ID a1
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 a2
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 a1:
Prevents confusion with a condition action, thus improving readability.
Sub ID a2:
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
R2020a
See Also
JMAAB guideline jc_0753, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Evaluate Outer Transitions with Condition and Transition Actions (Stateflow)
Version History
Introduced in R2020a