Using Stateflow     Search    Help Desk 

Example: Cyclic Behavior

This Stateflow diagram shows a typical example of a cycle created by infinite recursions caused by an event broadcast.


When state C during action executes event E1 is broadcast. The transition from state A.A1 to state A.A2 becomes valid when event E1 is broadcast. Event E2 is broadcast as a condition action of that transition. The transition from state B.B1 to state B.B2 becomes valid when event E2 is broadcast. Event E1 is broadcast as a condition action of the transition from state B.B1 to state B.B2. Because these event broadcasts of E1 and E2 are in condition actions, a recursive event broadcast situation occurs. Neither transition can complete.



[ Previous | Help Desk | Next ]