Uninitialized Shift Register

From LabVIEW Wiki
Jump to: navigation, search

An uninitialized shift register is a shift register of either a While Loop or For Loop that has no input data wired to the shift register's left terminal from the outside of the loop. Since the shift register is not initialized, the data that flows out of the shift register:

  • on the first time the loop is called, is equal to the default value of the shift register's data type, and
  • on subsequent calls, is equal to the value that flowed into the right terminal of the shift register, on the previous call of the loop.

This behavior means that the shift register can be used to store some data that will be remembered from one call of the loop to the next. This technique is used for creating Functional Globals.