LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric control display format

Solved!
Go to solution

Hi,

How can I write the dotted dbl number in the numeric control in labview 2020 version?

0 Kudos
Message 1 of 8
(2,716 Views)

@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?

0 Kudos
Message 2 of 8
(2,711 Views)

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.

 

 

0 Kudos
Message 3 of 8
(2,694 Views)

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:

 

Kevin_Price_0-1649683148812.png

 

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 8
(2,682 Views)

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?

0 Kudos
Message 5 of 8
(2,680 Views)

@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").

0 Kudos
Message 6 of 8
(2,658 Views)

@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?

0 Kudos
Message 7 of 8
(2,613 Views)
Solution
Accepted by topic author iErd

Hi,

 

I solved the problem as follows;

Front panel>>tools>>options>>category(front panel) - use the localized decimal point* (uncheck)

 

Thanks for your help

 

 

0 Kudos
Message 8 of 8
(2,568 Views)