Closed NOM-99 closed 1 month ago
@NOM-99,
Thank you for report.
I would like to know if this is really a bug of the file "mbfuncinput.c" or if this limit has become different for some particular reason.
No any particular reason for this. I think it is legacy code issue. It will be fixed as low severity issue.
Thank you very much.
@NOM-99 ,
Thank you for your attention to this. This will be fixed with low severity.
The update merged with the commit d0be4c9478a7c2e19acf4e03da314936a390bc72.
Tools Used:
Good afternoon,
Right now, I am using the "esp-modbus" component to work as a slave with a Modbus-RTU communication, 9600 baud rate, without parity and with two stop bits. I am triying to read 125 Holding registers and 125 Input registers.
When the Holding registers are read the communication is correct between the master and the slave; however, when the Input registers are read the communication returns "Modbus illegal data value" messages. Therefore, investigating the files that manage these communication functions I have found that in the Holding registers reading function the maximum number of registers that can be read are 125 and in the Input registers reading function the maximum number of registers that can be read are 124.
Screenshots of "mbfuncholding.c" file of the "eMBFuncReadHoldingRegister()" function:
Screenshots of "mbfuncinput.c" file of the "eMBFuncReadInputRegister()" function:
I have read the documentation "Modbus application protocol specification" and the reading limit of the Holding and Input registers should be the same, 125.
I would like to know if this is really a bug of the file "mbfuncinput.c" or if this limit has become different for some particular reason.
Thank you very much.