Stateflow User's Guide Previous page   Next Page

Adding a History Junction to a Superstate

History junctions store the most recently active substate of a superstate. When the superstate is exited and reentered, this is the substate that becomes active. In this topic, you add a history junction to a superstate in the following steps:

  1. If not already loaded, load the Simulink model SFcontrol5, which you save in Adding Superstates to Simplify Control.
  2. Save the model as SFcontrol6.
  3. Open the Stateflow diagram for the Controller block as shown.

  4. In the drawing toolbar, click the History Junction tool .
  5. Move the cursor to the upper-right corner of the superstate On and click to place a history junction as shown.

  6. Save the model (SFcontrol6).

Previous page  Adding a History Junction to Save State Simulating with a History Junction Next page

© 1994-2005 The MathWorks, Inc.