Transition
A transition controls the transition behavior between states. A transition is possible if one of the following events occurs:
- conditional event or change event
- Termination event (when the actions of the source state are complete)
- Time event
A transition has a guard condition and an optional action. The state transition is usually executed when the evaluation of the guard condition detects a rising edge. Alternatively, the transition can be configured to detect whether the guard condition is TRUE. In this case, advancing is independent of the edge behavior of the guard condition. When the state transition is executed with the next clock cycle, first the transition action is executed, then the target state is assumed.
If a source state has several outgoing transitions, each transition is assigned a priority. These can be changed in the element properties (View → “Properties” → “Priority”). The priority determines the order in which the guard conditions are checked and therefore in which order the transitions are switched.
A transition is displayed as a thin arrow pointing to the next state.
The guard condition of a transition can consist of several Boolean variables or expressions. In addition, transition elements, which can be added to a POU object as separate objects, can be used as transition condition. A new line can be added in the line editor for the transition condition via [Ctrl+Enter], in order to display the individual conditions more clearly.
Properties
"Property" | Description |
---|---|
"Relationship type" | Transition (not editable) |
"Priority" | Priority, which determines the processing order Sample: 1 Note: if the state has further transitions and you change the priority, all transitions are affected by the change and are automatically adjusted. |
"Rising edge" |
|
Edit transition
User input in the state diagram | Response in the state diagram | Description |
---|---|---|
Selecting "Transition" in "Toolbox". Click on a state (source state) in the state diagram, then click on another state (target state). |
| A transition with TRUE condition and an action icon is created. Use this method to generate a transition between existing states. |
Click on a state (source state) in the state diagram. | The icon through which an outgoing transition can be added to the selected state is available. If you use it, the state is extended with an outgoing transition. The target state is determined with a further click. | |
Double-click on the symbol |
| An input field with IntelliSense functionality opens. Select a Boolean variable or a Boolean expression. When the required option is selected in IntelliSense, it can be activated by double-clicking or by focusing plus [Enter]. |
Two single clicks on : |
| An input field with IntelliSense functionality opens. Select a method or action. When the required option is selected in IntelliSense, it can be activated by double-clicking or by focusing plus [Enter]. This selected method or action is executed when the transition has switched. |
Click once on a transition, the action icon or the guard icon: |
| The transition is selected (indicated by a blue arrow). A selected transition can be moved via drag and drop. The position of the linked states remains unchanged. |
Click on the start or end of a transition. | The symbol enables reconnecting of the transition, while retaining the existing transition configuration. You can pull the symbol to another source or target state in order to connect the transition there. The corresponding condition and action are retained. |