IMDHMIControls LibraryShop main store

Selection guide

OPC UA versus EtherCAT for PLC-to-PLC data exchange

Industrial networks Published 9 min read By IMDHMI controls team

Short answer

Choose OPC UA when the exchanged values have no cycle deadline and both PLCs share one Ethernet network; choose EtherCAT — an NX1P2 master against an X20IF10G3-1 slave — once the receiving logic needs each value inside a bounded control cycle. Keep the EtherNet/IP converter path only when it is a fixed supplier boundary. Compute the data-age budget before ordering any interface module.

On this page
  1. What each path delivers
  2. The data-age test that decides
  3. Taking the OPC UA path
  4. Taking the EtherCAT path
  5. When the converter path stays
  6. The decision for each case
  7. Questions asked

Between an Omron NX1P2 and a B&R X20 controller, the network choice is a timing decision, not a byte-count decision. Pick OPC UA when the exchanged values have no cycle deadline — monitoring, recipes, setpoints, coordination flags — and the two PLCs can share one Ethernet network. Pick EtherCAT, with the NX1P2 as master and a B&R X20IF10G3-1 module as the slave side, as soon as the receiving logic needs each value within one of its own task cycles. Keep the EtherNet/IP converter path only when that converter interface is a fixed supplier boundary. One number decides: compute the data-age budget first, and the worked example below shows how a 10 ms requirement rejects a 250 ms poll and passes a 1 ms bus cycle.

What each path delivers #

OPC UA is a client/server exchange of named variables over the controllers' Ethernet interfaces. One CPU hosts the server and its address space; the other connects as a client and reads or writes by node. Data moves when the client asks or when a subscription publishes, and the model promises secure, authenticated sessions carrying well-typed values — it promises nothing about arrival time. That is why OPC UA is the exchange recommended where machines feed supervisory levels: secure connection and data transmission are the point, and cycle time is not in the contract.

EtherCAT is a master/slave fieldbus with a fixed cyclic process image. The master owns the clock: once per bus cycle it writes its outputs and samples the slave's inputs, and the bytes land in the same offsets every cycle. No names travel on the wire, only the byte map both sides agreed to, and there is no request or response — the data age is bounded by the cycle, not by network load.

Path B&R side NX1P2 side Delivery behavior Right when
OPC UA client or server on the CPU's Ethernet port; no interface module client or server on the Ethernet port (port 1) named variables, delivered on request or per publishing interval; age follows that interval values may be hundreds of milliseconds old
EtherCAT X20IF10G3-1 EtherCAT slave module in the X20 station EtherCAT master on the built-in EtherCAT port (port 2) fixed process image copied every bus cycle; age bounded by the cycle the consuming task needs the value within one task cycle
EtherNet/IP through a converter X20IF10D1-1 EtherNet/IP scanner on the CPU or on a remote X20 station the converter as EtherNet/IP adapter cyclic assemblies through a gateway that keeps its own copy of the image the converter interface is fixed by the supplier contract

The first two rows are the engineering choice; the third is a constraint, handled as such further down.

The data-age test that decides #

Write one number before comparing datasheets: how old the value may be when the receiving logic uses it. The clean basis is the consuming task's own cycle — a status byte that interlocks a task running every 10 ms may be at most 10 ms old, and a recipe setpoint reviewed once per second may be a full second old. Everything after that is arithmetic against the budget.

Worked example, with illustrative inputs — example numbers that make the arithmetic concrete, not vendor specifications:

  • Requirement: the NX1P2 task that consumes a B&R status byte runs every 10 ms, so the data-age budget is 10 ms.
  • OPC UA case: the client polls every 250 ms and the session adds about 20 ms of response and network time at normal plant load. Worst-case age = 250 ms + 20 ms = 270 ms. Against the budget: 270 ms / 10 ms = 27, meaning the interlock can act on data 27 task cycles old. This path fails the requirement.
  • EtherCAT case: a 1 ms bus cycle refreshes the process image once per cycle, so the worst-case age is about 1 ms plus the master task's own handling. The cycle age clears the budget with a tenfold margin. This path passes.

What moves each number: on OPC UA, the poll or publishing interval you configure and the session load — a 500 ms interval puts the worst case near 520 ms, still fine for a per-second recipe check and hopeless for the interlock. On EtherCAT, the bus cycle you configure and the master task's jitter — a 1 ms image under a 2 ms requirement still passes, while a 4 ms image does not.

