You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_REGISTER_VALUE);
}
And I fix the checkRange(value, 0, Modbus.MAX_REGISTER_VALUE) after that it worked for me
Did this right or not help me?
The text was updated successfully, but these errors were encountered:
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_REGISTER_VALUE);
}
And I fix the checkRange(value, 0, Modbus.MAX_REGISTER_VALUE) after that it worked for me
Did this right or not help me?
The text was updated successfully, but these errors were encountered: