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

Multiple holding register reads with overlapping addresses

roelof4 opened this issue · comments

Take the case of a consecutive range of holding registers, say 100 ... 109. My Modbus client would like to make two types of multiple register reads, one to only read the first two holding registers (100 and 101) and another one to read all 10 holding registers.
How do I setup the correct addHreg and call back functions in this case?

onGet/onSet callbacks executed for each individual registers. Than meant the library internally interprets request and execute callback for each register affected.