From the course: Learning LabVIEW

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Process an array with a for loop

Process an array with a for loop - LabVIEW Tutorial

From the course: Learning LabVIEW

Start my 1-month free trial

Process an array with a for loop

- [Instructor] In addition to building and initializing arrays, for loops can also be used to iterate through the individual elements in an array to do some sort of processing on them. I have here a one-dimensional array containing the numbers one through 10. I'll create a new for loop by right-clicking to bring up the Functions palette, going to the Structures menu, and selecting For Loop, and clicking and dragging to create it. Now, I'll wire my Input Array to the edge of that for loop which creates an auto-indexing terminal. When wiring an array into a for loop, the auto-indexing terminal will sequentially iterate through the elements in that array and output them one at a time within the loop. If I right-click on that terminal's output and create an indicator, it's a single-numeric indicator, not an array. I'll move that over here and rename it to Current Value. Now that inside of the for loop, I'm working with…

Contents