Hi, I've been working on this problem for hours now and can't quite seem to find the solution. I want to be able to log my data at a different frequency than my sampling. Someone on this forum was kind enough to help me get start so now i've adapted his code, with a few additions.
The problem: when I click on the Acquire data button, I need the shift register of my while loop to return to zero. Right now, the shift register just keeps on going and, if for example I want to collect data every 2 samples but I don't click on "acquire" until, say, the 3rd sample is read, then my comparison between the loop iteration and the time interval I want to collect data will never match up. But if i can reset the shift register of the loop to zero, then it will work! 😄
Also, how accurate will this be to log data. If I'm using DAQmx to acquire analog signals, say at 10Hz, and I want to collect data at 1Hz, so I set up my program to write the samples every 10 iterations of the while loop, will it log every 10 seconds?
Thanks a lot!