Discussion:
Counting TTL pulses in LabVIEW
(too old to reply)
robhlam
2006-07-28 16:40:13 UTC
Permalink
Hey guys,

I'm a poor little undergrad who has been given LabVIEW, a PCI-6220 card
and a BNC-2110 breakout box and told to count the TTL pulses from an
avalanche photo diode (at up to 40 MHz).

I've managed to get LabVIEW reading analog inputs with no problems but I've spent days trying to get the counter working.

Measurement & Automation > My System > Devices and Interfaces
> NI-DAQmx Devices > NI PCI-6220: "Dev1" > Test panels... >
Counter I/O
will happily give me the edge count of a signal from an external generator.
(Settings as follows: "Channel Name" = "Dev1/ctr0", "Mode" = "Edge
Counting", "Edge Source" = "/Dev1/PFI1", Frequency" = 1000, "Duty
Cycle" = "50"  Physical ground from signal generator connected to "D
GND" and the signal wire to "PFI 1")

I tried using
C:\Program Files\National Instruments\LabVIEW
8.0\examples\DAQmx\Counter\Count Digital Events.llb\Count Digital
Events-Buffered-Continuous-Ext Clk.vi
But it just kept giving errors. Either it didn't find a signal when
using /Dev1/PFI* (error -200284 "Some or all of the samples requested
have not yet been acquired...") or if I tried other sources like
OnboardClock (Error -200303 "External sample clock must be specified
for this application) I got a selection of other errors.
Any help would be very gratefully received.

Thanks,

Robert
devchander
2006-07-31 09:40:11 UTC
Permalink
Did you try using 'count digital events.vi' ??
 
Try it
 
devchander
2006-07-31 10:40:09 UTC
Permalink
Do read throught the doucmentation for that VI
 
It tells
Note: For buffered event counting, an external sample clock is necessary to signal when a sample should be inserted into the buffer.  This is set by the Sample Clock Source control.
So you to Physically Hardwire/connect an external Sample clock for this VI to work
Hope this helps

 
robhlam
2006-08-07 09:40:10 UTC
Permalink
Thanks again for your help.
 
I think ideally we would have a stable hardware clock and switch to "count digital events-buffered-continuous Ext Clk.vi" but we don't appear to have one lying around.
Loading...