Most battery and generation sites speak both. The site controller or PLC usually offers OPC UA; meters, protection relays, inverters and BMS gateways often offer only Modbus TCP. A historian will meet both, so it is worth knowing what each gives you and where each will catch you out.
The short version
| OPC UA | Modbus TCP | |
|---|---|---|
| What you connect to | A server with a browsable address space of named variables | A device's numbered registers and coils |
| Finding the data | Browse folders and names | Read the device's register map document |
| How values arrive | Subscriptions: the server sends changes | Polling: the client asks, again and again |
| Timestamps | Source and server timestamps with each value | None; the logger stamps the time it received the reply |
| Quality | A status code with each value | None; failures show up as timeouts or exceptions |
| Data types | Typed: floats, integers, booleans, strings, structures | 16-bit registers; larger types span several, in a device-specific order |
| Security | Signing, encryption, certificates, user sign-in | None in the protocol |
| Typical devices | PLCs, site controllers, SCADA servers, newer gateways | Meters, relays, inverters, BMS gateways, older PLCs |
Where OPC UA wins
It describes itself. A historian can browse the server and offer the signals as a tree with names and types. With Modbus, someone has to type or import a register map, and a single wrong offset produces believable nonsense.
It sends changes, not snapshots. With a subscription, the server checks each value at the sampling interval and sends only those that changed at the publishing interval. On a site where most signals are statuses and slow temperatures, that is far less traffic than polling everything every second.
It carries time and quality. Each value arrives with the time the source measured it and a status code. A historian can store "bad, communication failure" rather than guessing, and timestamps stay right even if the network delays the reply.
It can be secured. Sign & Encrypt with certificates means values cannot be read or altered on the way. On a site with a remote-access link or a shared network, that matters.
The cost is complexity. Certificates have to be trusted in both directions, clocks have to be right for certificates to be valid, and controllers limit how many sessions and monitored items they will serve. Our guide to logging an S7-1500 over OPC UA walks through all three on a common controller.
Where Modbus TCP wins
Everything speaks it. Almost every meter, relay and inverter on a battery site has a Modbus TCP interface, and many have nothing else.
It is simple and predictable. A request, a reply, a fixed register layout. There is little to negotiate and little that changes between firmware versions.
It is light on the device. Reading a block of registers costs a small device very little, which is why it survives on equipment that will never run an OPC UA server.
Where Modbus will catch you out
Word order. A 32-bit float spans two 16-bit registers, and devices disagree about which comes first. The four common word orders are ABCD, BADC, CDAB and DCBA. Get it wrong and a power reading of 2,500 kW comes out as a tiny number or a huge one, and it may still look plausible on a trend.
Off-by-one addresses. Register 40001 in a document may be address 0 or address 1 on the wire, depending on who wrote the document. Check one known value before importing a whole map.
No quality. If a device keeps answering with its last value after its own sensor has failed, Modbus has no way to say so. A heartbeat or watchdog register that the device increments is the best defence: if the counter stops moving, mark the device's data as stale.
Polling cost. Polling 300 registers one at a time is 300 requests. Read contiguous blocks of up to 125 registers instead, and group signals by how fast they really change.
Which to use where
On a typical battery site:
- Site controller or PLC: OPC UA, with Sign & Encrypt, for everything the controller already gathers. This is usually the bulk of the signals.
- Point-of-connection meter: Modbus TCP is common. If the controller already reads the meter, log it from the controller to keep one time base; otherwise read the meter directly at one second.
- Protection relays: Modbus TCP for basic values. IEC 61850 carries much richer detail if your historian supports it.
- BMS and PCS: usually via the site controller. Read them directly only for signals the controller does not pass on.
The best answer is usually both, logged into the same historian on the same time axis, with each signal's quality kept.
How Vault handles each
Vault's OPC UA collector browses the server, negotiates its limits, uses Sign & Encrypt with two-way certificate trust and recovers missed notifications after a reconnect. Its Modbus TCP logger imports register maps, plans block reads, handles all four word orders and uses heartbeats to tell a quiet device from a dead one.