Function Description

The function block UA_NodeGetHandleList is used to get node handles for multiple nodes.

Passing at NODEIDS input an array [ 0 .. 31 ] of NodeIds Structure Elements, this block returns an array [ 0 .. 31 ] of NodeHdls.

It translates NodeIds to NodeHdls in order to optimize the payload of OPC UA requests from the client to the server.

The NodeIds requests by the client are registered by server that returns to correspondent handles for future requests.

Representation in FBD

Parameter Description

Input parameters:

Name

Type

Comment

EXECUTE

BOOL

FB performs its task on rising edge on this input.

CONNECTIONHDL

DWORD

Connection handle.

NODEIDCOUNT

UINT

Number of NodeIDs In Array of NodeIDs.

NODEIDS

AUANodeID

Array of UANodeID

TIMEOUT

TIME

Time to response.

Output parameters:

Name

Type

Comment

DONE

BOOL

FB has successfully completed its task.

BUSY

BOOL

The FB is not finished and new output values are to be expected.

ERROR

BOOL

Signals that an error has occurred within the FB. Set to true if either ERRORID or any of the NodeErrorIDs indicates an error.

ERRORID

DWORD

Error code.

NODEERRORIDS

ANY_ARRAY_DWORD

Array of NodeErrorIDs. (DWORD)

NODEHDLS

ANY_ARRAY_DWORD

Array of Node Handles. (DWORD)

NOTE: UA_NodeGetHandleList uses the inside register nodes service that is managed on the server side for a session: "Registers one or more nodes for repeated use within a session."

Because the nodes are the same, there is no verification that these nodes have already been registered. So handles are incremented. It is up to the client side to take care to avoid creating a new registration on nodes already registered. PLC applications that use OPCUA Client EFBs could use Release Handle EFB in order to free node registration in the server.

To limit the size of the application variable that is filled for pin NODEIDS, the maximum number of node handles is limited to 32.

If you require more that 32 node handles for future usage for UA_ReadList, UA_WriteList, UA_MonitoredAddItem (up to 251 variables), you need to iterate the call of UA_NodeGetHandleList with the required NodeIds, and concatenate the handle array of the output to fill the handle array of the others blocks.

Runtime Error

Refer to the Appendix for a list of OPC UA detected error codes.