SFC Elements ‘Step’ and ‘Transition’

Step symbol ; Transition symbol

As a rule, CODESYS inserts steps and transitions as combinations. Inserting a step without a transition or a transition without a step causes an error when compiling. You can modify this by double-clicking the name.

Hint

Step names must be unique within the scope of the parent block. Consider this especially when using actions that were also programmed in SFC.

Please note that you can convert a step into an initial step by clicking Init step or by setting the respective property in the SFC properties.

All steps are defined by the step properties, which you can display and edit in the Properties view, depending on the set options.

You have to add those actions to the step which are to be executed when the step is active. A distinction is made between IEC actions and step actions. Details for this are found in the chapter about the SFC element “Action”.

A transition must include the condition for the subsequent step to be active as soon as the value of the condition yields TRUE. Therefore, a transition condition must yield TRUE or FALSE. It can be defined in one of two ways:

Hint

The user is responsible for assigning the required expression to a transition variable if the transition includes multiple instructions.

Transitions that reference a transition or property object are marked with a small triangle in the upper right corner of the transition box.

As opposed to CoDeSys V2.3, now CODESYS treats a transition condition like a method call. The entry has the following syntax:

<transition name>:=<transition condition>

(for example trans1:= a=100)

or only

<transition condition>

(for example a=100)

You will find an example (condition_xy) in the figure above.

See also