Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum counting speed of USB-6341 ?

I am using a USB-6341 to measure the counting rate (pulse events per second) of single photon detectors.

 

When I checked the edge count function of the USB-6341 using pulse generator as a counter source,

 

it seems that the USB-6341 can't measure the higher frequency than about 25 MHz.

 

I used a 1 Hz external clock for a sample clock source, so the measured counter value means the output frequency of the pulse generation.

 

The counter value seems to be saturating around 25 MHz even for the higher frequency input to the counter source.

 

25 MHz is quite lower than the 100 MHz timebase of the counter card.

 

What is the maximum counting rate (or the maximum frequency) that can be measured with USB-6341?

 

Is there any bandwidth limit in the input area of the hardware?

0 Kudos
Message 1 of 13
(864 Views)

By default, the counter input frequency task uses Low Frequency with 1 Counter. It has the lowest measurement time but also the lowest accuracy, which further decreases as the signal frequency increases.

 

Try using the High Frequency with 2 Counters method instead. This method is accurate for high frequency signals. 

 

Reference: Choosing a Counter Frequency Measurement Method for an NI DAQ Device

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 13
(835 Views)

ZYOng!

Thank you for your reply.

 

Actually, I am using the USB-6341 to count the pulse generation event of certain generator, which generate pulses with random period,  not to measure the frequency of the signal with fixed period.

 

So, I think I need to utilize the edge counting function.

 

What I exactly want to konw is the maximum counter speed (or count rate) of the USB-6341 edge counting.

I couldn't find the maximum counter speed in the spec. sheet.

 

And, if there is techniques or tips to maximize the counter speed of the edge counting function,

it would be very helpfull to me.

0 Kudos
Message 3 of 13
(818 Views)

we use  x series usb  to count edges up to 60 (80) MHz ... (mainly around 40 MHz)

unbuffered edge counting , no prescaler, no filter, IIRR... give me some time to look up the configuration .... (no express .. plain DAQmx and LabVIEW) ,

no need to use two counters  , the 32 bit counter will wrap around after about 53s @ 80 MHz  and a simple unwrap can catch it. If edges per second (or say samplerate)  are needed a simple I32 calulation will do it ...  or was it U32? .. have to look up the code 😉

 

migth be next week

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 13
(807 Views)

To fine-tune your measurement plan and tradeoffs, it's important to have a clear understanding of the way NI's counters work.  This is part of the counter learning curve -- some things are less obvious due to several ways that counters aren't fully analogous to the other kinds of DAQ I/O (AI, AO, DI, DO).

 

If you read ZYOng's linked article (and followed some of the links inside), you'll have seen that there are tradeoffs among the different frequency measurement methods when it comes to accuracy, resolution, and sample rate.

 

A "dirty little secret" that is less publicized is that a simple 1-counter frequency measurement can usually be post-processed to produce the kinds of tradeoffs seen for the 2-counter methods.  I cut my teeth on counters when MIO devices only had 2 counters, so I learned to use 1-counter methods whenever possible. However, it isn't always possible.

 

I know I've written up the tradeoffs between quantization error and sample rate many times over the years, here's one fairly recent example.  (And maybe read more of the thread for fuller context).

 

Another important concept to get really clear about is the difference between "counting speed" and "capture rate".   Henrik confirmed a real-life ability for the hardware to register incremental counts at rates in the 10's of MHz.   When X-series counter tasks count their own internal clock, they can count at 100 MHz.

 

But that's *different* from the capture rate your device and data bus can sustain for the lifetime of a task.  Capture rate has to do with latching and storing a count value into a DAQ device FIFO, then relying on the hardware and your data bus to deliver those captured values into the task buffer held on your PC.  Sustainable capture rate will tend to be reduced for "less direct" data bus connections like USB and Ethernet as compared with PCIe or PXIe.

 

Pulling it all together, the best measurement approach for you will depend on some things you haven't clearly defined. 

  • What is the max pulse rate expected from your detectors?  (If high relative to the DAQ's 100 MHz clock, this could affect choice of measurement method)
  • How many pulses might you get in such a high-rate burst?  (If both frequency and quantity are high, your USB data bus may be a limiting factor)
  • What's the longest measurement interval you can live with if you have to get an average pulse rate during high-frequency bursts?   (For example: would it be sufficient to characterize the average rate across a 10 microsec interval?  Or would you truly need to get 10 distinct 1-microsec interval measurements during that 10 microsec interval?)

 

-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 13
(790 Views)

Kevin, as far as I understood the task, he want to read one counter value per second while doing edge counting ..

(using an external 1Hz source).

No debounce filter , no sync , no prescaler , plain edge counting (number of photons per second), he seems to use express vis , so no idea how the counter is actually configured.

 

 

And another point for the photon pulse counter: The input impedance of the PFIs is 10 kOhm ... I would worry about signal reflections due to impedance mismatch .. (ok, if cable and source is 50 Ohms the reflection shoudn't  come back 😄 )

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 13
(777 Views)

I guess I took the 1 sample per second experiment as just a simple illustration, mainly based on history with other photon counting threads.  I've found that folks have generally been interested in changes to the pulse rate over much smaller intervals than 1 sec.  But I guess we need to hear some clear definition from the OP to be sure what's needed.

 

 

-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 7 of 13
(770 Views)

Thank you, Henrik_Volkers!

 

You understand exactly what I am doing using the USB-6341 and a single photon detector (SPD).

 

The maximum pulse output rate of the SPD is around 50 MHz and coaxial cable and source is 50 Ohms.

 

I can't figure out your comment that I32 calculation will fixed the problem.

 

I attached my Labview vi. Could you check if there is something wrong in the code?

0 Kudos
Message 8 of 13
(755 Views)

I am attaching the block diagram of vi attached to the above message. 

0 Kudos
Message 9 of 13
(724 Views)

Should be default, but just to make shure add some more properties:

U32 edge counter conf.png

 

the output is a U32 value. if you calculate the difference in U32 the wrap around is included 🙂

here something to play and check.  The controls and indicators work only for integers 😉

Notice that by converting the result in I32 you get negative results  (you don't want)

 

U32 counter diff calc.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 10 of 13
(708 Views)