The rule behind the arithmetic: if the consuming logic must act within one of its own task cycles, EtherCAT. If the value may be several cycles or a human-scale interval old, OPC UA — no interface module to order and no byte map to maintain on either side.

Taking the OPC UA path #

Split ownership by producer: each PLC serves the values it generates as the OPC UA server and reads the peer's values as a client, which turns one bidirectional requirement into two ordinary sessions instead of a custom link. Then settle the feasibility check that belongs to the peer CPU: Omron's specification gives the NX1P2 a built-in EtherNet/IP port (port 1) and a separate built-in EtherCAT port (port 2), and the OPC UA role is tied to the CPU's unit version, so confirm the version supports it — if it does not, the EtherCAT path below becomes the answer by default.

On the B&R side, both roles run on the CPU's Ethernet interface: the server for supervisory consumers and the client for reading the peer. The OpcUa_any device covers reading standard data types from another server, and the AsOpcUac library handles the cases that device route does not.

Give each controller a fixed place in the shared network's addressing — for example the B&R CPU at 192.168.1.50 and the NX1P2 at 192.168.1.51 on one subnet — and confirm the OPC UA endpoint is reachable through whatever routing and filtering sit between them, in both directions. Then write the exchange contract before either tool opens: every variable, its type, its direction, the update behavior (poll period or subscription publishing interval), and the reconnect behavior after a broken session. Map received values into dedicated communication variables with a freshness flag — never directly into machine logic — so a dropped session cannot leave a stale value that the logic mistakes for a live one. Expect a certificate exchange at first connect: OPC UA sessions are secured and authenticated by design, and two PLCs meeting for the first time must establish trust like any client and server pair.

Taking the EtherCAT path #

The roles are fixed by the technology, so verify them before any configuration import: the NX1P2 is the master on its built-in EtherCAT port (port 2), and the B&R station is the slave through the X20IF10G3-1, an X20 interface module equipped with an EtherCAT interface that puts the station's I/O onto the EtherCAT network as the slave side. A master paired with a master, or a slave with a slave, cannot establish the cyclic relationship no matter how clean the import looked.

Build the process-image contract before either tool opens: exact input and output byte counts in both directions, offsets, signedness, scaling, byte order, and the meaning of every status bit. Enter identical lengths on master and slave, and carry a validity or heartbeat bit whenever the receiving logic must distinguish live data from a frozen image. Define the loss-of-communication response in the design phase, because it is a machine behavior decision, not a communication setting.

One safety note: if a partner byte can release a guard or command motion, qualify it with that validity bit and drive the receiving logic to its defined stop when the bit freezes — a frozen cyclic image is indistinguishable from live data, and clean signal delivery is no substitute for a validated safety function.

Commissioning closes on the slave's own state machine: an EtherCAT slave climbs through init, pre-operational, safe-operational and operational, and the master reports that state acyclically alongside the cyclic image. The exchange is proven when the slave reports operational and a test value forced at the sending controller appears at the receiving controller, with the right type and offset, within one bus cycle.

When the converter path stays #

The EtherNet/IP route through a protocol converter is not a third engineering option; it is a constraint accepted when the supplier side cannot change. In the setup behind this decision, the converter — an Anybus Communicator — presents itself to the B&R station as an EtherNet/IP adapter with its own device description, so the B&R side becomes the scanner: an X20IF10D1-1 EtherNet/IP scanner module, either on the CPU's local bus or on a remote X20 I/O station behind a bus coupler. The remote layout answers cabinet and network-architecture needs — distance, expansion, cable routes — and it makes a small exchange no simpler, so choose it only when the panel demands it.

Two failure patterns dominate this path, and both are configuration, not hardware. First, the device description imports cleanly and nothing flows: an EDS file proves the description parsed, not that cyclic data moves, and the checks that decide are scanner and adapter roles, byte counts and mappings — the ground covered by why an imported EDS does not prove EtherNet/IP cyclic I/O. Second, the connection runs while the adapter returns nothing: that points at the assembly contract between scanner and adapter, the pattern explained in why an Ethernet/IP adapter does not receive scanner outputs. And because a converter holds its own copy of the image between two unlike networks, the PLC must treat what it receives as buffered values that need their own application copy — the requirement described in why an Ethernet/IP gateway process image needs an application copy.

