Chapters

102 OPC UA: Architecture, Models, and Security

applications
iiot
opc
ua

102.1 Overview

This first route builds the OPC UA architecture from information models and communication patterns through a reviewable security baseline.

This is part 1 of 2. Continue with OPC UA: Companion Models and Implementation for the second focused route.

102.2 Start With the Story

Picture two factory lines that both report a value called speed. One means motor turns per minute. The other means belt metres per second. Joining the raw tags would create a quiet but dangerous error.

OPC Unified Architecture (OPC UA) gives industrial data shared names, types, units, quality, time, and links. A protocol is an agreed set of rules for how systems exchange data. Transmission Control Protocol (TCP) provides an ordered byte stream between two endpoints. Start with the machine meaning, not the wire. Name the asset, value, unit, state, and allowed action. Then choose the exchange pattern. Keep a fast or safe control loop near the machine when a remote link cannot own it.

Use this first review path:

  • Which machine fact is shared?
  • What does the name mean?
  • Which unit does it use?
  • How fresh is the value?
  • Is its quality known?
  • Who may read it?
  • Who may change it?
  • Which certificate proves identity?
  • What happens when trust fails?
  • Can the local process stay safe?

OPC UA can share meaning. It cannot repair a weak source model by itself. Practitioner covers nodes, service patterns, certificates, roles, and field rollout. Under the Hood covers the full information model, security choices, subscription tuning, and companion rules. Those details refine the shared model. They do not make two unlike tags mean the same thing.

Retell one machine value. Start at the asset. Name the part. Name the value. Name the unit. Name the time. Name the quality. Name the source. Mark whether it can change. Mark who may change it. Keep those facts with the value.

Then choose the exchange. A client may ask a server. A client may watch for change. A publisher may send events. A subscriber may receive them. The pattern follows the job. Fast control may stay local. Remote systems may read a safe view. A lost link has a known effect. A stale value stays marked stale.

Then protect the route. Each system has an identity. A certificate can support that identity. Trust lists name accepted peers. User roles limit human acts. Signing can show tampering. Encryption can hide data in transit. A safe policy still needs owners. Old trust must be removed. Failed trust must stay visible.

Then keep the model alive. One team owns the names. One team owns each source. Model changes get a version. Clients can detect that version. A companion model may provide shared terms. A local extension stays documented. New machines keep the contract. Old machines keep clear adapters. Tests catch a broken meaning.

Finish at release. The consumer is named. The control limit is named. The trust owner is named. The local fallback is named. The field test is recorded. The change process is recorded. The deeper model can add detail. It cannot change the unit in secret.

Picture a machine model that needs to be understood by software beyond the original controller. OPC UA becomes useful when the story is semantic interoperability: expose state, commands, alarms, and metadata in a way that another system can trust and maintain.

102.3 Learning Objectives

After completing this chapter, you will be able to:

  • Explain OPC-UA architecture and its role in industrial integration
  • Analyze the OPC-UA information model and node structure
  • Compare client-server and publish-subscribe communication patterns
  • Implement OPC-UA security features including authentication and encryption
  • Design OPC-UA-based systems for IT/OT integration

OPC-UA is like a universal translator for factory machines. In most factories, different machines from different manufacturers speak their own “languages” and cannot talk to each other. OPC-UA gives them a common language so a robot arm, a temperature sensor, and a cloud computer can all share information securely. If you have ever used a USB cable that works with many different devices, OPC-UA does the same thing but for industrial communication.

102.4 Prerequisites

Before diving into this chapter, you should be familiar with:

Chapter Roadmap

This chapter moves from meaning to release evidence:

  1. First you learn why IEC 62541 is more than a wire protocol: it gives industrial values names, units, quality, timestamps, and relationships.
  2. Then you compare client-server and PubSub patterns so SCADA, historians, MES, CMMS, analytics, and cloud systems get the right interaction.
  3. Next you secure the route with certificates, user roles, signing, encryption, trust lists, and audit evidence.
  4. Finally you tune subscriptions, use companion specifications, and test a brownfield migration without flattening every source into raw tags.

