Modbus RTU to Modbus TCP gateway

NetNathan

Lifetime Supporting Member
Join Date
Nov 2011
Location
Corona, CA
Posts
2,199
I have some instruments that are Modbus RTU and I want to communicate to them (read information) over Modbus TCP.
What converters have you used to do this? Were they easy to configure?
 
I've seen two styles of that kind of gateway.

1st, generally cheaper, kind forwards the TCP poll straight through onto serial without buffering it. one message(TCP) to one message(serial). Some of them are really easy to configure via a webpage. The issue I ran into with those is that if there are multiple Modbus/TCP clients clamoring for access to RTU devices there can be a bit of traffic cross interferences. If one client asks for a bunch of registers and a second client asks for something, the second one goes on hold until the RTU device catches up. And even if two clients ask for the exact same array; the RTU slave has to answer twice. There is no efficency.

I even ran into a case were a SCADA client would disconnect/reconnect for every poll that it considered timed out (maybe one RTU slave in a chain of 'n' devices is offline). Which put a lot of burden on the embedded processor in the gateway trying to close and reopen sockets. A better behaved SCADA would have left the TCP port/socket open and just resent the poll.

The 2nd style is a buffering gateway, and they poll the RTU devices(chain) on their own timer, just one at a time. They pull apart the array and store it in memory. Then any number of TCP clients can come and get the array whenever they want. Adding clients doesn't increase the amount of messages the RTU slaves have to answer.

Buffering devices can even rearrange register indexes, change scaling (math on the register contents) or track RTU slaves being up/down and provide the TCP clients a state register. I've seen that done on the old FieldServer devices.
 
Morgan's general description of the two kinds of Modbus network gateways is excellent and concise.

Examples of the first type of "forwarding" gateway are the Digi One IAP, and that linked Automation Direct MB-Gateway. They take one Modbus / TCP command over Ethernet, use the Unit ID as the Slave ID, and perform that command over serial, then wait for the reply.

Because Modbus has no "transaction identifier" in the protocol, there's no way to make that particularly efficient. The gateway device can't tell which message the slave is replying to, so it just has to wait for a reply before it can process the next request.

I think the best example of the second type of gateway is a Red Lion or Prosoft device, that uses an internal data table to store information so it can run some optimization. If multiple Modbus/TCP clients are asking for the same Modbus RTU slave device data, a buffering gateway knows it just received that data from a given slave device and can offer it up to the Modbus/TCP clients without doing another transaction on the serial side.

For applications where you just need a simple translation between physical network types and Modbus TCP <-> RTU protocols, with one client and one message at a time, the first type of gateway is sufficient.
 
Moxa MB3170 is a simple and easy to use gateway i have found. i Agree with "the_msp"


very simple to configure. i can even send you a config file for a starting point to fine tune from there.
 
Last edited:

Similar Topics

Dear All, i am trying to connect Danfoss inverter with s7 200 cpu 226.but microwin shows following error at DATA Ptr.i assigned different VB...
Replies
1
Views
51
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
227
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
268
Hi, I'm having an issue with a mircologix not transmitting out. The current setup is a mircologix 1400 connected to a Guardian 100 Radio...
Replies
1
Views
116
If a device has Modbus RTU over serial and Modbus RTO over TCP and Modbus TCP then there is a difference between Modbus RTU over TCP vs Modbus TCP...
Replies
7
Views
512
Back
Top Bottom