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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stepping through an array

Solved!
Go to solution

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,

0 Kudos
Message 1 of 5
(2,422 Views)

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 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(2,417 Views)

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

0 Kudos
Message 3 of 5
(2,415 Views)

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,

0 Kudos
Message 4 of 5
(2,396 Views)
Solution
Accepted by topic author bunnykins

No Problem, here's the 2010 version:

0 Kudos
Message 5 of 5
(2,388 Views)