Stateflow User's Guide Previous page   Next Page

Creating Subcharts to Add More Substates

Many superstates have more substates of control than just Hi and Lo. For example, an On state for a washer must have states for soaking, washing, rinsing, and spinning. The On state for the transmission of a car must have substates park, reverse, drive, lo, and overdrive. In this section, you add more substates to the superstate On in the model SFcontrol6 that you create in Adding Superstates to Simplify Control. But adding substates can make your diagrams crowded. To make your diagrams more readable, Stateflow diagrams let you create subcharts.

Create more substates of the state On by making it a subchart in the following procedure topics:

  1. Converting a State to a Subchart
  2. Simulating a Subchart

Previous page  Simulating with a History Junction Converting a State to a Subchart Next page

© 1994-2005 The MathWorks, Inc.