Lets say i want to aquire 262144 Samples @ 51,2kHz.
I use the SafeTaskDisposer example from the documentation and start acquiring data like this.
Snippet
analogReader.BeginReadWaveform(4096, analogCallback, continuousTask);
I count the samples that have been acquired and stop at 262144.
Snippet
if (_cancelAfterNSamples) { _nSamplesAquired += data[0].SampleCount; if(_nSamplesAquired != _finiteSamples) { // Do Stuff... } else if (_nSamplesAquired == _finiteSamples) { this.Dispose(); } }
The problem i heave is that my measurement should take 5.12s but in reality it measures like 10 to 15 seconds for the 262144 samples. The samplecount is right but it takes way to long. I Use the cDAQ-9174 with USB.
I feel i cant trust that the data i acquired has really a Ta = 1/51200Hz.