PortDock

Reading Modbus registers in blocks — the 125 limit, gaps, exception 02 and poll time

One request per tag makes polling slow. Reading registers in blocks: the 125-register and 2000-bit limits, exception 02 on gaps, and the time saved.

Tools for this guideModbus Master Windows program · freeModbus Slave Windows program · freeModbus Read Request Planner web · no installSerial Timing Calculator web · no install

When an HMI, SCADA system or PC program reads a Modbus device one request per tag, every extra device and tag makes the poll cycle longer. Each request carries more than its data: sending the request, the device's processing time, and the pause before the next request. So values with nearby addresses are read together in «blocks». This guide sets out the rules and limits.

Rule 1 — one table, one contiguous run per request

Rule 2 — quantity limits

FunctionMax per request (spec)Response data
01 Read Coils2000⌈quantity ÷ 8⌉ bytes
02 Read Discrete Inputs2000⌈quantity ÷ 8⌉ bytes
03 Read Holding Registers1252 × quantity bytes
04 Read Input Registers1252 × quantity bytes

Reading 125 registers gives a response PDU of function 1 + byte count 1 + data 250 = 252 bytes, within the 253-byte PDU maximum (§4.1). Devices may accept fewer — see «Max per request» on the device register map or the manual. Above the limit, the device answers with exception 03 (Illegal Data Value).

Rule 3 — gaps and exception 02

If a grouped request includes an address the device does not define, many devices reject the «whole» request with exception 02 (Illegal Data Address). The specification's processing order also checks whether «start + quantity» fits the device's range and returns 02 if not. Some devices fill undefined registers with 0 instead; this varies, so check the manual or test.

How much faster — a worked example

Take ten holding registers (40001–40010) at 9600 bps 8E1, with the device replying 10 ms after a request. One request per value means ten requests of 8 bytes out and 7 bytes back. One request for all means 8 bytes out and 25 back.

MethodRequestsRTU bytesCycle (calculated)
One per value10150about 312 ms
One request133about 52 ms

Bytes fell 4.5-fold and time six-fold, because the device delay (10 ms here) and the 3.5-character pause repeat for every request. The longer the device takes to process, the more grouping helps. Modbus TCP has no serial transmission time, but processing and the network round trip still repeat per request.

Split the poll rate too

Sources

Published 2026-10-29