04-23-2016 04:09 PM - edited 04-23-2016 04:22 PM
Apologies for posting in the wrong section. I've reposted it in the software section, but can't find the option to delete this from here.
Hi folks,
I'm trying to acquire data from a Force sensor connected to an DAQ card in sync with some other devices. Problem is, the other devices run at a much lower frequency.
Reading just one sample from DAQmx in a timed loop often results in errors because the software can't keep up with the hardware acquisition, so my solution is to read N samples from the DAQ at a certain frequency and then discard N-1 by indexing the 0th element of my output and recording just that (Image attached).
However, I found this page from 10 years ago which says "DAQmx does not allow the user to specify whether the newest or oldest data is read from the FIFO; it always reads the newest and clears the remaining FIFO." If it is FIFO, how is it reading the newest data? Shouldn't it be reading the oldest?
My question boils down to this: should I be indexing the first or the last element/row of my output in order to get the data that was acquired when the loop started?
Any alternative suggestions on recording just 1 sample are also welcome. Note that I can't stop the DAQ and start it within the loop becuase that reduces the frequency below my threshold for recording data.
04-23-2016 05:49 PM
Duplicate thread: http://forums.ni.com/t5/LabVIEW/Acquiring-1-data-sample-from-DAQmx/m-p/3286323#U3286323