Modbus Many to Many Connection


Thread Starter

YC Soo

I know that we can connect from a modbus Master station to many Slave station by different station ID. Can we connect many modbus Master to many modbus Slave station with different ID form the same piece of RS485 cable (4-wire)?

Example: Master A will acquire data from Slave ID 1, 2 ; Master B will acquire and send data to Slave ID 3, 4 and 5; and even Master C will acquire from Slave 1, 5 and 7.
If yes, will the single hardwire connection cause the traffic congestion. or any other hidden problems might occur?


L. R. Schneider

Yes you can use multiple masters if done correctly. The problem you must overcome is to prevent multiple masters from communicating at the same time. You can do this by either having the functionality in the master software to detect activity on the circuit or by using an external arbitration device. The PLC09 Arbitrator from Calta or the BM85 from Schneider are two such devices.

Short answer - NO.

Long answer - you need to solve two issues:
RS485 - coordinate among several masters (not in the RS485 definition) - so only one transmits at any given moment.
MODBUS - each such master listens only to replies to its own queries.

It's a little unusual but you should be able to do it as long as only one master can poll a specfic modbus address at a time.

The slaves can handle multiple masters. From their prespective any master will do.

What you have to watch for is that both masters don't broadcast a request at the same time. I don't know how you'll be able to do this without somehow syncing the two masters.

Seems like more work than its worth. You should look at something like a data concentrator that will poll all the devices on the line and create 'virtual' modbus slaves that can be polled by multiple masters via multiple serial ports on the concentrator.

Lynn at Alist

Normally no - 1 Master per RS-485. However, if you send few messages, you could use logic programming or other tools to allow more than 1 Master to share the RS-485. Many wide-area-network systems use timing to allow slaves to issue master-like requests between the true-master's periodic polls. This would be near impossible for OPC or other CP masters which assume 100% control at any time.

The only way to do this full-time is by declaring 1 Master the Proxy Master for the RS-485.

For example, something like the Modbus Arbitrator allows 3 Masters to share a line of Modbus slaves. It is (in effect) a 4th Proxy Master which issues all polls on behalf of the other 3. The other Masters need to understand their polls may be responded to more slowly due to sharing the line.

Or a more forward looking method is to use Ethernet and Modbus/TCP bridges. It may add a bit to your start-up cost but will have wider future value. A single Modbus bridge acts as proxy master for the RS-485 line of Slaves. From 4 to 64 Masters (limit is vendor-specific) can connect by Modbus/TCP and poll any of the slaves. If most of your masters are PC, this is a rather cheap solution.

I've been coding such bridges for 5 years now. Our bridge is at: Plus we now offer a 2nd serial port to support not only the line of slaves, but 1 serial master. So if 1 of your masters is a small HMI with serial port and the other 2 are newer OPC-like systems, this would be a very good solution.

- LynnL, Snr Prin Engineer for email address see:

Frank Prendergast

Dear YC Soo,

In a standard RS485 network there can only be one master at one time. If you can synchronize that then you can have multiple devices be the master. The only tough part is putting the logic in to synchronize it when there is a unit offline. Sometime you will spend more time getting this logic put into place than is worth it but it depends upon how many devices and how critical the communication timeframe is.

Good luck.
Frank Prendergast

Rafael N. Jacomino

I got clobbered sometime ago in this forum by some ModBus purists arguing that this could not be done, but here I go again. Depending on the telemetry latency/frequency and amount of nodes, you can make a ModBus RS-485 multi-master implementation. I have done this with Modicon Momentum PLCs so here it goes. In your case you need to make one of your slaves a SYNCH device, which basically every master needs to poll as part of its “polling turn.” It will contain a TOD register, which every master utilizes to determine its turn and exclusively read/write the slaves he needs. Based on PLC timing “drift,” you will decide how often each master RESYNCHs itself. I have done this with a system that had 14 Momentum PLC slaves, 2 ATV28 VFDs, 6 PM620s (power meters), and 3 Momentum PLC masters that supervised the entire system (19.2kbaud). Each master polled the system every 2 minutes and contained a “communication start up sequence.” Your node count is smaller so give it a try. Good luck.