AddValue (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

Description

This method is used to add an entry to the data telegram. The entry consists of the name of the variable, its value, and the associated timestamp.

NOTE: If more than one value of the same variable (iqs_wsVarName) are part the same data message, only the latest value is considered by the Machine Advisor monitoring application interface.

The return value of the method is of type ET_Result and indicates the result of the execution. If Ok is indicated, the value is successfully added to the data telegram.

Interface

Inputs Data Type Description

i_anyVariable

ANY

Variable whose value is to add to the data telegram.

NOTE: Only integer or floating-point types are supported.

iqc_wsVarName

WSTRING(GCL.Gc_uiLengthVarNameUtf16)

Name of the variable. In Machine Advisor a variable is identified by its name and the prefix (AssetName).

i_uliTimestamp

ULINT

Timestamp for the value of the variable.

The value must be provided as unix timestamp in nanoseconds since 01.01.1970 00:00:00.

Example

SysTimeRtc.SysTimeRtcHighResGet(uliTimestamp);
etResult := fbDataEquipment1.AddValue(	i_anyVar := diMyVariable,
                                          iqc_wsVarName := "MyVariable",
                                          i_uliTimestamp := uliTimestamp);