What steps will reproduce the problem?
1.
Run it with any baud rate above 19200. Use it with > 8 coil or digital
registers.
2.
Inter-message timing calculation is not right for all baud rates, refer
http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf page 13.
The existing code uses baud as type word, which has max value of 65535,
therefore any baud over that doesn't work.
Also above 19200, inter-message delay should be 1750ms (Fixed).
3.
Coil and digital types only populate one byte for return packet (equivalent to
8 contiguous digital or coil registers).
What is the expected output? - Non-fragmented messages above 19200 baud and
ability to utilise 100+ coil and digital registers.
What do you see instead? fragmented messages above 19200 and only the first 8
contiguous digital or coil registers are returned to master.
What version of the product are you using? - Version 0.01b.
On what operating system? - Arduino
Please provide any additional information below.
See files attached for fixes that work for my application.
I have tested at 19200, 38400 and 115200 and packets look okay.
I have also tested with 100 coil registers and all are returned correctly.
Need to test digis and i suspect that analogues have similar issue.
Cheers, Ben
Original issue reported on code.google.com by Sys...@gmail.com on 18 Nov 2014 at 1:32
Original issue reported on code.google.com by
Sys...@gmail.com
on 18 Nov 2014 at 1:32Attachments: