OpcUaReadValue – Read value from OPC UA Server

Block SymbolLicensing group: ADVANCED
PIC

Function Description

This function block depends on the OpcUa driver. Please read the OpcUaDrv manual [15] before use.

The OpcUaReadValue block reads value of an OPC UA Node through a connection established by the OPC UA client driver.

The first two parameters are NodeId and NodeId_type. The NodeId_type specifies what type of information it is expected to be entered as the NodeId parameter. If the value is string, numeric, guid than the NodeId parameter should contain the id of the actual OPC UA Node on the server prefixed with the index of the namespace declared in the configuration of the driver separated by a colon (e.g. 1:myNode).

If the value of the NodeId_type parameter is set to path than the NodeId parameter should contain the path to the desired Node in the server structure. Every segment of the path is composed from the attribute BrowserName of the node and the BrowserName is similarly with regular NodeId types prefixed with the index of the namespace declared in the configuration of the driver separated by a colon (e.g. /1:myDevice/1:myNode). The path is relative to the Objects folder in the OPC UA server structure.

The parameter type specifies the expected Node’s value data type. The block converts the Node’s value to the specified type and sets the value output signal in case of success or it sets the errId to the resulting error code.

Input

READ

Enable execution

Bool

Parameters

NodeId

OPC UA Node Id

String

NodeId_type

Type of Node ID  1

Long (I32)

1 ....

string

2 ....

numeric

3 ....

guid

4 ....

path

type

Expected type of incoming data  1

Long (I32)

1 ....

string

2 ....

double

3 ....

long

4 ....

bool

Outputs

value

Output signal

Any

BUSY

Busy flag

Bool

DONE

Indicator of finished transaction

Bool

errId

Error code

Error

2023 © REX Controls s.r.o., www.rexygen.com