Checkpoints recap the governing decisions. Interactive calculators and quizzes count as breathers; use them before moving to the next design layer.

102.5 OPC UA Shared Meaning

OPC Unified Architecture, standardized as IEC 62541, is not just another wire protocol. Its main value is that it lets a machine describe what its data means. A client can browse a server, find an asset, read variables, inspect units and data types, and discover methods without relying on a spreadsheet of vendor-specific register numbers. That makes OPC UA especially useful when a factory needs data to survive vendor changes, PLC upgrades, and multiple generations of analytics tools.

That matters in plants where equipment comes from many vendors and must connect to SCADA, HMI, historian, MES, CMMS, analytics, and cloud systems. A conveyor drive, robot cell, chiller, or packaging machine can expose a structured address space instead of forcing every integration team to reverse-engineer tags from scratch. A temperature value is more useful when the client can also discover the asset it belongs to, its engineering unit, its timestamp, its quality code, and whether it is read-only, writable, or part of a method call.

The practical design question is not “Can the server expose data?” but “Can downstream systems understand and trust it?” A good OPC UA deployment names the consumer, the operational risk, the namespace owner, and the change process. It separates monitoring from control writes, defines which values are authoritative, and documents which data can leave the control network through an edge gateway or DMZ broker.

  • Address space: Organizes objects, variables, methods, references, and metadata into a browsable model.
  • Security: Uses application certificates, secure channels, user authentication, signing, and encryption instead of assuming a trusted plant network.
  • Integration: Supports request-response access for SCADA/HMI and publish-subscribe patterns for larger telemetry flows.

For learners, the important shift is from tag collection to information modeling. A raw register list might say that register 40017 is a number. An OPC UA model should help a client understand that the number is a motor current, measured in amperes, sampled from a specific drive, valid at a specific time, and linked to the packaging line where maintenance decisions are made.

102.6 Model Before Wiring Tags

A practical OPC UA project starts by deciding which objects the client should see. Model assets such as Line 3, Filler 2, Motor M101, TemperatureSensor A, or BatchRecipe as meaningful objects, then attach variables and methods that operators, engineers, and applications can interpret. Avoid publishing thousands of raw PLC tags with names that only the control engineer understands. The model should reflect how the plant is operated: line, cell, station, equipment, sensor, actuator, recipe, alarm, and maintenance context.

The integration choice depends on the consumer. A SCADA display may use client-server subscriptions to monitor selected nodes at a defined sampling interval. A plant historian may collect normalized values with engineering units and quality flags. A cloud analytics pipeline may receive OPC UA PubSub messages over MQTT through an edge gateway or DMZ broker rather than opening inbound access to control networks. MES and maintenance systems may need ISA-95 equipment hierarchy or companion specifications so production orders, downtime events, and asset records use the same vocabulary.

  1. Name the consumer. Identify whether the data is for HMI, SCADA, MES, CMMS, historian, engineering analytics, or a cloud service.
  2. Choose the interaction. Use browse/read/write/call/subscription for direct operational clients; use PubSub when many downstream consumers need decoupled streams.
  3. Set the security baseline. Use current policies such as Basic256Sha256 or Aes256-Sha256-RsaPss, manage X.509 certificates, and disable Security Policy None outside isolated tests.
  4. Reuse standard models. Check companion specifications such as OPC UA for Machinery, Robotics, PackML, PLCopen, MTConnect, and ISA-95 before inventing custom node structures.

Practitioners also need an operating model. Decide who issues and trusts application certificates, who approves writable nodes, who maps roles to user identities, who validates namespace changes, and how clients are tested before production. Tools such as UaExpert are useful for inspection, but production readiness usually needs source-controlled model definitions, documented namespace versions, certificate lifecycle procedures, and a rollback plan for server updates.

