OPC-UA (Open Platform Communications Unified Architecture), formally IEC 62541, is a communication standard that lets software read data from industrial equipment — PLCs, SCADA systems, HMIs, robots, CNC machines — regardless of who manufactured them. Published by the OPC Foundation, first released in 2008, and now embedded directly in controllers from Siemens, Rockwell, Schneider, ABB, Beckhoff, and most other major PLC vendors.
Think of it as USB for factory equipment. Before OPC-UA, reading data from a Siemens PLC required Siemens software. Reading from a Rockwell PLC required Rockwell software. OPC-UA gives them a common interface.
Most factories run equipment from multiple vendors. Line 1 has Siemens PLCs. Line 2 has Allen-Bradley. The packaging machine speaks Modbus. The robot speaks its own proprietary protocol. Getting all of them to report data to one dashboard or historian used to require a different driver for each vendor — or an expensive middleware platform.
OPC-UA solves this at the protocol level. If your PLC has an OPC-UA server built in (most modern PLCs do), any OPC-UA client can read its data. No vendor-specific driver. No middleware license. One standard protocol.
That said, OPC-UA carries a convention tax worth understanding. See "when you do and don't need it" below.
Client/server architecture:
OPC-UA Client (your software) → connects to → OPC-UA Server (runs on the PLC or gateway)
Key difference from MQTT: OPC-UA is request/response (client asks server for data). MQTT is publish/subscribe (devices push data to a broker). OPC-UA gives you a rich data model with types and structure. MQTT gives you lightweight, fire-and-forget messaging. They solve different problems and are often used together.
You need OPC-UA when:
You probably don't need OPC-UA when:
The convention tax: OPC-UA is sometimes prescribed as "the standard you must adopt before your systems can interoperate." That's the vendor story. In reality, a factory with 5-50 machines often does better with simple point-to-point integration (Modbus reads, REST APIs, even CSV exports) than with a full OPC-UA implementation. OPC-UA pays off at scale (100+ machines, multi-vendor environments, enterprise integration requirements). For a first IoT project, it's often premature optimization.
The OPC Foundation recognized that OPC-UA's client/server model doesn't scale well for cloud and IoT scenarios (it requires inbound firewall ports on the server side). OPC-UA PubSub mode was introduced to solve this — it can transport OPC-UA messages over MQTT or AMQP, combining OPC-UA's rich data model with MQTT's lightweight pub/sub transport.
Sparkplug B is the alternative approach: it adds a standardized payload format (with device/metric semantics) to plain MQTT, solving the "no data model" problem without requiring OPC-UA at all. Both approaches work. Sparkplug B is simpler; OPC-UA PubSub is richer.
opc.tcp://192.168.1.10:4840), and read a tag. Or use Python with the opcua or asyncua library.