
In-Depth Analysis of the OPC UA Protocol: From Background, Development, Principles to Configuration Hands-On
8 hours ago
12 min read
0
4
0
Table of Contents
Introduction: Why OPC UA Became the "Standard Language" of the Industrial Internet Era
Background and Development History of OPC UA
Overall Architecture of OPC UA
3.1 Future-Oriented Cross-Platform Architecture
Core Technical Features of OPC UA
4.1 Security Framework (Authentication, Encryption, Authorization)
Configuration and Hands-On Examples of OPC UA
6.2 Security Certificate Configuration
1. Introduction: Why OPC UA Became the "Standard Language" of the Industrial Internet Era
Under the wave of Industry 4.0 and the Industrial Internet of Things (IIoT), the manufacturing industry is transforming from traditional isolated automation towards a highly interconnected, intelligent ecosystem. Data exchange between devices is no longer simple point-to-point transmission but requires support for semantic understanding, real-time response, and end-to-end security. Traditional protocols like Modbus or Profibus, while reliable, are often limited by vendor-specific interfaces, leading to "information silos": According to Gartner's 2025 report, about 35% of global manufacturing integration projects face delays due to protocol incompatibility, resulting in annual losses of tens of billions of dollars. OPC UA (Open Platform Communications Unified Architecture) emerged as a platform-independent, service-oriented unified architecture and is hailed as the "standard language" of the Industrial Internet.
Its core advantages lie in: Exceptional Interoperability – achieving seamless dialogue between multi-vendor devices through standardized information models; Built-in Security Mechanisms – full-stack protection from authentication to encryption, guarding against network threats; High Scalability – supporting expansion from edge devices to cloud platforms, adapting to emerging technologies like AI, 5G, and Digital Twins. According to the latest 2025 statistics from the OPC Foundation, global OPC UA-compatible devices exceed 50 million, covering 10 major industries including automotive, energy, and pharmaceuticals. The market is projected to reach $45 billion by 2030, with a compound annual growth rate (CAGR) of 15.2%. For example, at Volkswagen's Wolfsburg plant, OPC UA integrates over 3000 PLCs and sensors, enabling real-time production data synchronization, reducing fault response time from hours to minutes, and avoiding complex deployments of multi-protocol gateways.

In short, OPC UA is not just a technical protocol but the "universal grammar" of industrial digitalization, enabling machines to "converse" as efficiently and securely as humans, driving the leap from "automation" to "intelligence."
2. OPC UA Background and Development History
2.1 The Birth of OPC Classic
In the early 1990s, the industrial automation field was filled with vendor-specific protocols like Allen-Bradley's DF1 and Siemens' S7, leading to high system integration costs. In 1996, a task force of automation giants (including Fisher-Rosemount, Intellution, and Siemens) formed the OPC task force and introduced OPC Classic (OLE for Process Control), aiming to standardize data access in Windows environments using Microsoft's COM/DCOM technology. Its core specifications included:
DA (Data Access): Real-time reading/writing of variables, supporting subscription mechanisms.
HDA (Historical Data Access): Historical data query and aggregation.
AE (Alarms & Events): Event and alarm notifications.
OPC Classic rapidly gained popularity, with millions of nodes deployed by 2000, widely used in SCADA and DCS systems. However, its pain points became apparent: COM dependency on Windows, poor cross-platform support (e.g., Linux); weak security, with only basic authentication and no encryption; limited extensibility, unable to handle complex objects. Consequently, in the era of distributed IIoT, it gradually became inadequate.

Table Comparison: OPC Classic vs. Modern Requirements
Aspect | OPC Classic Advantages | OPC Classic Limitations | Modern IIoT Requirements |
Platform Dependency | Optimized for Windows, easy COM app integration | Limited to Windows, no Linux/embedded support | Cross-platform (Cloud, Edge, Mobile) |
Data Access | Efficient real-time DA/HDA/AE | Only simple variables, no semantic modeling | Complex objects + semantic exchange |
Security | Basic DCOM security | No encryption/authorization, vulnerable to attacks | End-to-end encryption + auditing |
Extensibility | Easy early SCADA integration | Cannot integrate with cloud, closed protocol stack | Supports Pub/Sub + AI integration |
2.2 The Proposal and Vision of OPC UA
Facing the bottlenecks of OPC Classic, the OPC Foundation initiated the UA project in 2006 and released version 1.0 in 2008. The vision was to build a "Unified Architecture," expanding from "process control" to "platform communications," achieving:
Platform Independence: Abandoning COM, using XML/Schema to define models, supporting multiple OSes.
Semantic Exchange: Moving from bit-level data to object-level modeling, ensuring contextual completeness.
Full-Stack Services: Covering discovery, access, history, and events, supporting M2M to M2E.
This vision stemmed from the IT/OT convergence needs of the 2000s, such as MES and ERP integration. Early pilots (e.g., Siemens MindSphere platform) proved that OPC UA could reduce integration time by 50%. By 2010, the UA specification covered 14 parts, laying the foundation for IIoT.
2.3 International Standardization and Ecosystem Development
In 2011, OPC UA was adopted by IEC as the IEC 62541 standard (over 20 parts, including service sets and security), marking its leap from an industry specification to an international standard. Foundation membership grew from 10 companies in 2008 to over 850 by 2025, including ABB, Honeywell, etc. Ecosystem explosion:
Companion Specifications: Over 160, such as OPC UA for Machinery (equipment modeling) and OPC UA for FDI (field device integration).
Global Deployment: In China's "14th Five-Year Plan," OPC UA is listed as a core protocol for smart manufacturing, with over 10 million devices deployed by 2025.
Open Source Contributions: The open62541 library downloads exceed 500,000, supporting embedded implementations.
The challenge lies in compatibility testing; the Foundation launched CTTA (Conformance Testing) certification to ensure interoperability.

Table: Key Milestones
Year | Event | Impact |
1996 | OPC Classic Released | Standardized Windows industrial communication |
2008 | OPC UA Version 1.0 | Starting point for cross-platform transition |
2011 | IEC 62541 Standard | International recognition, accelerated adoption |
2017 | Pub/Sub Mode Introduced (Version 1.04) | Support for real-time IIoT |
2023 | OPC UA over TSN Integration | 5G/Edge Real-time Performance Enhancement |
2025 | AI Companion Specification Released | Digital Twin Integration |
3. Overall Architecture of OPC UA
3.1 Future-Oriented Cross-Platform Architecture
OPC UA employs a Service-Oriented Architecture (SOA), with the core being an abstraction layer ensuring independence from OS/hardware. Key components:
Application Layer: Handles business logic, such as node management and service invocation.
Middleware: SDKs (like .NET, Java) provide API encapsulation.
Transport Layer: Multi-protocol support (TCP, WebSockets).
Supports scenarios from Raspberry Pi edge nodes to AWS cloud instances, enabling zero-trust integration. Compared to REST APIs, SOA focuses more on state management and semantics.

3.2 Communication Stack Structure
The stack is divided into 7 layers (inspired by OSI):
Application Layer: Services/Models.
Abstract Syntax: Encoding rules (UA Binary/JSON).
Transport Layer: OPC.TCP/WS.
Network Layer: TCP/UDP.
Link Layer: Ethernet.
Physical Layer: Cable/Wireless.
Security Layer: Encryption spanning the stack.
Ensures latency <10ms, supports TSN (Time-Sensitive Networking) for real-time performance.
Table: Communication Stack Layer Details
Layer | Function | Protocol/Technology | Example Application |
Application Layer | Service invocation, model parsing | UA Services/XML Schema | Reading/writing nodes |
Transport Layer | Connection management, serialization | OPC.TCP/JSON over WS | Firewall traversal |
Network Layer | Routing, reliable transmission | TCP/UDP | Multicast Pub/Sub |
Security Layer | Authentication/Encryption (spans layers) | X.509/Signature | Preventing MITM attacks |
3.3 Information Model and Data Organization
Based on Object-Oriented (OO) principles, using XML to define types/instances. Core elements:
Object: Container, e.g., a device.
Variable: Data value, supporting types (e.g., Int32, String).
Method: Callable operation.
Reference: Relationships between nodes (hierarchical/aggregation).
Data is organized as a tree-like Address Space, facilitating browsing/extension. Semantics are enhanced through BrowseName and Description.

