Skip to Main Content Skip to Search
Product Documentation

Basic Tutorial for Modeling Event-Driven Systems

Before you start building a chart, you identify system attributes by answering these questions:

  1. What are your interfaces?

    1. What are the event triggers to which your system reacts?

    2. What are the inputs to your system?

    3. What are the outputs from your system?

  2. Does your system have any operating modes?

    1. If the answer is yes, what are the operating modes?

    2. Between which modes can you transition? Are there any operating modes that can run in parallel?

    If your system has no operating modes, the system is stateless. If your system has operating modes, the system is modal.

After identifying your system attributes, you can follow a basic workflow for building Stateflow charts to model event-driven systems:

  1. Define the interface to Simulink.

  2. Define the states for modeling each mode of operation.

  3. Define state actions and variables.

  4. Define the transitions between states.

  5. Decide how to trigger the chart.

  6. Simulate the chart.

  7. Debug the chart.

  


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