LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve data after memory issue error

Greetings forum,

I had a long running experiment which took 3 days. Today it finished but gave me the error (attached image).

Once finished the labview stopped, I got the error and my data files were not saved. I was wondering is there a way I could retrieve unsaved data?

Also to prevent this from happening, is there a way to remove cache in labview?

Thanks for your help

 

0 Kudos
Message 1 of 5
(2,508 Views)

First question - probably not. Once the data is gone, if you didn't save it, it's gone.

 

Second question - sure thing. It sounds a lot like you're using Build Array or similar to create a very large data array over time, and you're continuously increasing the size of this array until your program ends. Over 3 days, even a moderate acquisition rate can cause a problem.

 

The solution is to look at something like the Producer/Consumer architecture, and then write to disk in your consumer (the producer is your current data acquisition loop). You can also display to a graph whilst running.


GCentral
0 Kudos
Message 2 of 5
(2,499 Views)

Also have a look at TDMS to simplify streaming lots of data to file. It will flush the data to file automatically (threshold can be set) so you will never lose it again.

Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(2,468 Views)

The code could make unneeded copies of the 'big array'. Preventing this might make 3 days fit.

 

If the data is critical, I'd stream to file ASAP though.

 

And of course the memory issue could be a memory leak...

 

We'd need details and\or code...

0 Kudos
Message 4 of 5
(2,456 Views)

It is nearly impossible to tell you how to fix your code without seeing it 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(2,453 Views)