Chapters

27 OPC UA: Companion Models and Implementation

applications
iiot
opc
ua
Listen
Uses your device's voice. Tap ▶ beside any paragraph to hear just that one.
  • Podcast audio coming soon
  • Character narration audio coming soon
Lecture
Video lecture coming soon. The slides are the lecture for now.
Ask AI
Pick a prompt. We copy it for you and open an AI service; paste it there. Nothing is sent to IoTClass.

27.1 Give the Bottling Line Shared Meaning

A secure OPC UA connection can exchange data, but machines still need shared meanings for assets, states, and measurements. This chapter follows implementation from model selection to deployment evidence: choose an industry model, preserve its meaning through gateways, and test the result alongside transport security. It is part 2 of 2; OPC UA: Architecture, Models, and Security explains the architecture behind these decisions.

A beverage company operates a bottling line with native PROFINET PLCs, EtherCAT motion equipment, inspection cameras, and legacy Modbus RTU conveyor controllers. Management wants overall equipment effectiveness (OEE) dashboards and maintenance analytics without replacing functioning equipment. The team must connect these sources while keeping operational control and analytics responsibilities clear.

The problem is more than moving values. A dashboard needs units, quality, timestamps, and equipment meaning; a control client also needs explicit permission to write. We will first choose companion models, then size the implementation, place integration boundaries, and trace a value through the completed plant workflow. The wider Industry 4.0 Fundamentals sequence places this migration in its operational context.

KEY CONCEPTS

  • Domain models

    Choose shared machine meaning before adding local extensions.

  • Subscription tuning

    Match sampling, buffering, and delivery to process needs.

  • Integration boundaries

    Separate operational access from read-only cloud datasets.

  • Release evidence

    Trace meaning, security, and ownership from source to consumer.

27.2 Learning Objectives

By the end of this chapter, you will be able to:

  • choose OPC UA companion specifications for a domain
  • plan an implementation with semantic and security evidence
  • evaluate OPC UA integration in a practical plant workflow

27.3 Choose a Model the Machines Can Share

The OPC Foundation provides base specifications. A companion specification defines a standardized information model for an industry domain. For packaging states and production counters, the bottling team should examine PackML. OPC UA for Machinery supplies a general manufacturing baseline machine model; EUROMAP addresses plastics and rubber machines; MTConnect addresses CNC and machining-center data models. ISA-95 supports enterprise integration between manufacturing execution systems (MES) and enterprise resource planning (ERP), while PLCopen covers motion-control coordination and reusable machine logic.

These models offer common interfaces across vendors, less custom mapping, and industry consensus on data organization. For the bottling team, the benefit is a shared interpretation of machine state and production count across vendors. That benefit depends on selecting a model that describes the equipment domain; generic state vocabulary does not make a machining model a packaging model. Conformance testing supports interoperability, but the model name alone does not guarantee plug-and-play integration. Record the supported version, tests, and local extensions so clients know which behavior they can rely on.

Five review steps connect the base OPC UA address space, PackML domain types, site-specific meaning, conformance evidence, and the client contract.
Companion specifications add domain meaning to the base OPC UA model. Local extensions record site-specific meaning. Conformance evidence records model versions and tests passed. The client contract distinguishes standard rules from local rules.

Read Figure 1 through its five steps. The base node model is generic; the companion layer adds domain types shared by peer machines. The site-specific extension introduces local meaning and can quietly break integration if undocumented. Conformance evidence and the client contract make those assumptions visible. A valid server can still be hard to integrate when its local rules are unclear.

27.4 Fit the Runtime and Plan Recovery

With the model chosen, check where it can run. OPC UA spans operating systems, hardware, and languages, from embedded PLCs and gateways to historians, MES, and enterprise servers. Embedded devices may have only megabytes of RAM and processors rated in MHz. Nano or Micro profiles limit required capabilities; prioritize reliability and verify subscription support rather than assuming every embedded server offers complex subscriptions. Server-class implementations can support high-performance subscriptions, complex models, and enterprise integration, but their supported profiles still determine available features.

Availability also needs explicit design. Server redundancy provides multiple servers with the same address space; client failover reconnects to a backup; network redundancy supplies dual Ethernet paths. Test the combination the plant actually uses.

