Closed anotherkeycode closed 5 years ago
Thanks for you question!
The server responds with an IllegalDataAddressError
. So you're requesting a coil or register which does't exists in the server.
Oh, and could use wrap the code snippet with '```'. This will apply some markup to the code to make it more readable. Read more about it here.
Python 3.6.9 [GCC 8.4.0] on linux
As a newbie to modbus protocol, I am facing the same issue of umodbus.exceptions.IllegalDataAddressError: The data address received in the request is not an allowable address for the server
.
Can the client and server example in the repo for TCP be used as is? If not, how should they be modified to work together? I am trying to simulate both the client and server using the python code given in the repo.
Can the client and server example in the repo for TCP be used as is?
Yes, they can work together.
Hi, Thanks for your reply.
I tried it already but end up with this error:umodbus.exceptions.IllegalDataAddressError: The data address received in the request is not an allowable address for the server
I start the server first (which is listening for incoming connections). Then I start the client in a different terminal. The client throws this error and stops. Any idea what I could be doing wrong?
Hi @codevak, the code for the server included in the Readme is wrong, you need to modify _functioncodes=[3, 4] to _functioncodes=[1, 2] and _functioncodes=[6, 16] to _functioncodes=[5, 15].
Hi, This works now. Thanks a lot!
I can't start the client example.
Python 3.7.0 (default, Sep 15 2018, 19:13:07) [GCC 8.2.1 20180831] on linux
How can I fix it?