Symbol: Step
Symbol: Transition
As a rule, CODESYS inserts steps and transitions as a ⮫ combination. 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.
For more information about working in the SFC editor, see also: ⮫ “Programming in SFC ”, ⮫ “Creating a POU in SFC ”, ⮫ “Adding a step-transition ”, ⮫ “Adding an entry action ”, ⮫ “Adding an exit action ”, ⮫ “Adding an action ”, ⮫ “Adding an alternative branch ”, ⮫ “Adding a jump ”, ⮫ “Adding a macro ”, ⮫ “Adding an association ”





NOTICE

Step names have to be unique within the scope of the parent POU. Consider this especially when using actions that were also programmed in SFC.
Note that you can convert a step into an initial step by clicking “Init Step” or by setting the respective property in the ⮫ “SFC Element 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. There are "IEC actions" and "step actions". For more information, see: ⮫ “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:
- 1
-
Inline condition (direct): You replace the default transition name with either the name of a Boolean variable, a Boolean address, a Boolean constant, or a statement with a Boolean result (example:
(i<100) AND b
). You cannot specify programs, function blocks, or assignments here. - 2
-
"Multi-use condition" (separate transition or property object): You replace the default transition name with the name of a transition or property object (
,
). Click “Project Add Object” to create these objects. This allows "multiple use" of transitions, for example "condition_xy" in the figures below. Like an "inline condition", the object can contain a Boolean variable, Boolean address, Boolean constant, or an statement with a Boolean result. In addition, it can also contain multiple statements with any code.





NOTICE

It is the responsibility of the user to assign the desired expression to a transition variable if the transition contains multiple statements.
Transitions which reference a transition or property object are marked with a small triangle in the upper right corner of the transition box.

In contrast to CODESYS V2.3, now CODESYS handles a transition condition like a method call. The input is made according to the following syntax:
<transition name>:=<transition condition>
(Example: trans1:= a=100
)
or only
<transition condition>
(example: a=100
)
You will find an example (condition_xy
) in the figure above.
For more information, see: ⮫ Method call