LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView useing more and more memory till lock up.

I have a program that reads from my digitizer, then analyzes the data and just does this over and over again. Im useing two sub VIs, one that reads, one that analyzes. First it reads, places the data into an array, and then the analyze VI then feeds that array into itself, analyzes and returns a VERY small table of data, generaly 5 rows, 6 colums worth. The Array of data im looking at however is pretty big, around 2 million points of data. On the first run it does fine, but then consistantly gets worse and worse over time and then eventually just locks up completly eating up all of my available memory. I even made sure the array in the main VI wasnt being added to by clearing that array right after it analyzes. Please let
me know what I can do to fix somthing like this, for my program will be one that needs to be able to run possibly for days on ends.

Thanks you very much,
-Mark
0 Kudos
Message 1 of 4
(2,655 Views)
I don't know from the information given, but you can use the Profiler in LabVIEW to see which VI is using the memory.
0 Kudos
Message 2 of 4
(2,655 Views)
Hi Mark,

Are you initializing the 2 million points array of data somewhere? Please check out the following link if you are using initialize array function.
http://digital.ni.com/public.nsf/websearch/DA3F851F8581CE2186256C1C00764C7F?OpenDocument

Regards,
Ankita A.
National Instruments
0 Kudos
Message 3 of 4
(2,655 Views)
It's a bit hard to guess without seeing the code.

I am very puzzled by one of your statements: How are you "clearing the array"? In general, the wire is the data, while controls and indicators contain copies of it.
So operations such as feeding an empty array to local variables of the controls or indicators just causes uneccesary resizing operations and the same memory needs ot be reallocated in the next iteration. In fact you should keep the array at constant size so its memory does not need to be constantly freed and reallocated.

Are there any uninitialized shift registers in any of the subVIs? Do you use local variables?

You might also want to set the subVIs at subroutine priority.
0 Kudos
Message 4 of 4
(2,655 Views)