05-06-2008 11:01 AM
05-06-2008 11:54 AM
05-09-2008 10:19 AM
There have been a lot of threads here about photo counting and time-stamping. Here's a few of my thoughts and you can do some searches to find a whole lot more ideas. Sorry, I don't have LV handy to be able to look at the code now.
The error is pretty likely due to the board's hardware FIFO getting overrun before the driver can transfer the data to system RAM. The FIFO is only 1 or 2 samples deep. 2 or 3 consecutive photon pulse edges that arrive too close together can produce this error. Two likely causes are somewhat noisy photon pulses, or brief bursts of pulses at a very high rate. Among the possible noise workarounds are board-level features to digitally filter the incoming pulses. To work around bursts of pulses, I would point you to one of the USB-based M-series boards that has a much larger counter FIFO of 1024 samples. I think it's the 6210.
These general thoughts are only partly consistent with your symptoms though. The fact that the problem is more severe with the real APD than with a function generator is probably a key clue that either noise or brief high-freq bursts from the APD are a factor. The fact that the problem doesn't entirely disappear with a func gen is a clue that you may have more than one root cause.
I'm a bit surprised that calling out a larger system RAM buffer also helped a little. It could be that *some* of the error codes are caused by the board's hardware FIFO while others are caused by overwriting the system RAM buffer.
-Kevin