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).
BSD 3-Clause "New" or "Revised" License
455 stars 267 forks source link

TCP stop selection #4

Closed TomaTLAB closed 8 years ago

TomaTLAB commented 8 years ago

I tried to use this wonderful library with the AdvancedHMI project, but unfortunately it appeared that works nothing... It appeared also that IGSS SCADA terribly freezes. MasterOPC sends the duplicated requests. In CAS Modbus Scanner it was required to "disconnect" after each "poll"... Mudbus library works perfectly with all last ones. It was clarified that in Mudbus there is no "client.stop ()" function call. With enc28j60 it was slightly more difficult. I am not sure as far as this correct decision, but everything began to work perfectly.

andresarmento commented 8 years ago

Very Good TomaTLAB! Many users of this library (students in Brazil) are using this library with ScadaBR (www.scadabr.com.br). By default ScadaBR uses TCP Not Keep Alive. I was planning put a define to control this option, then you did! Thanks. I will change #define TCP_STOP to TCP_KEEP_ALIVE and invert ifdef logic, just to maintain "Not Keep Alive" by default. Thanks for work on ENC28J60 too.

TomaTLAB commented 8 years ago

I tried to remember how it's called correctly ("Keep Alive") for all evening yesterday, but it absolutely flew out from my mind. :D