| Stateflow User's Guide | ![]() |
Code Generation Error Messages
Typical code generation error messages include the following:
A transition path starting from a default transition segment in one state completes at a destination state that is not a substate of the original state.
A Stateflow expression assigns a value to an Input from Simulink data object. By definition, Stateflow cannot change the value of a Simulink input.
"Transition <number> has a condition action which is preceded by a transition <number> containing a transition action. This is not allowed as it results in out-of-order execution, i.e., the condition action of <number> gets executed before the transition action of <number>."
The preceding Stateflow diagram flags this error. Assuming that there are no other actions than those indicated for the labeled transition segments between state A and state B, the sequence of execution that takes place when state A is active is expressed by the following pseudocode:
Because condition actions are evaluated when their guarding condition is true and transition actions are evaluated when the transition is actually taken, condition action a2 is executed prior to transition action a1. This violates the apparent graphical sequence of executing a1 then a2. In this case, the preceding diagram is flagged for an error during build time. As a remedy, the user can change a1 and a2 to be both condition or transition actions.
| Parser Error Messages | Compilation Error Messages | ![]() |
© 1994-2005 The MathWorks, Inc.