From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-23-2012 07:00 AM
Dear Forum members,
Can anyone provide some guidance about how to step through and process data in an array file. My outline LabVIEW program is to carry out the following steps:
(1) Take the first 5 samples from the data file (which contains 1000 samples)
(2) Process calculation
(3) Take the next 5 samples and process calculation Step (2) until the last batch of samples is reached
I understand that I will need a loop (200 x 5 samples = 1000 samples analysed), but what I cannot get is how to programmatically step through the array rows, 5 at a time. If anyone can help it would be appreciated.
Regards,
Solved! Go to Solution.
03-23-2012 07:23 AM
Read from text file has an input to read 5 rows at a time. Howver, if it's only 1000 lines, read it all and extract 5 lines at a time from the resulting array.
/Y
03-23-2012 07:29 AM
Hi bunnykins,
Using the Array Subset vi, this becomes a fairly simple problem.
Just specify a start point and a length of data you want then you can pull a small array of data out of a large one.
I have attached an example for you to tweak to whatever you need.
Enjoy!
-Rob Afton
Electrical Engineering Intern
GHSP
03-23-2012 09:22 AM
Dear Rob,
Thanks for your response. Unfortunately I'm unable to view your vi since my LabVIEW version is 2010. Would you be able to save your (newer) LabVIEW vi revision to 2010 revision ?
Thanks,
03-23-2012 09:46 AM
No Problem, here's the 2010 version: