DAQmx error 200279

Here's a link to a thread on the Measurement Studio discussion board dealing with DAQmx error 200279 (trying to read data buffer that has been overwritten while running continuous aquisition):  
http://forums.ni.com/ni/board/message?board.id=232&message.id=2926&query.id=12659#M2926
These errors can be dealt with by modifying the RelativeTo and Offset properties of DAQmx Read. The same thing applies when using DAQmx in LabVIEW, so I thought this may be useful here.
Zador

Update:
Changing the priority under VI properties to a higher or time sensitive setting has helped decrease the build up of samples in the task and increase performance of the loop, but it seems that there are more issues possibly related to the number of visible items on a VI front panel.  I have a number of objects that toggle their visibility based on which item is selected in a menu, and when objects with graphs are displayed, I notice performance dropping and samples accumulating.  No solution yet.

Similar Messages

  • Error -200279 in DAQmx

    Hi all,
     I am using NI PCI-6251 on Labwindows. Basically i am acquiring two analog signals one of freq 200 Hz
    and the other of freq 1 KHz using "ContAcqIntClk" example that is shipped with CVI.
    The problem is that on the default settings that are
    Samples per Chan  = 1000
    Sampling Rate = 10000
    The program works fine but when i changed the sampling rate that is
    Samp per chan = 1000
    Sampling Rate = 20000
    After running for approximately 25 seconds. The DAQmx gives the Error (-200279)
    "DAQmxErrorSamplesNoLongerAvailable" . Why is this so?
     It is mentioned in the specs of 6251 that it is capable of sampling at the rate of 1 MS/s,
    so why it is giving error for only  20 Ksamples per second per chan.
     I want to add one thing more that I am also writing the samples of the acquired signals
    to the separate text files in the same while loop in which i am using DAQmxReadAnalogF64. 
    Any help will be greatly Appreciated.

    Hello,
    This could be due to a buffer overflow.  The following Knowledge Base articles should be able to walk you through how to avoid this.
    3WAC2E3Q: "Overwrite Unread Samples" Overwrite Mode causes Buffer Overflow Error -200279
    http://digital.ni.com/public.nsf/allkb/64243F5D9995450B8625714F007C81F6?OpenDocument
    2XQEAPQJ: Common NI-DAQmx Error Codes and Solutions
    http://digital.ni.com/public.nsf/allkb/001DA4DB6A31CF8886256D33006FA857?OpenDocument
    Hope this helps!

  • Error -200279 of DAQmx

    Hi all,
    Attached are two VIs for generate and measure signal with DAQmx. An error -200279 occurred when I measure harmonic distortion. There is no error if I turn it off. What's wrong of the program? I'm using LabVIEW7.1 and PXI-4461.
    Bill
    Attachments:
    error_200279.zip ‏112 KB

    Hi Bill.
    I reproduced the problem in my PC. I think the problem was in your vi (some extrange incompatibility between HarmAnalyzer and Daqmx read). I erased the while loop and redid again and now It runs OK. Your PC can deal with theese vis in real time, as mine, using generator too.
    See attached vi. I used LV7.0/nidaq7.2/PCI6052.
    Hope it helps
    Alipio
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    test.vi ‏99 KB

  • Error 200278 and error 200279 with DAQmx read

    Good day everyone,
    I have been trying to write a code which generates a sine wave and a trigger signal and send them out to two different devices. I am trying to phase lock device-1 on a certain phase angle of the operating signal  (sine wave) of the device-2.
    The device-1 which receives the trigger signal also generates a trigger signal at the same time it receives the trigger. It also can not work with trigger signal with a frequency which is greater than 4 Hz.
    I got that part to work and then I realized that I need to make sure that the responses of the devices have the same phase difference. So I added another part to the code which reads the trigger signal generated from the device-1 and the sine wave generated by the code (which basically goes to the device-2).
    I did not have any loop in the code at the beginning, and I just set the sampling frequency and sample rate and I though that it would work at the rate which I want. Unfortunately it did not. So I added a while loop to control the speed of the writing and reading process, and slow it down to 4Hz which is the limit of device-1.
    I have tried the reading process with finite sample and continuous sample on the sample clock and I got Error 200278 and Error 200279 correspondingly. Attached please see the main VI and subVIs. There are some subVis for writing data to the file which are not attached.
    I really appreciate it if you can help me to solve this problem and get the code to work in a way that the whole process works at 4 Hz frequency.
    I am not sure if my code is completely optimized. Any suggestion to optimize the speed of the code and the way it acquires data is also highly appreciated.
    Regards,
    Pooya
    Attachments:
    Trigger_Seq_R1.vi ‏115 KB
    time.vi ‏23 KB
    wavegen.vi ‏33 KB

    Hello Pooya,
    You need to add some wait delay in your while loop. Try adding a Wait Until Next Millisecond Multiple to your while loop with a constant wired in.
    You are acquiring data too quickly. Here is a link that discusses this in general.
    Regards,
    Jeff L.
    Applications Engineer | National Instruments

  • Error -200279 DAQmx

    Hi,
    I am reading 3 channels of data into a waveform chart at a speed of 512 Hz, and my waveform chart seems to slow down over time and eventualy stops working, then i get the error -200279?
    ReadSamples.vi<append>
    <B>Property: </B>RelativeTo
    <B>Corresponding Value: </B>Current Read Position
    <B>Property: </B>Offset
    <B>Corresponding Value: </B>0
    <B>Task Name: </B>AnalogInput
    I use a master/slave message handler structure and in my master is the "read samples" vi which reads 4 samples at a time, when i display 1 channel it works okay, but the more channels i display the slower it gets...?  
    Best regards,
    Thijs
    Solved!
    Go to Solution.

    It looks like you are getting a buffer overflow... You aren't reading data into your application fast enough. 
    http://digital.ni.com/public.nsf/allkb/AB7D4CA85967804586257380006F0E62
    Ian K.
    Applications Engineer
    National Instruments

  • Error 200279 Continuous DAQ Assistant

    I am getting Error 200279 while running my VI.  I am using a DAQ assistant with four channels set to Continuous Samples with a rate of 1K and Samples to Read at 100.  The error comes up at different times.  It can happen right after starting the vi or it has happened as late as 2 1/2 hours of running the vi.  I added the DAQmx property node to observe the number of available samples per channel.  The number of available samples is stays at 0 but then will spike in a few seconds until it goes over 10,000 available samples and the error pops up.
    I'm at a loss as to what might be causing the sudden spike of samples because the program does the same calculations each iteration of the loops.  Therefore, I don't believe the program is running to slow to read the samples.
    Thanks for the help,
    Tony

    I am writing to a file called datalog.csv.  At first I thought it might have been the cause.  When I got the vi, the data is recorded to datalog.csv at a period determined by an input, Sample Rate.  The fastest I have written to the file was 20 ms (50 times a second) which meant the program was opening, writing to, and closing datalog.csv 50 times a second.  So I did change how the data was saved by moving data writing to a separate loop and by only opening the closing the file once. but I still got the error, so I changed the program back to the way it was.
    a little bit of input on the vi.  it is for controlling a tesile strength tester.  it controls the amount of tension is being pulled on a powerline cable.  the controller in the vi is the bottom loop.  writing to datalog and the data acquisition are located in the top loop.
    Thanks
    Attachments:
    cabletest_v2_input_test.vi ‏747 KB

  • Error -200279

    Hi friends,
    I am getting the error -200279 during acquisition.
    I have developed the application in a PXI located at my place.
    The application is running fine in that PXI.
    But when I ran it on PXI which is located at a remote site. It is giving this error -200279.
    I have run the application using remote desktop connect at the remote site.
    I have run the application in another PXI located at my place. There also the application is running properly.
    Can anyone provide solution for this issue.
    Thanks in advance...
    Into the pursuit...
    Maverick

    Hi Maverick,
    what exactly are you doing in your application?
    The error message tells me that you do data acquisition and you are not reading data from the PC Buffer fast enough.
    There are several methods to avoid that problem:
    −Increase the buffer size with the DAQmx Timing VI
    −Increase the Number of Samples per Channel to read with DAQmx Read VI
    −Decrease the Samples per Channel per Second acquisition rate with the DAQmx Timing VI
    −Don’t do any extra processing in your loop with the DAQmx Read VI
    Stefan

  • Stuck in Error -200279

    My program involves several DAQ tasks that run in lockstep, after the fashion of the "Multi-Function-Synch AI-AO" example. Works very well in general, but if anything ever interrupts the flow of the program, I get permanently stuck with error -200279. Here is the precise report:
    Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1
    Possible reason(s):
    Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
    Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
    Property: RelativeTo
    Requested Value: Current Read Position
    Property: Offset
    Requested Value: 0
    Task Name: Analog input
    And once I am in this state, the only way I can find to get out of it is to kill and restart all my tasks. Surely there is a better way? How do I resynchronize so that the computer quits asking for old samples and gladly accepts the ones that are there NOW?
    Here are a couple of reliable ways to bring on this problem: 1. Hit a breakpoint while debugging. This is very exasperating, when you can't use a breakpoint without destroying the very operation you're trying to debug. 2. The user presses a button that opens a file dialog. Even though my main program consists of several parallel loops, and the file dialog is called from a DIFFERENT LOOP from the one that is doing the data acquisition. That's a problem anyway. How can I bring up a file dialog without stopping my DAQ flow in midstream?
    Help eagerly appreciated. This problem is stopping my program from being the industrial-strength job that my scientist users need.
    Thanks,
    Ken
    Solved!
    Go to Solution.

    Hi Dan,
    Agree with you in general.  In our specific case, we need to recognize the error but then immediately move on and get the next available data.  What I think I understand from earlier in the thread is you need to manually move the RelativeTo and Offset to the most recent data and then continue.  Here's what I have tried, and it seems to work.  This is placed in the error handing code (essentialy in the DAQmxErrChk, so you have to worry about recursion because of calls to DAQmxErrChk).
         Case -200279
             ' Force DAQmx to read the most recent sample in the buffer
             DAQmxErrChk (DAQmxSetReadOffset(ByVal AITaskHandle, -1&)) 
             DAQmxErrChk (DAQmxSetReadRelativeTo(ByVal AITaskHandle, DAQmx_Val_MostRecentSamp)) 
             ' now read just one value to resynch everything
             DAQmxErrChk (DAQmxReadAnalogF64(AITaskHandle, -1, 1#, DAQmx_Val_GroupByChannel, AIData(0), 1&, sampsperchanread, ByVal 0&))
             ' now reset DAQmx to read from the current position from now on
             DAQmxErrChk (DAQmxSetReadOffset(ByVal AITaskHandle, 0&))
             DAQmxErrChk (DAQmxSetReadRelativeTo(ByVal AITaskHandle, DAQmx_Val_CurrReadPos))
    The only problem is I don't really know if this is working as expected!  Not sure how to really tell.
    Van

  • Error 200279 and number / frequency of logged data

    Hello,
    I am new to LabVIEW and I am writing a VI that sends 2 voltage (AO voltage) to a motor, and read the voltage input (AI voltage) from a strain gauge and one of the corresponding AO signal that I sent out to the motor. Also, the VI reads encoder value. I am using a PCI 6230.
    I am unsure of the difference between the number of samples per channel in DAQmx Read (AI Volt), DAQmx Read (Encoder), and DAQmx Write (AO volt).
    If I set all three values to 1 (like in the attached VI), I will get a log data that has logical data for DAQmx Write (AO volt) and DAQmx Read (Encoder) (values changing and logged every 1ms). However, the log data from DAQmx Read (AO volt) has some error (it's not logging data with increment of 1ms), then the Error 200279 shows up.
    If I set DAQmx Read (AO volt) to 1000, and the other two to 1, I will get DAQmx Read (AO volt) data with increment of 1ms, and the others increment of 1s. While if I set all to 1000, my encoder and DAQmx write data will lag (shows up late in the log) by 1s (transient data is not shown, only stedy state after 1s).
    I have been trying to troubleshoot and read about the error description but found no helpful clues.
    Appreciate your help.
    Thanks a lot!
    Attachments:
    AnalogOutputandInputRev1b.vi ‏135 KB

    Hi Thomas,
    Thanks for your inputs. I have tried using the "Shared Sample Clock" example but I have an error which says:
    Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:6->AnalogOutputandInputRev1c.vi
    Possible reason(s):
    Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
    Property: SampTimingType
    Requested Value: Sample Clock
    You Can Select: On Demand
    Task Name: _unnamedTask<2DE>
    And then,
    Error -50103 occurred at DAQmx Start Task.vi:3
    Possible reason(s):
    NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.
    Task Name: _unnamedTask<2DF>
    I have attached my modified VI here as well.
    I would like all my tasks to occur at the same time, and most importantly, logged at the time it happens without some delay.
    Would you please advise on what's going wrong with my VI this time?
    Thank you very much.
    Attachments:
    AnalogOutputandInputRev1c.vi ‏131 KB

  • Error 200279 in SignalExpress

    Hi,
    I'm using a full-Version of SignalExpress 2.0 with a cDAQ-9172 with NI9205-Module and NI-DAQmx 8.5. SE is configured for continous sampling two voltages with 1k-Samples per read and 10kHz Sample rate. In the recording options, I defined a leaving-window-Trigger to start logging with a 5s pretrigger and an entering window to stop it again (5s posttrigger).
     The problem is, that the logging crashes with error 200279 shortly after trigger-event. I've searched the web, but only found solutions for Labview. Turning off "Prepare log data for viewing" did not help. There is nothing but SignalExpress running on the computer.
    Has anybody a tip? 
    Thanks in Advance.

    Hi,
    please read this KB in order to track down why your DAQ is overflowing.
    http://digital.ni.com/public.nsf/allkb/7AD4854943BF344186256D6500807935?OpenDocument
    M. Brauner NIG

  • Error 200279 in exe not in LV8.5

    I have a program that I have installed to a computer as a stand alone application.  When I run the stand alone application the buffer is filling up in about 5 seconds and I get error 200279.  When I run it in the LV8.5 environment with the same hardware, the available samples per channel never goes above 10.
    I have tried playing with the rates and samples with no luck.  I have tried rebooting.  Both computers are running fresh versions of DaqMx8.6.
    The computer with the exe is newer than my laptop which I developed the code on.  It also has run applications before with the same hardware with no issues.
    Any ideas?

    Hello,
    Are you specifying a fixed number of Samples to Read or using the read all available samples with the DAQmx Read.vi?  You stated you played with the rate and the samples.  Does this mean that you changing the Sample Rate and Samples per Channel on the DAQmx Timing.vi?
    Since you stated that the samples available to read is always 10 on the development machine, I would assume this is reflective of your buffer size set by the Sample Rate and Samples per Channel on the DAQmx Timing.vi.  It could be that you are pulling too slowly from your buffer with the Read function and the buffer is set to a size around 10.  Thus, you don’t see the value increase over time past 10 but it’s still overwriting.
    Another option to look into is if there is anything else in your program that is prolonging the time in-between the Start Task and Read functions.  This could be solved by using the error outputs to control the flow of the program.  To learn more about dataflow in LabVIEW, refer to the LabView Help.  Try to make sure that the last function executed prior to entering the loop that contains the Read function is the Start Task function.  You can run highlight execution also to help further troubleshoot.
    Samantha
    National Instruments
    Applications Engineer

  • Error -200279 with simultaneous analog input (different devices) and digital output.

    Hi guys,
    I am a beginner in Labview and have been dealing with this problem for a couple of weeks now and just can't seem to get it completely right, I have a feeling there are a few small bugs in my code/hardware setup.
    I am running an scxi-1000 chassis with a 1600 module and 1302C along with a 1303 accesory for temperature measurements, this is connected to four thermoucouples. Unfortunately I have a limited number of modules available so I am also using a PCI-6221 DAQ card with an scb-68 breakout box used for a digital output and analog input voltage channel. Attached is my labview program. When I run the code at a 50 Hz sampling rate it runs with no errors but the data file comes out extremely wrong, this is also attached. When I run the code at 100 Hz I get error-200279 after a few loops. I used to have 2 daqmx timing VIs (one for each input), but the same error would eventually happen, I have also tried increasing the buffer size on said timing VI. I am also using an old computer (Pentium IV) could this effect the program?
    I have learned a lot going through forms for similar problems to mine but I just can't get it to for an extended period of time, I have posted my simplest code.
    Thanks in advance,
    Luca
    Attachments:
    tc_2.txt ‏1102 KB
    FinalCombined_2.vi ‏128 KB

    Ok this makes sense. I have made the suggested modifications but still getting the same error with sampling rates of 100 Hz or higher. Could you check that I have implemented the queue VIs properly (new file attached)? Also when running at 50 Hz in debug mode it does not look like the second while loop (with the dequeue element) comes into play until I hit the stop button, once I hit the stop button I get the following error:
    Error 1 occurred at Dequeue Element in FinalCombined_2.vi
    Possible reason(s):
    LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    =========================
    NI-488: Command requires GPIB Controller to be Controller-In-Charge.
    This leads me to believe I have programmed the queue elements incorrectly.
    Thanks for your help, any suggestions are greatly appreciated.
    Luca
    Attachments:
    FinalCombined_2.vi ‏102 KB

  • Error -200279 apt

    I have a Thorlabs APT DC Serve controller rotating a polarizer.  I want to roate it through 360 degrees one degree at a time and then measure the voltage output from the DAQ and output the angle and voltage to a file.  It is all working pretty well, but the system stops about six degrees in when it seems like the voltage reads get out od sync.   I am getting Error -200279.
    I think we need some way to sequence the call to the DAQ read once the motor is done rotating.  There has got to be an easy way to do this, but I am new to LabView and can't figure it out.  The VI is attached.
    Thanks in advance for any help you can provide.
    Attachments:
    APT.vi ‏104 KB

    cantyoudobetter,
    What was the following statement after the error code?  For example...
        Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi
        Possible reason(s):
        Measurements: Attempted to read samples that are no longer available. The requested sample was previously               available, but has since been overwritten.
    To get started on figuring out what is happening, the following KB has some things to consider.  Remember that you're opening closing the file every iteration, which could take some time to do.  This could lead to samples being lost.
        http://digital.ni.com/public.nsf/allkb/AB7D4CA8596​7804586257380006F0E62
    Wayne T. | Application Engineer | National Instruments

  • Attempting to write data to file, but getting error 200279

    I am having trouble when writing data to a file. About 10 seconds into the saving process, I get the error 200279. I have done some research on the topic, but am unable to corect my code. I believe I do not want to increase the buffer size, but would rather, I assume, read the data more frequently. The way I save my file is, before running the VI, I assign a location and name of the file (e.g. data.csv). The date and time is appended to the end of the actual file when the I begin to save the data (e.g. data_07-26-13_122615.csv). If the file does not exist, it creates a new file, then appends data to that file after every loop iteration. The reason I did it this way was so I do not have to worry about running out of memory, but apparently my code is flawed. 
    I will include a copy of the flawed section of my code. Any help would be greatly appreciated.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    data_acquisition.vi ‏127 KB

    Your problem is that writing to disk is slow.  It is slow enough that it is causing your DAQ buffer to overflow and cause the error and loss of data.  What you need to do is implement a Producer/Consumer.  This will put the daq and the logging to disk in seperate loops.  This will allow the DAQ to run at the speed it needs to keep up with incoming samples and the writing to disk can run at whatever rate it can.  You send the DAQ data to the logging loop using a queue.
    You might also want to think about changing how you write to the file.  That VI is constantly opening and closing the file, which is a very slow process if you are doing it inside of a loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Daqmx error num: -50103 with message: The specified resource is reserved. The operation could not be completed as specified.

    Hi, I am running a program where I have 4 nidaq cards on a single machine, all connected. I am trying to start a counter and keep getting that error (daqmx error num: -50103 with message: The specified resource is reserved. The operation could not be completed as specified.) in two places in my code. I understand what the error means (you can only have one task of a type per card), but I don't see where that is occuring in my code.
    See below for code. I noted the two places where the error is occuring. I am debugging someone else's code, which is part of the problem.
    Thanks!
    counterTask = 0;
    daq_err_check( DAQmxCreateTask( "counter_generation_task",
    &(counter_generation_task) ));
    daq_err_check( DAQmxCreateTask("counter_count_task",
    &(counter_count_task) ));
    char co_chan_name[40];
    char ci_chan_name[40];
    char ci_trig_chan_name[40];
    sprintf( co_chan_name, "%s/ctr0", niDev);
    sprintf( ci_chan_name, "%s/ctr1", niDev);
    sprintf( ci_trig_chan_name, "/%s/PFI9", niDev);
    printf("OK1");fflush(stdout);
    daq_err_check( DAQmxCreateCOPulseChanTicks( counter_generation_task,
    co_chan_name, "", "ai/SampleClock",
    DAQmx_Val_Low, 32,16,16) );
    daq_err_check( DAQmxCfgImplicitTiming( counter_generation_task,
    DAQmx_Val_ContSamps, 1000) );
    daq_err_check( DAQmxCreateCICountEdgesChan( counter_count_task,
    ci_chan_name, "",
    DAQmx_Val_Rising, 0, DAQmx_Val_CountUp) );
    daq_err_check( DAQmxCfgSampClkTiming( counter_count_task,
    "Ctr0InternalOutput", 1000.0, DAQmx_Val_Rising,
    DAQmx_Val_ContSamps, 1000) );
    daq_err_check( DAQmxSetRefClkSrc( counter_generation_task, "OnboardClock") );
    daq_err_check( DAQmxSetRefClkSrc( counter_count_task, "OnboardClock") );
    printf("abt to start counter_count\n"); fflush(stdout);
    daq_err_check ( DAQmxStartTask( counter_count_task ) ); // ERROR OCCURS HERE
    printf("abt to start counter_gen\n"); fflush(stdout);
    daq_err_check ( DAQmxStartTask( counter_generation_task ) ); // ERROR OCCURS HERE
    fflush(stdout);
    Thanks again for your patience!

    I get it when capturing from my mini DV cam (which is not controllable by FCP). To resolve, I have to click Capture Now a split second after I start the DV tape rolling.

Maybe you are looking for

  • New MacBook Pro - admin password Help

    There is no start up disk w the new MacBook Pro. I recently changed my admin password when it goes to sleep. Must have hit a wrong key, possible w me....nothing is working.  I have to reset it. I was going to register my Mac, had it for a few days, s

  • IBM POS with SAP Issue.

    Dear Experts,        I am working at client site, have a peculiar issue please help by providing your suggessions or ideas to solve it. Here is the Issue : Every time a Transaction is completed at the terminal the data will be written (Appended) to t

  • Lightroom book

    I have installed Lightroom v 5.6 (latest) on my desktop computer and on my Laptop.  I have made a book. I get up one exclamation mark at the pictures and the text "this photo is offline or cannot be found. It will be omitted when you print your book»

  • Where to put my site

    This question has been buggin me for a while and I just thought I'd ask. I wasn't sure whether to put this on the iWeb or .mac forum, so I copied it to both. First, I am a novice with almost anything about website making, so forgive me for misused te

  • Saved form data and logins are not sorted alphabetically anymore

    Go to gmail, double click in the "username" field, suggestions appear in a drop down box. If you have more than 1 gmail account they are no longer sorted alphabetically, '''they are sorted by the order entered! '''(with the newest entered on the bott