Modbus slave to slave

secs

Member
Join Date
Aug 2015
Location
Office
Posts
65
Just putting together some software and looking at tying 2 projects together. I have some Modbus components that suit each. One being a Pascal project and the other being a Node-Red project. Both have slave Modbus components. Can Modbus do slave to slave? I cant think of a situation I have tried that with
 
Like many other protocols, Modbus works with the Request-Response method.

There must always be a Master that begins the communication with a Request, a slave can only answer.

Slave to Slave is not possible.
 
Correct.



One device can be both a modbus master and a modbus slave (although typically not in the same network).


On a serial bus (typically RS485) there can only be one modbus master. Limited bandwidth and the absence of low level collision detection would lead to unreliable communication with multiple masters on the same network.



With modbus/tcp over ethernet you could potentially have a large amount of both masters and slaves on the same network as there is usually plenty of bandwidth in an ethernet network and the underlying network protocol has built-in collision detection. Typical slaves can reliably communicate with one master only though.


To make things more confusing: with modbus/tcp the same device could potentially be both a modbus master as well as a modbus slave. In theory you could even have two PLC's that are both modbus master as well as modbus slave and as such communicate with each other. Not sure if there is any practical use for that.
 
To make things more confusing: with modbus/tcp the same device could potentially be both a modbus master as well as a modbus slave. In theory you could even have two PLC's that are both modbus master as well as modbus slave and as such communicate with each other. Not sure if there is any practical use for that.
Since Modbus is mostly done by software (functions running at the same time as control logic), I'd say that it would help not so much because of bandwidth, but to reduce the cycle time on the other PLC.

A Modbus RTU to TCP converter is both a master and slave... and more interestingly, a lot of power meters nowadays tend to be ModbusTCP Slaves and ModbusRTU masters to interface with simpler meters.

Yes, I've played a bit with Modbus lately. LOL
 
No, you would need to either write a custom driver to handle what youw ant to do, or use a hardware device, like a red lion datastation, or use a software solution. I think kepware has a software package that can be setup similar to a datastation where you can pass data between two different devices.
 
I believe you could probably put a Red Lion protocol translator in the middle as the masters to both and map the software in the middle. Talk to Martin Daines at Control Logic.
 
In theory you could even have two PLC's that are both modbus master as well as modbus slave and as such communicate with each other. Not sure if there is any practical use for that.

I actually do this all the time with B&R PLCs for simple stuff. Just started doing OPC UA instead for more complicated things though.
 
Serious question, is the requirement for a Slave to Slave comms in Modbus RTU really common?

The short answer is yes, devices sending information to other devices is more and more common due to everyone expecting more from the electronics on a machine. The medium answer is that you do this with a master middle-manning the communication if you are stuck with devices that only act as Modbus slaves. The longer answer is that smarter devices can just be a ModbusTCP master and slave at the same time.
 
Serious question, is the requirement for a Slave to Slave comms in Modbus RTU really common?
The short answer is no (at least my short answer is). The slightly longer version is no but only because it's not something that can be done so scenarios where it can be done don't come up. Spectrum's Gateway wasn't designed to provide MB slave to slave communications but because of how it operates it can do it and the feedback is indicating that there are applications where it will be helpful.
It's worth noting that it will do DF-1 to Modbus RTU and EtherNet/IP to Modbus RTU (and TCP) as well as many other combinations.
 
Yes its an old post but relevant so no need to start a new one...

I just came into a situation where this slave to slave, or multiple master would be helpful. I would like to interrogate a packaged system for info, no control, just status and vitals.
But this system is from a third party and they are using modbus over cellular to communicate to their own monitoring system, much like solar companies do now that I think about it. If I could either poll directly or even "listen in" to that stream I could get all the info I needed.

I'm not ready to add a gateway or interfere with their comm path so I'm just thinking out loud how I can get what I need with minimal effort.
 
Your best bet for success is sniffing data on an RS-485 network. For everything else, who knows.



TL;DR


It's not a big deal to eavesdrop on RS-485; RS-232 is a bit more complicated, but doable; ethernet/TCP/IP would require a sniffer (ethernet adapter in promiscuous mode), again fairly straightforward for RaspberryPI or PC (Linux certainly, probably Windows too), but I doubt it could be done on a PLC.

The headache would be the parser: because Modbus protocol is request-reply, using any existing Modbus RTU master PLC instruction would be problematic. Modbus TCP is possible: TCP servers can in principle, and often do, handle multiple clients, so it would depend on the Modbus TCP implementation.

That said, if you are reduced to sniffing traffic, the Modbus protocol is fairly simple to decode. The main requirement would be knowing up front which Modbus server (IP address and/or node address), and which messages, you were looking for.

And while that's all possible, for the amount of effort it would take it may be preferable to instead reconfigure the entire network to have one client that buffers all the data in one place, and that also runs a server that every other client queries. This is pie in the sky, and even this may not be possible with your existing third-party setup; it would also introduce delays that may not be acceptable.

Sniffing data on an existing Modbus RTU server on RS-485 would probably need a secont serial port, because the existing port is already being used by the server instruction.
 
Yea, I get all that, Modbus and I have been dancing quite a bit over the last year. - just thinking out loud in case someone has created a widget for such things. With such a small use case its unlikely but you miss 100% of the shots you don't take. :)

I'll most likely just get hold of the vendor and work something out.
 
I know you said you're not ready to use a gateway, but ICC's Mirius gateway would work well for your application. In addition to the standard master and slave roles, the Mirius supports a Modbus RTU Sniffer driver that allows you to sniff data from an existing Modbus network. The driver is completely passive and works by listening in on the existing requests and responses.

The Mirius is a two-port serial device. You would configure one port for Modbus RTU Sniffer and could configure the other port for any other supported protocol, such as Modbus RTU Slave, Modbus RTU Master, BACnet MS/TP Server, etc.

Details on the Mirius can be found on its product page here:
http://www.iccdesigns.com/protocol-gateways/66-mirius.html

Full Disclosure: I am the product specialist at ICC for the Mirius.
 

Similar Topics

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
68
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
139
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
831
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
545
Hello all, I am working on project to pull data from G4/G5 ABB Totalflows via a modbus master/data radio. I don't have a physical totalflow with...
Replies
5
Views
1,768
Back
Top Bottom