When reading three channels by DAQmxReadAnalogF64 the first channel appears to have an offset of one sample. I'm feeding the same signal to all three channels.
- trigger rate: 1kHz
- software version: LabWindows 8.1.1
- same behavior for GroupByScanNumber
source code:
int a=100;
DAQmxCreateTask ("", &readOutHandle);
DAQmxCreateAIVoltageChan (readOutHandle, "Dev1/ai0, Dev1/ai1, Dev1/ai2", "", DAQmx_Val_Diff, -10, 10, DAQmx_Val_Volts, "");
DAQmxCfgSampClkTiming (readOutHandle, "PFI0", 100, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 3*a);
DAQmxGetTaskAttribute(readOutHandle,DAQmx_Task_NumChans,&numChannels);
data = malloc((a*numChannels)*sizeof(float64));
DAQmxStartTask (readOutHandle);
DAQmxReadAnalogF64 (readOutHandle, -1, 1000.0, DAQmx_Val_GroupByChannel, data, a*numChannels, &numRead, 0);
when applying a sinosodial signal ai1 and ai2 are in phase, but ai0 is one sample behind.