Replies: 2 comments
-
found the issue.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Please read the documentation, you have not upgraded your code to the 3.6.3 call standard. A good way is to look at our examples, like the simple_client ones. Why do you want to double decode the registers, that is very likely not going to work on little endian CPUs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This code works on 2.1.0 using Ubuntu 22.04.3 LTS
after modifying what I thought might work for 3.6.3
I receive the error
Traceback (most recent call last): File "/home/chromebox/Scripts/Python/./battery.py", line 19, in <module> BatterySOC = modbus_register(266, BmvID) / 10 File "/home/chromebox/Scripts/Python/./battery.py", line 16, in modbus_register msg = decoder.decode_16bit_int() File "/home/chromebox/.local/lib/python3.10/site-packages/pymodbus/payload.py", line 406, in decode_16bit_int return unpack(fstring, handle)[0] struct.error: unpack requires a buffer of 2 bytes
Beta Was this translation helpful? Give feedback.
All reactions