2

I've been using node-red to simulate TCP and RTU slaves on a raspberry pi and a dell gateway. So far, I've managed to get the TCP slave working, but it doesn't seem possible to do it via rs485 on node-red.

Is it possible to use pymodbus running on a raspberry pi connected to a dell gateway via rs485 to simulate a slave device, because the examples provided only specify a serial connection rather than an rs485 connection specifically? If it is possible, please could you recommend an example that I should use from the pymodbus readthedocs examples?

MattieG4
  • 150
  • 2
  • 12
  • "Is it possible to use pymodbus running on a raspberry pi connected to a dell gateway via rs485 to simulate a slave device" RS 485 is hardware, so I'm not sure I understand - it wouldn't be possible to simulate hardware. I use Pymodbus with RS-485 but I'm not sure I get what you're asking. Can you elaborate? – Hayden Eastwood Feb 11 '20 at 14:00
  • Is it possible to use pymodbus to simulate a slave device? What I mean is, can you use it to respond like a slave to requests from the master and if so how? – MattieG4 Feb 11 '20 at 16:06
  • I've set up a Raspberry Pi communicating with a slave Arduino, so I imagine it's also possible from Pi to Pi. I will take a look at what I can find and revert. – Hayden Eastwood Feb 11 '20 at 20:26
  • Have not done this on a Pi but would expect it to work fine - quickest way to check would be to use the [Synchronous Server Example](https://pymodbus.readthedocs.io/en/latest/source/example/synchronous_server.html). Just uncomment the "RTU" section", set the port, baud rate etc and see if your gateway will talk to it. – Brits Feb 14 '20 at 01:54

0 Answers0