FB_NoSQLResultEvt

FB_NoSQLResultEvt 1:

Function block for reading buffered records.

The records must first be retrieved from the database using the function block FB_NoSQLQueryEvt when the ExecuteDataReturn method is called. The function block FB_NoSQLResultEvt is specified for initialization. They can then be read out either as a PLC structure or as a string.

Syntax

Definition:

FUNCTION BLOCK FB_SQLResultEvt
VAR_INPUT
    sNetID: T_AmsNetID := '';
    tTimeout: TIME := T#5S;
END_VAR
VAR_OUTPUT
    bBusy: BOOL;
    bError: BOOL;
    ipTcResult: Tc3_EventLogger.I_TcMessage
END_VAR

FB_NoSQLResultEvt 2: Inputs

Name

Type

Description

sNetID

T_AmsNetID

AMS network ID of the target device at which the ADS command is directed.

tTimeout

TIME

Indicates the time before the function is cancelled.

FB_NoSQLResultEvt 3: Outputs

Name

Type

Description

bBusy

BOOL

TRUE as soon as a method of the function block is active.

bError

BOOL

TRUE when an error occurs.

ipTcResult

Tc3_EventLogger.I_TcMessage

Message interface from the TwinCAT 3 EventLogger, which provides details on the return value.

FB_NoSQLResultEvt 4: Properties

Name

Type

Description

eTraceLevel

TcEventSeverity

Specifies the weighting of the events. Only events with a weighting higher than this value are sent to the TwinCAT system.

nDataCount

UDINT

Indicates the number of returned records available from the call of the function block FB_NoSQLQueryEvt.ExecuteDataReturn().

FB_NoSQLResultEvt 5: Methods

Name

Definition location

Description

ReadAsString

Local

Reads a specified number of records from the result data cached in the TwinCAT Database Server as JSON string.

ReadAsStruct

Local

Reads a specified number of records from the result data cached in the TwinCAT Database Server into the specified structure.

Release

Local

Releases data buffered by the TwinCAT Database Server.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1 Build 4022.20

PC or CX (x86)

Tc3_Database