From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

globals

I have seen references to "LabVIEW 2 style globals" as an alternative to global variables. My question is, how are these alternative globals constructed?ThanksPaul
0 Kudos
Message 1 of 2
(2,508 Views)
Paul Dillon wrote:

> I have seen references to "LabVIEW 2 style globals" as an alternative to
> global variables. My question is, how are these alternative globals
> constructed?
> Thanks
> Paul

A LV2 Style global is basically a VI that you construct.
They have input and ouput terminals and a while loop in the
diagram. There are other things you can add such as an
input to read or write.
The basic idea is to use a while with nothing on the conditional
terminal. This makes the loop run once for every time it is called.
The input is tied to a shift register on the left of the loop and the
output is tied to the shift on the right side of the loop.

some more advanced examples are in examples/general/globals.llb

If you look in the help under Functional Global it will
show you a simple
exampl.
Kevin Kent
0 Kudos
Message 2 of 2
(2,507 Views)