LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx

I have a program in labview 2012, it has many dio writes and reads...it creates the task each time and sets the auto cleanup to true and does not clear the task after it has executed. This is a large program and calls these writes and reads many times. I noticed that as the program is in use the CPU performance monitor shows an significant increase in the # of handles and threads and the ram used goes up to, the handles and threads seem to continuously increasing over time. I have multiple intermittent problems that occur more often, the longer the program is running. Eventhough the auto cleanup is set to true I put a wait until done and a clear at the end of each dio read/write, my CPU performance is significantly different now where the # of handles and threads is much lower and does not increase over time, is there some bug in labview? Because it sure looks like the auto cleanup is not working

0 Kudos
Message 1 of 5
(3,605 Views)

The lesson here is close references and tasks you open and don't depend on automatic closing of this, that, or-the-other-thing. It's a discipline you need to develop.

 

Always cleanup after yourself.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 5
(3,579 Views)

Thank you for your  response. I normally do cleanu after myself but in this case I am trying debug someone elses code

0 Kudos
Message 3 of 5
(3,555 Views)

Another lesson would be that snarky responses are best left not said...this is a discipline that you need to develop

0 Kudos
Message 4 of 5
(3,384 Views)

I didn't think mike's response was snarky - it was good programming practice, regardless of who wrote the code. You/they should create the task once at the start of the application and clear the task once at the end. Repeatedly opening/closing the task will cause LabVIEW to repeatedly reserve, configure & release the hardware which is going to use CPU and if any references get left open, they will consume memory.

 

I'm not certain, but I think the 'auto cleanup' just releases the device once the whole VI finishes executing, if there are no other open references to it at the time.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 5
(3,372 Views)