‎03-31-2014 02:49 AM
Hi,
I am using global variables in order to share values captured by one VI (as kind of data source) with other VIs, but after several days of continuous running I recieve Error 2:Memory is full.\
Please advise how can i empty global variables or use other way of sharing data between VIs continuously without interruptions.
Thanks
‎03-31-2014 02:57 AM - edited ‎03-31-2014 02:58 AM
You need to show us some code.
Are you sure the memory problems is due to the global variables?
What does the global variables contain? (e.g. an array that grows over time without bounds).
To "empty" a global variable, you would simply write the smallest possible size of the datatype. For example if contains an array, write an empty array to it.
‎03-31-2014 03:00 AM
Hi Innka,
you don't get "Memory full" errors just by using global variables.
You get them because you
- build up arrays constantly
- open references without closing them
- similar wierd stuff…
So the point is: What kind of data do you store in those variables?
To share data you could use FGVs (FunctionalGlobalVariables aka ActionEngines aka LV2-style globals) or notifier or queues. It all depends on your requirements…
‎03-31-2014 03:33 AM
Hi,
Maybe it will be better if I answer your questions first.
I am reading and sharing values from indicators which are communicating using .NET protocol, and the values are received as two signed 6 digit numbers (DBL) and I am sampling the data every second. The idea was replacing the value each second and not creating the array of values.
Thanks a lot!
‎03-31-2014 06:16 AM
@Innka wrote:
I am reading and sharing values from indicators which are communicating using .NET protocol, and the values are received as two signed 6 digit numbers (DBL) and I am sampling the data every second. The idea was replacing the value each second and not creating the array of values.
So you don't have an array? The the global variable is not your problem. The .NET interface could be something to look at. Are you opening a .NET interface inside of a loop without closing it?