Flow Control

You can track the execution of the program with flow control. The flow control is available for the language editors ST, FBD, LD and CFC.

With flow control activated, TwinCAT displays the values of variables and the results of function calls and operations at the respective execution position and at the respective execution time. Precisely the code lines or networks being run through in the current cycle are marked in color. For comparison: with standard monitoring, TwinCAT returns only the value that a variable has between two execution cycles.

The flow control operates in all currently visible parts of the currently opened editor window. Flow Control activated is thereby displayed in the status bar as long as the function is active and flow control positions (parts of the code that have been run through) are visible in an editor window.

You can write values in the declaration part and in the implementation part. Forcing is not possible.

Flow Control 1:

Writing of the values is done at the end of the current cycle.

Flow Control 2:

The runtime of the PLC project is extended if you activate flow control.

Representation of the flow control in various language editors

By default, TwinCAT represents the flow control positions of the code parts that have been run through as green fields. Code parts that have not been run through are displayed in white.

Flow Control 3:

Please note that the displayed value of a code position that has not been run through is a "normal" monitoring value. This is the value that exists between two task cycles.

Flow Control 4:

In network editors, TwinCAT marks the networks that have been run through by bars at the left-hand edge in the "flow control color".

In LD, TwinCAT displays the connecting lines currently being run through in green, the others in gray. The actual value of the connection is also displayed: TRUE by thick blue lines, FALSE by thick black lines, unknown or analog values by thin black lines. This can lead in the case of combination of the respective pieces of information to dashed lines.

Flow Control 5:

In IL, TwinCAT uses two fields for each statement for displaying the actual values. One to the left of the operator with the current accumulator value and one to the right of the operand with the operand value.

Flow Control 6:

See also: