Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter Semiperiod resolution

Hi,

 

We have 2 similar measurement setups for pulsetrain measurement (measure duty cycle). We however see very different results in measurement resolutions :

 

Setup 1 : PCI-6602 (8x 32-bit counter)

We configure a counter to measure a pulsetrain with this code :

Capture.PNG

After this code, we just do a "DAQmx Start" and "DAQmx Read"

- With this code, we see that the measurement resolution is 0.25 µs

- If we change toe Digital Filter.MinPulseWidth from 5E-7 (=0.5µs) to 1.5µs, we see that the measurement resolution lowers to 0.7µs.

 

Then we have :

2nd setup :  PCIe-6321 (4x 32bit counter) 

that has the exact same SemiPeriod measurement. With the MinPulseWidth at 5E-7, we have a measurement resolution of at least 0.01µs.

(25x better than other setup).

 

Can anybody give any advise on :

- what (and why) is the influence from the digital filter on the SemiPeriod Measurement resolution?

- why does the PCIe-6321 give much better resolution that the PCI-6602?

 

Some more details :

- LabVIEW 2015

- DAQmx version 18

 

Kind regards,

Thomas.

0 Kudos
Message 1 of 6
(3,240 Views)

You can find some differences from a very careful reading of section on Digital Filtering in chapter 3 of the 6602 manual and the section on PFI Filters in chapter 8 of the X-series manual.   But it takes a *very* careful reading indeed.   And I for one don't find the explanations to be entirely clear about the distinctions between filter clock, filter clock timebase, resolution, and delay.  For example, the programmable setting in the 6602 table seems different than the others, perhaps due to the sort of ambiguous terminology used to configure these filters.  The X-series table looks more consistent.

 

My layman's explanation of things goes like this:

- when you pick a filter width, your legitimate transitions will be delayed by at least 1 and not more than 2 widths.  This is true for both boards.

- with the 6602, your measurement *resolution* is also based on this width.  Resolution is set at 1/2 the width.

- with the X-series board, resolution is determined by the filter clock timebase.  This is normally the 100 MHz internal clock, so you can get resolution down to 10 nanosec.  Delay is still governed by the filter width you defined.

 

Further attempts to wrap this up:  For both boards, resolution is determined by 1 period of what they call the filter clock.  But they don't refer to the same kind of thing as the filter clock.   

   On X-series, the filter clock is defined as the internal 100 MHz timebase.  Then that gets used to support filter width settings that are pretty much any integer multiple of its period.  Delay is governed by filter width, resolution is one period of the 100 MHz timebase.

   On the 6602, the filter clock is defined as the *derived* clock with a period equal to 1/2 the filter width.  Delay is governed by filter width, resolution is one period of this *derived* filter clock, i.e., 1/2 the filter width.

 

Final thoughts.  The 6602 (and its manual) came out before DAQmx.  I cannot test, but it's conceivable that the DAQmx driver and API support methods  that would make both kinds of boards behave similarly.  It'd be great if the 6602 filters could be made to behave more like the X-series.  But you might instead be stuck "dumbing down" the X-series board to artificially limit its resolution and make it act like the 6602.

 

Actually, answering this question helped me out quite a bit too.  I had carried around vaguer, impression-like ideas that the 6602 filters not only delayed edges but also quantized their timing resolution, making their usage more of a compromise.  Now it's more clear exactly how and why that's true.  And it's also clearer how the X-series board's implementation is better, much more like I had wanted from the 6602 in the first place.

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 6
(3,226 Views)

Hi Kevin,

 

thank you for your in-depth explanation. Happy to hear that what we are seeings actually makes sense.

Seems that the counters of the X-series boards are much better that the counters on the 6602.

 

I guess it's time for an upgrade!

0 Kudos
Message 3 of 6
(3,221 Views)

I thought of another thing that can be a workaround for *some* situations, dunno if yours is one.

 

Using up one counter per signal to measure, you can get a *partly* analogous effect to digital filtering when you configure them for retriggerable single pulse generation.  You can get both minimal delay *and* 12.5 nanosec resolution.  However, you tend to always pass through the 1st transition and reject additional ones immediately thereafter.

 

It can be a suitable method if the nature of what you're filtering is due to something like mechanical switch bounce (1st transition means switching is really happening, subsequent transitions are the bounce effect to filter away) or electrical signal "ringing" after true digital transitions (again, 1st transition can be considered real, subsequent ones are the ringing effect to filter away.)   

 

It is *not* a suitable method if the false transitions show up as brief pulses when the true signal should be in a stable state.  A typical example of this situation is a signal that's picking up a lot of RF noise from nearby equipment and machinery.  

 

I posted a snippet once upon a time in this thread (skip to the end of the linked msg).

 

Further note:   the 6612 is the most direct replacement for the 6602, and performs filtering the same way as the X-series boards (because both are built around the same DAQ-STC3 timing chip).

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 6
(3,216 Views)

Hi,

 

I would like to try your suggestion. Could it be that the link is not working?

 

Thomas.

0 Kudos
Message 5 of 6
(3,201 Views)

I totally messed up on that link somehow.  Here's what I meant to link to.  Mostly pay attention to the last full paragraph about using a retriggerable pulse generator as a kind of digital filter.  You can ignore any of the stuff in that thread about linking the pulse output to an AI task.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 6
(3,190 Views)