Stateflow User's Guide Previous page   Next Page

Controlling Objects with Parallel Superstates

In this section, you control two control objects instead of one. For example, instead of controlling a single fan with two speeds, you use two single-speed fans, each with its own control. Because both fans have their own control and must run concurrently, you use another form of hierarchy to control the fans in Stateflow: parallel states.

You use parallel states in Stateflow to control concurrent processes. Concurrent processes are control processes that take place simultaneously, but independently. Because each fan is controlled separately, as if it were the only fan running, you control them concurrently.

Use the following procedure topics to create a model with parallel states and test them in simulation:

  1. Creating Parallel States -- Create a model with two Stateflow diagrams, each executing in its own parallel state.
  2. Simulating Parallel States -- Test the parallel states you create in simulation.

Previous page  Simulating a Subchart Creating Exclusive States Next page

© 1994-2005 The MathWorks, Inc.