01-12-2010 03:34 PM
01-13-2010 07:17 AM
Macblood,
Sounds like a memory leak in your program. Can you post your code?
01-13-2010 08:03 AM
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
01-13-2010 08:19 AM
Macblood,
Thanks for the update. Sounds like you are on the right track.
01-13-2010 09:33 AM
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 ) 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.
01-13-2010 09:39 AM
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.
01-13-2010 02:02 PM
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.