05-11-2006 08:41 PM
05-12-2006 12:03 AM
Hi dakeddie,
I don't know any LabView but am somewhat familar with DAQmx.
You stated initially that you were interested in edge counting but it sounds like you're either doing frequency or period measurement. There are some subtle differences. Frequency and period measurement use "implicit" timing, meaning that you get a new measurement sample whenever one is ready, as dictated by the measurement signal. If this is what you're doing, you need to change the default timeout (10 sec) for data reading to a larger value, e.g. DAQmx_Val_WaitInfinitely (in Ansi C) waits forever. On the other hand, edge counting uses "sample clock" timing, meaning you can read the measurement data whenever a clock edge is detected - at a periodic rate for example. With edge counting you should always be reading the cumulative (total) number of edges since the task began, so I think the error you speak of shouldn't occur. Of course, if this error is occuring in edge counting mode, you could increase the read timeout just as with frequency or period measurement.
05-12-2006 08:55 AM
There have been a lot of threads here about photon counting and binning. I would tend to suggest that you use a 1-counter buffered measurement rather than the 2-counter (unbuffered?) measurement. Another key concept for you to look into is the boolean "Duplicate Count Prevention" property in DAQmx. Here a links to a couple threads, and I'm sure there are more if you search with various combos of terms similar to photon, counting, binning, etc.
http://forums.ni.com/ni/board/message?board.id=40&message.id=2318&query.id=27323#M2318
http://forums.ni.com/ni/board/message?board.id=40&message.id=2498&query.id=27397#M2498
Hope this helps you get started...
-Kevin P.
05-15-2006 01:26 PM