I'm having weird problems with continuous data acquisition using simulated device. When I read all available samples from the buffer using:
DAQmxReadAnalogF64(taskHandle, -1, 10.0, DAQmx_Val_GroupByScanNumber, data.get(), bufferSize, &numSamplesReadPerChannel, NULL);
I sometimes get gaps in the sine signal (see attachments). As I understand this call should return all available data from the buffer so gaps should not appear. When I perform the same read command with predefined sample amount (i.e. replace the -1 with some value) everything seems to work. I create my task using:
DAQmxCfgSampClkTiming(taskHandle,"", samplingRate, DAQmx_Val_Rising,DAQmx_Val_ContSamps, bufferSize));
DAQmxRegisterEveryNSamplesEvent(taskHandle,DAQmx_Val_Acquired_Into_Buffer, amountOfSamplesToSavePerIteration, 0, &onSamplesRead, this));
Is there an bug with my code or are the sine waves generated in such way that gaps appear with continuous acquisition?
Message Edited by SamiL on 08-07-2007 02:21 AM