Initializing Shift Registers and Using Previous Values

Use an initialized shift register to reset the initial value of a shift register each time a VI runs.

Complete the following steps to initialize a shift register.

  1. Create a shift register.
  2. Wire any value from outside the loop to the left terminal. If you do not initialize the register, the loop uses the value written to the register when the loop last executed or the default value for the data type if the loop has never executed.

Use a loop with an uninitialized shift register so that each time the VI runs, the initial input of the shift register is the last value from the previous execution. Leave the input to the left shift register terminal unwired for an uninitialized shift register to preserve state information between subsequent executions of a VI.