For brownfield systems, use gateways deliberately. A Modbus, PROFIBUS, PROFINET, EtherNet/IP, or vendor-driver gateway should not simply relay every register as a flat tag. It should attach asset names, units, quality, timestamps, and references so the new OPC UA layer creates a stable interface while the underlying equipment remains unchanged.

102.7 OPC UA Reads Semantics

Inside an OPC UA server, each node has a NodeId, BrowseName, DisplayName, NodeClass, attributes, and references to other nodes. A variable can carry a DataType, ValueRank, engineering unit, quality status, timestamp, and access level. References such as HasComponent, HasProperty, Organizes, and HasTypeDefinition make the model navigable instead of flat. Namespaces keep vendor, standard, and site-specific definitions separate, which is why careless NodeId churn can break historians, dashboards, and analytics jobs after a PLC or server update.

The hierarchy in Figure 102.2 makes those semantics inspectable. Follow the object types, objects, variables, methods, properties, and references to see how a client discovers both a value and the operational context needed to interpret it safely. The secure channel is also part of the design, not a later wrapper. Applications exchange certificates, negotiate a security policy, create sessions, authenticate users, and authorize operations. Production servers need certificate rotation, trust-list management, user-role mapping, time synchronization, and clear rules for writable nodes because a write to the wrong setpoint can affect real equipment. Security Policy None is acceptable for a classroom lab but is not a production baseline for plant or pharmaceutical systems.

OPC UA communication choices change the failure mode. Client-server subscriptions maintain monitored items, queues, publishing intervals, keep-alives, and sequence numbers. PubSub decouples publishers from subscribers and may use UADP or JSON mappings over UDP, MQTT, or other transports depending on the deployment. Neither pattern removes the need for data-quality handling: clients still need source timestamps, server timestamps, status codes, stale-data detection, and explicit behavior when a gateway restarts or a subscription queue overflows.

Implementation choices are concrete. Teams commonly test models with clients such as UaExpert, build servers or clients with SDKs such as open62541, Eclipse Milo, node-opcua, or vendor SDKs, and bridge legacy Modbus, PROFIBUS, PROFINET, or EtherNet/IP systems through gateways. The difficult work is making the published model stable, secure, and useful across the equipment lifecycle.

  • Model stability: Version namespaces and NodeIds deliberately so dashboards and historians do not break after every PLC or server update.
  • Data quality: Preserve source timestamp, server timestamp, quality code, engineering unit, and operating state alongside the value.
  • Boundary control: Keep read-only monitoring separate from write methods and control actions unless the authorization, safety, and change process are engineered for writes.

A reviewer should be able to trace one value from PLC or gateway source, through OPC UA namespace, secure session or PubSub route, historian or SCADA consumer, and final operational decision. If that trace loses units, quality, ownership, or write authorization, the deployment is only connected, not integrated.

AdaCheckpoint: Shared Meaning

You now know:

  • OPC UA is standardized as IEC 62541 and should preserve meaning, not just move values.
  • A useful node carries context such as asset, engineering unit, timestamp, quality code, access level, and references.
  • The first design question is the consumer and risk: HMI, SCADA, MES, CMMS, historian, analytics, cloud service, or approved write path.

102.8 Introduction

OPC Unified Architecture (OPC-UA) is the leading standard for industrial interoperability, designed to bridge IT and OT systems. Unlike proprietary protocols that lock users into specific vendor ecosystems, OPC-UA provides a vendor-neutral, platform-independent foundation for secure industrial communication.

OPC UA Standard Basics

Core Concept: OPC-UA (Open Platform Communications Unified Architecture) is a vendor-neutral, platform-independent standard for secure industrial communication that provides semantic data modeling, built-in security, and both client-server and publish-subscribe communication patterns for bridging IT and OT systems.

