National Instruments BridgeVIEW User Manual

Page 255

Advertising
background image

Chapter 11

Loops and Charts

BridgeVIEW User Manual

11-16

© National Instruments Corporation

Each time the VI is called,

running average

is computed from the new

input and the previous three values. Then the new value is saved into the
shift register, and the previous two values are moved up in the shift register.
There is no input value wired to the input side of the left shift registers, so
all three values are preserved for the next execution of the VI.

Because this subVI has nothing wired to the condition terminal, it executes
exactly once when called. The While Loop in this subVI is not used to loop
several times, but to store values in the loop shift registers between calls.

When the Running Average VI is loaded into memory, the uninitialized
shift registers are set to zero automatically. If the shift registers are wired to
Boolean values, the initial value is FALSE.

Advertising