Skip to content

Commit fda815f

Browse files
authored
Correct max. read size for registers. (#2295)
1 parent 6a75201 commit fda815f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymodbus/pdu/register_read_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def decode(self, data):
8989
:param data: The request to decode
9090
"""
9191
byte_count = int(data[0])
92-
if byte_count < 2 or byte_count > 246 or byte_count % 2 == 1 or byte_count != len(data) - 1:
92+
if byte_count < 2 or byte_count > 252 or byte_count % 2 == 1 or byte_count != len(data) - 1:
9393
raise ModbusIOException(f"Invalid response {data} has byte count of {byte_count}")
9494
self.registers = []
9595
for i in range(1, byte_count + 1, 2):

0 commit comments

Comments
 (0)