02-28-2013 09:15 AM
I am working on a program that records all the input information into the header of a data file, then begins recording the input information from my measuring devices. The data in the header format will not read past the decimal, it will round the number to its closest whole number - I need to be able to record up to the hundreths place (.01). Ive been trying a number of different things and an truly stumped.
02-28-2013 09:26 AM
That's because you use the Number to Decimal String. That can only output integer numbers in a string format. You need to use Number to Fractional String like you did for the actual data.
02-28-2013 09:42 AM
That did it! Thank you
02-28-2013 10:41 AM
Ahhh, my favorite pet peeve. Of course, LabVIEW is exactly correct in the naming of the function - it follows exactly the convention used to name the others - e.g., "Number to Hexadecimal String," "Numnber to Octal String," etc... but it is SO CONFUSING because we tend to think of decimal meaning "x.y" when in reality it means "base10." And even more confusing is, we tend to think of fractions as numerator/denominator, so "Fractional String" would intuitively mean a string written in either proper or improper fractional notation.
There is no real fix, because it's not really broken. It's just something that probably trips up just about every LabVIEW programmer once.
02-28-2013 01:13 PM
or dozens of times.......
02-28-2013 01:19 PM
Think of it as the radix point and not the decimal point. There is a binary point, and a hexadecimal point, but we do not really think naturally in terms of 1/2 or 1/16. Perhaps the word integer should have been chosen in place of number in those functions...