Modbus 1 slave, 2 masters

Nearbyatom

Member
Join Date
Jul 2017
Location
USA
Posts
38
I'm sure this has been asked before but I'm looking for a modular plug and play option.

We have:
HMI (Delta DOP-B03S211 has 2 RS485 ports or 1 RS232)
Modem (Advantech Smartstart)
Slave 1 (Proprietary board).

HMI and Slave 1 have software written for the 2 to be married together. Minor code changes is an option. Changing cables and rewiring is an option though. Adding a PLC or another device somewhere on the network to handle the com traffic is an option as well. The HMI and modem would be reading/writing the same tags on the slave.

I would be looking for a solution to plug into the existing network.

The ideal situation would be this: HMI--Slave 1--Modem. That way both the HMI and modem can write into slave 1 at the same time not having to do any major code writing for the HMI.

Please advise. Thanks.
 
I assume slave1 has only 1 485 port? A plc with 3 come ports (in from hmi, in from modem, out to slave) may be the easiest. You would obviously need to write modbus logic in plc.
 
Are you using a Red Lion? If so it is possible to map 2 Modbus masters - Modbus can normally only have 1 master.
 
I assume slave1 has only 1 485 port? A plc with 3 come ports (in from hmi, in from modem, out to slave) may be the easiest. You would obviously need to write modbus logic in plc.

I've done that before but that was on a different system. If I do that (use the PLC to manage traffic), the HMI would be reading modbus addresses from the PLC and not the slave 1 addresses. That would require me to rewrite the HMI software which would be a lot of work.
 
Red Lion has a protocol converter in it. You use that. Talk to the Red Lion guys - they should be able to tell you how to do it. I think you set up a master on each side of the Red Lion and translate in the middle.
 
I've done that before but that was on a different system. If I do that (use the PLC to manage traffic), the HMI would be reading modbus addresses from the PLC and not the slave 1 addresses. That would require me to rewrite the HMI software which would be a lot of work.

Not necessarily. Some PLCs let you assign the modbus registers you want, for example the Productivity2000/3000 from Automation direct.

Example:
PLC read register 40001 from slave and save value to a tag: Slave_Value1. You can assign the modbus register 40001 to Slave_Value1.
 
Take a bit of a step back. We get the question every once in a while "can a Modbus RTU network have two Master devices".

The answer is "No". Modbus RTU is by design and by definition a single-master protocol.

The problem is a basic one of data bus access. The only time a Master device knows it's not supposed to transmit is when it's waiting for a reply from a Slave device.

There's no mechanism, either at the RS485 level or at the protocol level, for a Master device to listen for another Master device's traffic so that it doesn't collide and corrupt the transmission.

Ethernet used to work that way, because devices could detect a collision and there was a re-try randomizer to keep them from colliding immediately afterwards. There's simply no practical way to do that at the RS485 level, without re-inventing the technologies of Ethernet or CAN, except slower. Simply connecting two Modbus RTU masters to a single slave over RS-485 will result in a system that works occasionally by coincidence.

A Red Lion DSP might be usable to serve as a broker for this data, but it's an unusual application.

Does the Slave device have an RS-232 or an RS-485 port ?

How much data are we talking about ?
 
You can have 2 masters 1 slave if you use an arbitrator. I have done it many times before.

The plc09 arbitrator is 3 serial ports rs232 so tou.may need converters
https://www.calta.com/plc09.htm

The IP100 is. Fewer unit with serial and Ethernet. It has 1 485 port

https://www.scadalink.com/products/scadalink-series/100-platform/ip100/

I have used both with great success. But I am not sure if there is a 485 only type unit out there. My advice is converters or have the ip100 close to the masters and then 485 to the slave? Or vice versa
 
You can use two RS232-Ethernet converters and ethernet switch.
Connect modem with ethernet port to Modbus TCP port between converters.
PLC side Converter handles then querys from HMI (RS232 converted to TCP with HMIS side converter) and modem (TCP).
 
Slave = Server, Master = Client. The only limitation to having multiple clients is collision avoidance on serial as Ken states, which can be handled by a 3rd party serial arbitration device (I've only seen these as PCI cards for a computer, not stand alone). Another option is to put Modbus TCP converters on everything that can't natively use ethernet and let the TCP protocol fix it for you ($190 each from Automation Direct).
 
I contend that any of these Ethernet solutions depends on the provided solution understanding the query-response nature of Modbus because of the limited response nature of most Modbus RTU slaves.

I have witnessed two different Modbus RTU products, both of which failed to reply when bombarded with sequential polling requests from an ethernet-RS-485 converter where the proposition was that being Ethernet, the converter would hold and sequentially feed out the query/polls from each of two master/clients. It did exactly that, but the slave balked at getting a 2nd sequential request before it completed the reply to the first. Just puking out the client query at ethernet speeds, before the RTU slave responds has a high likelihood of failure, unless the Ethernet arbitrator understands what's going on and waits for the reply to the first poll (routes it/addresses it to the proper client/master) before hitting the slave with the 2nd request/poll.

There are commercial bus arbitrator products designed for Modbus from outfits like http://www.miille.com/
 
I would think any multip-port Modbus gateway from Red Lion, Prosoft, etc. should work. I'm more familiar with Prosoft, and I know the Modbus TCP to Modbus RTU gateway has 4 independent Modbus ports that can be either master or slave, RS232 or RS482. Since each serial port shares a common database, this might make it even easier since you want the HMI and modem to write to the same addresses... So define two ports as slaves for the HMI and modem, and the third port as a master reading and writing to your slave.

CH
 

Similar Topics

Hi, I currently have a s7-1200 enabled as modbus tcp slave for customers master to connect to freely. Now my customer want to add a new modbus...
Replies
8
Views
4,666
Does anyone have an example project of the cm ptp ET200 SP HA with 410-5H DCS (PCs7 9.1 SP1) for MODBUS MASTER/SLAVE communication ?
Replies
2
Views
130
Hello, I set up my Micro820 with a basic mapping. When I try to run a script to read the addresses I get errors for illegal addresses...
Replies
2
Views
172
Looking for some advice on a project. The controller is a BMEP584040. There is a RIO ring with several drops with Quantum I/O. On this ring...
Replies
12
Views
1,001
CR3000 HMI ModBus TCP/IP Master has gotten erratic after increasing block size to 24 at DA70A in Protocol 1. What should a practical guide be for...
Replies
2
Views
560
Back
Top Bottom