03-11-2021 11:17 AM
I currently have two DAQs that are taking on-demand measurements from Encoders. I want to continually sample over an indeterminant amount of time, and store all of the samples being taken and write the whole thing to a file, but currently I can't figure out how to do it. My current file output (as shown below) only posts one value per column, but I'd like it to post ALL of the samples I've taken. Whenever I try to use continuous sampling mode, I get buffer overflow errors, and I'd prefer to do it this way.
Is there a way I can continuously store the values in an array and then write the array to the file or something to this extent? Any other solutions?
03-11-2021 07:49 PM
First, look up the NI White Paper "Learn 10 Functions in NI DAQmx and Handle 80% of your Data Acquisition Applications". [Hint -- Google]. Second, do NOT use the (Dreaded) DAQ Assistant, but use NI MAX. [Also do not use the Dynamic Data Wire -- use Waveforms or 2D Arrays].
Depending on your data rates, you might want to look up the Producer/Consumer Design Pattern (which comes as a Template in LabVIEW) -- this lets you take advantage of the natural Parallel Processing built into LabVIEW to save your data at the same time you are gathering it.
Bob Schor