Why It Matters: Industrial environments contain equipment from dozens of vendors, each with proprietary protocols and tag naming conventions. Without a shared model, every integration can become a custom mapping and revalidation project. With OPC-UA and companion specifications, teams can expose repeatable information contracts that make commissioning, diagnostics, and analytics easier to govern.

Key Takeaway: OPC-UA is a semantic integration layer for industrial systems. Use client-server mode for operational clients such as SCADA and HMI, PubSub for decoupled telemetry paths, and companion specifications when the domain already has a tested model. Treat certificate trust, user roles, namespace versioning, and write authorization as part of the design, not optional deployment details.

Hey there, young engineer! Bella the Bridge Builder has a big challenge at the Smart Factory!

The Problem: Imagine you have a classroom where some kids speak English, some speak Spanish, some speak French, and some speak Japanese. Nobody can understand each other! That is exactly what happens in factories — every machine speaks its own “language” (protocol).

Bella’s Solution — OPC-UA! Bella builds a Universal Translator that can talk to ALL the machines:

  • The robot arm speaks PROFINET (like German)
  • The temperature sensor speaks Modbus (like French)
  • The conveyor belt speaks EtherCAT (like Japanese)
  • The cloud computer speaks MQTT (like English)

OPC-UA is like a super-smart translator who speaks ALL these languages and helps everyone understand each other!

How It Works (Simply):

  1. Self-Describing: Each machine tells OPC-UA what it can do — like a kid introducing themselves: “Hi, I’m a temperature sensor. I can tell you how hot things are!”
  2. Secure: OPC-UA uses secret codes (encryption) so nobody can sneak in and give wrong instructions to the machines
  3. Flexible: It works whether you want to ask a machine a question (client-server) or have machines shout updates to everyone who is listening (pub-sub)

Sensor Squad Memory Trick:

  • OPC-UA = Universal Translator (speaks every factory language)
  • Client-Server = Asking a question and getting an answer
  • Pub-Sub = Shouting news so everyone hears it
  • Companion Specs = Phrase books for specific industries

102.9 Why OPC-UA?

Time: ~12 min | Difficulty: Advanced | Unit: P03.C06.U04

Key Concepts

  • Address Space: Browsable OPC UA structure containing objects, variables, methods, views, references, and type definitions.
  • NodeId: Stable identifier for a node; careless NodeId churn can break historians, dashboards, and integrations.
  • Reference: Typed relationship such as HasComponent, HasProperty, Organizes, or HasTypeDefinition that makes the model navigable.
  • Secure Channel: Message-security context negotiated between applications using endpoint policy, certificates, signing, and encryption.
  • Session: Authenticated client context used to browse, read, write, call methods, and manage subscriptions.
  • Monitored Item: Subscription item that defines sampling, queueing, dead-band behavior, and notification rules for a node.
  • Companion Specification: Domain model, such as PackML or OPC UA for Machinery, that standardizes node types and semantics for an industry or equipment class.

Traditional industrial protocols were designed for specific vendors or applications, creating integration challenges. OPC-UA provides:

  • Platform independence: Works on any OS, hardware, or programming language
  • Semantic data modeling: Self-describing data with context and relationships
  • Built-in security: Authentication, encryption, and audit logging
  • Scalable: From embedded devices to cloud servers
  • Service-oriented: Multiple communication patterns (client-server, pub-sub)

102.10 OPC-UA Architecture

Ground opc-ua architecture with the visual at Figure 102.1. Start from OPC UA Client-Server Architecture, but keep Unified Architecture for Industrial Communication visible while evaluating opc-ua servers expose address-space nodes and service sets through secured sessions so scada, hmi, mes, and erp clients can browse, read, subscribe,.

OPC UA client-server architecture with multiple clients connecting through sessions to an OPC UA server that contains address space nodes, service sets, communication stack, and security layer.
Figure 102.1: OPC-UA servers expose address-space nodes and service sets through secured sessions so SCADA, HMI, MES, and ERP clients can browse, read, subscribe, write, and call methods according to policy.

Locate OPC UA Client-Server Architecture on Figure 102.1 before checking Unified Architecture for Industrial Communication. The visual’s third anchor, OPC UA Server, completes opc-ua servers expose address-space nodes and service sets through secured sessions so scada, hmi, mes, and erp clients can browse, read, subscribe,. Carry OPC UA Client-Server Architecture into opc-ua architecture; use OPC UA Server as its limiting condition.

102.11 Information Model

OPC-UA’s information model is object-oriented and hierarchical:

Core concepts:

  • Nodes: Objects, variables, methods, views
  • References: Relationships between nodes (HasComponent, HasProperty, etc.)
  • Attributes: Metadata (NodeId, BrowseName, DisplayName, Value, etc.)
  • Data types: Built-in and custom types

Example hierarchy:

The visual evidence for information model sits in Figure 102.2. Find OPC-UA Information Model Hierarchy beside Self-describing object-oriented data model before interpreting the information model gives clients more than a value: it exposes type, unit, timestamp, quality, method, property, and relationship context.

OPC UA information model hierarchy showing object types, objects, variables, methods, properties, views, and references such as HasTypeDefinition, HasComponent, and HasProperty.
Figure 102.2: The OPC UA information model gives clients more than a value: browsable object types, objects, variables, methods, properties, and references expose type, unit, timestamp, quality, and relationship context.

Compare OPC-UA Information Model Hierarchy with Self-describing object-oriented data model inside the visual at Figure 102.2. Next find Object Types, which completes the scope of the information model gives clients more than a value: it exposes type, unit, timestamp, quality, method, property, and relationship context. The decision in information model must preserve that labelled boundary. This self-describing model means clients can discover capabilities without prior knowledge of the device.

102.12 Communication Patterns

To test communication patterns, open the diagram in Figure 102.3. OPC-UA Client-Server Communication supplies one named condition; Client Application supplies the necessary comparison for client-server communication separates discovery, read/write access, subscriptions, notifications, and secure-channel handling.

OPC UA client-server communication diagram showing a client application using session manager, browse, read/write, and subscription manager services over a secure channel to an OPC UA server with session service, address space, data access, methods, notification engine, and device data layer.
Figure 102.3: Client-server communication separates discovery, read/write access, subscriptions, notifications, and secure-channel handling.

At OPC-UA Client-Server Communication in Figure 102.3, compare the diagram with Client Application; then locate Session Manager. That labelled check bounds client-server communication separates discovery, read/write access, subscriptions, notifications, and secure-channel handling. For communication patterns, retain Session Manager as evidence for the resulting choice. OPC-UA supports two communication patterns: client-server for direct request-response interaction (ideal for SCADA and HMI), and publish-subscribe for scalable, decoupled cloud integration.

102.12.1 Client-Server (Request-Response)

The traditional OPC-UA communication pattern:

  • Client discovers server capabilities
  • Client reads/writes values
  • Client subscribes to data changes
  • Server notifies client of changes
  • Good for: SCADA systems, HMIs, configuration tools

Typical workflow:

  1. Connect: Client establishes secure session with server
  2. Browse: Client explores server’s address space to discover nodes
  3. Read: Client reads current values of variables
  4. Subscribe: Client creates subscriptions for data change notifications
  5. Monitor: Server sends notifications when subscribed values change
  6. Write: Client writes new values to writable nodes
  7. Call: Client invokes methods on the server

102.12.2 Publish-Subscribe (Pub-Sub)

Modern OPC-UA extension for scalable communication:

  • Publishers send data to broker (MQTT, AMQP)
  • Subscribers receive data from broker
  • Decoupled, scalable, firewall-friendly
  • Good for: Cloud connectivity, analytics, mobile monitoring

Pub-Sub advantages:

  • Scalability: One publisher, thousands of subscribers
  • Decoupling: Publishers don’t need to know subscribers
  • Firewall-friendly: Outbound connections only
  • Cloud integration: Native MQTT/AMQP transport

