Page 1 of 1

How can I implement modbus slave exception code: 0x03 Illegal data value

Posted: Fri Mar 22, 2024 4:02 pm
by mlotorto
Hello everyone!

I implemented on an esp32 board a modbus slave device with some parameter managed as holding registers (0x03 read, 0x10 write). I could be able to do that modifying the esp-idf mb_slave example:
https://github.com/espressif/esp-idf/tr ... l/mb_slave
Getting into the API provided I can't find any method/interface to provide the data range for those holding registers in order trigger, in case of write command (0x10) of data outside the defined range for that particular register, the Exception frame response with:

1) Exception function code = Request function code + 128 (0x80)
2) Exception code = 03 (0x03) Illegal data value. The value in the requested data field is not an authorized value for the slave

Re: How can I implement modbus slave exception code: 0x03 Illegal data value

Posted: Sun Nov 17, 2024 10:43 pm
by emp32_32
Hello @mlotorto, did you receive a response to this post?

Thanks