From the wikipedia page for modbus:
coil numbers span from 000001 to 065536,
discrete input numbers span from 100001 to 165536,
input register numbers span from 300001 to 365536,
holding register numbers span from 400001 to 465536.
Therefore the maximum register number accessible (and decodable in uin16) is 65535. This is the highest register that should be allowed by the program to access. The startRegisterSpinBox should allow this value since a poll of data length 1 is valid for that start address, but the program should limit the value in the numberOfRegistersSpinBox to max(65536 - startRegisterSpinBox.value(), 100) to prevent illegal data access.
From the wikipedia page for modbus:
coil numbers span from 000001 to 065536,
discrete input numbers span from 100001 to 165536,
input register numbers span from 300001 to 365536,
holding register numbers span from 400001 to 465536.
Therefore the maximum register number accessible (and decodable in uin16) is 65535. This is the highest register that should be allowed by the program to access. The
startRegisterSpinBoxshould allow this value since a poll of data length 1 is valid for that start address, but the program should limit the value in thenumberOfRegistersSpinBoxtomax(65536 - startRegisterSpinBox.value(), 100)to prevent illegal data access.