Sunday, December 7, 2008

Creating & Using Functional Global in LabVIEW

An un-initialized shift register with in the single run loop (Before LabVIEW 8.5 ) VI is Functional global. This VI must having Read & Write operation. Functional global is also called as LV2 global.
This is similar to global variable (Used to read & write the values among the VI’s ).
Some advantages are,
* Avoid racing in value read & write operation
* Easily used among VI’s & subVI’s
* Modification & Addition of more operation is easy
Do not set Reentrant execution property in Functional global VI because it will make racing.
The basic method for creating Functional Global is given below (See Picture)




























Operation enum having Write & Read item. In write case value is stored into shift register .In Read case stored value is getting in the Value Out variable. This stored value is kept in the shift register upto the LabVIEW application is closed. You can use while loop with single run as a Functional global.