Hold this path to the byte exchange the supplier contract fixes, and put anything machine-critical on the EtherCAT design instead.

The decision for each case #

  • Values with no cycle deadline, both PLCs on one Ethernet network: OPC UA on the Ethernet ports, client and server split by data ownership, no interface module on either side. If the peer CPU's unit version does not support its OPC UA role, the EtherCAT answer applies instead.
  • Values the receiving task needs within its own cycle: EtherCAT — the NX1P2 as master on the built-in EtherCAT port, the B&R station as slave through the X20IF10G3-1. Order that module, not the EtherNet/IP scanner, and close the process-image contract before configuration.
  • The converter interface fixed by the supplier contract: keep the X20IF10D1-1 scanner against the converter's adapter, verify the assemblies byte for byte, and keep machine-critical signals off this path.
  • Physical reality behind both decisions: the NX1P2's Ethernet and EtherCAT services live on separate ports and separate networks, and one cable never serves both — plan them as two networks, not one.

Compute the data-age budget once, in the receiving task's own units, and the path names itself.

Questions asked

Is OPC UA limited to a few bytes between two PLCs?

No. Payload size is not the constraint; OPC UA moves typed, structured variables of any practical size. The constraint is timing: once the receiving task needs the value within its own cycle, the client/server model fails on data age, set by the poll or publishing interval you configure, no matter how few bytes cross the link.

Does an OPC UA subscription give fresher data than polling?

It cuts network load, not the worst-case age. A subscription publishes on change or at the publishing interval you set, so the value can still be one full interval old when the logic reads it. A 250 ms publishing interval behaves like a 250 ms poll at worst. Use subscriptions for bandwidth; use EtherCAT when the age must drop below the interval.

Which B&R interface module belongs to which network?

The suffix decides. X20IF10G3-1 is the EtherCAT slave module for the deterministic path, and X20IF10D1-1 is the EtherNet/IP scanner module for the converter path. An OPC UA exchange needs neither. Ordering the scanner module for an EtherCAT design, or the reverse, is the classic hardware mistake in this decision, and naming the network and role in the order line prevents it.

Can the two PLCs use automatically assigned addresses for the OPC UA exchange?

Treat both endpoints as fixed infrastructure instead. OPC UA clients store endpoint addresses, and the session trust binds to the server identity, so an address that changes on reboot breaks the client configuration and the trust relationship together. Give each controller a reserved address in the shared network's plan, and record it beside the exchange contract.

Does the PLC-to-PLC exchange need its own EtherCAT network?

No. The EtherCAT master sees the X20IF10G3-1 as one slave beside the machine's I/O terminals, and the exchange occupies part of the cyclic process data, so no second network is required. Do recheck the cycle time with every slave present, because the exchange frame rides in the same cycle as the I/O, and consider separating the networks if the peer exchange must not inherit the machine network's faults.

Keep reading

  • Troubleshooting

    Why OPC UA cannot expand EtherCAT I/O channel nodes on ctrlX CORE

    When an OPC UA client connects to ctrlX CORE but cannot expand the child nodes under an EtherCAT instance, the session itself is fine: the earlier EtherCAT and OPC UA Server apps do not resolve channel nodes below instances. From system image version 2.04 with the updated apps the I/O channels are exposed for reads and permitted writes; otherwise bridge the values through PLC real-time variables, which adds one PLC cycle of delay.

    Industrial networks

  • Comparison

    Which path links LabVIEW to an S7-300: OPC, direct Ethernet or MPI

    Use an OPC server with a supported Siemens S7-300 driver, hosted on Windows, unless the application must run entirely on the CompactRIO target. Siemens did not modify TCP/IP: S7comm is an application protocol over ordinary TCP on port 102, and a reverse-engineered library stays unverified until tested against your CPU, communication hardware and execution target.

    Industrial networks

  • How-to

    How to build a virtual PLC test bench for protocol practice

    One laptop runs the whole bench: a Modbus TCP server simulator, a master test client, a Node-RED OPC UA server and a SCADA trial connect over loopback, so you can practice addressing, sessions, scaling, alarms and fault diagnosis without a PLC. Work through three bounded projects and finish with seven pass criteria you can defend.

    Industrial networks

Replacing the DH+ Global Status Word on ControlNet