With flow control, you can monitor the processing of the application program. Flow control is provided for the ST, FBD, LD, and CFC 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 process 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 values in the declaration part and implementation part. Forcing is not possible.




NOTICE

Values are written at the end of the current cycle.




NOTICE

When you enable flow control, the cycle time of the application is prolonged.
When “Confirmed Online Mode” is selected in the communication settings, a dialog prompt appears when switching on the flow control to cancel the operation.
When flow control is enabled, it is not possible to use breakpoints or step through the program.
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 that the displayed value of an unprocessed code position is an ordinary monitoring value. This is the value between two task cycles.

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.

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