LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

deleting data after passing to storage subVI

Hi All,

I am probably missing something simple. I collect several matrices of data and then pass them to a mathScript subVI for processing and saving. I repeat this many times in a single run. I want to continuously delete the raw data after I pass it to the processing subVI to preserve memory. Is there a good way to do that?

0 Kudos
Message 1 of 3
(2,669 Views)

LabVIEW does memory management for us and knows when it needs more and when it can reuse un-used buffers. Since allocating memory is very expensive time-wise LV will generally release memory once it has it.

 

What you can do is code such that LV is structure your code such that LV can "see" were buffers can be re-used, pass data by reference etc. One method is explained in the "Clear as Mud" thread found here.

 

Now as to the mathscript node... I can not speak to it treating memory as elegantly as LV does. 

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

Why not attach your code?  Many of us do data acquisition/collection/saving where the total amount of data can be terabytes, far more than fits in memory, yet we never "run out" (typically because we have parallel loops to Collect, Process, and Save the data in usable "chunks" (a few KB-MB at a time), and LabVIEW simply reuses the memory without us having to think about it.

 

Do you know you are having an "out-of-memory" problem?  If so, attach your code and we will make suggestions.

 

Or you can choose to not attach your code -- we might still make suggestions, but they probably won't be helpful ...

 

Bob Schor

0 Kudos
Message 3 of 3
(2,546 Views)