LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter problem

Hi,

I have a PCI-6025E card. I want to measure a frequency between 10 and 500Hz. The signal came froma Hall-sensor with TTL output. When i put the signal on the PFI9 input (ctr0 gate) and i use the Express VI "Frequency" (1 counter measure) i get sometimes good measure and sometimes wrong measure (6MHz for exemple).

I have plug the signal to an scope and ti vary from 0,1V to 4,6V without noise. When i put a TTL signal from a generator it work perfekt.

So, where is the problem ?

Thanks

Jeremy
0 Kudos
Message 1 of 5
(3,373 Views)
I was experimenting with counters a week ago and I was getting spurious measurements, they were very short glitchs too, something that might be hard to find on a scope. I think a 6MHz means you had a spurious output for 167 nano seconds. To fix it my problem I used a digital filter on the counter (which unfortunately I don't think is support by E-Series cards, someone more experienced with DAQ boards might know how to setup something equivalent though).

Link to info about setting up a digital filter.
http://digital.ni.com/public.nsf/allkb/220083B08217CFD686257131007E5D2C

The M-Series manual has a good description of what the filter does.
0 Kudos
Message 2 of 5
(3,363 Views)
Thanks for your help. I'll look on this way and i hope it will work

Jeremy
0 Kudos
Message 3 of 5
(3,351 Views)
Hello,

I try to remove the glitches by putting 1/2/or 3 buffer before the card. It work better, i gett lesser "spike", but still 4 or 5 per minutes. Measure the frequency by using analog input is less accurate.I don't know what i can do more .

So what should i do to remove theses hidden glitches ?

Thanks

Jeremy


0 Kudos
Message 4 of 5
(3,291 Views)

I'm assuming your high-freq measurements are caused by high-freq ringing after real transitions and that you don't get spikes elsewhere.  If so, there's a way to get E-series boards to produce similar behavior to a digital debounce filter.  More info can be found on the site (like here for example) by searching for terms like retriggerable, pulse.

You'd use 1 counter configured for retriggerable single pulse generation to do the filtering.  Once a transition triggers it, further triggers will be ignored until the full pulse has been generated.  For example, to make yourself immune to transitions >10 kHz, you need a pulse duration of 100 microsec.  I'd set the pulse low time to a minimal value like 1 microsec and high time to 99 microsec each.  (You may also need to set the initial delay to 1 microsec to handle the very first trigger.)  

Then you have your 2nd counter measure the period or frequency (using the 1-counter method) of the 1st counter's output.  (In some ways, this works even better than the newer board's digital filter because it adds less delay to the signal's active edge for a given filter cutoff frequency.  On the other hand, it costs you the use of a counter to do it.)

There'll be some learning curve to get from the DAQ Assistant to the method I've described.  Best quick advice I can give is to search for, dissect, and learn from the examples you can find in your LabVIEW installation and on this site.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 5
(3,278 Views)