07-18-2005 11:24 AM
Hi Ian,
If you are very concerned about not missing any pulses and about taking the measurements from two different channels at the same time, I think you may have to go a different route than you currently are. When I described using the wait until next ms multiple function I did not mean for you to place it between the start task and read VIs. I meant for it to just go in the while loop itself so it would control how often the loop iterates. The loop would then always iterate every 10 ms or whatever you specify. However, since you are starting and stopping the task in the while loop you are going to lose counts due to this overhead. You also will not know for sure that the bins of your two different channels always occur at the same time. What I would suggest is to not start and stop the task inside the while loop but to continually count and then subtract the previous loop's value to get the current number of counts so that you are not missing anything. To make sure your two channels are synchronized, you will need to use an external clock. There is a example that uses an external clock in the example finder called Count Digital Events-Buffered-Continuous-Ext Clk.vi. I think the first few messages found on this thread help explain this concept. Sorry I didn't realize this sooner, but I think using this implementation in your experiment will work best for you.
Thanks,
Laura