-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading coil data bits is reversed #38
Reading coil data bits is reversed #38
Comments
To clarify. This issue exists only, as labeled, in the client Implementation of this library. The issue does not exist when reading from a power meter or other device not running on this lib. |
@brainelectronics I tested now in the
Slave:
Master:
Look as was in Problem 2 for the same register_definitions:
So, the problem Problem 2 is fixed in this version, just Problem 1 still have the problem. |
Now I don't know that is the correct order, from left to right or vice-versa? Because the register
If the set up is just only one COIL (like as in register |
@brainelectronics I think that this bug is fixed, right? |
Unfortunately no 😔 but it's only a client Implementation issue. As mentioned the data should be returned in blocks of 8 starting with the highest address. Like 27, 26, ... 20. Right now it is 20, 21, ... 27 |
All right! Understood :) |
Found during resolving #36
Setting up a coil with the following data and reading the coil states returns
1100 1101
instead of expected1011 0011
as setup. This issue was covered by the limit of only reading up to 8 coils in a row. And due to the bad unittest, not covering this case.Reason/root cause
Not sure yet, but it might be due to
micropython-modbus/umodbus/functions.py
Lines 279 to 295 in eee18c2
functions.py
. In particular the constructedoutput_value
is mixing up LSB and MSB.Taken from Modbus Application Protocol, chapter 6.1 01 (0x01) Read Coils
The text was updated successfully, but these errors were encountered: