ArduinoModbus
ArduinoModbus copied to clipboard
ModbusRTUClient.requestFrom can lead to bus collisions
Not exactly sure if this qualifies. I have a loop that steps through reading a bunch of inputs. The first run through works perfectly I do one requestFrom() and then process the resulting data then the loop pops onto it's next iteration and tries to take over the RS-485 bus while the server is still in TX mode, corrupting the first few bits of the request... the library doesn't generate the necessary 3.5 character wait time.
I've been having the same issue. Libmodbus does not enforce the wait time after receiving before sending again. It causes communication errors with some devices when polling at maximum rate. There's a pull request to fix it upstream. https://github.com/stephane/libmodbus/pull/494/commits/6c9c575d169a9919c95a0db218434c89386681e9
I have not yet tried running a patched libmodbus with this library.