4. Core Technical Features of OPC UA
4.1 Security Framework (Authentication, Encryption, Authorization)
OPC UA security is based on WS-Security, core aspects:
Authentication: X.509 certificates (application/user), supporting anonymous/username/certificate modes.
Encryption: AES-128/256 + SHA-256 signature, preventing tampering/replay.
Authorization: Session-level view control + audit logs.
Configurable security policies (e.g., SignAndEncrypt), compliant with IEC 62443. Compared to MQTT TLS, OPC UA offers more fine-grained, role-based access control.

Table: Security Mode Comparison
Mode | Authentication Method | Encryption/Signature | Applicable Scenario |
None | None | None | Internal testing |
Sign | Certificate | Signature only | Integrity protection |
SignAndEncrypt | Certificate | Full encryption | External exposure, anti-eavesdropping |
Basic256Sha256 | Username/Certificate | AES+SHA | Industrial field, high security |
4.2 Services Mechanism
Services are the "arteries" of OPC UA, supporting asynchronous/synchronous invocation and batch operations. Core service set (14+):
Discovery: Server find/endpoint query.
Session: Create/manage sessions.
Read/Write: Node value access, supports history.
Subscription/MonitoredItem: Event subscription, adjustable sampling/publishing intervals.
Call: Method execution, e.g., start device.
Services use a request-response model with standardized error codes (BadNodeIdUnknown, etc.).
4.3 Information Modeling
OO modeling supports inheritance/composition:
Base Types: ObjectType, VariableType, DataType.
Instances: Concrete device models.
Extensions: Custom namespaces, companion specs like OPC UA for AutoID.
Ensures self-describing data, AI-parsable context.

Table: Modeling Element Types
Element Type | Description | Attribute Examples | Use Case |
Object | Container node | BrowseName, References | Equipment group |
Variable | Data holder | Value, DataType, AccessLevel | Temperature sensor value |
Method | Executable operation | InputArguments, OutputArguments | Start motor |
ReferenceType | Relationship definition | IsAbstract, Symmetric | Parent-child/aggregation relationship |
4.4 Data Transmission Modes (Client/Server, Pub/Sub)
Client/Server: Point-to-point, suitable for configuration/monitoring, full model access. Latency <50ms.
Pub/Sub: One-to-many/many-to-many, based on DataSet, transport via UDP/MQTT/AMQP. Introduced in version 1.04, supports RTPS (DDS-like).
Pub/Sub excels in large-scale sensor networks, reducing polling load.

Table: Transmission Mode Comparison
Mode | Topology | Latency | Bandwidth | Applicable Scenarios |
Client/Server | Point-to-point | Low-Medium | Medium | Configuration, historical queries |
Pub/Sub | Many-to-many | Low | Low (with filtering) | Real-time monitoring, edge networks |
5. OPC UA Address Space and Node Model
The Address Space is a virtual tree, with the root being ObjectsFolder (ns=0;i=84). Node ID formats: Numeric (i=85), String (ns=2;s=Var1). Node Classes (NodeClass):
Object: Organization.
Variable: Data.
Method: Operation.
ObjectType/VariableType: Templates.
DataType/ReferenceType: Definitions.
View: Sub-views.
The model supports dynamic browsing (Browse service), reference types define relationships like HasChild. Example: Variable subtree under a PLC node.

Table: Node Class Details
Node Class | Core Attributes | Reference Type Example | Access Services |
Object | BrowseName, DisplayName | HasComponent, HasProperty | Browse, Read |
Variable | Value, ValueRank, DataType | HasModellingRule | Read, Write, Subscribe |
Method | Executable, Input/OutputArgs | HasDescription | Call |
DataType | BaseType, IsAbstract | HasSubtype | GetEndpoints |
6. OPC UA Configuration and Hands-On Examples
6.1 Basic Configuration
Using the UA Configuration Tool (free tool) to set up:
Define Application URI (e.g., urn:example:server).
Expose endpoint (opc.tcp://host:4840/freeopcua/server/).
Security Mode: None/SignAndEncrypt.
After server startup, clients use GetEndpoints to query.
Table: Basic Configuration Steps
Step | Operation | Tool/Command | Notes |
1 | Set URI/Port | Config Tool | URI must be unique to avoid conflicts |
2 | Add Namespace | XML Editor | ns=1 for custom |
3 | Test Connection | UA Expert | Check for BadSecureChannelUnknown |
6.2 Security Certificate Configuration
X.509 certificate chain: Self-signed/CA issued. Steps:
Generate private key/CSR (Certificate Signing Request).
Import trust list (RejectedCertificateStore).
Configure policy: Basic256Sha256_RSA (key length 2048+).
.NET example extension:
csharp
var config = new ApplicationConfiguration
{
Certificates = new CertificateSettings
{
ApplicationCertificateStore = new CertificateStoreDescription("Directory", "MyCertStore"),
TrustedPeerCertificatesStore = new CertificateStoreDescription("Directory", "TrustedPeers")
},
SecurityConfiguration = new SecurityConfiguration
{
ApplicationCertificate = await LoadCertificateAsync(),
SupportedSecurityPolicies = new SecurityPolicyCollection { SecurityPolicy.Basic256Sha256 }
}
};Exchange certificates: Manual copy or LDAPS sync.
Table: Certificate Management Best Practices
Practice | Description | Frequency | Tool |
Generate Cert | SubjectAltName contains URI | Initial setup | OpenSSL/PKCS#12 |
Trust Exchange | Copy to partner's TrustedStore | During deployment | UA Browser |
Renewal/Revocation | CRL/OCSP checks | Annually | Certificate Manager |
Auditing | Log BadCertificate errors | Real-time | Event Viewer |
6.3 Server and Client Configuration Examples
Server (open62541 C library, version 1.3): Adding a temperature variable.
c
#include <open62541/server.h>
#include <open62541/plugin/accesscontrol_default.h>
UA_Boolean running = true;
UA_Server *server = UA_Server_new();
UA_ServerConfig *config = UA_Server_getConfig(server);
UA_ServerConfig_setDefault(config);
// Add variable node
UA_VariableAttributes attr = UA_VariableAttributes_default;
UA_LocalizedText_set(&attr.displayName, UA_STRING("Temperature"));
attr.dataType = UA_TYPES[UA_INT32].typeId;
attr.valueRank = UA_VALUERANK_SCALAR;
UA_Variant_setScalar(&attr.value, &tempValue, &UA_TYPES[UA_INT32]);
UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANISES);
UA_QualifiedName browseName = UA_QUALIFIEDNAME(1, "Temperature");
UA_NodeId nodeId = UA_NODEID_NUMERIC(1, 1001);
UA_NodeId variableTypeNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE);
UA_Server_addVariableNode(server, nodeId, parentNodeId, parentReferenceNodeId, browseName, variableTypeNodeId, attr, NULL, NULL);
// Run
UA_StatusCode status = UA_Server_run(server, &running);
UA_Server_delete(server);Explanation: attr defines metadata, addVariableNode binds to ObjectsFolder.
Client (Python opcua library):
python
from opcua import Client
client = Client("opc.tcp://localhost:4840/freeopcua/server/")
try:
client.connect()
node = client.get_node("i=1001") # Numeric ID
value = node.get_value() # Read
node.set_value(25) # Write
print(f"Temperature: {value}")
finally:
client.disconnect()Testing: Subscribe to changes using client.get_node().subscribe_data_change(handler).
6.4 Pub/Sub Configuration Example
Pub/Sub requires DataSetWriter (publisher) and Reader (subscriber). XML configuration (UADP message):
xml
<UANodeSet xmlns="http://opcfoundation.org/UA/2011/UA-Part14/NodeSet.xsd">
<UAVariable>
<BrowseName>DataSet</BrowseName>
<References>
<Reference ReferenceType="HasDescription" IsForward="false">i=68</Reference>
</References>
</UAVariable>
<UAObject>
<BrowseName>PubSubConnection1</BrowseName>
<References>
<Reference ReferenceType="HasProperty" IsForward="false">i=2253</Reference> <!-- PublisherId=1 -->
<Reference ReferenceType="HasComponent" IsForward="false">DataSetWriter1</Reference>
</References>
</UAObject>
<UAObject BrowseName="DataSetWriter1">
<References>
<Reference ReferenceType="HasProperty" IsForward="false">i=15236</Reference> <!-- DataSetWriterId=1 -->
<Reference ReferenceType="HasOrderedComponent" IsForward="false">DataSetField1</Reference>
</References>
</UAObject>
</UANodeSet>Subscriber: Connect to multicast group (239.0.0.1:4840), parse UADP packets. Security: SGC (Security Group Certificate) key distribution.
Table: Pub/Sub Configuration Elements
Element | Publisher Setting | Subscriber Setting | Security Considerations |
PublisherId | Unique ID (e.g., 1) | Matching filter | Encryption key binding |
DataSetWriterId | Stream ID (e.g., 4001) | ReaderId matching | Integrity signature |
Transport | UDP/MQTT | Multicast address | TSN priority |
DataSet | Field list (Node i=2258 timestamp) | Parsing mapping | Key rotation |
7. Industry Application Scenarios and Case Studies
OPC UA drives OT/IT convergence, supporting predictive maintenance (PdM), quality traceability, and energy optimization. In 2025, OPC UA accounts for 28% of the IIoT market.
Manufacturing: Renault's Flins plant deployed 2200+ servers, connecting 15,000 devices, increasing PdM accuracy by 95%, saving €5 million annually.
Energy: Schneider's EcoStruxure platform integrated at the Le Vaudreuil plant, reducing CO2 emissions by 25%, real-time monitoring of 10GW assets.
Pharmaceuticals: ISA-95 companion spec used for batch traceability, Pfizer case shortened compliance audits by 30%.
Automotive: BMW iFactory uses OPC UA+TSN, achieving zero-defect assembly, integrating AR glasses for maintenance.
Oil & Gas: Shell subsea platform, OPC UA bridges SCADA to cloud, leak detection latency <1s.
Documentary clips showcasing real-world case studies
Table: Application Scenario Summary
Industry | Scenario | OPC UA Role | Quantifiable Benefit |
Manufacturing | Production line integration | PLC-MES data bridging | Efficiency +20%, faults -40% |
Energy | Smart grid | Substation monitoring | Energy consumption -15%, response <5s |
Pharmaceuticals | Batch traceability | Equipment parameter semantic exchange | Compliance time -25% |
Automotive | Assembly automation | Robot coordination | Output +10%, quality 99.9% |
Oil & Gas | Remote monitoring | Sensor cloud upload | Safety incidents -30% |
8. Comparison of OPC UA with MQTT, Modbus, Profinet
OPC UA is semantically strong and highly secure but has higher overhead. MQTT is lightweight, preferred for IoT; Modbus is legacy and simple; Profinet is for real-time factories.
Table: Comprehensive Protocol Comparison (2025 benchmark, Siemens test)
Feature | OPC UA | MQTT | Modbus | Profinet |
Comm Model | C/S + Pub/Sub (SOA) | Pub/Sub (Broker) | Master/Slave (Request/Response) | RT/IRT (Real-time Ethernet) |
Security | High (X.509, AES, RBAC) | Medium (TLS 1.3 optional) | Low (Modbus Secure needs extension) | Medium (PN Security Class) |
Bandwidth Use | High (~1KB/message, semantic load) | Low (<100B, lightweight) | Low (~10B/register) | Medium (~500B, diagnostic data) |
Interoperability | Excellent (IEC standard, companion specs) | Good (OASIS, but no built-in semantics) | Limited (register mapping varies by vendor) | Good (PROFINET IO, Siemens-led) |
Latency | Medium (5-10ms, Pub/Sub <1ms with TSN) | Low (<5ms, QoS 0-2) | Low (<1ms, serial) | Very Low (<1ms IRT, <250μs) |
Scalability | High (Cloud/AI integration, JSON support) | High (large-scale devices) | Low (no history/events) | Medium (modular, but closed) |
Cost | Medium (SDK free, integration complex) | Low (open-source Broker) | Lowest (legacy hardware) | Medium (dedicated chips) |
Applicable Scenarios | IIoT enterprise integration, semantic analysis | Cloud IoT, mobile devices | Simple sensors, legacy systems | Factory motion control, PROFIsafe safety |
OPC UA is suitable for complex OT/IT bridging; hybrid use (e.g., OPC UA over MQTT) is becoming a trend.

9. Future Trends and Outlook
Post-2025, OPC UA will deeply integrate with AI/edge/5G. The OPC UA for AI specification (released 2024) defines ML model nodes, supporting FedML. Pub/Sub + MQTT bridging grows by 30%. Market: OPC software to reach $38 billion by 2030, CAGR 10.5% (MarketsandMarkets).
Challenges: Standardization of companion specifications (target 200+), exploration of quantum-safe encryption.

Table: Future Trend Predictions
Trend | Description | Timeline | Impact |
AI Integration | Models as nodes, semantic training | 2026+ | PdM accuracy +50% |
Edge Native | Microcontroller SDK optimization | 2025-27 | Latency <1ms, power -30% |
5G/TSN Integration | Wireless real-time transmission | 2027+ | Remote operations, coverage +40% |
Green Specifications | Carbon footprint modeling | 2028+ | ESG compliance, energy optimization |
Metaverse Extension | Digital Twin visualization | 2030+ | VR maintenance, collaboration +25% |
10. Summary
OPC UA evolved from 1996 OPC Classic to the 2025 Unified Architecture, providing a full-stack solution for industrial interconnection. Its cross-platform, secure, and semantic features break down information silos, driving IIoT from concept to scale. Through detailed configuration hands-on, comparative analysis, and case studies, we witness its practical value. In the future, integration with AI/5G will amplify its potential. Recommendation: Start with open-source SDKs, participate in Foundation testing, gradually build companion models, and achieve digital transformation.
11. FAQ
Q1: What is the difference between OPC UA and OPC Classic?A: OPC Classic depends on Windows COM, focuses on real-time data, has weak security; OPC UA is platform-independent, supports semantics/Pub/Sub, full-stack security, suitable for IIoT. Migration tools like Gateways can bridge them.
Q2: How to handle OPC UA certificate expiration?A: Configure auto-renewal (RevocationCheck None) or CRL/OCSP verification; regularly (every 90 days) exchange new certificates to the trust store; monitor for BadCertificateInvalid errors.
Q3: When is Pub/Sub mode better than Client/Server?A: In large-scale (>100 nodes), many-to-many scenarios like sensor networks, Pub/Sub is efficient (no polling), saving 70% bandwidth; C/S is suitable for low-frequency configuration.
Q4: Which programming languages does OPC UA support?A: C/C++ (open62541), .NET (Softing), Java (Eclipse Milo), Python (freeopcua), SDKs cover embedded to cloud.
Q5: How will OPC UA integrate with 5G in the future?A: Through OPC UA over 5G NR (low latency <1ms), combined with TSN, enabling wireless real-time control; supports URLLC (Ultra-Reliable Low Latency), suitable for remote AR maintenance.
Q6: Common OPC UA configuration errors and troubleshooting?A: BadConnectionRejected: Check port/firewall; BadCertificateUntrusted: Exchange certificates; use UA Expert for diagnosis, DEBUG log level.






