gijzelaerr / python-snap7

A Python wrapper for the snap7 PLC communication library
http://python-snap7.readthedocs.org/
MIT License
663 stars 246 forks source link

How to get byte_index from the byte array to read real values ? #245

Closed niravpatidar37 closed 3 years ago

niravpatidar37 commented 3 years ago

plc = snap7.client.Client() plc.connect('192.168.1.101', 0,1) all_data = plc.read_area(S7AreaDB,1,0,14) print(all_data[:])

real=snap7.util.get_real(all_data,byte_index) print(real)

need a byte index to get the value of real type variable in byte array so how to find byte index of that ?

gijzelaerr commented 3 years ago

ive enabled 'discussions' for python-snap7, we kindly request to move any requests for help to this location https://github.com/gijzelaerr/python-snap7/discussions