Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse counter using 6009

hey i have a problem:

i need to be able to count 4 seperate TTL signals but i the 6009 only has 1 counter channel.

These inputs are paired so for input 1 and input 2, only one will be signalling at any given time (the same is true for inputs 3 and 4) so i could probably use a case structure to switch between the two counts.

But that still leaves inputs 3 and 4... I have another DAQ that i could use but that seems rather... elaborate.

Is there a better way to do this? Is there a way to have the digital I/O ports act as counters and as quickly as the counter channel?


Thanks in advance,
Eric
0 Kudos
Message 1 of 4
(3,506 Views)

If you want to count at the full speed of the counter (5 MHz I remembered ?) you can count just one channel ...

You can count the 4 channel but with a software timed clock, so in this case, the maximum frequency is dependant of your system.

Regards

Wilfried.
0 Kudos
Message 2 of 4
(3,504 Views)
Wilfried is correct in saying that if you want to count at the full speed of the counter which is 5 MHz, you can only utilize one channel since the USB-6009 only has one counter.  When you are monitoring digital lines, software timed or static I/O is used where the value is monitored inside a loop. In this case, no hardware timing is employed and the transfer speeds are completely dependent on software.  With LabVIEW, you can achieve a software accuracy of 1 ms (or a 1 kHz signal).  So if your signals are coming in at a frequency less than that, you should be able to poll and count the pulses.  Static I/O is usually used for low-speed applications that do not need hardware timed precision.  If you are interested in having this type of precision for all four of the signals you are monitoring, you will need a device with more than one counter.   The PCI-660x series are the counter boards that you could consider. 

This example program utilizes a timed software loop to acquire digital data for unstrobed (static) I/O boards.  This would get you closer to the precision that you need but is still limited by software timing. Hopefully this information will help you in your application!

Regards,
Vanessa L.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,474 Views)
Howdy,
I use 5 timed AI input channels at 8khz to supplement my single counter for frequencies of 4khz or less (nyquist max). The digital port read might be used if timing resolution were as good as AI input. I compared the 'real' counter and 3 AI input 'pseudo' counters with a pulse generator, a great nyquist validation experiment for students. The 6009 must sample all channels at same rate,thus the 48khz max throughput must be shared. I used 5 channels, 3 for counting and 2 for dc voltage   (5 x 8khz=40khz), obviously way overkill for dc, but you can't separate them. You could alter the vi to have higher sampling with fewer AI input counters.
christopher stanford.
0 Kudos
Message 4 of 4
(3,322 Views)