For session recovery, subscription transfer can preserve subscriptions when the receiving server supports the required state. It does not automatically copy them to an independent backup. Sequence numbers identify missing notifications and support recovery when notifications remain available for retransmission. Secure-channel renewal rotates security tokens and keys. These mechanisms address different parts of continuity, so reconnection alone is insufficient evidence of complete recovery. Verify whether the historian resumes with the expected notifications and model, and distinguish a recovered connection from recovered data. Reliability has priority over adding features that the embedded devices cannot support.

27.5 Tune Changes Without Hiding the Process

The next problem is load. A publishing interval sets the subscription’s notification publishing cycle; the chapter’s typical range is 100 ms–5 s. The sampling interval controls how often the server samples an underlying value and can be faster. Queue size bounds buffered changes between publications. Lifetime count bounds how many publishing intervals a subscription can survive without available client Publish requests.

Read several nodes in one request, and use an indexed range to retrieve only needed array elements. Group related monitored items in subscriptions. Apply dead-band filtering to report changes only beyond a configured threshold, such as a temperature change greater than 0.5°C. Changes within the deadband are not sent; retain raw history separately when needed. For variables fluctuating within tolerance, filtering reduces notifications only when those small changes can safely be omitted.

Batching combines variable updates into messages and reduces per-message overhead. In the calculator’s simplified model, a 24-byte header shared by 10 variables contributes 24/10=2.424/10 = 2.4 bytes per variable. This assumed header size is a sizing input, not a universal OPC UA wire cost. Validate deadband and queue settings against actual process data before treating the estimate as a capacity plan.

Try it

OPC UA Subscription Performance: explore bandwidth and daily volume with 2,000 variables and a 100 ms interval.

Try the calculator →

Try it

Two Different Levers on Subscription Load: Ada works through the chapter's numbers, rounding at the end.

Follow the calculation →

A historian receiving 2,000 variables across 20 PLCs at 100 ms can miss updates during bursts. If a trace shows a subscriber queue overflowing, size buffering from burst duration and drain rate, and filter confirmed noise. Sustained overload needs more capacity or a lower rate. A different trace requires a different response: values arriving 3 seconds late with no overflow and a 3-second publishing interval call for a cadence closer to the required 1-second trends, after checking capacity.

Check knowledge

Model fit and subscription evidence: choose companions and distinguish queue overflow from publishing delay.

Check knowledge →

27.6 Put Each Consumer Behind the Right Boundary

Tuning makes sense only in its architecture. Figure 2 places OPC UA between real-time operational technology (OT) and operations or enterprise consumers. Keep an owner and a boundary rule at each step.

ISA-95 automation layers connect field devices, direct control, supervisory systems, operations, and enterprise consumers through native industrial links, OPC UA, MQTT, and REST APIs.
Industrial links connect field devices to edge gateways; OPC UA serves SCADA clients, MQTT carries cloud streams, and REST APIs expose enterprise analytics.

Read downward from Level 4: Enterprise, where ERP and business planning access analytics through REST APIs. Next, Operations shows cloud platforms receiving publish-subscribe data over MQTT. Supervisory control places SCADA systems in the role of OPC UA clients that consume data. Direct control places edge gateways in the server role, where they aggregate data. At the bottom, Field devices communicate through native industrial protocols. These boundaries connect local operational systems to operations and enterprise consumers. OPC UA supplies structured meaning without making cloud software responsible for deterministic control.

Read upward from field devices: native protocols carry fast local signals, edge gateways aggregate them as OPC UA servers, SCADA consumes them as clients, cloud platforms receive publish-subscribe data over MQTT, and enterprise applications access analytics through REST APIs. OPC UA bridges PLC control and operations integration across ISA-95 Levels 0–3; MES operates at Level 3, while ERP operates at Level 4. It supplies structured meaning without making cloud software responsible for deterministic control.

Three integration patterns meet different needs. In PLC to Cloud, an embedded PLC server feeds an edge subscriber, which publishes to an MQTT broker for cloud consumption. In Multi-vendor Integration, each vendor exposes a server; a central OPC UA aggregator collects the models into a unified namespace, giving SCADA one endpoint. In Legacy Integration, a gateway converts Modbus/PROFIBUS data into a standardized model for modern clients while existing equipment remains unchanged.

The bottling plant combines these patterns. Gateways can expose Modbus RTU serial and PROFINET Ethernet data through one modeled namespace while existing control links remain in place. Industrial Protocols compares Modbus, PROFINET, and EtherCAT when deciding where such bridges belong.

