Evaluate the AutomationView desktop suite free for 30 days. No credit card required. Claim trial key →
arrow_back Back to Articles

Inside OPC UA PubSub over TSN: Deterministic PLC Comm

calendar_month
person Carvalho Raphael

Inside OPC UA PubSub over TSN: Deterministic PLC Comm

Learning
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    style ControllerA fill:#2b6cb0,stroke:#2c5282,stroke-width:2px,color:#fff
    style Network fill:#319795,stroke:#285e61,stroke-width:2px,color:#fff
    style ControllerB fill:#2b6cb0,stroke:#2c5282,stroke-width:2px,color:#fff
    
    ControllerA["Publisher (PLC A)"] -->|"OPC UA PubSub"| Network["TSN Switch"]
    Network -->|"Scheduled Traffic"| ControllerB["Subscriber (PLC B)"]
AutomationView Icon AutomationView

Key Takeaways

  • Sub-millisecond Precision: Understand how TSN transforms standard Ethernet into a predictable, deterministic medium for critical control loops.
  • Decoupled Architecture: Leverage the publish-subscribe model to significantly reduce network overhead compared to traditional client-server polling.
  • Legacy Integration: Navigate the hurdles of integrating Time-Sensitive Networking hardware with existing non-TSN plant floor infrastructure.

The Shift Toward Deterministic Industrial Networking

Achieving true real-time, deterministic PLC-to-PLC communication on standard Ethernet has historically required proprietary fieldbuses. When control engineers need a variable frequency drive in station A to perfectly synchronize with a robotics controller in station B, standard TCP/IP introduces unacceptable jitter. The integration of OPC UA PubSub over TSN (Time-Sensitive Networking) fundamentally alters this paradigm, providing vendor-neutral, guaranteed message delivery.

Implementing OPC UA PubSub over TSN is not merely a software update. It requires specific hardware capabilities at the MAC layer to support time-aware traffic scheduling. In a real-world plant environment, routing deterministic traffic through legacy unmanaged switches will instantly destroy the time synchronization, causing dropped packets and synchronized axis faults on the machine.

Understanding the Publisher-Subscriber Model

Traditional OPC UA relies on a client-server architecture, which is excellent for SCADA data aggregation but fails when applied to high-speed PLC-to-PLC networking. Client-server polling introduces latency and scales poorly. The PubSub extension (Part 14 of the OPC UA specification) flips this approach. A publisher broadcasts data to the network, and multiple subscribers consume it simultaneously without establishing dedicated connections.

flowchart TD
    style Pub fill:#c53030,stroke:#9b2c2c,stroke-width:2px,color:#fff
    style Broker fill:#ed8936,stroke:#c05621,stroke-width:2px,color:#fff
    style Sub1 fill:#3182ce,stroke:#2b6cb0,stroke-width:2px,color:#fff
    style Sub2 fill:#3182ce,stroke:#2b6cb0,stroke-width:2px,color:#fff
    
    Pub["PLC A (Publisher)"] -->|"UDP Multicast"| Broker["TSN Network Infrastructure"]
    Broker -->|"Guaranteed Delivery"| Sub1["PLC B (Subscriber)"]
    Broker -->|"Guaranteed Delivery"| Sub2["PLC C (Subscriber)"]

By utilizing UDP multicast, the network overhead is drastically reduced. However, without TSN, UDP multicast offers no delivery guarantees on a crowded network. This is where the Time-Sensitive Networking layer becomes mandatory for critical control loops.

Configuring the TSN Layer: Real-World Hurdles

Setting up the deterministic communication path involves configuring the Network Schedule. TSN relies on a Precision Time Protocol, specifically the generalized Precision Time Protocol (gPTP) defined in IEEE 802.1AS, to synchronize all clocks across the switches and PLCs. Achieving sub-microsecond synchronization is not trivial. If your plant floor experiences heavy electromagnetic interference near large Variable Frequency Drives (VFDs) or servo amplifiers, the resulting packet corruption on copper lines can cause the grandmaster clock synchronization to fail intermittently. Using fiber optics for trunk lines between TSN switches is highly recommended to isolate noise and maintain clock stability.

The core of TSN scheduling is the Time-Aware Shaper (TAS) defined in IEEE 802.1Qbv. You must allocate specific, recurring time slots for OPC UA PubSub traffic. During these protected windows, the switch blocks all other queues, isolating deterministic packets from general IT traffic like firmware updates or HTTP requests. Furthermore, Frame Preemption (IEEE 802.1Qbu) allows the switch to interrupt a large, non-critical Ethernet frame, send the time-sensitive PubSub frame, and then resume the standard frame, minimizing delay drastically.

Comparing Client-Server vs. PubSub over TSN

Feature OPC UA Client-Server OPC UA PubSub over TSN
Architecture Point-to-Point (Polling) One-to-Many (Multicast)
Latency 10ms to 100ms Sub-millisecond
Determinism No guarantee (Best Effort) Strictly Deterministic
Network Load Scales poorly with many nodes Highly scalable
Primary Use Case HMI, SCADA, MES Integration High-speed PLC-to-PLC networking

