LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital filtering signals on a two edge seperation measurement

Hi all,
 
I'm looking for advice on applying digital filters in a two edge seperation measurement. My device is a USB 6251, and I'm programming in LabVIEW 8.0
 
I'm using three PFI lines for this measurement, gate and aux inputs recieve the two edges in question, start and stop pulses if you like. A strobe pulse is connected to the source input, and the number of strobe pulses between start and stop is counted. I'm filtering to remove noise effects from these signals, giving either false starts, stops, extra strobes, or a mixture of these.
 
Looking through the product documentation, it seems I can apply a filter to any of the three signals being used, and I need to enable the filter on each input and specify the minimum pulse width to be detected.
 
I found enable and min pulse width properties for the gate and aux inputs, they are under counter input-two edge seperation-first and counter input-two edge seperation-second.
 
Does anyone know if these settings for the source input are found under are counter input-general properties-counter timebase? They seem the only ones with a relevant name. I can't find an answer in the documentation anywhere.
 
Regards,
 
Bandit 
 
0 Kudos
Message 1 of 8
(2,656 Views)
Hi Bandit,
 
Just to let you know I am looking into this for you though it's been quite busy lately so it's just a matter of finding time to do some proper research.
 
As I understand it, your question is essentially how to enable digital filtering on the source input of your counter, is that correct?
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 8
(2,636 Views)

Hi Bandit,

I found this KB that explains how Digital Filtering is applied to PFI lines in DAQmx:

http://digital.ni.com/public.nsf/allkb/9ECE7DBE7DF338BD86256F8600734A41

Basically digital filtering can't be directly enabled on a PFI or a digital line, the line has to be set up as a counter in order to access this property. The VI in the KB demonstrates how you can enable digital triggering on a PFI line then just use that line as a trigger for another task, rather then actually using it as a counter.

I believe this means that all you need to do is enable triggering for the PFI line you're using as the source, it doesn't really matter what you're actually using that PFI line for.

May I ask how you're configuring your edge seperation measurement? I'd be quite interested to see how you're setting it up to use an external timebase.

Sarah

Applications Engineer | National Instruments | UK & Ireland
Message 3 of 8
(2,636 Views)

Hi Sarah, thanks for looking at this.

I had found the KB you mention and used it for guidance. I have yet to test the modified code (today) and willl advise you how it goes - but if you spot any glaring errors in my attachment, be sure to let me know.

My application is a complicated one, but I have cut and pasted the following .vi which shows how I'm doing this particular measurement. I hope I exported the basic task correctly from MAX - if not let me know and I'll post a jpg screenshot so you can reproduce the task.

All the code in the .vi has been bench tested in the original application except the new digital filter setup.

Regards,

Bandit

0 Kudos
Message 4 of 8
(2,623 Views)
...and yes, my question is how to enable digital filtering on the source input for the 2 edge seperation measurement....
 
Bandit.
0 Kudos
Message 5 of 8
(2,622 Views)

Hmmm. That didn't work. The only filter times allowed are 0.000s, 2.56e-3s, 6.425e-6s and 125.0e-9s. So my settings, which didn't match these, didn't work.

Time to alter the default values and try again.

Bandit.

0 Kudos
Message 6 of 8
(2,613 Views)
Hi Bandit,
 
I'm just wondering how you're getting on with this. Let me know if you need any more info.
 
Best regards,
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 7 of 8
(2,588 Views)

Apologies - I really should have posted back again. I hate those threads that just stop in the middle without a conclusion. Some of them I'm afraid are mine.

After selecting one of the allowed filter values this seems to work. At any rate it's running without presenting any error messages, and the results I'm getting are far more consistent, so I'm assuming the filters are working OK.

Regards,

Bandit.

0 Kudos
Message 8 of 8
(2,585 Views)