Monitor (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

Description

This method is used for the cyclic monitoring of variables. The method must be executed cyclically to perform the monitoring process.

The return value of the method is of type ET_Result and indicates the result of the execution.

The method iterates through the assigned array of variables. For each valid entry it is verified whether the variable is already monitored by the function block. If so, the trigger condition is verified. If the trigger condition is TRUE, the value of the variable is added to the data telegram.

In case there is a variable in the array that is not yet monitored, it is added to the internal list of variables to be monitored.

If a variable is monitored but not contained anymore in the array, it will be removed from the internal list of monitored variables.

If the number of variables in the array is greater than the maximum number of variables which can be monitored by the function block, the method execution is aborted. A corresponding result message is provided.

When the maximum number of values in the data telegram is reached, the trigger conditions are not verified anymore. A corresponding result message is provided.

Interface

Inputs Data Type Description

i_astVariables

ARRAY [<variable size>] OF ST_VariableToMonitor

The data type is an array with variable length.

List of variables to be monitored by the function block.

The access to the variables is implemented through a pointer access. To ensure that the pointer addresses are valid, the list must be updated each time the method Monitor is executed.

You can use the function FC_VariableToStruct to create and to update an entry in the array.