LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read every 5th (or so) line from a text file.

How to create software in LabView 6.1 that can do the following:
1. Read a text file. The date (time stamp, and four numbers – separated by “,”) are stored in lines.
2. Read every 5th (or so) line. How to read EOF caracter?
3. Write data (lines) in a new file.
0 Kudos
Message 1 of 3
(2,816 Views)
Hi,

I hope "Read Lines from File.vi" found in FILE I/O Pallate will help you to read the file interms of lines. It also gives the EOF info also i think. Then you can process the strings whatever way you want. All the VIs to process the strings available in strings Pallate.

all the best.
Thanks,
Logic
0 Kudos
Message 2 of 3
(2,809 Views)
Quick answer : if your file is not too large, load it in memory as a 1D array of strings, then use the "Decimate array" function, convert back the string array into a spreadsheet string and save.

See the attached jpeg

CC
Chilly Charly    (aka CC)
0 Kudos
Message 3 of 3
(2,799 Views)