04-11-2022 06:53 AM
Hi,
How can I write the dotted dbl number in the numeric control in labview 2020 version?
Solved! Go to Solution.
04-11-2022 07:05 AM
@iErd wrote:
Hi,
How can I write the dotted dbl number in the numeric control in labview 2020 version?
You'd have to explain.
Write? To file? To a database?
Dotted? The decimal point? Or decimal separators? Something else?
The numeric control? A specific one?
04-11-2022 07:56 AM
Hi,
I want to save floats with multiple numeric controls in a .csv file. I will read it here later, but in the controls I use, I can only write the number with a comma, not a period. In older versions of LabView, I was able to add points to controllers. What settings can I use in labView 2020?
I want to write the controller that writes the pin parameters in the cluster in the .vi below, not with a comma but with a dot.
04-11-2022 08:22 AM
I just learned this in the past week while fixing a mfgr's poor instrument driver. But this was a thing they did well.
If you follow the detailed help for "Scan From String" and "Format Into String", then follow the link for format codes, you'll see this:
So in the beginning of a format string you supply to one of these functions, you can include one of those localization codes as needed. "%.;" or "%,;" to specify period or comma respectively as the decimal separator.
-Kevin P
04-11-2022 08:37 AM
Thanks for your answer, Kevin.
I know what you're saying, I tried subvi shows dotted number, but excel shows comma separated.
Do you have any other suggestions on this subject?
04-11-2022 10:54 AM
@iErd wrote:
Thanks for your answer, Kevin.
I know what you're saying, I tried subvi shows dotted number, but excel shows comma separated.
Do you have any other suggestions on this subject?
If your system is set to use commas, Excel will show numbers with commas.
If you really don't want that, you should write strings... IIRC, you do that by quoting the values ("1.2").
04-11-2022 12:09 PM
@iErd wrote:I know what you're saying, I tried subvi shows dotted number, but excel shows comma separated.
Do you have any other suggestions on this subject?
I guess you have a problem with Excel, not with LabVIEW. How does the file look like if you open it in e.g. notepad?
04-12-2022 01:37 AM
Hi,
I solved the problem as follows;
Front panel>>tools>>options>>category(front panel) - use the localized decimal point* (uncheck)
Thanks for your help