From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 buffer overflow in counting mode

Hi all,

 

I've got a problem with my 6602 timer/counter card. I am using one counter (1) to generate a fixed frequency, and another one (2) to record the time (relative to the start of the clock) for every event on a particle detector. Counter 2 is in "CI Cnt Edges" Mode, timing is set to "Sampla CLock" and "continuous samples". Data transfer is explicitly sert to DMA. The problem is that I cannot allocate sufficient buffer memory for more than 30 Million clock cycles. Means, when I set the clock to run at 10 MHz, I can acquire data for a maximum of 3 seconds. 30 seconds at 1 MHz, 60 s at 500 kHz and so on.

 

Why does this happen? I'd naively think that i shouldn't need more buffer than what's necessary for the total number of detector events accumulated during the open time (which typically amounts for an average 50 counts per second, but may peak at 1 every 10 µs over the duration of a millisecond). Even if i were actually recording every single clock count, there should be a way to increaqse the buffer size. But neither setting large values on the "Sampla clock" VI or even using "DAQmx Configure Input Buffer" has worked so far. What can I do to buffer more data than just 120 MiB (30,000,000x4 bytes)?

 

Thanks for any advice you may have

DAQduck

0 Kudos
Message 1 of 5
(5,866 Views)

Hi DAQduck,

 

The maximum sustainable transfer rate a TIO device can achieve for a
buffered acquisition depends on the following factors:
• Amount of available bus bandwidth
• Processor speed and operating system
• Application software

 

You have to unload the Buffer in less time, please give me an explicit example how you do this.

 

Regards

Christian

0 Kudos
Message 2 of 5
(5,852 Views)

Hi Christian,

 

thanks for taking the time to look at my problem.

 

Here is how I configure my data acquisition:

DAQ configure

Don't bother about the "sync to injection" VI, it does nothing at the time. The "6602 counter assign" VI only outputs channels and PFIs so that all my applications run with a consistent configuration. The task and error inputs are initially empty.

 

After configuration, I repeatedly execute the following code snippet in a while loop, where the taks and erros are remembered between iterations:

readout.png

The upper task/error pair is the clock, the lower pair for the counter. The wires at the bottom are from a notifier. Only the shown segment of the stacked loop accesses the tasks at all.

 

To give you an idea of the application situation: I am filling an ion trap with ions every few seconds (takes about 100µs). From the start of the filling process, I want to register the arrival times of every particle lost from the trap and arriving on a detector, relative to the start of the injection process.

 

Hope you can figure something out.

 

Cheers

DAQduck

0 Kudos
Message 3 of 5
(5,850 Views)

I should perhaps add that the VI is running on a quad-core machine with 2 GB, 6602 card is a PCIe one. A few more VIs are running at the same time but are idle while waiting for front panel input. The problem is independent of the number of counts received, but depends only on the ratio between sample clock and open time, i.e. the VI fails with more than 30 million ticks of the sample clock, no matter at what frequency.

 

DAQduck

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

Hi DAQduck,

why is your DAQmx Read not in a While Loop, you have create a continuous measurement. On Traditional DAQ you have to allocate the Buffer size, but in DAQmx is this feature normally required not more. Please try to read the buffer filling level with the shown property nodes, I hope it is useful for monitoring.

 

Understanding and Avoiding Overwrite and Overflow Errors with NI-DAQmx

http://digital.ni.com/public.nsf/allkb/A224DA0551EEA073862574F60060AB6F?OpenDocument

 

Sincerely

Christian

 

Buffer

0 Kudos
Message 5 of 5
(5,825 Views)