Skip to content Skip to navigation

Connexions

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

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of 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.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Lenses

What is a lens?

Definition of 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.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

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.
  • National Instruments display tagshide tags

    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.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

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.

Exercise 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
    Figure 1 ( feedbackfp.png)

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
    Figure 2 (feedbackbd.png)
    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. exehilit.png Click the Highlight Execution button, shown in Media 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
    Figure 3 (feedbackbdedit.png)
    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
    Figure 4 (moreiterations.png)
    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?

Send feedback