Skip to Main Content Skip to Search
Product Documentation

Stateflow Hierarchy of Objects

Stateflow machines arrange Stateflow objects in a hierarchy based on containment. That is, one Stateflow object can contain other Stateflow objects.

The highest object in Stateflow hierarchy is the Stateflow machine. This object contains all other Stateflow objects in a Simulink model. The Stateflow machine contains all the charts in a model. In addition, the Stateflow machine for a model can contain its own data and target objects.

Similarly, charts can contain state, box, function, data, event, transition, junction, and note objects. Continuing with the Stateflow hierarchy, states can contain all these objects as well, including other states. You can represent state hierarchy with superstates and substates.

A transition out of a superstate implies transitions out of any of its active substates. Transitions can cross superstate boundaries to specify a substate destination. If a substate becomes active, its parent superstate also becomes active.

You can organize complex charts by defining a containment structure. A hierarchical design usually reduces the number of transitions and produces neat, manageable charts.

  


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