07-13-2013 11:17 AM
I have a text file with repeating sets of data. Each is 4 lines long, with line 1 containing a title, line 2 containing a constant which identifies the data, line 3 has one number, and line 4 has two numbers corresponding to a max and min. Is there any way I can extract the numbers from line 2, 3, and 4 separately to create an array for each? So far, I've used read from text file wired into a FOR loop containing the scan from string function. I'm not sure how to pick out every 4th line of the file to get common data grouped. I'm new to Labview, so any advice is much appreciated! Thanks.
Solved! Go to Solution.
07-13-2013 11:51 AM - edited 07-13-2013 11:54 AM
You should check this function:
If you can share the sample data file, probably someone can also suggest BETTER approach, just a possibility... !!
07-13-2013 12:55 PM
@chazzchuzz wrote:
I have a text file with repeating sets of data. Each is 4 lines long, with line 1 containing a title, line 2 containing a constant which identifies the data, line 3 has one number, and line 4 has two numbers corresponding to a max and min. Is there any way I can extract the numbers from line 2, 3, and 4 separately to create an array for each? So far, I've used read from text file wired into a FOR loop containing the scan from string function. I'm not sure how to pick out every 4th line of the file to get common data grouped. I'm new to Labview, so any advice is much appreciated! Thanks.
You could use a for loop and use "Pick line" function. For each line, you could use the search/split string function. For line 4, it depends on how you have the numbers stored. Do you have a snapshot of the data ? That'd be helpful.
07-13-2013 02:02 PM - edited 07-13-2013 02:04 PM
07-13-2013 03:36 PM
Thanks for the help! The max and min are separated by a tab and I'd like them in separate arrays.
07-13-2013 04:24 PM