How to get byte_index from the byte array to read real values ? #285
Unanswered
niravpatidar37
asked this question in
Q&A
Replies: 1 comment
-
You need to know in advance the structure of the DB that you will read, otherwise you are blind | Datattpe | byte.bit || Bool | 0.0 | ... For reading the real 2.0 you will do get_real(all_data, 2) |
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
-
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 ?
Beta Was this translation helpful? Give feedback.
All reactions