Buffer Overwrite Error -200141

I am using an extension of the code called "Measure Buffered
Semi-Period-Continuous.vi" from the example finder.  Inside the
main while loop I have added some additional calculations before I
return to DAQmx Read in the next iteration.  I am getting an error
-200141 which states that "Data was overwritten before it could be read
by the system."  Currently I have the "Number of Samples Per
Channel" at 2 for the DAQmx Read input, but I am not sure if what I
have done is correct for what I am trying to accomplish.  What I
would like to do is pull only the first two points of the buffer each
time I come to DAQmx Read.  The remainder of the buffer is not
important and could be thrown away if possible.  When the next
iteration of the while loop comes to DAQmx Read I would again like to
read the first two points and so on.   Also I would like to
know if there is a way that I could keep track of the size of the
backlog of the data for future reference.
Thanks,
Nick

See the producer consumer model of programming.  It is best to extend this program by adding a second loop(thread) and after reading your data send it to the analysis loop for processing with a queue.  The buffer overrun is due to the data not being raed from the buffer fast enough.  Your processing is slowing down your DAQ loop.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA

Similar Messages

  • Error 2- memory full & error 10846 - buffer overwrite

    I am running a multi threaded application on Labview 6.1 on Win2000 that involves continuous buffered data acquisition on a PCI-6130E and serial communication. I am sampling 15 channels at 600Hz. I currently have a buffer size of 1000 and am reading 60 points at a time. The serial communication involves sending commands to a pump from a queue. The queue is maintained at about 500 commands and does not increase over time.
    I am plagued with two errors: the first is buffer overwrite error 10846. This occurs only when running the serial communication thread and DAQ thread simultaneously. I have tried reducing sampling rate, increasing buffer size, and increasing the number of points read at a time. The only effec
    t seems to be to postpone the crash for about an hour.
    The other error is error 2 - memory full. Labview seems to use gradually more and more memory over time and crashes after a few hours at about 110,000K.
    I am not sure if these two problems are related in some way, as I have only gotten error 2 after receiving and ignoring error 10846. Sometimes the program runs for about an hour and then Labview exits by itself. I'm wondering if this memory error could be a result of my chart histories being too large or from some kind of accumulation due to using a queue.
    If anyone has any suggestions on how to fix any of these errors, or on how to diagnose their cause, I would appreciate your help.

    I suggest you concentrate on the memory leak.
    There are many things that could cause this, some obivous others are very subtle.
    Do the following and let us know what you find.
    1) Reboot
    2) Brinf up the task manager and check the performance before you start. Note memory usage and compare with the actual physical memory.
    3) Run your app. Watch the memory usage.
    Let us know what you find, and feel free to post your code.
    I will not go into all of the things that can cause memory leaks because there have been many posting on this site on how to handle leaks, and I would only be scratching the surface.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Error 200141 when trying to measure motor encoder's speed from PCI 6221 card,

    Hi,
             I was trying to measure angular speed of a motor from its encoder signal. I'm using Ctr pin from PCI 6221 card take signals from the encoders. The problem comes when I've got an Error-200141 saying "data was overwritten before it could be read". I have tried a few ways as follows to overcome this problem.
         - Use DMA
         - Get rid of the noise from the signal by shielding the wire from encoder to DAQ card and using a capacitor.
            None of those seemed to solve the problem completely. Even though the noise from the signal was removed, I could still see the mechanical glitter at the edge of all the pulses from the oscilloscope. Is that a possible cause of this problem (my technician told me we can do nothing with this glitter. In other words, we can't remove it)?
            Please suggest me how to solve this Error-200141. With this message, I have also attached VI.
            Thank you very much.
       Regards,
       Suksun
    Attachments:
    Meas Dig Period-Buffered-Continuous-Low Freq 1 Ctr_Angular speed from encoder.vi ‏72 KB

    Hi Suksun,
    Only had a quick glance at your code, but can you drop the samples to read to 100.
    I think what the problem is from what I can make of your code, is that
    you have a low frequency counter, that you measure on the rising edge,
    however if you don't get a 1000 pulses within 100 seconds, DAQmx will
    report an error. So by lowering the number of samples to read you
    should be able to get 100 samples in 100 seconds, you should not
    overwrite data as the buffer will be sized correctly.
    Hope this help
    Regards
    JamesC
    NIUK AE

  • Why can't it count edges-Error -200141

    I'm using a very precise shaft quadrature encoder with 400 pulses per revolution. I'm simply trying to test it before I incorporate it into my VI. I've been using the DAQassistant to try and configure it. I've got a PCI-6036E with a BNC-2120 accessory. To start I hav been just trying to read an edge count of one of the channels. In this case I'm reading from CTR 0 Gate. When I try to run the edge count test as soon as I move the shaft at all I get an error(Error -200141).
    It says I should try using DMA. I've looked into this and everything I have found appears to indicate that the  PCI-6036E has "dma", however I have been unable to identity if it is being used or not.
    Is my DAQ simply not capable of reading this fast of a signal?

    Hi Erik!
    How quickly are the counter events occurring? The counter source frequency of that card is 20MHz which should be able to keep up with a quick signal. 
    I see you found the knowledgebase article that references this particular error code (found here). The solutions mentioned there are worth looking at.
    The PCI-6036E only has one DMA channel available to it. So if you are only using one channel, DMA is being used by default. Any other channel that is being used at the same time is then defaulted to interrupts. 
    If you would like to be sure that your task is using DMA, you can include a property node to force the channel to use DMA (still, only 1 channel can use it at a time).  See the attached image on how to access that property.
    Also, be sure that you are not doing too many operations within the loop that is reading this data. That way the software can pull the data off the buffer as fast as possible.
    Peter E
    Applications Engineer
    National Instruments
    Attachments:
    DMA Counter.png ‏17 KB

  • 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 ?

    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
    Attachments:
    Counter_1_Meas Buffered Semi-Period-Continuous_main_lv09.vi ‏34 KB
    SemiPeriod_Reconnect Counter on Error.vi ‏35 KB

  • Doing Data acq. and buffered period measurement using counters simultaneously, gives an buffer overflow error

    Iam doing Data acquisition using NI-PXI 4472 and buffered period Measurement using NI-PXI 6602 simultaneously,my program gives an buffer overflow error

    murali_vml,
    There are two common buffer overflow and overwrite errors.
    Overflow error -10845 occurs when the NI-DAQ driver cannot read data from the DAQ device's FIFO buffer fast enough to keep up with the acquired data as it flows to the buffer (i.e., the FIFO buffer overflows before all the original data can be read from it). This is usually due to limitations of your computer system, most commonly the result of slow processor speeds (< 200 MHz) in conjunction with PCMCIA DAQ boards, which have small FIFO buffers (e.g., the DAQCard-500). Sometimes using a DAQCard with a larger FIFO can solve the problem, but a better solution is to lower the acquisition rate or move to a faster system. Another cause of the -10845 error could be due to an interrupt-driven
    acquisition. For example, PCMCIA bus does not support Direct Memory Access (DMA). If the system is tied up processing another interrupt (like performing a screen refresh or responding to a mouse movement) when it is time to move data from the board, then that data may get overwritten.
    Overwrite error -10846 occurs when the data in the software buffer that you created for an analog input operation gets overwritten by new data before you can retrieve the existing data from the buffer. This problem can be solved by adjusting the parameters of your data acquisition, such as the lowering the scan rate, increasing the buffer size, and/or increasing the number of scans to read from the buffer on each buffer read. Additionally, performing less processing in the loop can help avoid the -10846 error.
    See the NI-DAQ Function Reference Manual for a listing of all NI-DAQ error codes.
    Have a great day.

  • Issue with running QuickTime Windows.  Buffer Overrun Error - C++ Library .

    Initial problem was Buffer Overrun Error (C++ Library) when clicking on QuickTime after installation. IE. QT would not even open. http://support.microsoft.com/kb/831875#appliesto
    I took these steps:
    1. Tried to uninstall QuickTime by itself (it failed).
    2.
    3. Manually deleted apple, itunes and quicktime from the entire system (where ever it let me).
    4.
    5. Manually took out from the registration the apple stuff.
    6.
    7. Left the items in the recycle bin (in case there were any real issues and I needed something restored).
    8.
    9. Performed a registration cure (RegCure).
    10.
    11. Took off my entire Anti Virus.
    12.
    13. Dropped down separately the QuickTime and separately the iTunes on desktop.
    14.
    15. Tried to install QuickTime from one of the two saved files on my desktop, but encountered a serious fault
    16.
    17. It needed the QuickTime Installer to remove QuickTime itself, else it crapped out and nothing happened. This complained for a QuickTime.msi file which was a problem.
    18.
    19. Went to the recycle bin and restored only components which were marked QuickTime Installer.
    Removed the QuickTime instead of Repair.
    Went to the website and Installed QuickTime 7 directly.
    It opened on the desktop after installation.
    Installed iTunes separately from the desktop and it opened directly.
    Rebooted my pc.
    Enabled all my Security (McAFee).
    Opened one by one the QuickTime and Then the iTunes.
    Created a computer restore point with a narrative for the future.
    This was a very difficult task and required a lot of steps. I am glad you helped me with the removing part. Its great to have everything working again on my pc.
    I hope this was helpful - it took me ageges to fix.

    I'm experiencing exactly the same bug. Matter of fact, it's the first time in years that I've run across this kind of 'problem' when using non-beta software from a major player. Too bad. This really reflects poorly on Apple's credibility.

  • Buffer Underrun error message - what is it and how do I fix it ?

    I am getting a 'buffer underrun' error message when I am burning to DVD (using iDVD); this means that only soundtrack is fully copied over, but not visuals. Any idea how I fix this ?

    Hi spaceface:
    Sorry you're still having this problem.
    There are a lot of suggestions in these articles:
    You see a "buffer underrun" error when burning a disc in Finder or iTunes
    http://docs.info.apple.com/article.html?artnum=25750
    Power Mac G4 (QuickSilver): Apple Optical Drives and BURN-Proof Technology
    http://docs.info.apple.com/article.html?artnum=58847
    Mac OS X: "Unknown Error -2147352480" when burning CD-R, CD-RW, or DVD-R media
    http://docs.info.apple.com/article.html?artnum=25480
    Sue

  • Quick Time (Audio Preferences) fails to launch with buffer overrun error

    It all started a few weeks ago, after installing itunes7.0 for windows, and itunes began to annoy me (indeed drive me mad) with an error message :
    "an unhandled win32 exception has occured in itunes.exe [3840]" at startup / closing immediately afterwards.
    After numerous uninstall/reinstall/clean the registry/system restore attempts I managed to solve the issue-- BUT only for a few days..It failed again and so I went through the itunes support forums even found an entry
    "iTunes 7 for Windows: iTunes fails to launch with an unknown error"
    which suggests that my issue could be solved by :
    "Open the QuickTime control panel and select the Audio tab.
    In the Devices section de-select the Safe mode (waveOut only) option and click Apply."
    But to my surprise, when i selected the Audio tab (and the Audio tab ONLY ) it presented me a "buffer overrun error" which indicated that the internal state of the program has been corrupt and it would be shutting down now..
    It's such a nuisance..!!
    Please, help, and your help will be deeply appreciated... !
    I have tried to revert to the older version and it didn't work..

    let's try swapping out your existing QuickTime one more time. we'll take a few additional explicit precautions this time.
    head into your Add/Remove programs. uninstall QuickTime.
    Next, we’ll manually remove any leftover program files and folders.
    1. On the Start menu, click My Computer (or double-click My Computer on the Desktop).
    2. In My Computer, open Local Disk.
    3. Open Program Files.
    4. Right-click on the QuickTime folder and click Delete from the shortcut menu.
    5. Navigate to C:\Windows\system32\.
    6. Remove the files QuickTime.qts and QuicktimeVR.qtx.
    7. Restart your computer.
    next, we'll get a fresh copy of QuickTime into your PC by doing a repair install of itunes.
    switch off antivirus and antispyware applications prior to the repair install.
    go into Add/Remove and select itunes. click "Change" and then click "Repair".
    if the repair install goes through okay, restart the PC and try launching itunes again. does it launch properly now?

  • Buffer Overrun error when playing MPEG4 video files

    Recently i upgraded to the newer version of itunes with quicktime 7.0.2. I am not able to play my MPEG4 video which i have in my itunes library for my ipod anymore.
    The video plays for a few seconds but with artifact type glitches in the video and then i get a Runtime Error saying "Buffer Overrun Error". This didnt happen to me before.
    I have the latest dirextX and windows updates and have also tryed rolling back quicktime to an earlier version. The error still occurs. The videos also play fine when they are on my ipod.
    Any suggestions why this is happening?
    Custom   Windows XP  

    I found a solution to my problem. I upgtraded my chipset drivers and that fixed my problem.

  • Buffer overrun error when new user closes QuickTime 7.2

    I'm receiving a Buffer overrun error for Program: C:\Program Files\QuickTime\QuickTimePlayer.exe
    Steps to reproduce error:
    Windows XP machine has 7.1.3 installed and user upgrades to 7.2
    New user logs onto the machine for the first time
    Opens QuickTime 7.2 from the Desktop
    Closes QuickTime -- Receives Buffer Overrun error
    This error does not show up for the users with an established profile on the machine prior to the QuickTime upgrade.

    Problem is with this key:
    HKEYLOCALMACHINE\SOFTWARE\Apple Computer, Inc.\QuickTime\Recent Movies
    http://discussions.apple.com/message.jspa?messageID=5531581#5531581

  • Buffered DAQmxBaseCreateCICountEdgesChan, error -200141

    Here I go again. Thanks to anyone with the intestinal fortitude to look at my problem!
    Using NI-DAQmx 1.4.0f2 Base on OS X 10.3.7, with a PCI-6014 DAQ board.
    I'm trying to do a finite buffered edge count, but get error -200141, "Data was overwritten before it could be read by the system." from my call to DAQmxBaseReadCounterU32. I'm trying to use a very basic testing program modified from the shipping example, cntBufCont.
    My test uses counter 1 to produce a continuous pulse train so that I have something to count, and it counts edges on counter 0. The pulse train specifies no output terminal; the default is pin 40. I specify "/Dev1/PFI9" as the source terminal. I have connected pin 40 to pin 3.
    I have an LED connected to pin 40 and pin 3 as well, and I see it come on and go off. Naturally, I can't see it blinking.
    The output from the program is:
    DAQmxBase Error -200141 on line 8: Data was overwritten before it could be read by the system.
    Samples read: 100
    0: 0
    1: 0
    2: 0
    3: 0
    and more lines like this up to 100.
    I can't see anything wrong with the program, but of course that doesn't mean there isn't something wrong! Should I be able to do this on OS X with a PCI-6014? The Read Me for DAQmx Base seems to indicate that I should.
    Here's the code:
    int main(void)
    // Task parameters
    int32 error = 0;
    TaskHandle taskHandle = 0;
    char errBuff[2048]={'\0'};
    time_t startTime;
    // Channel parameters
    char chan[] = "Dev1/ctr0";
    // Timing parameters
    #define bufferSize 100
    char clockSource[] = "/Dev1/PFI9";
    uInt64 samplesPerChan = bufferSize;
    float64 sampleRate = 10.0;
    // Data read parameters
    uInt32 data[bufferSize];
    int32 samplesToRead = 100;
    float64 timeout = 20.0;
    int32 read;
    // parameters for pulse generation
    TaskHandle PulseTaskH = 0;
    float64 freq = 1000.0;
    float64 duty = 0.5;
    float64 delay = 0.0;
    char pulsechan[] = "Dev1/ctr1";
    int i;
    int line = 0;
    DAQmxErrChk (DAQmxBaseCreateTask("",&PulseTaskH));
    line = 1;
    DAQmxErrChk (DAQmxBaseCreateCOPulseChanFreq(PulseTaskH,pulsechan,"",DAQmx_Val_Hz,DAQmx_Val_Low,delay,freq,duty));
    line = 2;
    DAQmxErrChk (DAQmxBaseCfgImplicitTiming(PulseTaskH,DAQmx_Val_ContSamps,1000));
    line = 3;
    DAQmxErrChk (DAQmxBaseStartTask(PulseTaskH));
    line = 4;
    DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
    line = 5;
    DAQmxErrChk (DAQmxBaseCreateCICountEdgesChan(taskHandle,chan,"",DAQmx_Val_Rising,0,DAQmx_Val_CountUp));
    line = 6;
    DAQmxErrChk (DAQmxBaseCfgSampClkTiming(taskHandle,clockSource,sampleRate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,samplesPerChan));
    line = 7;
    DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
    line = 8;
    DAQmxErrChk (DAQmxBaseReadCounterU32(taskHandle,samplesToRead,timeout,data,samplesToRead,&read,NULL));
    Error:
    if( DAQmxFailed(error) )
    DAQmxBaseGetExtendedErrorInfo(errBuff,2048);
    if( taskHandle!=0 ) {
    DAQmxBaseStopTask(taskHandle);
    DAQmxBaseClearTask(taskHandle);
    if (PulseTaskH)
    DAQmxBaseStopTask(PulseTaskH);
    DAQmxBaseClearTask(PulseTaskH);
    if( DAQmxFailed(error) )
    printf("DAQmxBase Error %d on line %d: %s\n", error, line, errBuff);
    printf("Samples read: %d\n", read);
    for (i = 0; i < read; i++)
    printf("%d: %d\n", i, data[i]);
    return 0;
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

    Hi John-
    I have a few suggestions for your app. First, in edge counting operations it isn't necessary to specify a sample clock. I would suggest simply creating the channel and then starting the task. You can then read the count register value at any time by calling the DAQmxBaseReadCounter function.
    Also, in order to count edges your pulse train will need to be an input to the counter source rather than gate. For your device, the Ctr0 source is pin 37.
    I am unsure why you are able to get readings by counting edges on the gate. I have been testing in LabVIEW and have seen good results by using the methods I have suggested here.
    Please let us know if you have any luck with these suggestions.
    Thanks-
    Tom W
    National Instruments

  • Microsoft C++ Buffer Overflow Error

    I have created two movies from iPhoto on my Mac. When I move them to an XP machine, sometime after 30 minutes of playing, I get the Microsoft C++ Buffer Overflow Error message, and Quicktime for Windows aborts. I have no problems playing them to completion on several Macs.
    I upgraded to the latest QT version, still see the problem.
    Any help appreciated.

    You're having the same issue as I...see my post here: http://discussions.apple.com/thread.jspa?threadID=672272&tstart=30
    Unfortunately, though, I have not gotten a response to my original post.

  • CI Semi Period, Error -200141

    I try to measure the semi-period of the signal in attach with a CI semi period counter in Labview 7.0.
    I am using the example VI Meas Buffered Semi-period Continuous with a acquisition card PCI-MIO-16E-4.
    I can measure the semi-period of a signal of 50KHz with a duty cycle of 25% but when I try to measure the signal in attach, signal that the frequency is lower, I obtain this message.
    Error -200141 occurred at DAQmx Read (Counter 1D DBL 1Chan NSamp).vi
    Possible reason(s):
    Data was overwritten before it could be read by the system.
    If using interrupt data transfer, try using DMA. Otherwise, divide input signal before measuring.
    What can I do ??
    Marc Ducommun
    University of applied sciences
    Switzerland
    Attachments:
    Signal_Capteur_modified.bmp ‏38 KB

    Marc
    Do you get this error when measuring the lower frequency signal? Or do you only get this error when switching from one signal to another?
    How are you switching from one signal to another?
    Switching from one signal to another usually causes high frequency noise which can cause this problem.
    For example, if your program is running fine with a 50kHz signal, and then you flip a switch to measure a lower frequency signal, the switch could introduce high frequency which could overflow the counter.
    Russell G.
    Applications Engineering
    National Instruments

  • Finite Measure with 2 boards 6602 and 6 DMA Channel Counter Buffered - error 200141

    Hi all,
    First .. I'm a beginner with LabView and I hope to explane myself in good way cause I'm italian..
    I red all the post about the error 200141 and check the suggested solutions (also the way to ignore the error), but I want try to ask for a differet one..
    What i'm trying to do is to aquire 6 encoder, 3 on the first board PCI 6602 and 3 encoder on the second board on DMA channels.
    The encoder generate 90000  X4 = 360000 pulses x revolution and the max speed rotaion is 4 RPs.
    Cause I need to store in a bin file all the pulses from the encoders, i generate a trigger of 1.5 MHz to get all the samples at the max system speed (360000 * 4 = 1440000 pulses  x sec).
    I think to have reached the limit, and maybe is not possible do better.. actually the 2 PCI 6602 works with 1,0 MHz of trigger and the system store in 6 files 4000000 of samples during
    the finite measure of the angular position on 6 channels.
    The trigger is not yet sync between the 2 PCI cause I'm waiting for a RTSI cable to put in the PC...
    In Your opinion is possible to find a alternative way to acquire these encoders ?..
    Thanks

    I also doubt if you need to capture every single increment from each encoder.  I'll discuss this more below.
    Further, many earlier discussions suggest that counter tasks can sustain data transfers merely in the 100's of kHz, with *maybe* a possibility under special circumstances to slightly exceed 1 MHz.  Your boards have very small hardware buffers (either 1 or 2 samples worth), causing the PCI bus usage to be very frequent and therefore less efficient.
    Now, let's go back to your sample rate.   You've got encoders which suggests that you're dealing with a physical system.  Physical systems have inertia, which limits their useful bandwidth.  In my experience, it's quite unusual to care about motion artifacts beyond the 10's of kHz.  The inertia just doesn't allow anything significant to happen at that rate.
    So, if the physical bandwidth of your motion system is, say, 5 kHz, there's a rule of thumb suggesting to measure at 10x when possible.  So that'd mean 50 kHz sampling.  50 kHz x 6 channels on the PCI bus may be possible.  Multi-MHz sampling won't be.
    Can you describe the physical system a bit?
    -Kevin P.

Maybe you are looking for

  • How to remove my credit card information from my apple I'd?

    Guys, I received the receipt of a wrong transaction that I didn't initiate on I tunes. I need to either remove my credit card information completely, so that every time I buy anything I'll put it manually. Please provide a solution. Thanks Ashish

  • My iMac calendar and contacts no longer sync on iPhone and iPad?

    I updated iTunes on my iMac a few months ago. Since then my calendar and my contacts on the iMac have not been syncing on my iPhone and my iPad. My memory says there used to be an "Info" button at the top of the iTunes interface when I had my iPhone

  • Windows 8.1 freezing when streaming media

    Hi Guys, Every time I stream any content such as youtube or netflix then the streaming freezes and stutters. The only thing that has been changed is the update to windows 8.1 last night. Can anyone tell me how to re-install Windows 8? A step by step

  • Java.util.logging in 10.1.2

    Hi all. We have a j2ee application deployed on Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) (build 050812.1879). We have used the java.util.logging package for our logging and are currently only able to view those with a level of ei

  • Bookmarks in "horizontal swipe" articles?

    Is it possible for a user to bookmark a particular page in an article if the folio is set to "horizontal swipe only"?  If I bookmark a vertical article arrangment, it goes to the first page.  Is this the same in horizontal arrangements?  Apologies fo