ClassicDIY / ModbusTool

A modbus master and slave test tool with import and export functionality, supports TCP, UDP and RTU.
Apache License 2.0
640 stars 193 forks source link

Failed to execute Write: Error Code 2 #29

Open NicoCaldo opened 1 year ago

NicoCaldo commented 1 year ago

I'm having issue sending command to my slave. I got this error from the console.

The strange thing is that data on the slave are correctly writte on the register when I run the write multiple register.

For istance, if I try to write on the register 29 the number 5, the Modbus Master send the string over serial (I'm using MODBUS RTU with an USB-RS485 adapter)

01 10 00 1D 00 01 02 00 05 65 DE

And I got the response

00 7f f7 c5 ff fd dd c2 00

and the Error code 2

Why the write goes well as I can see the register get updated with the data I requested to write but I got this error?

graham22 commented 1 year ago

Your slave is reporting an illegal data address, I get a valid response from the Modbus Slave image

NicoCaldo commented 1 year ago

That's quite strange as it's able to write anyway on the slave. I mean, I'm seeing the registers being updated anyway...

illegal data address means that, for instance, I want to write on register 40031 but I'm writing on the 31 or vice-versa? Because I've tried to write on both and I got the same issue.

Could it be a specific issue on my slave?