Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Passing Multiple Values to the Next Loop Iteration

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

You can create stacked shift register terminals on the left side of a loop to remember multiple previous iterations and carry those values to the next iterations. This technique is useful for averaging data points.

Complete the following steps to configure a shift register to carry over more than one previous value to the next iteration.

  1. Create a shift register.
  2. Right-click the left or right shift register terminal.
  3. Select Add Element from the shortcut menu to create an additional terminal on the left side of the loop.

Stacked shift registers can occur only on the left side of the loop because the right terminal transfers the data generated from only the current iteration to the next iteration, as shown in the following block diagram.

If you add another element to the left terminal in the previous block diagram, values from the last two iterations carry over to the next iteration, with the most recent iteration value stored in the top shift register. The bottom terminal stores the data passed to it from the previous iteration.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit