Monitoring in Programming Objects¶
Requirement: An application is loaded and started on the PLC. In the CODESYS Development System, you want to use the POU editors for monitoring the current values that have the variables on the PLC.
Make sure that the Enable inline monitoring option is selected in (category Text Editor - Monitoring).
Click
to set the display format of the values.Click the POU in the Devices or POUs view to display the variable values in the declaration and implementation parts. The following sections include general descriptions, as well as features depending on the type of POU and programming editor.
Monitoring in the declaration editor
The current variable value is shown in the Value column (3). You can write and force a value in the Prepared value (4) column. A red forced symbol ( ) is prepended to forced values.
If the expression is an array, then you can double-click the Data Type column to open a dialog for defining the range of the array index to monitor.
If the expression is an interface reference, then it can be expanded. If the interface points to a global instance, then this global instance is displayed as the first entry below the reference. If the interface reference changes, then the displayed reference is collapsed.
See also
Monitoring in the implementation part (inline monitoring)
Inline monitoring is the display of variable values in the implementation part. Depending on the implementation language, the following displays are possible:
- A small rectangle after the variables or in its own column (IL tabular editor):
.
- In network editors and CFC, the color of the connecting lines (in the LD editor, the fill color of the contact or coil element) indicates the current Boolean value: blue for
TRUE
, black forFALSE
. - SFC editor: Transitions with
TRUE
and active steps are filled blue.
For forcing and writing, prepared values are added in angle brackets to the inline monitoring view next to the current variable value In the LD editor, the current prepared value (TRUE
or FALSE
) is shown for contacts and coils in a small view next to the element.
Forced values are prepended with a red forced symbol ( ), as in the declaration editor. Note: In the implementation part of the SFC editor, only forced transaction values can be marked by a red fill in the transition element.
See below for monitoring values of functions and properties.
Monitoring in the ST editor
Monitoring in the LD editor
Monitoring in the SFC editor
Note
You deactivate the inline monitoring function in Text editor / Monitoring).
(categorySee also
- ST Editor ST Editor in Online Mode
- FBD/LD/IL Editor in Online Mode
- SFC Editor in online Mode
- CFC Editor in Online Mode
Monitoring for function block variables
When you open the editor view for a function block in online mode, you are prompted whether to open the view of the base implementation or of a block instance. In the base implementation, monitoring is possible only when a breakpoint is set. If you set a breakpoint in the base implementation, then it is set for all instances. In the base implementation view, the values are displayed first for the instance that is processed first in the program flow.
See also
Monitoring for return values from functions
In a function POU, the current variable values are displayed only when a breakpoint is set.
In the ST editor, the current return value of the function is displayed in inline monitoring at the position in the POU where a function was called when the following conditions are met:
- The value can be interpreted as a 4-byte numeric value (for example, INT, SHORT, or LONG).
- The
{attribute 'monitoring' := 'call'}
attribute is inserted in the function declaration.
See also
Monitoring for property variables
When you insert either the {attribute 'monitoring' = 'variable'}
attribute or {attribute 'monitoring' = 'call'}
attribute into the properties declaration, you can monitor variables in properties that belong to a function block
See also