Hello I have problem with last version jlibmodbus 1.2.9.7
when I use function x05 WriteSingleRegister
in
public void setValue(int value) throws ModbusNumberException {
if (!Modbus.checkRegisterValue(value)) {
throw new ModbusNumberException("Register value out of range", value);
}
this.value = ((short) value) & 0xffff;
}
I take error Register value out of range : 65280
in method
_static public boolean checkRegisterValue(int value) {
return checkRange((short)value, 0, Modbus.MAX_REGISTERVALUE);
}
And I fix the checkRange(value, 0, Modbus.MAX_REGISTER_VALUE) after that it worked for me
Did this right or not help me?
Hello I have problem with last version jlibmodbus 1.2.9.7 when I use function x05 WriteSingleRegister in public void setValue(int value) throws ModbusNumberException { if (!Modbus.checkRegisterValue(value)) { throw new ModbusNumberException("Register value out of range", value); } this.value = ((short) value) & 0xffff; } I take error Register value out of range : 65280 in method _static public boolean checkRegisterValue(int value) { return checkRange((short)value, 0, Modbus.MAX_REGISTERVALUE); }
And I fix the checkRange(value, 0, Modbus.MAX_REGISTER_VALUE) after that it worked for me Did this right or not help me?