Hello Scott_7723,
I took at look at your code, thank you for taking the time to add comments. I appreciate this.
With regards to your code, I noticed a few things. If you go into your Untitled 3.vi you will noticed that on the DAQmx create task, a 'true' is wired to the Autoclean pin. The
auto cleanup specifies if LabVIEW automatically destroys the
task when the application completes execution. Since you are running this program for more than 30 mins, the task you created is never destroyed, it sits there. You also have the Untitled 3.vi sitting in another while loop, this also runs multiple times creating a task every time you execute the larger while loop. This can add up to a large amount of space in memory.
What you might consider doing is creating the task once outside the while loop and then have it read from the channels multiple times, by only placing the read in the while loop. Take another look at your code and see if you can optimize the number of while loops you need to have. For an application like this, you may want to consider using lower level vis. Perhaps consider having the create task, sample clock, start task, stop task, or clear task outside the while loop. I have included a very useful link to various low level vis that you can use to program your DAQ applications.
Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Application
Make note of the figures and the order in which the vis are sequenced.
Give these suggestions a try!
Regards,
Sandra T.
Applications Engineer | National Instruments