ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify a numeric string?

I need to identify a numeric string. The number can even be in the exponential format. How can I do this?
 
-Vasanth.
Ya Ya
0 Kudos
Message 1 of 4
(2,898 Views)
Hi Vasanth,

by 'identify' you surely mean 'convert from string to number'...

So have you tried 'Scan from string'? You can use '%f' (or %g or %e) as format code to convert any floating point number.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,890 Views)
Hi
 
Have a look at the Scan From String vi. This vi allows you to scan a string for different data. If you wire a numeric constant as default, you get "normal" numbers, but also numbers in the "xEyy" form.
 
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 4
(2,890 Views)

Hi Gerd and Becktho,

                Thanks for your suggestions. I will look into it.

Thanks,

Vasanth.

Ya Ya
0 Kudos
Message 4 of 4
(2,884 Views)