Shift Registers Behavior in a SubVI

Updated Jan 3, 2019

Reported In


  • LabVIEW

Issue Details

In my main VI I am calling a subVI which uses shift registers in a while loop. How will the shift registers behave each time the subVI is called?


Shift registers in a loop will retain their value between iterations. Shift registers will also retain their value between multiple executions of a VI. This holds true in a subVI. Every time a subVI is called, the shift registers will be initialized to the previous value they had on the last execution of the subVI.

Additional Information

This implementation of shift registers in a subVI is a basic version of a Functional Global Variable (FGV). See the related link below for an example demonstrating the basic usage of an FGV.
Occasionally, shift registers will not operate normally when running a subVI independently when the subVI is is part of a larger application. Try running the entire application.