LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Weird output reading datat from tab delimited text file

Solved!
Go to solution

the task: to read data from a tab-delimited text file

the problem: it shows strange output (it should show double numbers but instead it shows only integers)

 

solutions that I have tried :

1- I tried two methods to read the data (read from a text file and read delimited spreadsheet), and I got the same results.
2- I tried to change the format [%.3f] (in case of read delimited spreadsheet) to different things but it was worse.

 

 

I think the problem is in my laptop configuration or the LabVIEW configuration! because I tried the same data on my friend's laptop and it worked well (it shows a usual ECG signal).

 

 

 

0 Kudos
Message 1 of 5
(1,049 Views)
Solution
Accepted by topic author Adham_m

Hi Adham,

 

your text file contains the numbers using a comma as decimal separator, so you may try the "%,;%f" format code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(1,037 Views)

yeap , it worked 🙂 , thanks for your fast reply and precious help

but can you explain how can i avoid this in future , from where can find this format  (%,;%f) , cuz i looked up in the help for [Read Delimited spreadsheet ] and found nothing helpful (just%d for integers and %s for strings)

 

and another question : why the same text file worked normally on my friend's laptop without changing the format !?

 

thanks in advance 

 

0 Kudos
Message 3 of 5
(1,020 Views)

Hi Chad,

 


@Adham_m wrote:

but can you explain how can i avoid this in future , from where can find this format  (%,;%f) , cuz i looked up in the help for [Read Delimited spreadsheet ] and found nothing helpful (just%d for integers and %s for strings)


When you read the paragraph on the format string input then you will notice a link to "format string syntax". Follow the link and read…

 


@Adham_m wrote:

and another question : why the same text file worked normally on my friend's laptop without changing the format !?


Because those functions respect your local regional settings. Your friend seems to use German settings (comma in numbers), while you use English dot decimal separator…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(1,011 Views)

Totally right !

 

Thanks Again 🙂

 

0 Kudos
Message 5 of 5
(1,000 Views)