steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
273 stars 110 forks source link

Function code 23: read&write registers #12

Closed martentamerius closed 8 years ago

martentamerius commented 8 years ago

Hi Steve,

First a big thank you for all the hard work you have done on this project!

I was going through the source code today and noticed a function (23 - ReadWriteMultipleRegisters) which we would like to use, might not be fully functional yet. The ReadWriteMultipleRequest and -Response classes are implemented, but in the AbstractModbusMaster there is no mention of this type of request.

Is this on purpose, or a work-in-progress, or maybe something else I missed?

Marten Tamerius

martentamerius commented 8 years ago

For the record: this question has been answered by Steve in the comment of a pull request: "You can use function 23 in the traditional manner i.e. use the request as per the AbstractTestModbusTestMaster.readRequest - create a Transport, Request, Transaction and Response. This is how it was always done in the original jamod and AbstractModbusMaster is really just a wrapper around those calls."

Thanks!