From the course: Learning LabVIEW

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Shift registers

Shift registers

- [Instructor] When using loops, there maybe times when you need to access data that was produced by a previous loop iteration. We can accomplish that in labVIEW using shift registers, which provide a way to pass data from loop iteration to the next. This simple program generates a new random number every iteration of a while loop. To access the random number that was generated in the previous loop iteration, I'll add a shift register by right-clicking on the edge of the while loop and choosing add shift register. Notice that it creates two corresponding shift register icons, one on each side of the loop. I'll wire the output from the random number generator into the shift register on the right, and labVIEW colors both of the shift registers orange to match the data type. Whatever value gets passed into the right shift register will be available from the left shift register on the very next loop iteration. To view that,…

Contents