Stateflow    

Using Boxes in Stateflow Charts

Boxes are a convenience for organizing items in your charts. To create a box, do the following:

  1. Create a state.
  2. Right-click the state.
  3. From the resulting submenu, select Type -> Box.
  1. Stateflow converts the state to a box, redrawing its border with sharp corners to indicate its changed status.

Once you create a box you can move or draw objects inside it. You could also draw the box first as a state around the objects you want inside it and then convert it to a box.

Like states, you can group (and ungroup) a box and its contents into a single graphical element. You can also subchart a box to hide its elements. See Grouping States and Using Subcharts in Stateflow Charts for more information.

For the most part, boxes do not contribute to the semantics of a Stateflow diagram. They do, however, affect the activation order of a diagram's parallel states. A box wakes up before any parallel states or boxes that are lower or to the right of it in a Stateflow diagram. Within a box, parallel states still wake up in top-down, left to right order.


  Changing Transition Properties Using Graphical Functions in Stateflow Charts