OPC UA Read
This function block reads a value from an OPC UA server address and returns the current value for use elsewhere in your scenario. It is intended for simple, synchronous reads when you already have an active client connection.
π₯ Inputs
Clientβ input socket that accepts an active OPC UA client connection.Node Addressβ input socket that accepts the address/identifier of the variable to read on the server.
π€ Outputs
Valueβ output socket that provides the current value read from the given OPC UA address.
πΉοΈ Controls
This block does not expose additional on-block widgets. The two input sockets (
ClientandNode Address) act as the controls: supply a connected client and the address to read.
π― Features
Simple synchronous read of a single OPC UA address on evaluation.
Minimal interface: only requires an active client and a node address.
Returns the retrieved value directly through the
Valueoutput for downstream processing.Logs errors to help diagnose connectivity or address issues.
βοΈ Running mechanism
When the block runs, it expects an active OPC UA client on the Client input and a valid server variable identifier on the Node Address input. The block requests the current value from that address and delivers it on the Value output so other blocks can consume or log it.
π‘ Tips and Tricks
To obtain a usable
Client, first use theOPC UA Clientblock and connect itsClientoutput to this block'sClientinput.To inspect or debug read results, connect this block's
Valueoutput toDebug Inputor toCSV Exportto record values over time.Use
Data Write Global/Data Read Globalto share read values across different parts of your scenario.Forward read values to external systems by connecting to
MQTT PublishorREST API - Postblocks.If you will read many addresses regularly, consider grouping or sequencing reads with logical blocks (for example, use flow-control or batching blocks) to keep your scenario organized.
π οΈ Troubleshooting
No value returned / error about client: ensure the
Clientinput is a connected OPC UA client (use theOPC UA Clientblock).Invalid address or unexpected value: verify the format and exact identifier of the
Node Addresson your OPC UA server.Permission or security errors: check server access rights and client security policies; ensure credentials and server settings are correct.
Intermittent connectivity: network issues or server load can cause read failures β monitor logs and retry as needed.
For visibility, connect the
Valueoutput toDebug Inputwhile developing to see raw results and aid diagnosis.
Last updated
Was this helpful?