04-23-2010 08:20 AM
Hello all,
I need to convert string like "-73.28" to number -73.28. With Decimal String To Number Vi I get only -73,00 output with "-73.28" string input. What I do wrong? How to get needed output? Notice also that , needs to be . in the output number!
Thanks!
Solved! Go to Solution.
04-23-2010 08:28 AM
Decimal String To Number returns, as easily seen by the color of the wire, integer numbers. You are therefore using the wrong function.
You are looking for "Fract/Exp String To Number".
hope this helps,
Norbert
04-23-2010 08:29 AM - edited 04-23-2010 08:30 AM
Hi,
in most cases, it´s a "decimal point character".
When you´r working on a machine which is set for example to german language, the decimal point is an "," on english systems, it´s most of the times the "."
You have to set the decimal character to search for in the "Scan from string" function like in this example:
Stefan
04-23-2010 08:30 AM
04-23-2010 08:35 AM
04-26-2010 12:30 AM
Hi,
And thanks for your help but he "comma problem" is still there as you can see from the picture. Because the input has a dot (.) as a separator, the output needs it too. Now output has a comma (,). Is there some kind of a setting in Labview I need to check?
Regards,
Jick
04-26-2010 12:56 AM
Hi again,
I just noticed that I can't enter dots(.) to a numeric control. Only commas (,). So there must be a setting to check somewhere...?
Jick
04-26-2010 01:24 AM
Hi Jick,
first of all: having the "," decimal separator in a numeric indicator is just for cosmetic purposes, you still can calculate using this value...
1) You may change the settings of the OS (Win: Regional Settings aka Regionale Einstellungen). I do this for all of my computers as it seems "natural" for me when working with scientific/measurement data
2) You may switch LV to ignore system decimal separator settings - you find that in the options dialog...
But when using properly formatted output functions you don't need to change any setting...
04-26-2010 01:43 AM
Hi,
The problem is that I am passing the number to the another program which does not undestand commas as a decimal separator. So I just thought that is there any simply way to convert commas to dots in Labview. I'll try to change options. Thanks!
Jick
04-26-2010 01:50 AM