HI, Everybody:
I am using PCI-6602 counter/timer to get the photon arrival time. But the data I got looks a little strange.
My system can be briefly described as this:
Photons--> Photon Detector--> Counter/Timer Gate.
The labview code I use is based on the example code ---- Meas Dig Periods-buffered-continuous-High-freq 2 Ctr. But I changed the measuring method of the virtual channel to high frequency with *1* counter, so that I can get each and every interval between those photons.
Unfortunately, the code only runs for about 1 second before it crashes (sometimes shorter, like 0.1s, sometimes as long as 3 seconds). Most of the data looks fine, but every now and then there will be a high spike of data, like the figure I attached here. The error message is 200141, telling me the data is overwritten. I am a little confused, because I clear the task immediately after taking the data, so the buffer should be cleared at the same time, right? And the photon intensity is less than 20KHz, so the counter should be able to handle it, right?
I am not very familiar with DMA(sorry:(), so although I tried to use it, it seems to make things worse. The code crashes after several miliseconds! I attached my code here, with and without DMA, and I really appreciate it if you can help finding out what's wrong with my code or method.
Thanks!
xiaoman