Sequence of Processing in SFC

Overview

In online mode, the particular action types will be processed according a defined sequence; see the table below.

Definition of Terms

The following terms are used:

Term

Description

active step

A step, whose step action is being executed.

In online mode active steps are filled with blue color.

initial step

In the first cycle after an SFC POU has been called, the initial step automatically becomes active and the associated step action is executed.

IEC actions

IEC actions are executed at least twice:

  • The first time when they became active.

  • The second time - in the following cycle - when they have been deactivated.

alternative branches

If the step preceding the horizontal start line of alternative branches is active, then the first transition of each particular branch will be evaluated from left to right. The first transition from the left whose transition condition has value TRUE will be searched and the respective branch will be executed that is the subsequent step within this branch will become active.

parallel branches

If the double-line at the beginning line of parallel branches is active and the preceding transition condition has the value TRUE, then in all parallel branches each first step will become active. The branches now will be processed in parallel to one another. The step subsequent to the double-line at the end of the branching will become active when all previous steps are active and the transition condition after the double-line has the value TRUE.

Processing Order

Processing order of elements in a sequence:

Step

Description

1. Reset of the IEC Actions

All action control flags of the IEC actions get reset (not, however, the flags of IEC actions that are called within actions).

2. Step exit actions (step deactivated)

All steps are checked in the order which they assume in the sequence chart (top to bottom and left to right) to determine whether the requirement for execution of the step exit action is provided.If that is the case, it will be executed. An exit action will be executed if the step is going to become deactivated. This means if the entry and step actions - if existing - have been executed during the last cycle, and if the transition for the following step is TRUE.

3. Step entry actions(step activated)

All steps are tested in the order which they assume in the sequence to determine whether the requirement for execution of the step entry action is provided. If that is the case, it will be executed. An entry action will be executed if the step-preceding transition condition is TRUE and thus the step has been activated.

4. Timeout check, step active actions

For non-IEC steps, the corresponding step active action is now executed in the order in which they are positioned in the sequence (top -> down and left -> right).

5. IEC actions

IEC actions that are used in the sequence are executed in alphabetical order. This is done in 2 passes through the list of actions. In the first pass, all the IEC actions that are deactivated in the current cycle are executed. In the second pass, all the IEC actions that are active in the current cycle are executed.

6. Transition check, activating next steps

Transitions are evaluated. If the step in the current cycle was active and the following transition returns TRUE (and if applicable the minimum active time has already elapsed), then the following step is activated.

NOTE: An action may be executed multiple times in 1 cycle because it is called from more than one other IEC actions when there are multiple steps active. That is to say, the same IEC action is used simultaneously in different levels of an SFC, and this could lead to undesired effects.

Example: An SFC could have 2 IEC actions A and B, which are both implemented in SFC, and which both call IEC action C. Then in IEC actions A and B both can be active in the same cycle and furthermore, in both actions IEC action C can be active. In this case, C would be called twice.

 WARNING
UNINTENDED EQUIPMENT OPERATION
Do not call IEC actions from multiple other IEC actions in the same cycle.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: Use implicit variables for determining the status of steps and actions or the execution of the chart.