LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to Number conversion

Solved!
Go to solution

I solved my problem

 

I used "Fract/Exp string to number". with false boolean wired to "use system decimal point" input and I get correct result.

 

bEst

0 Kudos
Message 41 of 46
(1,842 Views)

I do not think that +0,054847-3 is one of the available numeric formats.  It will come out 5.4847E-5.

 

You can get the comma as decimal separator by checking "Use Localized Decimal Separator" under Options >> Front Panel: General.

 

If you use scientific notation it will adjust so that a non-zero digit is to the decimal separator.  You can force the exponent to be a multiple of 3 (engineering notation) by using %^f in the format string (54.847E-6).  You can place a + in front of the number by the format string +%^f, but then negative numbers are displayed as +-54.847E-6.  Similarly, the E for exponent is always there.

 

You can convert the number back to a string and display it any way you wish.  For the display format you have described, that may be your only option.

 

Lynn

 

0 Kudos
Message 42 of 46
(1,840 Views)

Hey,

 

I couldn't solve my problem even if I said I solved:(

 

my string values as a format are like +5.456E-3 or like -5.456E-3. When I conversed I want to the same. But unfortunately not??

 

I tried many ways. one of them is %,;%f gives me -5,456E-3. But I need "." instead of ",". 

0 Kudos
Message 43 of 46
(1,832 Views)

Under Tools >> Options.. >> Front Panel is Use Localized Decimal Point checked?  That sets the format of numeric indicators.

 

Lynn

0 Kudos
Message 44 of 46
(1,830 Views)

Dear Lynn,

 

Yes, it is checked.

0 Kudos
Message 45 of 46
(1,828 Views)

Try unchecking it.  If the convention is to use the comma as the decimal separator in your country, having that box checked will cause the numeric controls and indicators to use the comma.  With it unchecked, I think it uses the dot.  You may need to restart LabVIEW to make the change take effect.

 

Lynn

0 Kudos
Message 46 of 46
(1,820 Views)