pyhys / minimalmodbus

Easy-to-use Modbus RTU and Modbus ASCII implementation for Python.
Apache License 2.0
306 stars 146 forks source link

Question? How to get real registers value if register data type is LINT32 #126

Closed abhishek73magar closed 5 months ago

abhishek73magar commented 7 months ago

while reading registers I have data type LINT32 which contain 2 register 18 and 19 how should i get actual values??

Jan 24 14:10:05 raspberrypi bash[88306]: [22041, 22220, 21833, 16316, 0, 14941, 0, 15524, 0, 4997, 999, 27796, 15, 24878, 27, 55777, 1, 28941, 5, 53374, 4, 10952, 5, 27732, 15, 61285, 65535, 387, 0, 60479, 65535]

registers values are follows is :

j123b567 commented 5 months ago

Use read_long https://minimalmodbus.readthedocs.io/en/stable/apiminimalmodbus.html#minimalmodbus.Instrument.read_long