Stateflow Previous page   Next Page

Build a Stateflow Model

In this section, you use Stateflow to create, run, and debug the simple power switch model introduced to you in the previous section. The steps you take in this quick start to learning Stateflow are as follows:

  1. Create a Simulink Model -- Start a model in Simulink containing a Stateflow block.
  2. Create a Stateflow Diagram -- Start a Stateflow diagram for the Stateflow block in your Simulink model.
  3. Define Input Events -- Define the input events from Simulink that trigger the execution of your Stateflow diagram.
  4. Define Input Data -- Define the input data from Simulink that controls a transition with a condition.
  5. Define the Stateflow Interface -- Add a source of triggers in the Simulink model for executing the Stateflow diagram.
  6. Define Simulink Parameters -- Define operating parameters for the Simulink model during simulation.
  7. Parse the Stateflow Diagram -- Check the Stateflow diagram for syntactical errors.
  8. Run a Simulation -- Go through the steps for simulating your model.
  9. Debug the Model During Simulation -- Tells you how you can use the Stateflow Debugger to carefully monitor all aspects of your quick start model during simulation.
  10. Save the Model -- Save the model that you created and simulated in the Quick Start section.


Previous page  Stateflow Generates Code Create a Simulink Model Next page

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS