UA_NodeGetHandle

This function block queries a node handle for a given symbol in the UA namespace. The symbol is specified by a connection handle and its node ID.
Inputs
VAR_INPUT
Execute : BOOL;
ConnectionHdl : DWORD;
NodeID : ST_UANodeID;
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. |
Node ID | ST_UANodeID | Unique addressing of the UA node, consisting of Identifier, IdentifierType and NamespaceIndex, which are resolved from a NamespaceName, e.g. by means of the method UA_GetNamespaceIndex. |
Timeout | TIME | Time until the function is aborted. DEFAULT_ADS_TIMEOUT is a global constant, set to 5 seconds. |
Outputs
VAR_OUTPUT
NodeHdl : DWORD;
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : DWORD;
END_VAR
Name | Type | Description |
---|---|---|
NodeHdl | DWORD | Node handle that can be used for other function blocks, such as UA_Read or UA_Write. |
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 do not accept new commands as long as Busy is 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 included in ErrorID. |
ErrorID | DWORD | Contains the command-specific ADS error code of the most recently executed command. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT 3.1 | Win32, Win64, CE-X86, CE-Arm® | Tc3_PLCopen_OpcUa |