Transitions in ST

Syntax
(* transition with one predecessor step and one successor step *)
TRANSITION (* optional_begin *) name_1 (* optional_end *) FROM step_name_1 TO step_name_2
:= transition_condition;
END_TRANSITION
 
(* transition with several predecessor steps and several successor steps *)
TRANSITION (* optional_begin *) name_2 (* optional_end *) FROM (step_name_1, step_name_2, ...) TO (step_name_3, step_name_4, ...)
:= transition_condition;
END_TRANSITION 

Meaning

a →transition within the →SFC network, the optional name of the transition (e.g. name_1) must be an →IEC-identifier
Several transitions are allowed per SFC network. See the notes under "SFC elements in ST" how to create/use SFC networks efficiently and correctly.

Each transition requires the following specifications:

  • one predecessor step after the keyword FROM – example: FROM step1
    In case of several predecessor steps, specify them in parenthesis and separate them from each other by: , Example: FROM (step1, step2, step3)

  • one successor step after the keyword TO – example: TO step1
    In case of several successor steps, specify them in parenthesis and separate them from each other by: , Example: TO (step1, step2, step3)

  • the transition condition transition_condition; after :=
    Use a Boolean →expression as transition condition. If this expression is evaluated with value TRUE (or an equivalent) and all predecessor steps are active, the transition is cleared (i.e., the execution is transferred from the predecessor steps to the successor steps). See "Evaluating the ST-code including the SFC networks" for information when a transition is cleard.

The usage of the transition is only possible within the current POU.

Restriction

Priorities of transitions are not evaluated.

Example
(* The transition 't0' is connected with the predecessor step 'step0' and the successor steps 'step1' and 'step2'. *)
(* Its transitions condition: cntStep0 MOD 10 = 0 *)
TRANSITION t0 FROM step0 TO (step1,step2)
:= cntStep0 MOD 10 = 0;
END_TRANSITION
 
(* The transition 't1' is connected with the predecessor steps 'step1' and 'step2' and with the successor step 'step0'. *)
(* Its transitions condition: MyFun01(In:=Var1) -- condition for this: 'MyFun01' has a Boolean return value. *)
TRANSITION t1 FROM (step1,step2) TO step0
:= MyFun01(In:=Var1);
END_TRANSITION