| Stateflow User's Guide | ![]() |
Watching Stateflow Execute During Simulation
Once you finish a Simulink model with a Stateflow block, you can simulate it. During simulation, Stateflow animates its Stateflow diagrams to show you how it responds to events, takes transitions, and changes states. In the animated diagram, active states are highlighted, as shown in the following example:
When events occur and transitions are taken, they too are highlighted. Continuing with the previous example, the following figures show what happens when an on_switch event occurs and the value of temp is less than 30:
temp is less than 30, the transition to the On state is taken.
| Stateflow Uses Data Variables | Generating C Code for Targets | ![]() |
© 1994-2005 The MathWorks, Inc.