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
com.intelligt.modbus.jlibmodbus.exception.ModbusNumberException: Register value out of range : 65280 at com.intelligt.modbus.jlibmodbus.msg.request.WriteSingleRegisterRequest.setValue(WriteSingleRegisterRequest.java:103) at com.intelligt.modbus.jlibmodbus.msg.request.WriteSingleCoilRequest.setCoil(WriteSingleCoilRequest.java:71) at com.intelligt.modbus.jlibmodbus.msg.ModbusRequestBuilder.buildWriteSingleCoil(ModbusRequestBuilder.java:93) at com.intelligt.modbus.jlibmodbus.master.ModbusMaster.writeSingleCoil(ModbusMaster.java:285)
This happens as the "true" coil value is 0xff00 and is checked to be in the range of 0 to 0xffff, but the range check in jave seems a bit unintuitive
com.intelligt.modbus.jlibmodbus.exception.ModbusNumberException: Register value out of range : 65280 at com.intelligt.modbus.jlibmodbus.msg.request.WriteSingleRegisterRequest.setValue(WriteSingleRegisterRequest.java:103) at com.intelligt.modbus.jlibmodbus.msg.request.WriteSingleCoilRequest.setCoil(WriteSingleCoilRequest.java:71) at com.intelligt.modbus.jlibmodbus.msg.ModbusRequestBuilder.buildWriteSingleCoil(ModbusRequestBuilder.java:93) at com.intelligt.modbus.jlibmodbus.master.ModbusMaster.writeSingleCoil(ModbusMaster.java:285)
This happens as the "true" coil value is 0xff00 and is checked to be in the range of 0 to 0xffff, but the range check in jave seems a bit unintuitive
checkRange((short)value, 0, Modbus.MAX_REGISTER_VALUE)
which will convert the value to a short (-32768..32767) and thus it is a negative value, not being in the int range!
The text was updated successfully, but these errors were encountered: