Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Feedback Node

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Use a Feedback Node to store data from a previous VI or loop execution. Because a Feedback Node stores only one data value at a time, the node is useful in storing and retrieving state information from the previous execution. A Feedback Node does not perform any action on the data it receives. Instead, it receives a value from the initializer terminal and transfers the value to the next input terminal. The Feedback Node stores the value until it receives a new one. A Feedback Node is analogous to a z-1 block in feedback control theory and digital signal processing.

Creating Feedback Nodes

A Feedback Node, shown as follows, automatically appears if you wire the output of a subVI, function, or group of subVIs and functions to the input of that same VI, function, or group and if you enable Auto-insert Feedback Node in cycles on the Block Diagram Options page in the Options dialog box. LabVIEW enables Auto-insert Feedback Node in cycles by default.

You also can manually select the Feedback Node on the Functions palette.

Initializer Terminals

The initializer terminal, shown as follows, sets the initial value of the Feedback Node.

When you place a Feedback Node on the block diagram, the initializer terminal remains attached to the node and the node globally initializes. If a Feedback Node globally initializes and you set an initial value, the Feedback Node initializes to that value on the first call of the VI in an execution. If you do not wire an input value to the initializer terminal, the initial input of the Feedback Node for the first execution is the default value for the data type. Each time the VI runs after the first execution, the initial value is the last value from the previous execution. If you use the Feedback Node in a loop, you can move the initializer terminal to the left edge of the loop to configure the node to initialize every time the loop executes.

Front Panel Indicators and Feedback Nodes

Front panel indicators connected to the same cycle of wires as the Feedback Node display different values depending on their location on the wire relative to the Feedback Node. In the following block diagram, the Feedback Node passes the initial value to the next input node, which operates on the initial value and sends the final value to the indicator and back to the Feedback Node.

In the previous block diagram, the Increment function operates on the initial value of 4 before passing it to the indicator. Thus, the front panel indicator displays 5. However, in the following block diagram, the Feedback Node sends the same data value to the Increment function, but the indicator displays a different value.

In the previous block diagram, the Feedback Node initial value, 4, reaches the indicator before it reaches the Increment function. Although the final value sent to the Feedback Node from the Increment function is 5, the front panel indicator displays the initial value of 4.

Arrow Direction

You can change the arrow direction of a Feedback Node to indicate the flow of data along the wire by right-clicking the node and selecting Change Direction from the shortcut menu. Changing the arrow direction changes only the cosmetic appearance of the Feedback Node and the wires connected to it on the block diagram and does not change the direction of the flow of data.


Resources


 

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