09-09-2009 07:08 AM
I have a quite unussual problem and can't find any solution. The problem is following.
I get the measurements from a multimeter as a string and it looks like this: "3.7260900E+00". Then I want to put this numbers on a waveform chart and I must convert them to numbers. Whichever VI to convert I use, everyone returns only the first digit in this case: "3".
What should I do to get the full number onto the chart? I allready tried to use more digits in the properties of the chart, but this doesn't have any effect.
Thanks for help.
Solved! Go to Solution.
09-09-2009 07:18 AM
09-09-2009 07:18 AM - edited 09-09-2009 07:20 AM
Hi Marlon,
you probably use a PC with "German" regional settings, i.e. using comma as decimal separator. So you should try this:
The format code "%.;" sets the point to be used as decimal separator, in contrast to your regional settings.
That's the reason why I set all measurement systems to use English regional settings (atleast swap the German point/comma settings).
Btw. increasing the precision of the chart doesn't change the data wired to it ![]()
09-09-2009 07:40 AM
GerdW wrote:Hi Marlon,
you probably use a PC with "German" regional settings....
How did you glean from his post that he's using decimal comma?
09-09-2009 07:51 AM - edited 09-09-2009 07:52 AM
Hi BrokenArrow,
well, when "3" is all Marlon gets with all string to number conversions then it's most probably a wrong regional setting...
(And I also had to learn the hard way that inclusion of "%.;" will get rid of nearly all problems with string to number conversion in Germany
)
09-09-2009 07:52 AM
09-09-2009 08:36 AM
GerdW wrote:Hi BrokenArrow,
well, when "3" is all Marlon gets with all string to number conversions then it's most probably a wrong regional setting...
(And I also had to learn the hard way that inclusion of "%.;" will get rid of nearly all problems with string to number conversion in Germany
)
Very cool GerdW, thanks for the information. ![]()
09-10-2009 02:51 AM
Hi,
I rather wander how GerdW new, that Marlon8781 had German Regional settings. ![]()
There is so many regional settings which uses decimal separator other than point.
Anyway, you can set your LabVIEW to not use localized decimal point. Open Tools - Options, and navigate to Front panel category. Under General section, you can find settings "Use localized decimal point". Uncheck this setting to use decimal point independently of your local settings. This can be useful if you are not familiar with % style formatting and you don't want to change regional settings.
Best regards,
Martin
09-10-2009 02:57 AM
Hi Martin,
does this setting also help when deploying apps to other computers using different regional settings?
Even when you set your IDE to use "standard" settings, an app may not do so when used on customer's computer. So I would opt for learning some simple %-codes ![]()
09-10-2009 03:59 AM
Hi GerdW,
You are correct that this setting will have no influence on your deployment. However, I believe it is good to notice it, because not everybody needs to deploy their code as executable.
Anyway, I agree you are right about learning simple %-codes ![]()
P.S. How did you know he had "German" regional settings?
Regards,
Martin