error-200279 card USB-4431 DSA

I use USB-4431 dynamic signal acquisition card.  I have the program set out in the attachment.  I am trying to generate a control shaker random vibration signal and at the same time reading back 2 analog inputs. When I run my code with the full program, I have error-200279 but when I split the acquisition & code generation and put it in a stand alone vi and run it in itself, I don't get any errors.  I tried the different sampling frequencies and samples/channel.  one that seems to work best is when I'm 60 kHz and 20Ks/channel sampling.  My requirement is an example for the acquisition of 200 kHz ane 20Ks/channel.  I've been monitoring the node available samples/channel and seems to continue until no more samples are available and it shows 0.  I need to make these 2 tasks to run correctly in the main program, which is an event focused on loops of master/slave.

Hi ssherian,

The USB-4431 is a sampling frequency maximum of 102.4 kech. / s. If your application requires a 200 kech. / s, you will have to use a PCI or PXI-based DSA with a sampling rate WAS higher.

What about the 200279 error, this error is usually due to a problem with the DAQmx hardware buffer. With a continuous acquisition, a good rule of thumb is to have 10 x the number of samples to read sample rate (i.e. the sample rate = 10000 s/s, samples read = 1000). It is also possible that your computer simply cannot process the data quickly enough. If you perform any complex, analysis of real-time data the processor of your computer simply may not able to catch the flow.

This KB: error-200279 DAQmx Read Error provides an overview of together in-depth to error 200279, possible causes and measures to resolve the error.

Hope this helps,

Chris G

Tags: NI Software

