Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

noisy counting with USB-6212

We are trying to count pulses from our mass spectrometer detector.  The pulses are run though a pre-amp and are somewhat TTL-like.  They are 5 V P-P, with a very fast rise time (a few nsecs), flat at 5V for about 250 nsecs and decaying back to 0 over 100 nsecs or so.
The problem is that as measured from our NI USB-6212 (counter 1 or counter 2), the count rates are very scattered.  The average values (over 10 seconds or more) look reasonable.  The hardware-software combinatinon has no trouble counting from a signal generator in the same count rate range (100-300 kHz) as our real signals.
We are using many a couple of functions of the 6212.  We are currently using ports 0 and 2 for digital input and output to control custom boards in our instrument.  We are not currently using AO or AI.  We had been using counter 1, but today did tests with counter 0, and with nothing else connected to the 6212.
We are controlling the 6212 with a Dell D620 laptop computer running Labview 7.1.1, and DAQmx 8.6.0f6.
A colleague hooked our signals to his data acquisition card (Measurement Computing) and the signals were not scattered.  Thus we believe the problem has something to do with our hardware connections (perhaps grounding issues?) or our software.  We have also tried test panels and simple programs to see if we are having some problems with our software.
We have used the same instrument with a PCI-6601 card and it works fine.
Can you please offer advice on hardware, connectivity, drivers, software - anything!
Thanks,
Chris & Becky
0 Kudos
Message 1 of 6
(5,054 Views)
Chris and Becky,

I have a few questions to help us get to the bottom of this.

Your USB-6212 should be almost identical in behavior to the PCI-6601 that you had previously used at the speeds you described. What differences between that time and this time do you have-- different code, wiring, etc.?

What happens when you try to count the edges with test panels? Do you get any results at all?

Finally, when you say "rates are very scattered". So does it miss every other edge, or will it work for a while and then stop for a while. More details on the kind of result you get would be helpful.

I look forward to to your reply,


-Marshall R
0 Kudos
Message 2 of 6
(5,039 Views)

We are using essentially the same code for both data acquisition problems (PCI-6601 and USB-6212).

We get the same scattered signals with the test panel.

Since we posted the original message, we have tried counting edges with a USB-6501, and the counting of our signals is very quiet.  The values are below what we were getting with the USB-6212, indicating we were probably getting extra counts (intermittantly).  The count rate with USB-6501 is about 90 kHz.  We were getting 100-300 kHz with the USB-6212.  We hypothesized that perhaps were we getting extra edges on the decaying edge of our pulses.  We tried implementing bounce filtering (using the DAQmx property node), but it didn't seem to make any difference.  Perhaps we didn't do it quite right.

Thanks for your help.

0 Kudos
Message 3 of 6
(5,032 Views)
So by "scattered" I assume you mean the signal is fine for a while then does not work for a while.  I am also assuming your are expecting a period signal, is this correct?

You also said the signal is "very quiet", is the amplitude not very high?  If you are not always reaching the TTL logic levels, this could cause a problem.

Finally, what are you using to implement your bounce filter?  This knowledge base discusses how to set one up properly.

Sorry, I can not be more help yet, but it sounds like we have a poor signal. Is it possible for you to scope the signals to see its characteristics?
-Marshall R
0 Kudos
Message 4 of 6
(5,019 Views)

Noisy means that the count rates vary in time, when the pulse rates are constant.  It appears to mean we are counting extra pulses, either small glitches, or pulse bounces.

We have looked at the pulses on a scope and they appear as described in our first message.  Zero volts rising to 5 volts in a few nsecs, constant at 5 volts for 250 nsecs, and then decaying to zero volts over about 100 nsecs.  They are not periodic.  They come from an ion detector and have a Poisson distribution of their time spacing.

As we said, counting edges with the 6501 works fine.

The Knowledge Base article you refer describes the philosophy of debounce filtering, but doesn't specifically say how to do it for my hardware.  Are there more detailed examples or instructions?

Thanks,

Chris & Becky

0 Kudos
Message 5 of 6
(4,978 Views)
Hi Chris and Becky,

Is there a particular reason you're trying to de-glitch your ion detector pulses? It sounds like that only on this USB board do you encounter problems. If there were glitches in your signal, you would expect this problem to manifest itself on every piece of hardware you tried, but you report that your 6501 works fine.

Have you looked at a comparison on an oscilloscope between a working setup on your 6501 and the misbehaving one on the USB-6212 with the signal connected to the DAQ board inputs? If there isn't a difference in the signals arriving at each board, then perhaps while there aren't any glitches in the signal, the shape of it is not good enough for the USB board to recognize it as a pulse.

In that case, it would make sense to de-glitch your signal. You wouldn't be de-glitching it perse, but you would be conditioning it to be more square. I would use the KnowledgeBase article Marshall linked and refer to the "Gen Dig Pulse Train-Finite-Retriggerable.vi" that ships with LabVIEW for an implementation of a re-triggerable pulse output. You can find that example from going to Help » Find Examples... and then navigating to Hardware Input and Output » DAQmx » Generating Digital Pulses.

Basically, you'd echo your ion detector signal with a pulse generated by a counter and use the echo. You'd use your ion detector signal as the trigger for a single pulse output that would generate a pulse that looked like your signal, and then you'd measure that pulse output as if it were your ion detector signal.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 6 of 6
(4,967 Views)