Modbus and RS485 SoftwareSerial

Hello everyone,

I'm developing a project where I need to communicate with the equipament by RS485 and Modbus protocol.

The problem it is that I cant find any example or way to do it. Because I need a library with ModbusMaster and SoftwareSerial.

I need that my Arduino being the Master, and through the RS485 take data from the equipament, and the equipament it will be my slave. But no library allows me to act like master in Arduino and control the serial of RS485, that it is mySerial, and at the same time communicate by Modbus.

So, I cant find examples, neither libraries and cant read any data.

Anyone knows how to do it? Or somehow integrate the SoftwareSerial library and the Modbus library?

Hi

I am looking for the same thing...

Did you find something?

My initial experiment with the ModbusMaster library was positive. I simply replaced the Serial object in the example with a newly constructed SoftwareSerial object.

NB that I am using a knockoff Max485 board, and talking to a known-good PLC on slave address 1. I did nothing except write coil 0 on and off, so YMMV.