setting input registers as floats #1783
-
Does anyone know how to configure modbus tcp server to allow floats instead of ints? |
Beta Was this translation helpful? Give feedback.
Answered by janiversen Sep 19, 2023
Replies: 2 comments
-
Best suggestion is to read the documentation. Pymodbus returns 16bit REGISTERS because that is how modbus is defined. not int32, float64 etc....you need to convert the register you receive into the datatypes you want....we actually provide several examples showing how to do that. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by janiversen
-
You can take a look at the payload_server.py - you will need a client that can decode the message. |
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
Best suggestion is to read the documentation. Pymodbus returns 16bit REGISTERS because that is how modbus is defined. not int32, float64 etc....you need to convert the register you receive into the datatypes you want....we actually provide several examples showing how to do that.