arduino-libraries/ArduinoModbus

PRESET_MULTIPLE_REGISTERS (0x10) fails on values above 10 bit, PRESET_SINGLE_REGISTER (0x06) does not.

Johi-b opened this issue · 1 comments

Hello,
I am using MKR1010 Modbus TCP/IP. It seems that the command 0x10 is built in line with the Modicon (PI-MBGUS-300-REV J.) spec and the PRESET_SINGLE_REGISTER is built in line with the MODBUS APPLICATOIN PROTOCOL SPECIFICATION V1.1b3. The latter does not limit the target values to 10 bit for write to a register whereas the first does.

Proposal: remove limitation of 10 bit in library if bug analysis is correct.

In attachment debug output from a WinSock based wxWidgets test application I wrote that details the TCP/IP communication with my MKR1010 and its Ethernet shield.

printscreenfailingtransaction

.

Fault from my side, test program was not completely ok (1 byte missing) and therefore it worked sometimes by accident and sometimes not. It remains bizarre that sometimes it worked with 1 byte missing in the telegram.