-
Notifications
You must be signed in to change notification settings - Fork 986
Decode 8 bit not possible #2668
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
Comments
Binary payload have not been changed for ages, so if it worked in 3.6.6 it still works. It is correct that client.fromRegisters (replacement for payload in 4.0) do not have UINT8 and INT8, which is because all modbus data calls deliver minimum 16bit. DATATYPE is part of client.fromRegisters and not payload, and have never supported 8bit as far as I remember. Your example do not use DATATYPE but only payload, so I do not understand what your problem ? |
I got the following warning: BinaryPayloadDecoder is deprecated and will be removed in v3.9.0 ! Please use "client.convert_from_registers()" or "client.convert_to_registers" See documentation: "https://pymodbus.readthedocs.io/en/latest/source/client.html#pymodbus.client.mixin.ModbusClientMixin.convert_from_registers" |
There are some devices on the market which use 8 bit values. |
that still have nothing to do with missing entries in DATATYPE. We will not add INT8 and UINT8 as a modbus device cannot return an 8 bit values, so if you need that you have to decode it in the app. As I wrote payload will be removed in v4.0 we postponed it from v3.9.0, so you have time. |
How can a modbus device return 8bit, that is really non standard. Modbus devices always return registers which are defined to be 16bit! |
If you receive a register (16bit) from your device via pymodbus, and for any reason want to split it into 2 bytes, then use the builtin python functions, it really is outside the scope of pymodbus. |
Closing as this is not a pymodbus problem. |
Ok Thank you for the feedback. |
Dear pymodbus team,
with version 3.6.6 it was possible to decode 8 bit values.
But with version 3.9.2 this is no possible anymore, because the
DATATYPE.UINT8
andDATATYPE.INT8
are missing.Could you provide also these datatypes for backward compatiliby?
I used the following function:
The text was updated successfully, but these errors were encountered: