SyncReadVars (FUN)

FUNCTION SyncReadVars : SysTypes.RTS_IEC_HANDLE

Reads the given variables synchronously. The resulting variable list must be released by a followup call to SyncReadVarsRelease.

Note

The returned variable list may be reused for further read calls (without additional symbolic resolution) by calling SyncReadVarList

Important

As communication and symbolic resolution is involved, take care (async calls etc.) when using this method from an IEC-Task

InOut:

Scope

Name

Type

Comment

Return

SyncReadVars

SysTypes.RTS_IEC_HANDLE

A handle to the newly created variable list

Input

hPlcHandler

SysTypes.RTS_IEC_HANDLE

The instance of the PLCHandler to work on.

ppInstPaths

POINTER TO POINTER TO BYTE

A POINTER to an ARRAY of POINTERs to zero terminated ASCII STRINGs representing the instance paths that should be written

numSymbols

UDINT

The number of variables to read. In fact this number represents the number of entries in ppInstPaths

Output

ppVarInfos

POINTER TO POINTER TO VariableValue

An ARRAY OF POINTERs to VarInfo instances representing each single read value

numVarsResult

UDINT

The size of the array of returned variables

result

Error

An error code representing the result of the operation