1

I'm looking at a solution that involves running a Modbus 485 slave to a Raspberry Pi (or similar) via Modbus RTU (through a USB serial converter, or serial addon board), which the Pi then translates this to Modbus TCP and outputs the packet through a port (502).

The Pi would be connected to a network by static IP, and the network also has a computer connected.

Then have Modbus master software on the computer in the network connect to this port and IP of the Pi. Effectively bridging RTU to TCP through the Pi. Almost like having the Pi run as an Modbus TCP simulator, getting it's values from the Modbus RTU on the otherside.

I'm no expert whatsoever on communications so I'm not even sure this is possible. From what I can understand, Modbus TCP packets contain the RTU information being sent, with the ID removed and MBAP in it's place, and the CRC removed. Is it possible to do this on Linux (Python, Node Red, libmodbus etc.), or am I walking into a wall?

Thanks in advance.

J.K
  • 11
  • 1
  • 2
  • Please mention what is the RTU to TCU bridge here? Did you write your own code to do this job? – Umair Aug 09 '18 at 09:37
  • I haven't written any code yet. The furthest I have gotten so far is using Node Red on Windows to test, receiving Modbus RTU input register data from serial port, decoding the raw data. I was then going to try and force these input registers to a Node Red Modbus server, basically emulating the original device. If that worked, I'd then run the same setup on a Pi or similar and run the Pi with the hardware setup. I ran into problems setting input register values, alongside using the server for to emulate multiple RTU devices etc. – J.K Aug 09 '18 at 12:14
  • 1
    Possible duplicate: https://stackoverflow.com/questions/50605244/modbus-rtu-over-tcp-modbus-tcp-gateway – Alexander Klauer Aug 26 '18 at 10:33

0 Answers0