LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save .txt files in a different format?

I had to reinstall Lab View on my laptop, and although I am using the same VI files, the format of output .txt files has changed. The instrument I am using is American, but I am working within Europe. The raw data is in the American/British format (eg. 1.2  1.3  1.4  1.5 etc) rather than European format (eg. 1,2  1,3  1,4  1,5 etc).

Before reinstalling the saved .txt files were in the European format, but now all the data has decimal places instead of commas, meaning I have to manually change it all before I can do anything with it. Is there something I can do to change this setting back to how it was originally?

Thanks

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

I'm pretty sure LabVIEW just uses the system (Windows) settings.  Could you share some of your code so we can get a better idea of where things are "going wrong".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(2,891 Views)

Hi Isinclair,

 

Before reinstalling the saved .txt files were in the European format, but now all the data has decimal places instead of commas, meaning I have to manually change it all before I can do anything with it. Is there something I can do to change this setting back to how it was originally?

- Change your Windows regional settings to use the correct numeric decimal separator!

- Change your VIs to use the correct decimal separator by setting proper format strings! There is a format code to enforce either point or comma…

 

Btw. I set all my computers to use the "American/British" numeric format to ease compatibility with hardware and foreign customers. You should atleast think about using a similar approach…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(2,867 Views)

A supplement to Gerd's response:

Go into Control Panel -> Region and Language.  Change the format to English (US) or modify the decimal symbol for the European format to a period. 

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 8
(2,848 Views)

I have checked these both and they are set to Dutch settings but it still uses decimal points in text files. I can't think of any other settings that would affect it

It is literally the exact same files I was using before I reinstalled Labview, I don't understand how it could be a problem with the code

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

In Labview settings -> Front Panel, there is a "Use localized decimal point". 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 8
(2,836 Views)

I ticked that and restarted Lab View still no difference

0 Kudos
Message 7 of 8
(2,829 Views)

Hi Isinclair,

 

I have checked these both and they are set to Dutch settings but it still uses decimal points in text files.

What exactly are "Dutch" settings? I suspect they are the same as "German" ones, but showing a screenshot would help to clarify this point!

 

I ticked that and restarted Lab View still no difference

I guess you talk about the ""Use localized decimal point" option, when you write "that"…

What is the current setting of this option? When it is switched on it will take the Regional settings. When those regional settings are "Dutch" with a comma as decimal separator you should get numbers with a comma in between (like "1,234").

 

I don't understand how it could be a problem with the code

We neither - as long as you don't attach any code we cannot tell you how to change the code!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(2,817 Views)