问题
I am having a modbus project where i am getting error code 3 while reading from device. If anyone knows what is the problem and how to resolve please help out.
net.wimpi.modbus.ModbusSlaveException: Error Code = 3
回答1:
Exception code 3 is "Illegal value", and it means that one of the values you provided in the request is illegal. This won't be an invalid address as that is exception code 2 ("Illegal address"). Which means that most likely your count of registers to read is either less than or equal to 0 or greater than the maximum number of registers which may be read per request -- typically 125 or so.
来源:https://stackoverflow.com/questions/31913253/how-to-resolve-modbusslaveexception-error-code-3