ljean / modbus-tk

Create Modbus app easily with Python
Other
566 stars 212 forks source link

Modbus Exception Code 2 #91

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi,

When modbus_tcp server (slave) is running as holding register function(code 3) and modbus_tcp client (master) is configured to read_coils (code 1), currently "Modbus Error: Exception code =2 (illegal data address)" is generated. But, i think that the exception code will be code =1 (illegal function).

Please, explain the reason for the exception.

ljean commented 6 years ago

I didn't try myself but I think you are right. I will try to fix that when possible