Main Content

jc_0763: Usage of multiple internal transitions

Since R2020a

Guideline Publication

Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®

Sub ID Recommendations

  • NA-MAAB — a1/a2

  • JMAAB — a1/a2

MATLAB Versions

All

Rule

Sub ID a1

Multiple internal transitions shall not be used in a single state.

Custom Parameter

Not Applicable

Example — Correct

Example — Incorrect

Sub ID a2

When multiple internal transitions are used in a single state, they shall be listed from top to bottom in the order of execution.

Custom Parameter

Not Applicable

Example — Correct

Example — Incorrect

Rationale

Sub ID a1:

  • The number of transition conditions is unclear when multiple internal transitions are used. By limiting the use of internal transitions to a single use, transitions are clearer and readability improves.

Sub ID a2:

  • Using multiple internal transitions can prevent transition lines from crossing and simplifies state transitions.

  • Arranging internal transitions in execution order improves readability.

Verification

Model Advisor check: Check usage of internal transitions in Stateflow states (Simulink Check)

Last Changed

R2020a

Version History

Introduced in R2020a