-

Execution Order in Code Worksheets

Graphical code in FBD/LD, NOLD, SNOLD and SFC is executed in the following order:

The order in which the code objects are executed when running the program can be displayed.

To display the execution order of objects in graphical code worksheet, click the 'Switch display execution order' toolbar button or press <Ctrl>+<Shift>+<O>. To reverse the display, repeat the command.

If activated in FBD/LD, NOLD and SFC, the execution order is indicated by a number at the top left of the object (as shown in the following example). The number is automatically assigned by PLCnext Engineer according to the object position. Execution starts with the object that has the lowest number.

When a new object is added to the code object network, the execution numbers of the following objects are increased by one. When moving objects or complete networks, the numbers are re-assigned accordingly.

Note
If no execution order is visible although the display is activated, PLCnext Engineer could not determine the order absolutely certain.

In NOLD code, each section gets an execution number too which is shown at the top left in the section bar. Example:

Note
The execution order of the code worksheets in a POU is defined by the arrangement of the code worksheets in the editor group. For information how to set this execution order refer to the topic "POUs".