Home Wiki Networks & Communications OPC-UA Deep Dive: The Unified Industrial Communication Standard
Networks & Communications

OPC-UA Deep Dive: The Unified Industrial Communication Standard

What Is OPC-UA and Why Does It Change the Game?

In a typical factory you will find devices from Siemens, ABB, Mitsubishi, and Rockwell — each speaking a different "language." Before OPC-UA, integrating these devices was an engineering nightmare requiring custom protocol converters for every pair of devices.

OPC-UA (Open Platform Communications - Unified Architecture) is the standard that says: "let us all agree on one language." It is not merely a data transport protocol — it is a complete framework that describes data, its meaning, its relationships, and its security.

From Classic OPC to OPC-UA

Feature OPC Classic (1996) OPC-UA (2008+)
Platform Windows only (COM/DCOM) Platform-independent (Linux, Windows, embedded)
Security Weak (DCOM security) Built-in (TLS, certificates, authorization)
Firewall Difficult (dynamic ports) Easy (single port 4840)
Data model Flat (groups and items) Rich (objects, references, hierarchy)
Discovery Limited Built-in (Discovery Server)

OPC-UA Architecture

OPC-UA is built on three core layers:

1. Transport Layer

Supports multiple communication patterns:

  • OPC-UA TCP (opc.tcp://): most common — fast binary connection on port 4840
  • HTTPS: for firewall traversal and web compatibility
  • WebSocket: for browser applications and dashboards

2. Security Layer

Integrated into the core of the protocol rather than added as an afterthought — detailed in the security section below.

3. Information Model Layer

This is the real power of OPC-UA — the ability to describe data, its meaning, and its relationships.

Information Model: Nodes, References, and Namespaces

Nodes

Everything in OPC-UA is a "node" — a sensor, a machine, a folder, a variable, a callable method. Every node has:

  • NodeId: unique identifier (e.g., ns=2;s=Temperature.Line1)
  • BrowseName: human-readable name for browsing
  • DisplayName: display name (supports multiple languages, including Arabic)
  • NodeClass: the type of node

Node Classes

NodeClass Description Example
Object Represents a real-world thing CNC machine, production line
Variable A readable/writable value Temperature = 85.3C
Method A callable function StartMachine(), ResetAlarm()
ObjectType Template for creating objects "MotorType" definition
VariableType Template for creating variables "AnalogItemType" definition
ReferenceType Defines the relationship between two nodes "HasComponent", "Organizes"
DataType Data type definition Int32, String, DateTime
View A filtered view of the address space "Active devices only" view

References

References connect nodes to each other and give the structure meaning:

[Factory]
  +-- HasComponent -> [Production Line 1]
  |     +-- HasComponent -> [Main Motor]
  |     |     +-- HasProperty -> [Speed: 1450 RPM]
  |     |     +-- HasProperty -> [Current: 12.5A]
  |     |     +-- HasProperty -> [Status: Running]
  |     +-- HasComponent -> [Temperature Sensor]
  |           +-- HasProperty -> [Value: 72.3C]
  +-- HasComponent -> [Production Line 2]
        +-- ...

Common reference types:

  • HasComponent: "contains" (machine contains a motor)
  • HasProperty: "has a property" (motor has a speed value)
  • Organizes: "organizes" (folder organizes devices)
  • HasTypeDefinition: "is of type" (this motor is of type MotorType)
  • HasSubtype: "is a subtype of" (PumpMotor is a subtype of Motor)

Namespaces

To avoid naming collisions between different vendors, OPC-UA uses namespaces:

Index URI Content
0 http://opcfoundation.org/UA/ Core types (predefined)
1 (reserved for server) Server-internal nodes
2 http://siemens.com/s7-1500 Siemens device-specific nodes
3 http://drmachine.tech/erp Your custom nodes

Every NodeId carries its namespace index: ns=2;s=Motor.Speed means the node "Motor.Speed" in namespace 2.

Security Model: Why OPC-UA Is the Most Secure

OPC-UA security is built on three levels:

1. Authentication

How the client proves its identity to the server:

  • Anonymous: no authentication — for testing only
  • Username and password: simplest method
  • X.509 certificate: strongest — each application has a unique digital certificate
  • Kerberos/Token: for Active Directory integration

2. Encryption and Signing

Security Mode Signing Encryption Usage
None No No Testing and development only
Sign Yes No Tamper detection without encryption
SignAndEncrypt Yes Yes Production — the only acceptable option

Supported security policies:

  • Basic256Sha256: AES-256 + SHA-256 (most common)
  • Aes128_Sha256_RsaOaep: lighter — for embedded devices
  • Aes256_Sha256_RsaPss: strongest currently available

3. Authorization

After authentication, the system determines what the user is allowed to do:

  • Read variables only
  • Read and write
  • Call methods
  • Administer the server

Certificate Management in Practice

1. Each OPC-UA application generates a key pair (private + public) and a self-signed certificate
2. On first connection: the server rejects the unknown certificate
3. The operator reviews the certificate and moves it to the "Trusted" folder
4. Subsequent connections proceed automatically
5. In large environments: a Global Discovery Server (GDS) manages certificates centrally

Publish/Subscribe (Pub/Sub) Model

The traditional OPC-UA model is Client/Server — the client requests and the server responds. But this does not fit every scenario.

Why Pub/Sub?

Scenario Client/Server Pub/Sub
5 clients reading from one server 5 separate connections Single broadcast to all
Updates every 1ms Heavy server load High efficiency
Cloud connection via MQTT Requires translation gateway Natively supported
Network without a central server Not possible Possible (Multicast)

Pub/Sub Architecture

  • Publisher: sends data as "DataSets"
  • Broker: receives and distributes messages (e.g., MQTT Broker)
  • Subscriber: receives the data it subscribed to

Transport Profiles

  • UADP over UDP Multicast: fastest — for local industrial networks
  • MQTT: for cloud connectivity — each OPC-UA message is wrapped in an MQTT message
  • AMQP: alternative to MQTT with stronger delivery guarantees

Discovery

How Does a Client Find Servers?

In a large industrial network there may be dozens of OPC-UA servers. Instead of manually configuring each one:

  1. Local Discovery Server (LDS): runs on each machine, announces local servers
  2. LDS-ME (Multicast Extension): announces itself on the local network via mDNS
  3. Global Discovery Server (GDS): a central server that aggregates all servers and manages certificates

The client asks: "Who is on the network?" and receives a list of all available servers, their endpoints, and supported security policies.

Companion Specifications

This is where the genius of OPC-UA shines: instead of every manufacturer inventing a proprietary data model, industry organizations collaborate to define standardized models.

Key Examples

Specification Organization Description
OPC-UA for Machinery VDMA Unified model for all industrial machines
OPC-UA for Robotics VDMA Model for robots (axes, tools, paths)
OPC-UA for CNC VDW Numerical control machines
OPC-UA for PackML OMAC Packaging and filling machines
OPC-UA for Plastics & Rubber Euromap Plastics and rubber machines
OPC-UA for AutoID AIM Barcode, RFID, optical reading
OPC-UA for Pumps Europump Industrial pumps

What Does This Mean in Practice?

Suppose you purchase a CNC machine from DMG Mori and another from Mazak. Without a Companion Specification, each machine names its data differently:

  • DMG: SpindleSpeed, FeedRate, ToolNumber
  • Mazak: S_RPM, F_mmPerMin, T_ID

With OPC-UA for CNC, both use the same model:

  • CncSpindleType.ActualSpeed
  • CncChannelType.FeedOverride
  • CncToolType.Identifier

Your monitoring system reads all machines the same way without custom programming.

Why OPC-UA Is the Future Standard

Industry Adoption

  • Industrie 4.0 (Germany): OPC-UA is the officially recommended communication protocol
  • NAMUR (chemical industries): adopted OPC-UA as the standard for Open Architecture
  • umati (machine tools): a global initiative to connect production machines via OPC-UA

Comprehensive Comparison with Alternatives

Standard OPC-UA MQTT Modbus TCP REST API
Data model Rich (objects, types) None (free-form payload) Simple (registers) Flexible (JSON)
Built-in security Comprehensive TLS only None TLS only
Discovery Built-in No No No
Real-time performance Very good Good Excellent Poor
Interoperability Excellent (Companion Specs) Weak Moderate Moderate
Learning curve Steep Easy Easy Easy

Practical Example: OPC-UA Integration in a Factory

Consider a factory with:

  • 3 CNC machines from different vendors
  • An automated packaging line
  • A central SCADA system
  • Cloud connectivity for quality analytics

Without OPC-UA: you need 6 different protocol converters and custom programming for each machine.

With OPC-UA: every machine exposes its data through an OPC-UA server with a standardized model. The SCADA system reads everything the same way. The cloud gateway uses OPC-UA Pub/Sub over MQTT to transmit data.

Summary

OPC-UA is not just a protocol — it is a "common language" for the entire industry. The rich information model gives data meaning, built-in security protects the factory, automatic discovery simplifies deployment, and companion specifications guarantee interoperability across vendors. If you are building an industrial system today, OPC-UA is the smartest bet for the future.

OPC-UA information-model pub-sub security interoperability namespace أو بي سي نموذج المعلومات النشر والاشتراك التشغيل البيني مساحة الأسماء الأمان