Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PC memory use increases with DAQ and is not released when aquisition stops.

When aquiring analog data with a 6052e DAQ, the Win XP PC page file use increases but is not released when the aquisition is complete. After multiple repeatative aquisitions, the PC locks up due to insufficient resources.
0 Kudos
Message 1 of 7
(3,392 Views)

Macblood,

 

Sounds like a memory leak in your program.  Can you post your code?

0 Kudos
Message 2 of 7
(3,370 Views)

Thanks for your help Wayne...

 

I may have already solved the problem by searching NI website for "memory leak" and finding article about DAQmx Stop Task vs DAQmx Clear Task.vi  implementation. My code is currently using the STOP Task. I'll try experimenting and report back what happens.

 

Macblood

Message 3 of 7
(3,363 Views)

Macblood,

 

Thanks for the update.  Sounds like you are on the right track.

0 Kudos
Message 4 of 7
(3,361 Views)

Macblood wrote:

Thanks for your help Wayne...

 

I may have already solved the problem by searching NI website for "memory leak" and finding article about DAQmx Stop Task vs DAQmx Clear Task.vi  implementation. My code is currently using the STOP Task. I'll try experimenting and report back what happens.

 

Macblood


Yup- Stopping a task only turns it off - it does not release the DAQmx resource.  So if you recreate the task you get a new task and the odl (stopped) one is still available in memory (it may not be useful but it's still there taking up space- like an ex-wife.)  Much better to use Clear task as that kills the referance.  In an older LV version I found out (the hard way of course Smiley Sad ) that there is an upper limit to the number of DAQmx tasks that can exist at any one time.  In that version 7.1? creating the 4097th task crashed LabVIEW.


"Should be" isn't "Is" -Jay
Message 5 of 7
(3,355 Views)

 

I replaced the Stop Task with a Clear Task in my DAQ vi and the page file memory size is cleared after each execution.

 

Thank you all.

0 Kudos
Message 6 of 7
(3,349 Views)

Macblood wrote:

 

I replaced the Stop Task with a Clear Task in my DAQ vi and the page file memory size is cleared after each execution.

 

Thank you all.


Whoops!

 

You might have missed something (or I was unclear) Create the task Once when your application starts.  Start and stop it as many times as you need to acquire data.  Clear it once when your application exits.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(3,324 Views)