From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building on existing data while recording new data

Solved!
Go to solution

I'm currently working on a program that collect samples in cycles defined before a while loop. The problem is that data collected within a cycle is wiped before a new cycle begins, but only if more than one cycle needs to take place in a single run. I've attached a handful of files below to better display the problem. I attempted to fix this problem by splitting the array of waveforms, appending each component, and bundling them back together. The only reason why this doesn't work is because the program can't collect samples fast enough. How can I rectify this?  

Download All
0 Kudos
Message 1 of 2
(2,054 Views)
Solution
Accepted by topic author mecheng86

Your Record Data code won't execute until the While Loop stops.  You need to have your logging function inside the While Loop. 

 

Have a look at the Log Data example in the Example Finder, or search for DAQmx with data logging. 

 

A little more advanced topic that you might want to look for is Circular Buffer. 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 2 of 2
(2,042 Views)