LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to floating point conversion with leading zeroes

hi, i'm running LV 6i (6.0) and am trying to convert a string from a serial connection into a floating point number. The thing is the number value i'm trying to convert is 10(-3) (e.g. 0.001539). I ultimately want to get it to 1.539.
 
any help? 
 
Thanks,
 
 
0 Kudos
Message 1 of 3
(2,663 Views)
I'm not sure I understand your question :
- could you simply multiply the floating point by 10^x ?
- Have you noticed that there is a series of vis dedicated to string to number conversion (in the string sub-palette) ?
 
 
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 3
(2,649 Views)
Hello tsi,
 
As Chilly Charlie already mentioned, there is a function on the String sub-palette called "Scan From String." If you place it on your block diagram and double-click, you'll get a configuration page that will help you format you number appropriately. Alternatively, you could using the format string input. This webpage describes how to use it:
 
 
Hope this helps!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 3 of 3
(2,631 Views)