|On this page…|
A history junction represents historical decision points in the Stateflow® chart. The decision points are based on historical data relative to state activity. Placing a history junction in a superstate indicates that historical state activity information is used to determine the next state to become active. The history junction applies only to the level of the hierarchy in which it appears.
The following example uses a history junction:
Superstate Power_on has a history junction and contains two substates. If state Power_off is active and event switch_on occurs, the system can enter Power_on.Low or Power_on.High. The first time superstate Power_on is entered, substate Power_on.Low is entered because it has a default transition. At some point afterward, if state Power_on.High is active and event switch_off occurs, superstate Power_on is exited and state Power_off becomes active. Then event switch_on occurs. Because Power_on.High was the last active substate, it becomes active again. After the first time Power_on becomes active, the history junction determines whether to enter Power_on.Low or Power_on.High.
See Default Transition and a History Junction for more information on the semantics of this notation.
By specifying an inner transition to a history junction, you can specify that, based on a specified event or condition, the active state is to be exited and then immediately reentered.
See Using an Inner Transition to a History Junction for an example of this notation.
See Inner Transition to a History Junction for more information on the semantics of this notation.