Similar Questions

  • NOR-DAQ + NOR USB-4431: error 233054

    Hello everyone,

    First of all, here is my config:

    -Dev PC: Win 7 32-bit

    -LabView 2009 - 32-bit

    - NI DAQ 9.7.5

    -Card acquisition: NI USB-4431

    The problem:

    When I run my app just after connect my DVR to my PC (or after startup) card, the DAQ Assistant gives me error 233054:

    I not found any explanation on this wonderful tool that is the internet, so I come here!

    The only way I Born to move forward, is the NOT-MAX aperture, ask to make an acquisition, ask to do a generation (that work) and then I can go back in LabView and run my program!

    The problem seems to come from the initialization. But I don't see what I need to do to make it work every time! Any idea?

    Best regards

    Harold

    Hello

    I just checked the daqmx and labview driver compatibility. I noticed your 9.7.5 daqmx driver version is not compatible with labview 2009, therefore, you have this agreement.

    The latest version of LabVIEW 2009 daqmx is 9.7 see below

    DAQmx and LabVIEW version compatibility:

    http://digital.NI.com/public.nsf/allkb/B0D5630C0A50D5C6862578E800459248

    So is this you can 9.7.5 uninstalling and reinstalling daqmx 9.7 see this link

    Uninstall the software

    http://digital.NI.com/public.nsf/allkb/AC6ED75D3D93375686256E8E00245F0D

    Best regards.

  • synchronize the inputs and outputs on the USB-4431

    Hello

    I have an application that needs to send a signal on the USB-4431 and then capture it with an entry on the same device.

    Aware that I use two tasks to do this, one for input and one for output. I discovered that a trigger (on the RTSI bus) can cycles of sending/capture sychronisé departure operations so that it can be a constant offset between the captured signal and the output signal.

    Unfortunately, the code I found is for Matlab. I can't find an equivalent for it in the C API of NIdaq. The method is described here; http://www.mathworks.in/help/daq/synchronize-analog-input-and-output-using-rtsi.html.

    What I can't understand is how to implement this on the analog input:

    ai.ExternalTriggerDriveLine = 'RTSI0';
    

    Can someone shed light on how to do it?

    The rest of the things described here, seems to be feasible with a normal trigger:

    ao.TriggerType = 'HwDigital';
    ao.HwDigitalTriggerSource = 'RTSI0';
    ao.TriggerCondition = 'PositiveEdge';
    

    Thank you

    Nirvtek

    You can synchronize the HAVE and AO by sharing the start of relaxation between your two tasks.

    Choose one of your tasks as the "master" and the other to be the "slave" (any).

    Set up a trigger to start of digital dashboard on the task of the slave, and set the source of the trigger to be the trigger of the master's departure.

    Assume the following:

    The name of your device is 'Dev1 '.

    I is the main task

    AO is the task of the slave

    Here's what you would do to sync the two:

    (1) create the tasks I and AO in order that you want to

    (2) set up "timing" on the tasks of HAVE it and AO (you choose the sampling rates must be the same or power-of-2 many of the other (for example 100 K, 50 K, 25 K, 12.5 K, etc...))

    (3) configure your slave (the task of AO) task to have a numerical advantage start trigger and make the source is the trigger for the start of the task of the master (the task to HAVE it). In our case, "Dev1, AI, StartTrigger.

    (4) write data (a sine wave, presumably) to your task AO

    (5) start the task from the slave (the task of AO).  The task of the AO is now in the 'Started' State, but given that you've set up a digital trigger early, it won't actually generate data until he sees a numerical advantage of 'Dev1, AI, StartTrigger.

    (6) to start the main task (task to HAVE it).  The task of the AI does not have a trigger digital early, so the software will immediately generate a start trigger, which also causes a numerical advantage on "StartTrigger/AI/Dev1", which causes the task AO start at the same time.

    7) read your job to HAVE.

    You will notice a few 0 at the beginning of your data to HAVE. It's a result of something called "Filter Delay" and it is an inherent characteristic of all DSA devices - see the manual to use DSA and this article for more information on what is and how to cope.

    I hope this helps.

    EDIT: I just noticed that you pointed out an existing C example. It's exactly what you want. I don't know why you have a resource error booked - I tried it myself and (after changing the AO will of +/-10V to +/-3 .5V), it works beautifully.  Try to reset your device to the MAX (or DAQmxResetDevice() of your program)

  • Status code: internal software error-223091 occurred in the DSA software. Please contact National Instruments support

    Hello

    I work with card 4461.

    When writing the data on the card I get this error

    The channel which has been set up had

    Update rate: 9210

    None of the samples: 87643

    Sample mode: finite samples

    Sync: Synchronization with AI0 even of the same device

    The values lie between 6 V and 1 .2V

    error occurred in the function .

    {Message of error =-223091 = "internal software error occurred in the software DSA. Please contact National Instruments Support.\n\nTask name: Magnet\n\nStatus Code:-223091 "}"

    The Stack Trace:

    «to nNIMSSAIL100.StatusObserverT<><>otNetApi > >.» CheckWithName (StatusObserverT<><>otNetApi > *, tCaseInsensitiveBasicString\\,_STL::allocator\\,nNIDMXS100::tLocaleConsideringWideStringComparitor\\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName) \r\n

    to nNIMSSAIL100.StatusObserverT<><>otNetApi > >. Check (StatusObserverT<><>otNetApi > *) \r\n

    to nNIMSSAIL100.StatusObserverWrapperT<><>otNetApi > >. Check (StatusObserverWrapperT<><>otNetApi > *) \r\n

    to nNIMSSAIL100.WriteotNetApi >, class nNIMSSAIL100::AnalogWrite, double > (tTask *, Double *, UInt32, UInt32, UInt32, Double, Boolean, Boolean, tScaledDataFormat, StatusObserverT<><>otNetApi > *) \r\n

    to nNINETAI2005100.Write1DotNetApi >, class nNIMSSAIL100::AnalogWrite, double, double, cli::array^ > (task task, Double [] buffer, UInt32 numChannels, UInt32, UInt32 numSamples lines, Double timeout, Boolean autoStart, Boolean interlace) \r\n

    at NationalInstruments.DAQmx.Internal.AnalogSingleChannelWriterImpl.WriteMultiSample (Boolean autoStart, Double [] data) \r\n

    at NationalInstruments.DAQmx.AnalogSingleChannelWriter.WriteMultiSample (Boolean autoStart, Double [] data) \r\n

    Project.Analog1ChannelWriterTask.Write (Double [] data, Boolean AutoStart) in C:\\Project\\AnalogWriterTask.cs:line 446\r\n

    to Project.HardwareIO.WriteAO (Double [] Data, Boolean AutoStart) in C:\\Project\\HardwareIO.cs:line 120\r\n

    at Project.DataAcquisition.RunAcq (C:\\Project\\DataAcquisition.cs:line 182\r\n)

    at Project.DataAcquisition.Run (C:\\Project\\DataAcquisition.cs:line 68\r\n)

    at Project.Program.ThreadFunction (C:\\Project\\Program.cs:line 47\r\n)

    at System.Threading.ThreadHelper.ThreadStart_Context (Object state) \r\n

    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state) \r\n

    to System.Threading.ThreadHelper.ThreadStart ().

    TargetSite:

    {Void nNIMSSAIL100.StatusObserverT<><>otNetApi > >.} {CheckWithName (nNIMSSAIL100.StatusObserverT<><>otNetApi > *, nNIDMXS100.tCaseInsensitiveBasicString\,_STL::allocator\,nNIDMXS100::tLocaleConsideringWideStringComparitor\, nNIDMXS100::tLocaleConsideringWideStringCaseForcer > *)}

    I am using VS2005 c#

    Please tell me what wroing

    Kind regards

    Alok dandois

    Hey Alok,.

    This error code means that the revision of the map is more recent and not yet supported by the driver.  That the release of new versions of the same map with new features, the ID usually changes requiring a new version of DAQmx.  Try upgrading to the latest version of DAQmx and try again.

    While you're there.  See if you can find the product ID located in Device Manager (if you are using Windows).  Once in the Device Manager, right click on the device and click Properties.  Go to the Details tab, and then copy the entire string that is displayed under "Device Instance Id".  It should look something like PCI\VEN_xxxx & DEV_xxxx...  Paste in a reply in this thread can I be sure of your problem.

    Germano-

  • Buffer FIFO output DAC on PCI-4461 and USB-4431

    I remember correctly, there is a FIFO buffer on the output DAC of a PCI-4461 to approximately 2048 samples.  Am I remembering correctly?  What is the output DAC FIFO on the USB-4431?

    Hi jmoses,

    The FIFO on the 4461 is actually 1023 * samples (found in the page on record).

    The 4431 does not actually list a FIFO size in the page on record, but any device that handles output clocked by material will have some sort of FIFO to avoid running out of data to generate.  By using the Output.OnBrdBufferSize property node returns 4095 * samples - it is logical that FIFO would need to be bigger, given the higher latency of USB transfers.  Unless you use on-board regeneration, the FIFO size should not typically be a concern since it is designed to be large enough to accommodate a continuous generation to the full rate of the device specced.

    Action request corrective number 149512 filed with respect to the issue of the missing documentation on our USB DSA devices - I apologize for any inconvenience.

    * If you are interested, the reason that the FIFO is not an even number of samples is the software limits the size of buffer to one less than the actual hardware buffer.  This is necessary for us to be able to detect the difference between an empty FIFO and a State full of PEP (we use a reading and a pointer to write to manage the transfer of data in and out of the FIFO - we can say that the buffer is empty when the two pointers are equal and complete when the write pointer is a sample behind the reading pointer).

    Best regards

    John

  • Hallo why? When I update ios. When the image has finished error itunes and usb

    Hallo why? When I update ios. When the image has finished error itunes and usb

    Connect the iPhone to the computer that you are synchronizing usually with

    and follow the prompts to iTunes on this computer. If you

    do not generally in sync with a computer, you should always use

    iTunes on a computer to complete the update.

  • Satellite A100-233 - error that unrecognized USB device

    I have a problem with my USB ports, they where working fine but all of a sudden they start gives me error that unrecognized usb device. I tried to reinstall XP but still the same.

    Can someone give my solution to this problem?.

    Hello

    You have yellow exclamation marks in Device Manager?
    I had a similar problem with the USB ports a few years ago. I removed the ports in Device Manager and reboot the laptop. The USB ports will recognize again.
    Furthermore, I reinstalled the latest chipset driver and everything worked well.

    The latest chipset driver download on the Toshiba site:
    http://EU.computers.Toshiba-Europe.com-online decision-making supported Downloads & => Download drivers

    Good luck! :)

  • Display of Acquisition sample done with a USB-4431

    Tried a bunch of examples, code the DAQ Assistant, mega-search time. At the end of the road. It's about my first traditional appointment to programming DAQmx after years of programming DAQ followed a long hiatus.

    I use a hammer strength IEPE hit to begin sampling of a USB-4431. I'll be post-processing fft; I want ten seconds of data to 4096 samples per second (40960 samples).

    As I am acquiring data, I want to update a chart to display the contents of the buffer, adding data to the chart every 125 mS up to what the end of the second 10 captures.  Relaxation, start sampling data and acquisition works very well. The problem becomes it to the chart control.

    The graph is updated in spurts and incompatible adjustments. The second set of 10 shot finally makes the curve, but it takes anywhere from 30 to 120 seconds to display, sometimes in quick "pieces" with long breaks. Sometimes the initial trigger data gets poster immediately, and it takes sometimes 15 seconds just to display the first 512 samples!

    I obviously had something fundamentally wrong here.  Could someone please have a look at the code below to me. TIA ~!

    void main (void)
    {
    X_AxisIndex = 0;
    NumDataPoints = 512; A sample rate of 4096 samples/second, trying to update the chart each 125 milliseconds.

    CreateDaqTask();
    DAQmxStartTask (taskHandle);
    RunUserInterface();

    } / / Hand

    Sub CreateDaqTask (void)
    {
    It all works very well as far as I KNOW *.
    DAQmxCreateTask("",&taskHandle);
    DAQmxCreateAIForceIEPEChan (taskHandle, ' Dev1/ai0', 'Hammer', DAQmx_Val_PseudoDiff,-10, 100, DAQmx_Val_Pounds, 50.0, DAQmx_Val_mVoltsPerPound, DAQmx_Val_Internal, 0,0021, NULL);
    DAQmxSetChanAttribute (taskHandle, 'Hammer', DAQmx_AI_Coupling, DAQmx_Val_AC);
    DAQmxCfgSampClkTiming (taskHandle, "OnboardClock", 4096, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 40960); Take 10 seconds of a data value to 4096 samples per second.
    DAQmxCfgAnlgEdgeStartTrig (taskHandle, 'Hammer', DAQmx_Val_RisingSlope, TriggerLevel);
    It all works very well as far as I KNOW *.

    The idea here is to launch a reminder all the 512 samples/4096 samples per second = 125 mS so I can view the data in a chart control, update all the 1/8th of a second.
    DAQmxRegisterEveryNSamplesEvent (taskHandle, DAQmx_Val_Acquired_Into_Buffer, NumDataPoints, 0, EveryNCallback, NULL);

    } / / CreateDaqTask

    Int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
    {
    Read the data of 512 points and display them.
    DAQmxReadAnalogF64 (taskHandle, NumDataPoints, 15.0, DAQmx_Val_GroupByChannel, buffer, NumDataPoints, & CurrentBufferIndex, NULL);
    PlotWaveform (main, Main_Graph, buffer, NumDataPoints, VAL_DOUBLE, 1.0, 0.0, X_AxisIndex, 1.0, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_YELLOW);

    X_AxisIndex += NumDataPoints;

    return 0;
    } / / EveryNCallback

    Thank you, WW, I'll give that a try.

    > For input analog, the USB-4431 has a size of 1 023 sample buffer, and it is shared by all channels. .

    Can you tell me where you found this information please? I looked and looked, obviously in the wrong place.

    Also, I discovered that if I move the mouse quickly as he tries to redraw the graph, it draws a lot more systematically and quickly, but still not in real time.

    UPDATE: I got SetSleepPolicy (VAL_SLEEP_NONE); active.

    I thought it was to prevent Windows events interfere with the events of data acquisition. Seems to have the opposite effect here. I turned it off, works great now.

  • Why 'Read a fixed number of samples' help with the error 200279?

    Hello world

    It is a question about a tip found in the explanations on the acquisition of data error-200279. This explanation it is said: '... ". reading a fixed number of samples instead of all available samples can fix this... »

    AFAIK the DAQ system buffer is a ring buffer, so we can consider having a writing position and a position of reading "in motion" along the ring. While the playback position is the position of writing, everything is brilliant. But if writing catch up reading, samples will be overwritten and therefore-> error-200279.

    So here's my question:

    I do not understand why a fixed amount of reading samples would help me with this error. I don't understand why other Councils (increase in the size of the buffer or the frequency of reading) would help me because they reduce the probability of the playback position being outrunned by the position of the writing.

    But if I read everything which is available, whenever I read the only way for the buffer fills would be that the time between two readings take more time than necessary fill the entire buffer.

    Or in other words to each reading I will read at least as many elements that it has been filled by writing since the last read, so the only way to fill the buffer would fill completely at once since the last reading.

    This should be a lot safer than reading a fixed amount, because in this case, I'd get a problem if I read it that fewer items than writing complete at the same time, regardless of the number of items that would be and no matter what the size of the size of the buffer that would be.

    What I understand here?

    Thanks and regards,

    Sebastian

    SBach wrote: this VI is a State Machine in queue, the reading part is made in the case of timeout and cases are used as initialization orders, stop and change the outside DAQ hardware.

    That I can't tell when these commands will trigger the time between two readings could not be set. If a strictly fixed amount of data could lead to a buffer to fill.

    Init command: you certainly don't have a running task.

    Stop: You stop the task, then doing here if you get overrun.

    Edit tasks: you will probably need to stop the task still before you can edit the task, but let's go back to not caring.

    The way I see it, the other commands must stop the task anyway.  If you can leave the timeout do its job and do not do a lot of extra stuff.

    And here are some alternatives:

    1. use a shift register to keep track of how long your wait time should be.  In the case of reading, make the deadline to be whatever it is that you are using.  In all other cases, only the 0 so that a read timeout must be performed immediately (once the queue is empty).

    2. When you do your check to 1.5 times the timeout, if there is too much data, queue a reading at the front of the queue so that playback will happen.  The idea is that you really want to keep the same stack sizes to keep the memory to be allocated.  So just to be read more often.

  • Scan USB 4431 DC analog output voltage

    Hi all

    I have NI USB 4431 Analyzer of dynamic signals. I want to generate constant tension on the port AO0 of this material. I tried to use the Gen Update.vi blood sample, but it is said that only updated the HW Timed mode cannot be used with this equipment. When I use the Test of MAX Panel, I can generate a constant tension.

    How can I make it happen in Labview? Can someone help me?

    The USB-4431 can be used to generate a voltage, but to do this, you actually create a timed task equipment.  This is because it uses a DAC delta-sigma, which must be clocked to produce output.  To do this, I would recommend that you set up the device to perform a finite generation.  The data you write are just the DC value that you want to copy, repeated.  Then you want to define the area of OCCUPANCY. Property of IdleOutputBehavior.  In LabVIEW, this is located in DAQmxChannel-> outputs Analog-> General Properties-> output Configuration.  In the C API, you would call DAQmxSetAOIdleOutputBehavior to DAQmx_Val_MaintainExistingValue.

    To summarize:

    (1) create output over task

    (2) configure the IdleOutputBehavior property

    (3) write the data (value of DC, repeated)

    (4) to start the task.

    This should lead to the value of the DC output.

    Hope that helps,

    Dan

  • Try to write data to the file, but error 200279

    I have problems when writing data to a file. 10 seconds in the recording process, I get the error 200279. I did some research on the subject, but I am unable to corect my code. I think I want to increase the size of the buffer, but he prefers, I suppose, to read the data more frequently. The way that I save my file is, before starting the VI, I attribute a location and name of the file (e.g. data.csv). The date and time is added at the end of the actual when file the I start to record the data (e.g. data_07-26 - 13_122615.csv). If the file does not exist, it creates a new file, and then adds the data of this file after each iteration of the loop. The reason why I did this way was so I don't have to worry about running out of memory, but apparently my code is wrong.

    I will include a copy of the faulty section of my code. Any help would be greatly appreciated.

    Thank you.

    Your problem is that the writing on the disk is slow.  It is pretty slow so it causes your DAQ buffer overflow and cause error and loss of data.  What you need to do is to implement a producer/consumer.  This will put the data acquisition and recording on the disc in separate loops.  This will allow data acquisition work at speed, that he needs to deal with incoming samples and writing on disk can run at all what pace, he can.  You send data from data acquisition to the loop of logging using a queue.

    You can also think about changing how you write to the file.  VI is constantly open and close the file, which is a very slow process if you do it inside a loop.

  • Error 200279 and slow program running

    I read a lot of posts about this error but still cannot fix mine. During the execution of the program realizing measures of error 200279 turns suddenly upward. In addition, the program is very slow; I'm trying to read data from a QD and a PSD (two different position detectors) and when I move a detector (QD or PSD, it doesn't bother me) the program response is too slow. I tried to correct the error by setting the value for timeout - 1, but the error is still there. What can I do?

    Thanks in advance,

    Mercurial

    P.D.: Error 200279: tried to read samples that are no longer available. The requested sample was already available, but has since been replaced. Increase in the size of buffer, most frequently the reading of data or by specifying a fixed number of samples to read instead of reading all available samples would correct the problem.

    You need to understand why your VI is so slow.  It go fast then slow down over time?

    I see a lot of things that could cause slowdowns.

    1. a lot of Express VI.  VI Express is designed to facilitate the installation and quickly start code.  They are not known for efficiency.  FIX: Use the regular functions of LabVIEW such as DAQmx and file write.

    2. you write to a file within the loop.  File writing is usually slower than other functions.  Maybe your hard drive slows you down.  FIX: Use producer/consumer and transfer the file to write to another loop indepdendent.

    3. you build graphics XY in the loop.  Inside that express the VI, it is continually adding more data in the tables stored in the shift registers.  These berries grow, windows must track more contiguous memory to store the data.  Eventually, it would run out of memory.  What size are these graphs?  FIX: Sometimes delete these graphics.  (EDIT: I see that you have the "erase data on every setting turned on for that call.)  This may not be a problem.)

    4. you write to the nodes property of each iteration of the loop.  Changing the properties of controls can be quite slow at times.  FIX: Write to a property node where the properties really change.  True to the visibility properties Plot writing is really bad, because you do each iteration, that it never changes.  You may as well just outside the loop.

    Your code to see how long each iteration of the loop is actually taken from reference.  Turn the pieces to see if you can speed it up.

  • HAVE DAQmx error-200279

    I run a loop with a N-Chan AI read vi, out its values in a queue which is read by the other parallel loops.  During the operation of the program, when the other loops treat their queues and (from what I can tell) occupy time processor, read it loop returns a 200279 error, saying:

    Error-200279 to AI Read.vi:7

    Possible reasons:

    Attempted to read samples that are no longer available. The requested sample was already available, but has since been replaced.

    Increase in the size of buffer, most frequently the reading of data or by specifying a fixed number of samples to read instead of reading all available samples would correct the problem.

    Property: RelativeTo
    Corresponding value: current playback Position
    Property: Offset
    Corresponding value: 0

    Task name: _unnamedTask<13>

    I am quite puzzled as to why this error keeps popping up.  No one knows what the first cause of this error is usually?

    Hi Jeanius, in my view, that this articlecan explain your problem.

  • Error-200279 during analog playback Wfm Nsample

    I called the VI attached at least 10 x in the main VI and works very well, but sometimes it gives me an error-200279. Can someone please tell me why?

    Thank you in advance.

    Your buffer is not large enough.

    You collect the 20,000 samples per second, but only set it to 2000 samples per channel.  This is 1/10 seconds worth of data.  You read 1000 samples at a time, until about 1/20th of a second.  If the loop runs fairly quickly, you can follow and will not get an error.

    If there is a small delay (maybe Windows turns off and does something else for 50 or 100 msec.) your buffer will overflow.

    I would say eliminating the constant 2000 where you set the samples/channel and try again.  See if it behaves better.

  • matter of timing gives error-200279

    Hey

    I'll have some problems in my program on the schedule and read. The question arises with the part of my code, relating to a barometer Vaisala PTB - 110. (in addition, the program is related to 4 x Rotronic HF5 transmitters and 3 x Brooks MFC). It worked fine for months with samples available by alternating channel between 0 and 1, but now he just continues to rise before giving the error 200279.

    The intention is to have snack every second. I tried to play use 'samples available' for the 'number of samples', but this translates each other read value is 0. I also tried to set the number of samples to read 2 but this messes with my Save function, which is built to collect time-based.

    The problem has left me speechless because nothing has been changed compared to when it worked fine.

    The section of the code dealing with the PTB-110 is included.

    I hope someone can help me understand what is wrong. If it is necessary to understand this out made me know.

    Thanks in advance

    Morten Tschiskale

    Not sure I understand what you try to do, but...

    Looks like you're creating a continuous sample with a sampling frequency of x ms/sample (for example 500 ms).  Then feed you the 500ms in all loop and I guess off the screen is a wait function.  In other words, the while loop will iterate to slightly more than 500 ms/iteration (assuming that there is nothing slower inside the loop) and check back to see if there is a sample ready.  This means that the apparent read rate is slightly slower than the sampling frequency and the # available creep indefinitely. If something is much slower inside the loop (for example, something takes 750ms to run) you're problem will worsen.  I would like to try out a millisecond timer reading to an output of indexation of the while loop to see what really is your loop rates.

    Seems strange that you're using "Channel N, N sample" and immediately the indexing on the first sample of the first waveform.  No further comment other than seems weird.

    If you can tolerate a little jig in the calendar of your reading, you could try a single reading (1 channel, 1 reading, don't not continuous) inside the while loop (or better still within a dedicated loop parllel) and finish with the clock sampling and stuff of readings available.

Maybe you are looking for