Flow Control

With flow control, you can monitor the processing of the application program. Flow control is provided for the ST, FBD, LD, and IL language editors.

With an activated flow control, CODESYS displays the variable values and results from function calls and operations at the respective processing location and time. In this way, the exact lines of code and networks that run through the current cycle are marked in colors. Compare this to standard monitoring, in which CODESYS delivers only the value that a variable has between two processing cycles.

Flow control works in all parts of the editor view that are currently visible. Flow control enabled is then displayed in the status line as long as the function is active and flow control positions (processed parts of code) are visible in an editor view.

You can write and force values only in the declaration section.

Attention

When you enable flow control, the cycle time of the application is prolonged.

When Confirmed Online Mode is activated in the communication settings, a dialog prompt appears when switching on the flow control to cancel the process.

When flow control is activated, it is not possible to use breakpoints or step through the program.

See also

Display of the flow control in different language editors

By default, CODESYS displays the flow control positions of the processed parts of code as green fields. Unprocessed parts of code are displayed in white.

Note

Please note that the displayed value of an unprocessed code position is an ordinary monitoring value. This is the value between two task cycles.

../_images/dcfce14da520f38dc0a8640e00295b24

In network editors, CODESYS marks the processed networks with bars on the left edge in the flow control color.

In LD, CODESYS displays the currently processed connecting lines in green and all others in gray. The actual value of the connection is also displayed: TRUE by a bold blue line, FALSE by a bold black line, and unknown or analog values by thin black lines. Combinations of these lines are displayed as dashed lines.

../_images/146bde57a520828dc0a8640e00f6b34f

In IL, CODESYS uses two fields for each statement to display the current values: one to the left of the operator with the current accumulator, and one to the right of the operands with the operand value.

../_images/b705c998a51fbb4ac0a8640e01e1fdbf