Connexions

You are here: Home » Content » Accessing Previous Data VI
Content Actions
Lenses

What is a lens?

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...
Affiliated with (?)
This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • This module is included in aLens by: National InstrumentsAs a part of collection:"LabVIEW Graphical Programming Course"

    Comments:

    "A full introductory course on programming with LabVIEW."

    Click the "National Instruments" link to see all content affiliated with them.

    National Instruments
Also in these lenses
  • This module is included inLens: Connexions Books Available for Print on Demand
    By: ConnexionsAs a part of collection:"LabVIEW Graphical Programming Course"

    Comments:

    "This book is available through the Connexions beta version of print-on-demand from online materials."

    Click the "Printable Books" link to see all content selected in this lens.

    Printable Books
Tags

(?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Accessing Previous Data VI

Module by: National Instruments

Summary: To observe the use of shift registers and feedback nodes to hold data from previous iterations of a For Loop.

Problem 1

1.a) Front Panel

  1. Open the Feedback VI located in the C:\Exercises\LabVIEW Basics I directory. The front panel shown in Figure 1 is already built.
    Figure 1

1.b) Block Diagram

  1. Display the block diagram and make sure both the front panel and block diagram are visible. If necessary, close or move the Tools and Functions palettes.
    Figure 2
    The 1 wired to the left terminals on the For Loop initializes the Feedback Node to 1. The Wait Until Next ms Timer slows the operation of the code. You also could use Highlight Execution instead of the wait function to slow the operation. The same code is used twice in this block diagram with the Feedback Node in a different portion of the wire.

1.c) Run the VI

  1. Run the VI. The top section of the code reads the initialized Feedback Node and passes this value to the Multiply function. The bottom section of the code reads the initialized Feedback Node and passes this value to the indicator. This Multiply function does not execute until the next iteration of the loop.
  2. Click the Highlight Execution button, shown in 3, to enable execution highlighting. Run the VI again to observe the order of execution. Turn off execution highlighting when you understand the execution order. The VI continues executing at normal speed.
  3. Replace the bottom Feedback Node with a shift register, as shown in Figure 3.
    Figure 3
    1. Select the bottom Feedback Node and press the <Delete key to delete it.
    2. Right-click the border of the For Loop and select Add Shift Register.
    3. Initialize the shift register by wiring 1 to the left shift register.
    4. Change the label of the bottom indicator to Shift Register and the top indicator to Feedback Node.
  4. Run the VI. Notice that both the Feedback Node and the shift register portions of the block diagram have the same functionality.
  5. If time permits, complete the following optional steps; otherwise, close the VI and do not save changes.

1.d) Optional

  1. Revise the shift register to display the last three iterations of the For Loop data, as shown in Figure 4.
    Figure 4
    1. Resize the left shift register to three elements. Right-click the shift register and select Add Element from the shortcut menu to add each shift register.
    2. Initialize each elements of the shift register to 1.
    3. Right-click each element of the shift register and select Create>>Indicator. Label each indicator.
  2. Run the VI.
  3. Close the VI. Do not save changes.

Comments, questions, feedback, criticisms?

Discussion forum

Send feedback