emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readWriteHreg Illegal Address with more than 25 registers.

matiasbarone opened this issue · comments

I need to read/write many registers. When I use readWriteHreg and set more than 25 registers the callback function receives EX_ILLEGAL_ADDRESS
What could be the problem, or what can I change in the configuration to avoid it?

Im using a ESP32S2 with arduino

I found the problem, was all mine. I feel so noob.

The readValue and writeValue arrays were of 125 registers. And th offset in both cases were 100. If I make bigger the arrays or take the offset to 0 I can trasfer more bytes and no more illegal address