Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI6602, freq meas, digital filter problem

Hi,

We have a PCI6602 board and I use it for frequency measurement and edge counting from an APD. Using the example 'Meas Dig Freq-Buffered-Cont-Large Range 2ctr. vi', I can measure the signal well, but it seems the signal is quite noisy as shown in the attached 'freq.jpg' file. The frequency is of an average of 200Hz but the noise is as high as ~1000Hz. When the freq of the signal goes high, say 100kHz, the noisy also goes high, ~+/- 30kHz. The range of the signal freq is ~100Hz - 200kHz.

If I increase the divisor, the noise decreases a little but still not satisfying. So I tried to add a digital filter from a DAQmx channel, pls see the attache vi, but I always got an error 200774 (snapshot attached). I connected the signal to be measured to PFI39. No matter which counter I chose I got this error. It seems the source of the counter is set as default 'no filter' in this buffered-freq-measurement?

One more problem in this VI is that in the Producer-Consumer diagram, once the producer loop errors, the consumer loop doesn't run while the excution is restarted unless I press the 'Abort Excution' button from the toolbar and start over. I tried to wire the dequeue error to the stop in the consumer loop, but it didn't help. What would the problem be?

Any help is greatly appreciated!

Best regards,
LTong
0 Kudos
Message 1 of 5
(5,021 Views)

The related thread I found from this forum is http://forums.ni.com/ni/board/message?board.id=40&message.id=6875&query.id=372866#M6875. From this thread, the gate of the selected counter for frequency measurement is reserved so that the digital filter can't be used on the corresponding PFI line. In a buffered measurement with 2 counters, let's say, counter 0 is chosen, I assume ctr 0 and 1 are used in pair, so PFI38 and 34 are reserved. The problem I'm having here is that I connect the unknown signal to PFI39, the source of ctr0, it still doesn't work, and an error jumps out saying the source of the chosen counter is set as 'No filter'. Maybe i'm missing some basic knowledge of counters gate/source issues, I don't know what's wrong here.

 

Since the noise level varies with the signal level, going high for a high freq signal and low for a low freq signal, I guess it's not enough to just set a minwidth for the digital filter (of course the first step is to make the filter work, which i'm stuck in)? Then how to set a filter that works for a large range freq signal? I assume that the noise is caused by photons coming too close to each other. 

 

The producer-consumer problem maybe doesn't belong to this forum, I just borrowed it from the template and added steps.

 

Maybe it's too simple a question, but any tips/comments are welcome and appreaciated.

 

Best,

L

0 Kudos
Message 2 of 5
(4,975 Views)

Have you gotten an answer on this?  I am having the same problem in a slightly different context.  I have an M-Series PCI6221 board with which I am trying to make a frequency measurement using "method 3" described in the users manual - 2 counters, where ctr0 divides the signal to be measured and ctr1 measures the pulse width of the divided signal.  I have my input signal connected to PFI8 (ctr0 Src).  When I call the channel property node followed by the DAQmx Control Task.vi as described in Digital Filtering with M Series and CompactDAQ,  I get the -200774 error.  If I drop the DAQmx Control Task.vi call then I get the same error when I try to read the channel with DAQmx Read.  My code is attached - LabView 8.5.1 w/ DAQmx 8.7.1f3

 

Greg

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

Hi guys,

 

This was a bug in DAQmx that was recently discovered (CAR ID 177385).  I'm happy to report that DAQmx 9.0 should fix the problem, but let us know if there are any issues after upgrading.

 

-John

John Passiak
0 Kudos
Message 4 of 5
(4,805 Views)

DAQmx 9.0 fixed the problem.  Thanks!

 

Greg

0 Kudos
Message 5 of 5
(4,719 Views)