Shift Registers Behavior in a SubVI

Updated May 3, 2018

Reported In

Software

  • 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?

Solution

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.

WAS THIS ARTICLE HELPFUL?

Not Helpful