Hi,
I have been trying to follow this thread with great interest. It
is however a bit complicated for me being relatively new to Labview and
DAQmx in particular.
I have a very similar application which even sounds a bit simpler than the original post.
I have random TTLs coming from a photon detector which I want to count
the number of pulses in a given time bin - so far the same as the
previous post. However, after collecting over this bin (say 4ms),
I want to stop counting and reset the counter. Basically, I am
collecting a fluorescence image, so at a given point in my 2dimensional
scan, I collect photons for 4 ms, then I stop counting, move the
scanning stage to the next pixel, and count again for 4 ms, etc etc.
until I have sampled each point in the 2d scan.
I have my photon TTL pulses going to one input pin, and I have a clock pulse going to another input pin of my BNC 2110.
Right now what I have done is used "DAQ Assistant" edge counting with
the acquisition mode set to "1 Sample (HW timed)" . This is where
I get a bit confused. I am not entirely sure how to tell Labview
to only collect for 4ms. (I would ideally like to include this in
the front panel as a control, where the user could select the
integration time per pixel for the scan) I have my external closk
set to 250 Hz, so that 1 Sample equates to 4ms. Is my
understanding correct in how Labview counts the pulses here? Once
this count is complete, I then DAQ mx stop task.vi to stop the DAQ
Assistant and effectively reset the counts to zero. Next time
around the loop (i.e. next pixel) it does it all over again.
I am convinced there is an easier way, or more elegant way, to do
this. For instance: do I really need an external clock? It
seems bizarre that with all the electronics in the PC and card, that I
can't get a clock from somewhere ...! ( I have the PCI 6229 by the way).
Another strange thing, that could be an effect of how I collect counts,
is that there seem to be random spikes in the counts occuring through
the data. This is not likely from the detector, but seems to be
electronic noise from within the card/PC.
Anyway help would be much appreciated.
CHeers,
Jim