Skip to Main Content Skip to Search
Product Documentation

Event Actions in a Superstate Example

The following example shows the use of event actions in a superstate.

Initially, the chart is asleep. State A.A1 is active. Event E_three occurs and awakens the chart, which processes the event from the root down through the hierarchy:

  1. The chart root checks to see if there is a valid transition as a result of E_three. No valid transition exists.

  2. State A during actions (durA()) execute and complete.

  3. State A executes and completes the on event E_three action (A_one).

  4. State A checks its children for valid transitions. No valid transitions exist.

  5. State A1 during actions (durA1()) execute and complete.

  6. The chart goes back to sleep.

This sequence completes the execution of this Stateflow chart associated with event E_three.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS