OPC-UA (Open Platform Communications Unified Architecture)

OPC Unified Architecture (OPC UA) is a platform-independent, service-oriented communication framework designed for industrial automation. Unlike its predecessor (OPC Classic), OPC UA supports complex data structures, cross-platform communication, and both client-server and publish-subscribe (PubSub) models.

The Core of OPC-UA:

OPC-UA is more than just a communication protocol; it’s a comprehensive framework designed for secure, reliable, and scalable information exchange in the industrial domain. At its core, OPC-UA offers:

Platform Independence:

  • Unlike its predecessors, OPC-UA is not tied to any single operating system or programming language, ensuring seamless integration across diverse platforms.

Enhanced Security:

  • With built-in security features such as encryption, authentication, and authorization, OPC-UA provides robust protection against cyber threats, a crucial aspect in today’s interconnected world.

Information Modeling Capabilities:

  • OPC-UA goes beyond mere data exchange. It allows the creation of sophisticated data models which can represent the complex structure and relationships within industrial systems.

OPC UA Architecture

It has two main models:

  • Client/Server Model – A client (HMI, SCADA, MES) communicates with an OPC UA server to read/write data.
  • Publish/Subscribe (Pub/Sub) Model – A server publishes data to multiple subscribers using MQTT or UDP. In a packaging line, OPC UA PubSub over MQTT broadcasts sensor data to multiple subscribers (e.g., PLCs, dashboards) with millisecond latency.

While OPC UA’s core data modeling remains consistent across client-server and PubSub, the structural and security optimizations differ to suit their respective communication paradigms. By combining both models, industrial systems achieve flexibility (client-server) and scalability (PubSub), making OPC UA a cornerstone of Industry 4.0 architectures.

Choosing Between Client/Server and Pub/Sub Models

The choice of Client/Server vs. Pub/Sub depends on the application requirements:

Client/Server Model: Best for Request-Response Applications

  • Use Case:
    • Supervisory control systems (SCADA, MES) that require on-demand data.
    • Applications where data integrity, browsing, and method invocation are crucial.
    • Secure access control with authentication and authorization.
  • Advantages:
    • Supports secure and authenticated communication.
    • Allows rich interactions, including method calls and detailed browsing.
    • Ideal for scenarios requiring precise data access with minimal bandwidth use.

Pub/Sub Model: Best for High-Throughput, Event-Driven Applications

  • Use Case:
    • Large-scale IIoT and cloud applications where multiple consumers need real-time data updates.
    • High-speed industrial automation systems where latency and scalability are critical.
    • Applications requiring seamless integration with message brokers like MQTT, AMQP.
  • Advantages:
    • Efficient data distribution to multiple subscribers without polling overhead.
    • Lower bandwidth usage for event-driven architectures.
    • Scalable to thousands of devices in large networks.

OPC UA Address Space

The Address Space is the structured representation of data within an OPC UA Server. Key components:

  • Nodes – The fundamental elements representing variables, objects, methods, etc.
  • References – Define relationships between nodes.
  • Node Classes – Types of nodes (Object, Variable, Method, View, etc.).

Differences in Address Space for Client/Server vs. Pub/Sub Models

  1. Client/Server Model Address Space:
    • Fully structured and browsable by clients.
    • Nodes have rich metadata, including relationships and attributes.
    • Supports methods, alarms, and historical data access.
    • Clients can navigate the hierarchy and request specific node values.
  2. Pub/Sub Model Address Space:
    • Not directly browsable like in Client/Server.
    • Focuses on data streams (topics/messages) rather than a hierarchical model.
    • Data is published/subscribed to using DataSets and Publishers/Subscribers.
    • Optimized for real-time, high-speed data distribution.

OPC UA Profiling

Use standard OPC UA profiles (Nano, Embedded, Standard) and select transport (TCP, HTTPS, MQTT) based on system needs.

CriteriaNano ProfileEmbedded ProfileStandard ProfileOPC UA TCPHTTPSMQTT
Device ResourcesVery Low (≤256 KB RAM)Moderate (512 KB – 4 MB RAM)High (≥4 MB RAM)HighModerateLow
Security RequirementsMinimal (Basic Authentication)Medium (Encryption & User Auth)High (Certificates, RBAC)HighVery HighMedium
Real-Time PerformanceLowMediumHighHighLowMedium
Data Exchange ComplexitySimple Read/WriteSubscriptions, AlarmsFull Feature Set (Methods, History)HighMediumLow
Use in Firewalled NetworksNoLimitedYesNoYesYes
Cloud & IIoT IntegrationNoLimitedYesNoYesYes
Best Use CaseBasic sensors/actuatorsEdge controllers, industrial devicesSCADA, MES, enterprise systemsFactory floor, real-time controlIT integration, web-based accessCloud & large-scale distributed systems
OPC UA Profile & Transport Protocol Selection Matrix

OPC UA Data Flow Diagrams

Creating data flow diagrams will show how the OPC UA data will flow through the system. This will help to clarify how different components will interact with the OPC UA server.

OPC UA Information Model

Define structured namespaces, leverage companion specifications, and optimize event/alarm handling.

OPC UA Services

OPC UA defines several services for interaction, including:

  • Read/Write – Retrieve or update values.
  • Subscription – Receive real-time updates.
  • Browse – Explore the address space.
  • Method Call – Invoke specific functions on the server.

OPC UA Data Types

  • Scalar Data Types (Boolean, Int, Float, String, etc.)
  • Structured Data Types (Complex objects defined in the Information Model)
  • Custom Data Types (Defined by the user for specific applications)

OPC UA-Compliant Data Structures

OPC UA organizes data into an address space—a hierarchical network of nodes representing real-world entities (e.g., sensors, machines). Key components include:

  • Objects: Represent devices or systems (e.g., a motor).
  • Variables: Hold values (e.g., motor temperature).
  • Methods: Define executable actions (e.g., start/stop commands).
  • Types: Custom or standardized data definitions (e.g., a “CNC Machine” type).

Data is structured using namespaces to avoid conflicts, allowing vendors to extend models while ensuring interoperability. As an example in Automotive Manufacturing Plant, a robot arm is modeled as an object with variables (joint angles, status) and methods (grip, rotate).

OPC UA Security Implementation

Security in OPC UA is crucial for industrial applications.

Security Features

  • Encryption – Uses TLS for secure communication.
  • Authentication – Username/password, certificates, or JWT.
  • Role-Based Access Control – Restricts access based on user roles.

Setting Up Security Certificates

  1. Generate an X.509 Certificate for the server.
  2. Install the certificate on both server and client.
  3. Configure the security mode (Sign, Sign & Encrypt).

OPC-UA Mapping Sheet:

An OPC UA mapping sheet helps translate data between your client application and the OPC UA server. Here’s what you should include:

OPC UA Server Information:

  • Server Name/Address: Identify the OPC UA server you’re connecting to.
  • Namespace URI: Define the namespace used by the server’s address space.

Data Mapping:

Client-Side DataOPC UA NodeData TypeDescriptionReadWriteNotes
Descriptive Name (e.g., “MotorTemperature”)Node Identifier (BrowsePath or NodeId)OPC UA Built-in or Custom TypeBrief description of the dataYes/NoYes/NoAdditional comments (e.g., Units)
Data Mapping in OPC-UA
  • Client-Side Data: This is the name you’ll use for the data in your application.
  • OPC UA Node: Specify how to identify the data point in the server’s address space. You can use either:
    • Browse Path: A human-readable path to navigate the address space (e.g., “Objects/Machine1/Motor/Temperature”).
    • Node Id: A unique identifier for the node within the server.
  • Data Type: Define the data type of the variable on the server. This should match the corresponding type in your application (e.g., Double for temperature). You can use built-in OPC UA data types or custom types defined on the server.
  • Description: Briefly describe the purpose of the data point.
  • Read/Write: Indicate whether you want to read data from the server (Yes/No) and/or write data to the server (Yes/No).

Additional Information:

  • Sampling Rate: If applicable, specify the desired frequency for reading data from the server.
  • Units: Clarify the measurement units for specific data points (e.g., °C for temperature).
  • Security Settings: If using secure communication, note any relevant security details (e.g., certificate information).

Tips:

  • Use a separate sheet for each OPC UA server you connect to.
  • Maintain the mapping sheet alongside your application code for easy reference.
  • Consider using version control for the mapping sheet to track changes.

OPC-UA in IIoT Applications:

In the realm of IIoT, OPC-UA serves as the backbone for communication and data exchange. Its significance includes:

Facilitating Machine-to-Machine Communication:

  • OPC-UA enables various machines and devices to communicate and share data seamlessly, forming the basis for advanced automation and control strategies.

Bridging the IT and OT Divide:

  • By providing a common language, OPC-UA bridges the gap between Information Technology (IT) and Operational Technology (OT), enabling a cohesive and integrated industrial environment.

Enabling Predictive Maintenance and Analytics:

  • With its ability to handle large volumes of data from multiple sources, OPC-UA is instrumental in predictive maintenance strategies and advanced analytics, leading to reduced downtimes and optimized performance.

Future of OPC-UA:

The future of OPC-UA in IIoT is not just promising; it’s already unfolding. With the advent of Industry 4.0, OPC-UA is poised to become the standard for industrial communication, driving innovations like digital twins, smart factories, and advanced robotics.

OPC-UA and SIEMENS PLCs:

How to implement OPC UA in SIEMENS SIMATIC S7-1500 PLC, click here.

How to implement OPC UA in SIEMENS SIMATIC S7-1200 PLC, click here.

OPC-UA and Allen Bradley PLCs:

How to implement OPC UA in 5580 and 5380 Logix Controllers, click here:

How to configure an OPC UA server on a CompactLogix 5480 controller using FactoryTalk Linx Gateway, click here

Conclusions:

OPC-UA stands at the forefront of the IIoT revolution, offering unparalleled flexibility, security, and efficiency. Its role in shaping the future of industrial communication and automation cannot be overstated. As industries continue to embrace IIoT, OPC-UA will undoubtedly play a pivotal role in this transformative journey.

Get a Free 15-Minute OPC-UA Consultation – No Strings Attached!

🚀 Need expert guidance on OPC-UA solutions? Book a free 15-minute consultation with our global freelance specialists.
Assess your project needs
Get expert insights
No commitment required

🔗 Book Your Free Session Now

×

Hello!

Click one of our engineer below to chat on WhatsApp

× Call/ Text Anytime