Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading 1 sample with DAQmx

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.

0 Kudos
Message 1 of 2
(3,007 Views)

Duplicate thread: http://forums.ni.com/t5/LabVIEW/Acquiring-1-data-sample-from-DAQmx/m-p/3286323#U3286323


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,994 Views)