Stateflow User's Guide Previous page   Next Page

Simulating a Stateflow Diagram

After you build the Simulink model described in Building an On-Off Control Model, you naturally want to test it. You test Simulink models in a process called simulation. During simulation, Stateflow diagrams generate a graphical display that informs you of the transition that is executing and the currently active state. In this way, you can find out if a Stateflow diagram is behaving the way you expect it to, and make appropriate changes, if required.

Use the following procedure topics to simulate the Controller Stateflow diagram in the SFcontrol1 model:

  1. Setting Up Diagram Simulation -- Define simulation parameters for the Simulink model.
  2. Simulating a Stateflow Diagram -- Go through the steps of simulating your model.
  3. Using the Debug Tool During Simulation -- Use the debug tool to slow down and gain step-by-step control of simulation.

Previous page  Sending a Trigger Event to the Stateflow Chart Setting Up Diagram Simulation Next page

© 1994-2005 The MathWorks, Inc.