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
453 stars 267 forks source link

Modbus Ip - It works but with Timeout Error #41

Open asdelx1 opened 5 years ago

asdelx1 commented 5 years ago

Hello ! I could connect an arduino Due with a w5100 mini ethernet shield. I can use the entire library. I use modbus poll or radzio for a modbus tcp ip master. The problem is that for example if I read a hold reg, i get a timeout error or ( write error read error ) and then I can read. So it is Yes-No-Yes-No-Yes-No. It´s like i lose connection, maybe something about times. I use mudbus library and mgsmodbus and I didn´t have that problem !

problem

As you see , i can run it OK but first an error and then it goes, error.. goes.. error .. goes ? Don´t you think it can be a time problem at the library ?

mail : matu_1234_ches@hotmail.com

mlednicky commented 3 years ago

You need to uncomment line "#define TCP_KEEP_ALIVE" in used library. If you read "README" file, you would knew.

ProgSuriya commented 2 years ago

nope