Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

error -200141 when doing buffered events with DAQmx and PCI-6602

When doing buffered events with DAQmx and PCI-6602 I get error 200141 - Data was overwritten before it could be read by the system.

This error is generated ONLY with random inputs >200/sec.

My setup is :
DAQmxCreateCIVCountEdges(taskhandle,"Dev1/ctr3"....
DAQmxCG+FGSampClkTiming(taskhandle,"/Dev1/FPI35",...
DAQmxSetCICountEgdesChan(taskhandlem,"", "/Dev1/80MHZTimeBase")
DAQmxSetChanAttribute(taskhandlw,",",DAQmx_CI_DataXferMech,DAQmx_Val_DMA,0);


Can somebody help ?
0 Kudos
Message 1 of 7
(5,067 Views)
Hi fngitliz,

The error you are getting is:
Error -200141 occurred at an unidentified location

Possible reason(s):
Data was overwritten before it could be read by the system.

If Data Transfer Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal before taking the measurement.
Essentially what is happening is that your counts are happening too quickly.  There is a very small FIFO between your buffer on the RAM and the actual inputs for the counter.  That means that you will be using your PCI bus very frequently.  Typically you can achieve rates up to about 100kS/s, but the actual rates seen will be system dependent.

To increase the max rate try looking for things that might also be using some of your PCI bus time.  PCI Video Cards are really common culprits, as are any fairly fast analog input operations, or some other PCI card could be using your bus bandwidth (such as a PCI-USB card).  Other than that, the error is exactly like it states, so you will need to either decrease the speed of sampling, or divide the input signal before taking the measurement.

Regards,
0 Kudos
Message 2 of 7
(5,051 Views)

i'm getting the same Error-200141, while reading semiperiods. (Meas_Buffered semiperiod continous)

 

while loop ex.rate seems to be pulsewidth*no.Samples to read. in my case PW=60ms

 

Input buffer size measured with Property node= 10000

 

why this error happens?? i cant use any mode other than implicit timing for semi-period measurement right??

 

more info: all the ai channels are used ~ 16 differencial.

 

i found one solution which is _ reinitializing the whole task if an error occur. is this the right way??

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 3 of 7
(4,252 Views)

another alternative, i think.

 

1 stoptask

2 clear error

3 start again

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 4 of 7
(4,240 Views)

Renn,

 

The 16 AI channels may have an impact due to their demands on the PCI bus, as described earlier in the thread by Otis.  Another common cause of such errors is a noisy or "glitchy" signal which registers a brief burst of edges at a very high rate.

 

I'd first try running just the semi-period task with no AI.  That'll help show you whether PCI bus contention is contributing to your problem.  If not, then you may have a noise problem to solve.  It's always best to try to eliminate noise at its source whenever possible through good wiring practices, etc.  Then, depending on what board you're using, you may also be able to configure a digital filter that can suppress those false edges. 

 

Hope this helps get you started...

 

-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 7
(4,204 Views)

Hi, I have met the same problem. I couldn't understand the method of dividing the signal you said. If we want to divide the signal what should we do specifically? And if we want to change another card, do you have other advice about choosing the one.

 

Thank you!

 

--Avina

0 Kudos
Message 6 of 7
(3,828 Views)

It isn't clear which aspect of the "same problem" you've run into.  In many cases it's better to clean up the signal or use digital filtering rather than dividing down a clock-like signal.  I'd recommend looking into / trying that first.

 

If you *do* need to divide-down, it's basically just a matter of using another counter between the original clocking signal and the counter that does the measurement.  The extra counter will be set to generate pulses based on ticks of the original signal.   You need a minimum of 2 high and 2 low ticks, so you can easily divide by any integer >= 4.   Special techniques can be used to divide by 2 or 3, but I'd just stick with the simpler methods unless there's a true need.

 

-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 7
(3,818 Views)