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 (Client and Node 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 Value output 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 the OPC UA Client block and connect its Client output to this block's Client input.

  • To inspect or debug read results, connect this block's Value output to Debug Input or to CSV Export to record values over time.

  • Use Data Write Global / Data Read Global to share read values across different parts of your scenario.

  • Forward read values to external systems by connecting to MQTT Publish or REST API - Post blocks.

  • 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 Client input is a connected OPC UA client (use the OPC UA Client block).

  • Invalid address or unexpected value: verify the format and exact identifier of the Node Address on 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 Value output to Debug Input while developing to see raw results and aid diagnosis.

Last updated

Was this helpful?