Hi guys
I am trying to make a Modbus slave with Arduino and having some challenges.
It 'works', but fails after 20-30 transactions with a socket error then timeout. The registers I'm using in the Arduino get reset to zero, but the Arduino itself does not reset
My config is as follows:
Arduino Uno R3
Ethernet Shield with 5100 chip
Ethernet library that ships with latest Arduino IDE
Modbus Library as found here: GitHub - andresarmento/modbus-arduino: A library that allows your Arduino to communicate via Modbus protocol, acting as a slave (master in development). Supports serial (RS-232, RS-485) and IP via Ethernet (Modbus IP).
My app software (sketch) is the example included with the Modbus Library
I have also tried the Mudbus library & examples, with same result. Library found here: Google Code Archive - Long-term storage for Google Code Project Hosting.
I am using a commercialSCADA package, and also ModbusView (a Modbus scanner/troubleshooter/monitor) and get the same result with both, ie socket failure then timeout.
I am polling at 1 second with 5 second timeout.
I am thinking of trying the Ethernet card (based on ENC28J60 chip) that uses a different library ?? I have seen some mention in forums about the 5100 chip & socket issues, but not sure if is my problem?
I have invested a week with trying all the options and not keen to open a whole new set of variants if I can get a simple solution with 5100 shield.
Does anyone have any ideas? or experience?
Thanks
Ross