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 - LabVIEW Tutorial
From the course: Learning LabVIEW
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
While loops3m 42s
-
(Locked)
For loops3m 6s
-
(Locked)
Build an array with a for loop2m 11s
-
(Locked)
Process an array with a for loop2m 22s
-
(Locked)
Loop timing2m 54s
-
(Locked)
Local variables6m 18s
-
(Locked)
Shift registers2m 26s
-
(Locked)
Stacked shift registers2m 24s
-
(Locked)
Challenge: Moving average52s
-
(Locked)
Solution: Moving average2m 25s
-
-
-
-
-
-