We have searched the forums and looked for examples but have not been able to find anything that works. We are working in C which makes the examples and help that much less avaliable.
Hardware:
NI6612
We are suppling an external signal "clock" (10Mhz) that we are down sampling by using a counter.
We are using the count edges chan function and trying to attach Register Signal Event with CounterOutputEvent so that we can get a call back. But this gives us the error "Event souce signal specified is not supported with the measurement type and/or sample timing type of the task."
DAQmxCreateTask("",&taskHandle);
DAQmxCreateCICountEdgesChan(taskHandle,"/Dev1/ctr1","",DAQmx_Val_Rising, 10, DAQmx_Val_CountDown);
... (other configuration to enable reset and specify port to reset on)
DAQmxRegisterSignalEvent(taskHandle, DAQmx_Val_CounterOutputEvent, 0, CallBack, NULL);
Currently we are getting the counter to reset to original value when it reaches zero and count down again. This happens in hw and we dont need to monitor the counter. We have tried to set the counter output to pulse so that we can do change detection on a different port but this did not work. the O-scope did not show a signal being generated so that may be the reason change detection event did not trigger.
Please help us on how to get a callback when the counter reaches zero.