



NOTICE

When you insert the pragma {attribute 'monitoring':='call'}
for monitoring, you have to pay attention to possible side effects. These kinds of
side effects can occur if additional operations are implemented in the property.




NOTICE

The pragma {attribute 'monitoring'}
is also evaluated for the symbol configuration. Only read access is possible for
the value 'variable'
.
In the online view of a function block or program, you can monitor the subordinate
properties in addition to the local variables. This allows you to monitor the values
of the Get
and Set
methods.
Insert either the pragma {attribute 'monitoring' := 'variable'}
or {attribute 'monitoring' := 'call'}
in the declaration of the property block. The current values of the property are
then displayed automatically in the IEC editor or in a watch list.
Example
In online mode, the PLC_PRG
object shows the value of the Minutes
property at the call location inline in the ST editor. This is because the pragma
{attribute 'monitoring' := 'variable'}
is located in the declaration of the Minutes
property.

Check carefully for each application which attribute pragma is suitable for displaying the desired value. This depends on whether further operations with the variables are implemented within the property.
- 1
-
Pragma:
{attribute 'monitoring':='variable'}
:An implicit variable is created for the property, which is then always given the current property value when the application calls the
Set
orGet
method. The value stored last in this variable is displayed in the monitoring. - 2
-
Pragma:
{attribute 'monitoring':='call'}
You can use this attribute only for properties that return simple data types or pointers, but not for structured types.
The value to be monitored is read or written by calling the property directly. This means that the monitoring service of the runtime executes the
Get
orSet
method of the property.
With the context menu command “Add Watch”, a variable on which the cursor is currently positioned is applied directly into the monitoring list in online mode.
The forcing or writing of functions is not supported. However, you can implicitly implement forcing by adding an additional input parameter for the respective function, which serves as an internal force flag.
Function monitoring is not possible in the compact runtime.
-
See also: ⮫ Add Watch