T_QueryOptionTimeSeriesDB_Insert

This structure is used to write data to a time series database. An array of a structure can be specified as a symbol. Each individual array element is mapped as a row with a unique timestamp in the database. The timestamps of the individual series are generated by specifying a start timestamp and the time cycle between the data sets.

Syntax

Definition:

TYPE T_QueryOptionTimeSeriesDB_Insert
STRUCT
    pSymbol         : PVOID;
    cbSymbol        : UDINT;
    sDataType       : STRING;
    nDataCount      : UDINT := 1;
    sTableName      : T_MaxString;
    nCycleTime      : UDINT := 100000;
    nStartTimestamp : ULINT := 0;
END_STRUCT
END_TYPE

Parameter

Name

Type

Description

pSymbol

POINTER TO BYTE

Pointer to the symbol that is to be written to the database

cbSymbol

UDINT

Length of the specified symbol pointer

sDataType

STRING

(Simple) type designation of the specified symbol

nDataCount

UDINT

Number of data sets in the transferred array symbol

sTableName

T_MaxString

Name of the table or table equivalent

nCycleTime

UDINT

Time interval of the cyclic data sets

nStartTimestamp

ULINT

Time stamp of the first data set in TwinCAT time: Number of 100 ns intervals since January 1, 1601.
Further: Reading the current TwinCAT time

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1 Build 4022.20

PC or CX (x86)

Tc3_Database