Garrett,
No, using change detection as a hw sampling clock is definitely better than using it to drive a software timed loop. Here are things I notice:
1. There's no call to DAQmx Start for either the counter or DI task. I knew unbuffered DI tasks can be read without an explicit call to Start, but did not know you could do that for buffered DI or for counters.
2. Nothing really syncs them to start together. The little screenshot I posted didn't show this either, sorry. The method would be to start the counter task first. Then it would already be ready and waiting for the change detection event when the DI task starts.
3. The DAQmx Read calls in the loop don't specify the # of points to read. Each task will by default read all points available at the time of the call to DAQmx Read. To keep the data in sync, make sure that the two tasks read the same # of points on each loop iteration.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.