Modbus Slave for GIGA

Hi all,

I hope you are all doing well.

I'm working on a Modbus slave project using the giga. After much hair pulling, I actually got it working, but not with any of the Arduino library code :astonished:

Has anyone else got Modbus Slave working using the ArduinoModbus library on the GIGA?

My hardware is the following

  1. GIGA (Duh!)
  2. A MAX485 RS232 to RS485 dev board, the one that has (RO)(RE)(DE)(DI) as the pins. RO=RX, RE+DE=Read/Write, DI=TX

To make the Modbus work (using KepServer), I had to add a delay "in TXEMPTY and the FALLING EDGE" (from code). It seems that the GIGA is working to fast, and this library does not account for that.

So as it sits right now, I have complete slave functionality on the GIGA.

My question is, have other done a slave on the giga, and if so, what library and RS485 hardware did you use? I'd like to use libraries from the Arduino Libraries Manager rather then an "out side one"...

~Kam

Have you tried adding a delay? Does the library work after this fix?

For the library that I'm using, they provided "delay" support at the appropriate time of the signal processing, to maintain the correct frame timing. it was a matter of tuning the value for the correct delay. Once I got it working, it worked on the M7 and M4 chips just fine.

I'm curious if anyone has gotten the slave working on the GIGA from the libraries provided