LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of Hex string to a hex string that can be converted to a floating point number

Solved!
Go to solution

Hi, Could someone help me please. I've been racking my brains out for nearly three hours trying to solve this problem trying various things.

 

I have some code that extracts a string from a robot controller. The string is in hex and represents the number 1.234567. The string itself is 3FF3C0C9539B8887

 

If I perform a typecast on the string I have, it merely returns the value zero.

 

If I delete the string from the control, change it to hex and manually type in 3FF3C0C9539B8887 (so Labview auto formats it to 3FF3 C0C9 539B 8887) I get the result I need.

 

However I can't figure out a way to do this. Apologies, someone out there is probably shaking there heads at something that is probably relatively simple, but I'm somewhat new to dealing with hex.

 

Code is attached below in LV8 (although I'm running LV2012)

 

Thanks


Andrew

 

Typecast.pngTypecast2.png

0 Kudos
Message 1 of 3
(2,169 Views)

I have just found the answer after stumbling across something else:

 

http://forums.ni.com/t5/LabVIEW/concatenate-hex-string-with-ASCII-string/m-p/973215/highlight/true#M...

0 Kudos
Message 2 of 3
(2,157 Views)
Solution
Accepted by topic author AndyF

The for loop is not needed if you limit it to 64 bits.

 

 

Omar
0 Kudos
Message 3 of 3
(2,124 Views)