LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert this data

Hi everyone.

From some device (Agilent Spec Analyzer) I get this data as a string
#18@;ys
in hex: 23 31  38 40  3B 79  FF A0

This has to be some sort of value, to be more exact, it should be 27,47

My problem: I don't know how to convert this to it's double - representation.

What I've guessed till now: It could be a float64 (in C). Though my knowledge isn't good enough to prove this 😞 and it's even worse to actually implement this 😞

Anyone who knows what I've got to do ..?


0 Kudos
Message 1 of 6
(3,083 Views)
Never mind this question.

There must have been an error somewhere. Now I do read out the correct values 🙂
0 Kudos
Message 2 of 6
(3,072 Views)
Hi Thomas,

you gave us 8 bytes - this screams for a DBL 🙂

Unfortunately there seems to be some kind of conversion needed, as the reverse process is giving different results:

Can you check the result you gave (27.47)?

Ok - don't mind my comments on your question 🙂 But maybe you can explain this error in more detail?

Message Edited by GerdW on 09-15-2006 10:18 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(3,072 Views)
Hi Gerd

For some reason I don't understand, I suddenly got the correct values (even in string format). Maybe there was some temporary error, because after testing my commands with MAX, it worked.

Thanks for the image you attached, at least from now on I will know how to see the byte values some result returns 🙂
0 Kudos
Message 4 of 6
(3,062 Views)
Hi Thomas,
I experimented a little bit and found this:





The first 3 bytes seem to be a line-counter (preceded by a #, probably in ASCII), and the rest is a shortened Dbl. See the attached VI. You should try with other data.
Greets, dave

P.S. I'm a bit late, but berhaps it helps anyway

Message Edited by daveTW on 09-15-2006 10:27 AM

Greets, Dave
Download All
Message 5 of 6
(3,060 Views)
It probably won't help this time, but I'm sure I can use it some time later.

Thanks to you, too 🙂
0 Kudos
Message 6 of 6
(3,054 Views)