Troubleshooting
Two SCADA servers writing to one PLC over Modbus TCP
Short answer
Yes: a Modbus TCP server accepts multiple client connections, so both SCADA systems can read the PLC at the same time. Conflict appears only where both applications write overlapping addresses, because the last write to a register or coil wins. Inventory every writable address in both projects, then either make the second system read-only or give the PLC command ownership with a separate request area per client.
On this page
Yes — two SCADA servers can run against one process PLC over Modbus TCP on the same network, and both can read it at the same time with no conflict. The problem to design for is the one already suspected: writes. A Modbus TCP write does not reserve the register it touches, so once both applications can write the same address, the later write replaces the earlier one, and the PLC task running in between may have already acted on the first value. Connection capacity is a separate, documented limit to check first. The fix is a writable-address inventory across both projects, then one of two decisions: make the second system monitor-only, or give the PLC command ownership with a separate request area per client.
Two clients, one server: what the protocol allows #
In Modbus TCP the SCADA systems are clients and the PLC is the server. Reads are request-and-response with no state kept on the client side, so every client inside the server's connection budget can poll at once without corrupting anything. Reading a register does not lock it.
The budget belongs to the controller, not to Modbus. The protocol sets no client limit; each server implementation documents its own. Schneider Electric documents the M580 BMENOC0301 communication module for 64 simultaneous Modbus TCP server connections, with the module maintained on firmware v2.08. On S7-1200 CPUs the documented pattern is one MB_SERVER instance per connection, each instance executed independently and listening on its own port. Check the figure for your CPU, then count everything that already holds a session on it — historian, gateways, engineering station, both SCADA systems.
Several concurrent sessions are ordinary for a controller; the same PLC can run separate Modbus links side by side, as in how a PLC runs two Modbus networks at the same time.
Capacity decides whether both systems connect. It decides nothing about who controls. Only overlapping writes do that.
Confirm both connections before testing writes #
- Open the diagnostics of both SCADA systems with both connected. Each should show an established session and good tag quality. If one client drops when the other connects, suspect the server's connection budget or the network path, not the logic.
- If a gateway or one of the clients cycles between Connecting and Disconnected, work through the subnet fix for a SCADA gateway cycling between Connecting and Disconnected before touching the write logic.
- Add the two poll rates together and compare the total against the PLC's response times. Two clients double the request load; heavy combined polling slows updates while both connections stay open.
- Compare one displayed value on each screen against the online PLC value. If a screen shows stale values, fix the read path first — start with why HMI values show question marks when PLC communication times out — because stale displays imitate command contention.
Both sessions stable and values matching: go to the write inventory. Sessions dropping or values disagreeing: fix that first, or every later write test reads like a conflict.
Inventory every write path in both projects #
A read-only display cannot compete with anyone's command. Writes come only from configured actions, so walk both applications and list them:
- Operator entries and buttons, including momentary buttons that write one state on press and the opposite on release
- Scripts and macros
- Recipe loads
- Scheduled or cyclic writes
- Anything the driver writes on startup or on reconnection after a communication loss
For each action, record the resolved destination: the raw protocol address, register count and data type of the actual Modbus write. Single coil and single register writes are function codes 5 and 6; multiple coil and multiple register writes are 15 and 16. Do not compare tag names — two differently named tags can resolve to the same storage, and identical names in separate projects prove nothing.
Separate the two faults this inventory can find. A binding fault, such as a button bound to the wrong address, misfires with only one SCADA connected. An ownership fault needs two legitimate writers on one destination. Fix bindings first.
Every destination writable from both projects is a conflict candidate. If the list comes out empty, the second system is already monitor-only in practice — record that decision so it stays true after the next project change.
What a successful write proves, and what wins #
A write response that returns success says the server accepted the value into that register. It does not say the logic acted on it, that permissives allowed it, or that any actuator moved. It also does not reserve the address against the other client's next request: a later write to the same register overwrites it without ceremony.
'Last writer wins' describes the storage, not the process. Worked example: both SCADA projects write the dosing pump speed setpoint to holding register 40110 — SCADA 1 from an operator entry, SCADA 2 from a recipe load. The PLC task runs the command logic every 20 ms. The operator writes 1800; the recipe lands 30 s later and writes 1200 to the same register. Between the two writes: 30 s = 30,000 ms, and 30,000 ms ÷ 20 ms per task cycle = 1,500 executions of the command logic, all of them acting on 1800. The process holds the first setpoint for 1,500 task cycles, then jumps to 1200.
The two writes were half a minute apart and the conflict happened anyway. Which value the logic sees at any instant is execution order — the same last-action-wins rule that governs how scan order makes the last rung win for internal tags. Shared storage with several writers and no arbiter behaves this way throughout a control system, and it shows up inside PLC code too — see fix for a function block Boolean output where the last one wins. For shared control, the arbiter has exactly one place to live: the PLC.
Give the commands an owner #
| Arrangement | Who decides control | Use it when |
|---|---|---|
| One writer, one monitor | The SCADA permissions | Only one station ever needs to command |
| A request area per client plus PLC ownership logic | The PLC | Either station must command |
| Both clients write one shared command block | Arrival order | Never — this arrangement is the fault |
Monitor-only second system: disable every write path the inventory found, including startup and reconnection writes. Where the driver offers it, restrict that client to reads at the device or controller layer too, so the application setting is not the only protection.
Ownership in the PLC: both systems keep reading everything, and each writes commands only into its own request area — a dedicated block of registers per client, defined once in the PLC and published to both projects. The PLC task reads the active owner's block, validates each request against operating mode and permissives, and writes acceptance or rejection plus the current owner into a status area both systems display. A failed validation returns a rejection status, never silence.
Define the handover and the communication-loss behavior before commissioning. Alarm the loss on the SCADA side as in how to create an alarm for PLC communication link loss.
Commission the arrangement #
- Back up both SCADA projects and the PLC application, and keep the writable-address map from the inventory with them.
- For a monitor-only system, disable the writes, then prove it: attempt a command from the second system and confirm the PLC value does not change.
- For ownership logic, run the first command tests with actuators in a safe state or disconnected, because the first live proof of new arbitration logic on running equipment is how the wrong owner moves the wrong output.
- Watch four values separately during tests: the owner, the requested command, the accepted command, and the equipment feedback.
- Test handover: release from client A, confirm its request area is clear, then accept a command from client B.
- Test loss: drop client A's connection with a command pending, and confirm the PLC neither executes the stale request nor keeps acting on the last value — it moves to the defined safe behavior.
The decision #
- The second system only needs visibility: make it monitor-only, with writes disabled in the application and read-only enforced at the device or controller layer where the driver allows it. Two clients on one Modbus TCP server is then a normal, supported arrangement.
- Both systems must command: give each client its own request area and put ownership in the PLC. The SCADA systems never write process outputs directly.
- Any destination writable from both projects with no arbiter: do not run it. Arrival order is not an ownership scheme, and the register's old value says nothing about which screen set it.
Questions asked
How many Modbus TCP clients can connect to one PLC server?
The Modbus protocol sets no client limit; the controller's server implementation does, as a documented per-model figure. Past that figure, the next client fails to open a session or an existing session drops, which looks like a communication fault rather than a control conflict. So a client that cannot connect while others hold sessions is investigated at the connection budget first, before anyone touches the write logic.
Do both SCADA systems have to write at the same instant for a conflict?
No. The conflict comes from overlapping write paths, not from simultaneous arrival. If the first server writes 1800 to a register and the second writes 1200 to the same register half a minute later, the second still replaces the first, and the PLC task runs on 1800 in between. Staggering poll cycles or write schedules only makes the fault intermittent; it never removes it.
We gave the second system different tag names. Is that enough?
Tag names are local to each project. Only the resolved protocol address, the register count and the data type of the actual write matter. Drivers also number registers differently — the same holding register shows as 40110 in one tool and as address 109 in another — so compare raw addresses and lengths across both projects. A 32-bit value written as two consecutive registers also overlaps the single-register tag beside it.
How should ownership hand over from one SCADA system to the other?
As a sequence, not an event. The active owner releases control and stops writing to its request area; the PLC clears or locks that area and confirms no command is pending; only then does it start reading the other client's request area. Commands arriving during the handover window are rejected with a status the losing client can display, and a request still pending when ownership changed is never replayed just because its source became owner again.
What should the PLC do when the owning SCADA connection drops?
The server cannot tell a dropped client from a silent one, so the ownership logic must watch the connection itself: the controller's server-side connection status or an application heartbeat written by the owning client. On timeout, switch to the defined behavior — freeze the command outputs at their last safe state, or revert that equipment to a defined local mode — and raise the loss so operators know which station lost control.