16.10.2012, 14:20
Hey there,
i communicate with a device by sending and receiving hexadecimal strings.
for example: by sending the command 01 04 00 00 00 02 71 CB I receive 01 04 04 3E A8 53 96 CB 12
Now I need to translate that into a number. In this case it should be 0,3287627
I have a demoprogramm which is working, but I can't comprehend how.
So my problem is to translate that hex number into 32bit float
[attachment=41875] --> demoprogramm
[attachment=41876] --> my version
i communicate with a device by sending and receiving hexadecimal strings.
for example: by sending the command 01 04 00 00 00 02 71 CB I receive 01 04 04 3E A8 53 96 CB 12
Now I need to translate that into a number. In this case it should be 0,3287627
I have a demoprogramm which is working, but I can't comprehend how.
So my problem is to translate that hex number into 32bit float
[attachment=41875] --> demoprogramm
[attachment=41876] --> my version