LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using scan from string to convert a string into a number

I wanted to use scan from string to change a string into a decimal number, but when the string is, for example, 9.14123E-2 it just returns 10. How can I get it to return .00914 or 9.14E-2(as a number not a string). Would there be something easier than scan from string? I'm using labview 5.1. Thank you!
0 Kudos
Message 1 of 7
(3,852 Views)
Why not use

From Exponential/Frac/Eng
0 Kudos
Message 2 of 7
(3,851 Views)
Hi,
use
"Functions->String->String/Number Conversion->Fract/Exp String to number.vi"
Also there are many other functions converting strings to numbers and back.

Good luck.

Oleg Chutko.
0 Kudos
Message 3 of 7
(3,851 Views)
I still get 10 if the input string is 9.15003E-2 when I use "From Exponential/Frac/Eng"
0 Kudos
Message 4 of 7
(3,851 Views)
Thanks guys I figured it out. There was a weird wire mix up because I used "replace" to put the "scan from string" in instead of wiring it up directly. Thanks!
0 Kudos
Message 5 of 7
(3,851 Views)
It does not happen on my computer
whether its labview 5.1.1 or 6.02

see attached 5.1.1 code
0 Kudos
Message 6 of 7
(3,851 Views)

Hello,

 

May be you can checkout the attached example.

 

Perkash Mohan Lal

Institute of Semiconductor Technology

Technical University Braunschweig

0 Kudos
Message 7 of 7
(3,541 Views)