LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Many Global Variables can be Created in a Single Global VI?

Hi,

 

I have a doubt...... i have created a Global VI in that i have placed a Boolean...Like wise how many variables can be inside a single Gloabl VI????

0 Kudos
Message 1 of 4
(3,153 Views)

As many as you want.

 

Of course, this leads to the inevitable quesion of what you're using the global variables for... Global variables, like local variables, can lead to race conditions if not used properly. The LabVIEW Help also has a couple of pages on caveats of global variables.

0 Kudos
Message 2 of 4
(3,144 Views)

@karthikeyan Mathialagan wrote:

Hi,

 

I have a doubt...... i have created a Global VI in that i have placed a Boolean...Like wise how many variables can be inside a single Gloabl VI????


In pre-LV 8 ( I think!) the size of the FP was limited such that if all of teh controls were is a single cluster that was flattened to a string, the type descriptor had to be less than 65K or ther abouts. Since then the size has been bumped up so...

 

The limit is now dependent on the address space of the OS and the amount of phystcal memory in the machine.

 

But the abovve is all some educated guess based on what I know. Since I avoid Globals like the plague, I can't speak from experience.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 4
(3,115 Views)

I think the answer is: Too many.

Should you manage to fill a VI with globals your program and/or the design probably has some issues. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 4
(3,111 Views)