Showing results for 
Search instead for 
Did you mean: 

How to counter-tag random pulses - (continuously save clock counts for each random pulse)

Hi to all, 


I have a clock signal, and then some TTL pulses (coming from a detector).

I want to continuously read the number of pulses of the clock (the "tag") for each time the detector sends a TTL pulse.

I should save these tags in a binary file.

I have 4 different detectors, and I need to count each of them (so, a file for each detector) using the same clock for all of them.




clock: 5 MHz would be the minimal requirement, 20 the optimal

TTL pulses: random, with an average rate of 200 KHz


I have two PCI6602 boards (I found that each 6602 can have only up to 3 DMA counters, so I bought a second one)

and I will probably use LabView 2009 (DAQmx) under windows XP (or linux).


I have some experience with LabVIEW, but feel I don't have enough knowledge to understand the details, and which is the best approach.

Starting from an example in


I added the file saving and the increasing counter (with shift registers).

But with this approach, for my specs (high frequencies) I need 2 counters for each channel, so I would need to buy two more 6602 cards.

Are my requirements beyond the hardware (i.e. two boards only) capabilities?


Is there a more efficient approach?





0 Kudos
Message 1 of 3

In the meanwhile, I tried few more attempts:

with "2 edge separation" apparently is not possible to use an external timing source.

The "encoders" approach seems not suitable, since it requires no input other than the "encoder" intelf.

So, I am running out of options to try...

Unless there is something I am missing.

0 Kudos
Message 2 of 3



I think it's not a period measurement, but a gated edge counter that you should use.

Have you had a look at the following exemples?


I know they are not really new, and they'll maybe need some modifications to work with the newer drivers, but they should give you some clues to access what you want to do with the hardware you already owns.


Kind Regards,

Olivier L. | Certified LabVIEW Developer

0 Kudos
Message 3 of 3