Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with digital Filter in the 6602-Board

Hi,
I have programmed my own driver for the 6602-board for
the Realtime-OS xPc-Target from MathWorks.
It works fine for buffered period measurement with 80MHz resolution

but because my signal is noisy, and I get some interrupts beetween the
periods, I want to enable the digital filter
on the gate from counter 0.

I read, there is an phase shifting of two filter clock periods for the
signal transition. Ok.
for example with setting 1µs I can detect all pulswidths greater 1 µs
and all pulswidths lower than 500 ns will be blocked.

Ok, but after enabling the filter, with a high-stable functiongenerator
I measure randomly two different periods in my interrupts,
and the time beetween them is accurat 500 ns or 40
countervalues
that's true for all filtersettings (perioddifference = filtersetting/2)

if I had only a phase shifting, I should see a stable countervalue.

what's wrong with the filters or is there an undocumented bit I must set
for some synchronisation?

thanks

M. Koeller
0 Kudos
Message 1 of 3
(3,531 Views)
Hi M,

Not sure if I can help with programming your RTOS but I have had success using the simple NI-DAQ function call:
Line_Change_Attribute (1, ND_PFI_0, ND_LINE_FILTER, ND_1_MICROSECONDS);
This should configure the 1us filter on PFI 0. Anyway, let me know if there is somethig specific I can help you with. Have a good day.

Ron
0 Kudos
Message 2 of 3
(3,531 Views)
I think it's inherent to the way the digital filtering is implemented. As I recall, the 6602 manual shows a timing diagram for it.

When I first fiddled with the digital filter settings, I was also surprised (and disappointed) by the way it worked. I expected a filter output which would be phase shifted but still carry full timing resolution. Then all the valid transitions would be measured with full 80 MHz precision. Instead the filter output shows transitions that are in sync with transitions of a filter clock, which means that the effective timing resolution is reduced.
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 3 of 3
(3,531 Views)