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

mlotorto
Posts: 1
Joined: Fri Mar 22, 2024 2:23 pm

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

Postby mlotorto » Fri Mar 22, 2024 4:02 pm

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
Attachments
ExceptionFrame.png
Exception frame response
ExceptionFrame.png (7.69 KiB) Viewed 641 times
ExceptionCodes.png
Exception code is in the data field of exception frame response
ExceptionCodes.png (27.61 KiB) Viewed 641 times

emp32_32
Posts: 9
Joined: Mon Jan 31, 2022 7:02 pm

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

Postby emp32_32 » Sun Nov 17, 2024 10:43 pm

Hello @mlotorto, did you receive a response to this post?

Thanks

Who is online

Users browsing this forum: No registered users and 120 guests