Bridging the Gap with Existing Infrastructure

One of the most frequent challenges control engineers face is bridging deterministic networks with legacy systems. You cannot pass a TSN scheduled frame through a standard, unmanaged switch; doing so strips the timing guarantees and introduces unpredictable queuing delays. To integrate legacy machines, you must install a TSN-capable edge gateway or a dedicated proxy.

This gateway acts as a boundary, participating in the synchronized TSN network on one port while providing standard industrial Ethernet (like PROFINET RT or EtherNet/IP) or serial protocols on the other. When engineering these systems, ensure you consult the OPC Foundation specifications for interoperability guidelines. Mixing vendors for TSN infrastructure requires meticulous validation of the time-aware shaper parameters and network configuration tools (often referred to as a Centralized Network Configuration or CNC system). Without a unified CNC, managing the schedules across diverse hardware becomes a significant bottleneck.

Conclusion

Deploying OPC UA PubSub over TSN provides the missing link for true vendor-agnostic, deterministic communication on the factory floor. While the hardware requirements and network scheduling present a steep learning curve, the resulting performance and scalability are unmatched for complex motion control and synchronized automation cells. As industrial Ethernet continues to evolve, mastering these protocols will be a definitive advantage for system integrators.

Frequently Asked Questions

What hardware is required for TSN?

Both the PLCs (endpoints) and the network switches must contain specialized silicon that supports IEEE 802.1 TSN standards, specifically hardware-based clock synchronization and time-aware traffic shaping. You cannot achieve this via software updates on standard Ethernet ports.

Can I route standard IT traffic over a TSN network?

Yes. The primary benefit of TSN is that it allows standard best-effort IT traffic (like TCP/IP) to coexist on the same wire as critical control data without impacting the deterministic timing of the control packets.

Is OPC UA PubSub secure?

Security is handled at the application layer. OPC UA PubSub supports message signing and encryption to protect UDP multicast data from spoofing or eavesdropping on the plant floor.

Looking to upgrade your control system architecture? Browse our premium automation assets and pre-configured communication blocks in the AutomationView Store to accelerate your next deployment.

Share this article

Stay Updated with Learning

Get the latest articles and news delivered directly to your inbox.

Log in to Subscribe

You must be registered and logged in to manage subscriptions.

Recommended for you

Inside PROFINET IRT: A Comprehensive Configuration Guide for Motion Control

Learning
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    A["PLC Sync Master"] -->|"Isochronous Clock"| B["Axis 1 (Slave)"]
    B -->|"Hardware Sync"| C["Axis 2 (Slave)"]
    style A fill:#0d9488,stroke:#fff,color:#fff
    style B fill:#2563eb,stroke:#fff,color:#fff
    style C fill:#2563eb,stroke:#fff,color:#fff
AutomationView Icon AutomationView
calendar_month

Inside PROFINET IRT: A Comprehensive Configuration Guide for Motion Control

When engineering high-speed motion control systems, standard real-time communication often falls short. In applications like robotics, CNC, or tightly coupled electronic gearing, a variance of a few milliseconds in communication can translate to mechanical collisions or significant product defects. Achieving precise coordination requires a hardware-synchronized, deterministic network architecture. This is where PROFINET IRT configuration comes […]

Read Article arrow_forward

Deep Dive: Implementing MQTT Protocol for PLC-to-Cloud Messaging

Learning
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    classDef default fill:#1E293B,stroke:#475569,stroke-width:2px,color:#F8FAFC
    classDef highlight fill:#3B82F6,stroke:#2563EB,color:#FFFFFF

    A["PLC (Publisher)"]:::highlight -->|Publish Data| B("MQTT Broker")
    B -->|Subscribe & Forward| C["Cloud Analytics"]
    C -->|Publish Command| B
    B -->|Subscribe & Receive| A
AutomationView Icon AutomationView
calendar_month

Deep Dive: Implementing MQTT Protocol for PLC-to-Cloud Messaging

Transitioning from traditional polling protocols to event-driven architectures is a major hurdle for industrial engineers connecting the shop floor to the cloud. While Modbus TCP and OPC UA excel in deterministic, local networks, they often struggle with latency and bandwidth overhead when scaled to wide-area or cellular networks. PLC MQTT integration solves this by introducing […]

Read Article arrow_forward

5 Essential OPC UA Integration Tips for Secure PLC Success

Learning
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    A[OPC UA Setup] --> B[Use Subscriptions]
    A --> C[Enforce Security]
    A --> D[Optimize Intervals]
    A --> E[Standardize Models]
AutomationView Icon AutomationView
calendar_month

5 Essential OPC UA Integration Tips for Secure PLC Success

Configuring a PLC to talk to a plant-level network often exposes unexpected bottlenecks—especially when polling rates overwhelm the controller’s CPU. While OPC UA Integration provides the standard for bridging operational technology (OT) and enterprise systems, a naive implementation will quickly cause network congestion and security vulnerabilities. Many engineers connect their PLCs using default settings, resulting […]

Read Article arrow_forward