Closed nices96 closed 8 years ago
I added a test case for this and it works OK - are you using a register number over 32767?
Added fixes for this and other places where the library should be using unsigned shorts The latest snapshot has the fixes - could you let me know if you see any issues https://oss.sonatype.org/content/repositories/snapshots/com/ghgande/j2mod/2.0-SNAPSHOT/j2mod-2.0-20160429.141401-1.jar
Yes, I did use over 40000 as a register number. Thanks.
I created a mockup modbus slave(TCP Server) using ModbusTCPListener class and test WriteMultipleRegisters function, but error occurred with "Illegal Data Address" message.
I think it is problem with WriteMultipleRegistersRequest.readData()'s _m_Reference = input.readShort();_.
I changed to input.readUnsignedShort() and checked it works fine.