Use client-server interaction for SCADA/HMI requests and configuration. PubSub supports decoupled distribution over UDP, Ethernet, or MQTT mappings; consider MQTT for cloud telemetry. Timing constraints determine which pattern fits, as Real-Time Requirements and ISA-95 explains. Selected read-only datasets should cross an edge or demilitarized zone (DMZ) boundary. Operational write methods stay within approved OT paths unless remote authorization, safety review, and recovery are engineered.

27.7 Test the Business Case Against Site Assumptions

A shared integration layer also needs an operating-cost case. Compare custom point-to-point integration with OPC UA using site estimates. Calculator defaults are planning placeholders, not vendor quotes or guaranteed savings.

Try it

OPC UA Deployment ROI Calculator: compare gateway, software, integration labor, and maintenance assumptions.

Compare costs →

In Year 1, gateways and software can increase costs, while reduced integration labor may compensate. In Years 2–3, lower maintenance can produce positive return on investment (ROI) if models, gateways, and certificate lifecycles are easier to operate than the custom alternative. In Years 4–5, standardized onboarding may reduce the effort to add equipment and increase savings.

The model omits outage windows, validation, vendor support, license terms, cybersecurity review, and ongoing namespace and certificate ownership. Include these in the plant’s decision rather than treating a three-year scenario output as an industry benchmark. The maintenance-analytics goal also needs usable data: Predictive Maintenance develops condition-monitoring and ML-based failure-prediction use cases for the collected values.

27.8 Release the Bottling Migration With Evidence

Return to the bottling line with three steps. First, inventory and map protocols. Identify native OPC UA servers and record endpoint policies, namespaces, and writable nodes. Put legacy serial and vendor-specific Ethernet sources behind gateways that add asset names, units, quality codes, timestamps, and references. Separate SCADA/HMI operational contracts from historian, MES, and cloud analytics contracts.

Second, implement the architecture. SCADA browses, reads, subscribes, and performs approved writes through native servers or an aggregator. Gateways preserve a unified namespace instead of flattening equipment into anonymous tags. Cloud consumers receive selected read-only datasets through the edge or DMZ broker, without direct control-network sessions.

Third, tune by purpose. Preserve every meaningful safety/interlock transition and test queue overflow. Bound sampling and queues for the control cell’s diagnostic needs. Apply deadband to quality metrics only when the process owner confirms small changes are noise. Dashboards and OEE can use slower aggregates when operators do not require every raw sample.

An endpoint exposing thousands of PLC tags without units, quality, hierarchy, or ownership is connected but not integrated. Model assets, variables, methods, and references. Give trust lists, renewal, user identity, role mapping, rejected-client handling, and endpoint policy named owners before release; neglected certificate expiry can turn a maintenance window into an outage.

OPC UA’s layered security includes X.509 application certificates for application identity and mutual authentication, message signing and encryption, user authentication options, and audit logging. Legacy Modbus and PROFIBUS lack these native protections. Never use Security Policy “None” in production. Release only when reviewers can trace one value from controller or gateway through namespace and security policy into historian or dashboard, preserving unit, quality, timestamp, owner, allowed writes, and the decision it supports.

Check knowledge

Deployment evidence: match concepts, order the rollout, label session services, and complete the route gate.

Check the deployment →

Summary

The bottling migration joins working equipment through native servers and gateways while preserving shared meaning. Companion specifications reduce custom mapping when versions and extensions are documented. Subscription settings must preserve significant changes, and each consumer needs an explicit boundary and contract.

OPC UA’s self-describing, object-oriented model of nodes, references, and attributes helps clients discover capabilities across platforms. Security and recovery still require configured policies, tested behavior, and named owners. A deployment is ready when its evidence connects a source value to an authorized operational or analytics use.

Start with the industry’s companion model, tune from process evidence, and trace meaning and authorization through every boundary before release.

Hi, I’m Ada. What do you need?

Find help

Let’s find what you need

Find a lesson or return to your module guide.

Give feedback

Help improve this chapter

Tell us what helped or what needs fixing.

Tips

Try a small next step

A few ways to get more from this chapter.

Ask AI

Continue the conversation

Take the conversation further with your preferred assistant.

AI help is available in supported modules when enabled in Settings.

No live person answers on independent study. Feedback does not promise a personal reply.

For welfare or safety concerns, follow your school’s procedures outside IoTClass.