AdaCheckpoint: Communication Pattern

You now know:

  • Client-server fits direct browse, read, write, call, subscription, SCADA, HMI, and configuration workflows.
  • PubSub fits decoupled telemetry over MQTT or AMQP when cloud analytics should not maintain direct sessions to machines.
  • A 500-machine factory often needs both: operational client-server locally, aggregated PubSub through edge gateways for cloud consumers.

102.13 Security Features

OPC-UA has security built-in from the ground up:

The next claim about security features depends on Figure 102.4. Its diagram makes Trust Record Before Release and Trust Authority explicit within opc-ua security needs certificate ownership, trust-list management, user identity, authorization roles, and endpoint policy evidence, not only a.

OPC UA trust record showing trust authority, server trust, client trust, user identity, roles, and endpoint policy before release.
Figure 102.4: OPC-UA security needs certificate ownership, trust-list management, user identity, authorization roles, and endpoint policy evidence, not only a checkbox that says encryption is enabled.

Trace the visual from Trust Record Before Release to Trust Authority in Figure 102.4; verify issuer, revocation, renewal before concluding. Together those labels make opc-ua security needs certificate ownership, trust-list management, user identity, authorization roles, and endpoint policy evidence, not only a testable. Apply their boundary when working through security features. OPC-UA security operates in layered defense: transport encryption protects the channel, application certificates authenticate endpoints, user tokens authorize access, and audit logging records all activity.

102.13.1 Application Authentication

  • X.509 certificates identify applications
  • Certificate exchange during connection establishment
  • Trust lists managed by administrators

102.13.2 Message Security

  • Sign: Detect tampering (HMAC-SHA256)
  • Sign and encrypt: Protect confidentiality (AES-256)

102.13.3 User Authentication

  • Username/password
  • X.509 user certificates
  • Kerberos tokens
  • SAML tokens

102.13.4 Audit Logging

  • All security events logged
  • Connection attempts, authentication failures
  • Read/write operations on critical data

102.13.5 Security Policies

  • None: Signing = No, Encryption = No. Use only for isolated testing.
  • Basic128Rsa15: Signing = Yes, Encryption = Yes. Legacy compatibility only; avoid for new deployments.
  • Basic256Sha256: Signing = Yes, Encryption = Yes. Widely supported, but verify whether it remains approved by the site security policy.
  • Aes256-Sha256-RsaPss: Signing = Yes, Encryption = Yes. Prefer for new critical deployments when both endpoints support it and latency tests pass.
Security Best Practice

Never use Security Policy “None” in production environments. This setting disables all authentication and encryption, exposing industrial systems to unauthorized access and data manipulation. Even in development environments, testing with security enabled helps identify integration issues early.

102.13.6 OPC-UA Security Policy Comparison

Compare security policies to understand the tradeoffs between performance and protection level.

Security Policy Selection Guidelines

For critical infrastructure (power plants, pharmaceuticals, water treatment): use the strongest site-approved security policy that both endpoints support, then validate timing and recovery behavior on representative hardware.

For standard industrial applications (manufacturing, logistics): prefer policies with signing, encryption, managed application certificates, named user identities, and tested trust-list operations.

Avoid Basic128Rsa15 unless a legacy device forces a time-bounded exception with compensating controls and an owner.

Never use “None” in any production environment. Measure the overhead of secure modes instead of assuming the insecure mode is operationally necessary.

AdaCheckpoint: Security Baseline

You now know:

  • Security Policy None is for isolated testing, not production.
  • Basic256Sha256 is a common supported baseline; Aes256-Sha256-RsaPss is the stronger target when endpoints and timing support it.
  • Release evidence needs application certificates, user identity, trust-list ownership, authorization roles, and audit logging, not only encryption enabled.

102.14 Continue to Part 2

Continue with OPC UA: Companion Models and Implementation.