I'm writing an application in C on Windows 7, using the DAQmx 9.6 API and the USB-6509 device. The digital input is configured with change detection:
DAQmxErrChk (DAQmxCreateTask("",&taskHandle_NI_R));
DAQmxErrChk (DAQmxCreateDIChan(taskHandle_NI_R, deviceStringFull,"",DAQmx_Val_ChanPerLine));
DAQmxErrChk (DAQmxCfgChangeDetectionTiming(taskHandle_NI_R,deviceStringFull, deviceStringFull,DAQmx_Val_ContSamps,1));
DAQmxErrChk (DAQmxStartTask(taskHandle_NI_R));
while(1){
DAQmxErrChk (DAQmxReadDigitalLines (taskHandle_NI_R,1,-1,DAQmx_Val_GroupByScanNumber,data_NI_R,1,&numRead_NI_R,&bytesPerSamp_NI_R,NULL));
//some other code
}
But the pattern of signals that I am reading from one device follows this pattern: 001001001. I would like to know why the method DAQmxReadDigitalLines reads the second 0 on this input line. I thought it was only supposed to read the line when a change in state occurred and block otherwise.
Thanks,
Danielle