02-27-2013 04:28 PM
I am running this SubVI inside a For loop, with say 2000 iterations. As the iterations increase, I notice the elapsed time increasing, starting around 15ms when i=0 and inching up continuously until it is around 100ms at i=2000.
Let us accept that there is a method to my madness and not get bogged down in why I want to turn this on and off 2000 times. I have a similar subvi in the same loop, which does some waveform in/out tasks, that is showing the same problem on a larger scale. I am noticing a memory leak when I look at the Windows Task manager as well.
I suppose that creating the Voltage task every time is the problem, and I can certainly go move it to before the loop. But I don't understand where the lost time is going. Does it have to do with how Labview stores/accesses tasks maybe?
Solved! Go to Solution.
02-27-2013 04:58 PM
My guess? You're creating a new task every time but not closing it, so you end up using all the resources on your computer.
02-27-2013 05:03 PM
I don't think the issue is that the task is not being closed, because this other subVI, attached, does close the tasks but exhibits the same problem
02-27-2013 05:16 PM
Welp, nevermind -- seems like the unclosed task in one was causing the problem in the other.