Stateflow    

History Junction

A history junction records the most recently active state of a chart or superstate.

If a superstate with exclusive (OR) decomposition has a history junction, the destination substate is defined to be the substate that was most recently visited. A history junction applies to the level of the hierarchy in which it appears. The history junction overrides any default transitions. In the component summary Stateflow diagram, the history junction in StateA1 indicates that when a transition to StateA1 occurs, the substate that becomes active (StateA1a, StateA1b, or StateA1c) is based on which of those substates was most recently active.

In the automatic transmission system, history indicates that when clutch_engaged causes a transition from neutral to the engaged superstate, the substate that becomes active, either first or second, is based on which of those substates was most recently active.


  Conditions Actions