Pass Values Between Iterations of SubVI Without a Loop

Updated May 3, 2018

Reported In

Software

  • LabVIEW

Issue Details

I want to pass values from one iteration of a SubVI to another. Normally I would use Shift Registers (see Shift Registers: Passing Values between Loop Iterations - LabVIEW Help for more information), but my SubVI doesn't use a loop. How could I set up something similar to a Shift Register without using a loop?

Solution

You can use a Feedback Node in place of a Shift Register. You can initialize Feedback Nodes similar to Shift Registers. The value you wire would normally wire into the right Shift Register, you'll instead wire into the right input on the Feedback Node. The value that you would wire out of the left Shift Register will be available at the left connector of the Feedback Node. Without a loop, this will pass values from one iteration of the SubVI to the next.

Additional Information

LabVIEW includes an example of the similarities between Shift Registers and Feedback nodes. Open the LabVIEW Example Finder by opening LabVIEW and go to Help >> Find Examples... then navigate to Fundamentals >> Loops and Structures >> Feedback Node - Building an Array.vi to open the example. The example is also attached to this article.

WAS THIS ARTICLE HELPFUL?

Not Helpful