When an engineer starts using Modbus TCP (the Ethernet one) instead of Modbus RTU (RS485 version), one of the first things that they notice is that Modbus TCP supports multiple masters. Over the years, this has befuddled many a system designer who needed to move data from one Modbus master to another.
A Modbus RTU Master is a master and only a master. It doesn’t act like a slave, in fact it can’t. It’s not built that way. It sends a message to an RTU slave device and gets an answer. That’s it. And there can’t be another master. Only one set of signals can be on the RS485 link at any one time. Either the single RTU Master is transmitting or one of the RTU Slave devices is transmitting. There is no other possibility.
In cases where there were two Modbus RTU Masters, each on a standalone network segment where it was the one and only master on that segment, there was no standard way to move data between the two masters. The devices had to have some other communications channel where they could share data. Or they could both have a second RS485 port with one of them as a Modbus master and the other one as a slave on the second device network. Both devices could then share data from their respective networks.
Technically, that worked, but it was rarely implemented. More likely, a controller with two RS485 ports would be the master of the two different networks. Slave data from both networks would end up in its data table, and if a device on network A needed a value from a device on network B, the master on network B would get it out of the data table and write it into the device on network B. Not elegant, but it worked. Usually this happened in systems where there were tens if not hundreds of Modbus RTU devices.
With the introduction of Modbus TCP, everything was simplified and easier. With Modbus TCP, controllers can much more efficiently use the bandwidth on Ethernet to be the Master to hundreds of Modbus TCP devices. Where RS485 had an electrical limitation of 32 devices, Ethernet is unlimited. Operating RAM is the only practical limitation.
And with Modbus TCP there is the ability for a network designer to use multiple masters if they so choose. Device X is no longer tied to a single Modbus TCP Master. One, two, or any number of masters are free to query, and yes, write to, that Modbus TCP device. If there are two controllers in a machine, both controllers can get access to the data of Device X whenever it’s needed. That creates a much more easily managed system than provided by Modbus RTU.
This works because in computer science terms, Modbus TCP is stateless. Stateless means that the device processes a single transaction and retains no information from that transaction. That is the opposite of protocols that use states, such as EtherNet/IP or Profinet IO. These protocols make a connection, and messages are processed within the context of that connection.
Since Modbus TCP uses stateless connections, it is possible for two or more masters to write to the same register or coil in a Modbus device – and write different values. There is nothing to prevent Modbus TCP Master 1 from setting the speed of a motor to 100 rpm and a second Master to set it to 1000 rpm. The Modbus TCP device, which supports multiple TCP connections, happily processes both messages and sets the motor speed to the value of the last write message received.
RTA has a full line of Modbus TCP products that can be used in all sorts of Modbus applications – contact our inside sales team at 800-249-1623 and they will be glad to help you.