> Question about GLobal Variables. If I have a Global Variable vi with
> 10 different items on it(a mixture of arrays, booleans, strings, etc.)
> and I use say a boolean in another vi, does it use the same memory as
> if I had used the array? In other words, would it be beneficial to
> have each Global Variable in it's own vi?
I think that 10 VIs with 1 global each takes more memory that
1 VI with 10 globals. It is of course the same space for data storage
by itself but the VI panel takes resources that it is added for each global
VI.
> Also, is there a way to load global variables into memory and keep
> them there when the loading vi closes (like when a vi creates a
> reference to itself so it stays in memory when it's caller closes).
>
Obviously the Global
VI cannot open a reference to itself since it has
no diagram to run. However, it will stay in memory as long as one of
the following is true:
- a VI in memory (running or not) have a node to one
of the control of the global VI
- a reference is opened to the global VI (the hierarchy in which the
reference has been opened must stay running)
- its front panel is opened
Jean-Pierre Drolet
Scientech R&D