Stateflow    

Using Junctions in Stateflow Charts

Junctions provide a decision point between alternate transition paths. History junctions record the activity of states inside states. The following sections describe how to create, move, and specify properties for Stateflow junctions:

Creating a Junction

To create a junction, click a Junction button in the toolbar and click the desired location for the junction in the drawing area. To create multiple junctions, double-click the Junction button in the toolbar. The button is now in multiple object mode. Click anywhere in the drawing area to place a junction in the drawing area. Additional clicks in the drawing area create additional junctions. Click the Junction button or press the Esc key to cancel the operation.

You can choose from these types of junctions.

Name
Button Icon
Description
Connective
junction

One use of a connective junction is to handle situations where transitions out of one state into two or more states are taken based on the same event but guarded by different conditions.
History junction

Use a history junction in a chart or superstate to indicate that its last active substate becomes active when the chart or superstate becomes active.

Changing Size

To change the size of junctions, do the following:

  1. Select the junctions whose size you want to change.
  2. Place the cursor over one of the junctions and right-click.
  3. In the resulting submenu, place the cursor over Junction Size.
  1. A menu of junction sizes appears.

  1. Select a size from the menu of junction sizes.

Moving a Junction

To move a junction, click and drag it to a new position.


  Specifying Graphical Function Properties Editing Junction Properties