LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI DAQmx -200290 error

Solved!
Go to solution

Hello,

I have a issue with 2 computers that run a customer built program for our electron guns to melt ingot I am getting the following error:

Error -200290 occurred at beam guidance.vi

 

The generation has stopped to prevent the regeneration of old samples. Your application was unable to write samples to the background buffer fast enough to prevent old samples from being regenerated.

 

To avoid this error, you can do any of the following:

 

  1. Increase the size of the background buffer by configuring the buffer.
  2. Increase the number of samples you write each time you invoke a write operation.
  3. Write samples more often.
  4. reduce the sample rate.
  5. if your data transfer method is interrupts, try using DMA or USB Bulk.
  6. Reduce the number of applications your computer is executing concurrently.

In addition, if you do not need to write every sample that is generated, you can configure the regeneration, and then use the position and offset attributes to write the desired samples.

 

My question is this a problem with the software or the operating system background processes causing the fault. 

0 Kudos
Message 1 of 2
(952 Views)
Solution
Accepted by topic author robhazekamp

@robhazekamp wrote:

My question is this a problem with the software or the operating system background processes causing the fault. 


I'm going to go with the problem being with the software.  Some questions and observations:

  • A Stacked Frame structure is generally not advisable -- it is clumsy, difficult to use, and messy to communicate between loops (no Shift Registers).  There are much better ways to code a three-step process (e.g. a State Machine).
  • Try really hard to make your Block Diagrams fit on a "reasonable-size single screen".  An excellent way to do this is to use sub-VIs (which occupy 32 x 32 pixels on the diagram) to encapsulate routines (like "Set Up Analog Output").
  • If you've got a time-sensitive routine (like "keeping up with the Analog Output"), don't put other non-time-critical code in the same loop.  Create two parallel loops, one for the time-critical process, the other for "everything else", and communicate between the loops to keep them synchronized.  Often a Consumer/Producer Design Pattern is useful.
  • Many of the little boxes within the While Loop take up a lot of space and are clumsily coded.  You seem to use Frame Sequences a lot, and the Error Line hardly ever.  Use the Error Line (and Data Flow) to eliminate the sequences.  Consider "hiding the details" in a sub-VI.
  • Use an Event Structure to handle processing the Boolean switches (such as Copy, Logout, etc.).  Note that this provides a single loop with a Case (the Event Structure) inside it that handles each of the Booleans, and has the added advantage that if the Boolean isn't changed, the code is never executed.  A Space and Time Saver.  You can also pass data from the Event Loop into your main Processing Loop (look up Producer/Consumer Design Pattern (Events), which you can find by clicking File, New ... (the dots are important), then looking for the Template "Producer/Consumer Design Pattern (Events)").

Bob Schor

Message 2 of 2
(922 Views)