UA_ReadList

This function block reads values from several given node and connection handles.
Inputs
VAR_INPUT
Execute : BOOL;
ConnectionHdl : DWORD;
NodeHdlCount : UINT;
NodeHdls : ARRAY[1..nMaxNodeIDsInList] OF DWORD;
stNodeAddInfo : ARRAY[1..nMaxNodeIDsInList] OF ST_UANodeAdditionalInfo;
pVariable : PVOID;
cbData : ARRAY[1..nMaxNodeIDsInList] UDINT;
cbDataTotal : UDINT;
Timeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is triggered by a rising edge at this input. |
ConnectionHdl | DWORD | Connection handle previously output by the function block UA_Connect. |
NodeHdlCount | UINT | Number of node handles stored in the input variable NodeHdls. |
NodeHdls | ARRAY | Array of node handles previously received by the function block UA_NodeGetHandle or UA_NodeGetHandleList. |
stNodeAddInfo | ARRAY | Defines additional information, such as which attribute is read from the UA namespace (default: 'Value' attribute) or which IndexRange is to be used. Specified by STRUCT ST_UANodeAdditionalInfo. |
pVariable | PVOID | Pointer to data memory where the read data is to be stored. |
cbData | ARRAY | Determines the size of the data to be read. |
cbDataTotal | UDINT | Total size of the data to be received. |
Timeout | TIME | Time until the function is aborted. DEFAULT_ADS_TIMEOUT is a global constant, set to 5 seconds. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
cbData_R : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Switches to TRUE if the function block was executed successfully. |
Busy | BOOL | TRUE until the function block has executed a command, at the most for the duration of the "Timeout" at the input. The inputs accept no new command as long as Busy = TRUE. It is not the connection time that is monitored but the reception time. |
Error | BOOL | Switches to TRUE if an error occurs while executing a command. The command-specific error code is in nErrID. |
ErrorID | UDINT | Contains the command-specific ADS error code of the most recently executed command. |
cbData_R | UDINT | Number of bytes read. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT 3.1 | Win32, Win64, CE-X86, CE-Arm® | Tc3_PLCopen_OpcUa |