I'm doing continuous acquisition with 2 AI channels
sample rate = 1500, samplesPerChanToAcquire = 150
DAQmxCfgSampClkTiming(m_taskHandle, NULL, 1500, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 150);
DAQmxRegisterEveryNSamplesEvent(m_taskHandle,DAQmx_Val_Acquired_Into_Buffer, 150, 0, EveryNCallbacks, NULL);
When i do the DAQmxStartTask() the following error is displayed.
Error -200877 Requested Every N Samples Event Interval is not supported for the given Data Transfer Mechanism and buffer size. To keep DMA as the Data Transfer mechanism, modify the buffer size and/or the Every N Samples Event Interval so the buffer size is an even multiple of the Every N Samples Event Interval. To keep the same Every N Samples Event Interval and buffer size, change the Data Transfer Mechanism to Interrupts.
Property: DAQmx_Every N Samples Acq Into Buffer Event Interval
Requested Value: 150
Buffer Size: 10000
1. Why does this error occur?
How should i calculated nSamples value? Do i need to use some logic for nSamples to make it even multiple of buffer size before i start my acquisition? also i dont want to change the transfer mode to interupt.