02-11-2011 09:42 AM
I am trying to convert a very large number to hexadecimal (string). The number gets truncated to 32-bit, which is not what I want. For example, the number 28037546508295 (double) should be 0x198000000007. Labview truncates it and the resulting string is 0x7FFFFFFF, using Number To Hex String.vi. I am stuck. Thanks.
Solved! Go to Solution.
02-11-2011 09:52 AM
"Number to Hexadecimal String" accepts only I32 data. So you should see a red coercion dot when connecting your floating point number.
You have to use "Format Value" (also in the String >> String/Number Coercion-palette) and use "%x" as format string.
hope this helps,
Norbert
02-11-2011 09:53 AM
Did you try
"To Unsigned Quad Integer"
02-11-2011 10:08 AM
I should clarify a bit. The Format Into String.vi works in Labview 10. I have a need to use Labview 7. I cannot get it to work using Format Into String.vi. Thanks for the help.
02-11-2011 11:55 AM
Here is a LV9 Snippet of a method that should be LV7 friendly.
02-11-2011 12:00 PM
02-11-2011 01:50 PM
An example would be great. Thanks.
02-11-2011 02:00 PM
I don't believe Labview 7 uses the $ format character. Thanks.
02-11-2011 02:12 PM
@habsfan wrote:
I don't believe Labview 7 uses the $ format character. Thanks.
Mostly a way to pull off a few tricks and avoid crossing wires. Here is a $-free version, I changed the constant to 2^32, I had the original code for working with 48-bit numbers should have looked more closely.