Introduction
The execution order is determined by the position of the FFBs in the section (executed from left to right and from top to bottom) and is displayed with execution numbers. If the FFBs are connected to a network using graphical links, the execution order is determined by the signal flow, see also section Execution order in the Reference manual.
You can already influence the execution order when creating the program.
In some cases it might be necessary to explicitly modify the execution order.
By using
in an FFB properties dialog the execution order of two FFBs can be defined.FFBs whose execution order has been explicitly modified receive the instance name / function number of the previously executed FFB as an additional entry in front of the execution number.
Modifying the execution order
In the example, the execution order of FFB 1.4 and FFB 1.5 has to be switched. Process the following steps to modify the execution order using an FFB properties dialog box.
Step |
Action |
---|---|
1 |
Select the FFB to be executed second. Example: ![]() |
2 |
Open the properties dialog box for the FFB. |
3 |
In the list box, select the function number / instance name of the FFB to be executed before the selected FFB.Example: ![]() Result:The execution sequence of both FFBs are exchanged. To indicate that the execution order was changed, the execution number is shown in a black field. Example: ![]() Note:Only one reference of an instance is allowed, e.g. the instance ".6" may only be referenced once. |
Notes
When using
please note the following:If an FFB that is referenced by another FFB is deleted, the execution order attribute of the referencing FFB is reset.
Example:
FBI_1 has an "Execute After" reference to FBI_2.
FBI_2 is deleted.
For FBI_1 the attribute for determining the execution sequence is deleted.
If an FFB deletion operation carried out on a referenced FFB is undone using
it is reset to its former state.Example:
FBI_1 has an "Execute After" reference to FBI_2.
FBI_2 is deleted.
For FBI_1 the attribute for determining the execution sequence is deleted.
Execute from
.FBI_2 is inserted again and FBI_1 and FBI_2 has an "Execute After" reference.
If an FFB that has an "Execute After" reference pointing to another FFB is copied, the attribute which defines the execution order attribute of the FFB is reset during insertion.
Example:
FBI_1 has an "Execute After" reference to FBI_2.
FBI_1 is copied and the copy (FBI_3) inserted in the section.
For FBI_3 the attribute for determining the execution sequence is deleted.