LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Errorcode -200279 for data acqusition

Solved!
Go to solution

Hi all,

 

I'm trying to build a small program for data acqusition, but I keep getting an error -200279 telling me to increase buffertime. What am I doing wrong?

errorcode-200279.png

0 Kudos
Message 1 of 9
(3,377 Views)

Anyone?

 

This is running on a simulated channel. Is there something wrong with the timing rate or number of samples?

0 Kudos
Message 2 of 9
(3,361 Views)

You've set up a Producer/Consumer pattern, but your #1 consumer, the Waveform Chart, is within the Producer loop.  If you really are sending multiple channels of data at 5KHz, I doubt that the display will be able to keep up, limiting the speed of your Producer loop and causing it to "back up".

 

Try creating a Consumer loop and putting the display stuff in there.  Make the Queue "reasonably large", but of fixed size.  You can also do a Lossy Enqueue in your Producer, which will cause points to be "pushed off the queue" if you fill up the buffer, but you should be able to notice that in your Consumer by "jumps" in the display when this happens.

 

What I've done to look at data being produced at 1KHz is to average 50 samples at a time, making my display update rate 20Hz, certainly fast enough for the type of data I'm visualizing (trajectories of machinery and controllers).

 

Bob Schor

0 Kudos
Message 3 of 9
(3,349 Views)

Do you get the error if you turn off highlight execution?

 

Your DAQ is acquiring data at 5kHz.  You are reading 500 samples per read.  So you need to have that loop run no slower than 100ms.  I would not expect the chart to cuase that much of a slow down.  But the highlight execution will kill your time and you will easily fill up the DAQ buffer.  The only other thing I can think of is if you have another loop that is just using up all of the CPU.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(3,341 Views)

No you are right. I'm not getting the error, when I'm turning off the highlight execution.

 

So it seems to run fine. I just didn't understand why it would come up with an error, when checking the code with the light bulb. As what I've found out on www.ni, it seems one can avoid the error by initializing some data for the chart. 

 

Not sure if I understood it 100% correct though. Here is the link:

 

http://digital.ni.com/public.nsf/allkb/A647A1BE3DA8336786257AAA0066B45B

 

 

I have no other loop in the setup. I'm sorry for the confusing with the name "producer loop". This is the only loop in the code, I deleted the rest to narrow down the error.

 

Is the conclusion that the program is alright? Or should I do something to remove the error?

 

0 Kudos
Message 5 of 9
(3,333 Views)
Solution
Accepted by topic author andersson

@andersson wrote:

No you are right. I'm not getting the error, when I'm turning off the highlight execution.

 

So it seems to run fine. I just didn't understand why it would come up with an error, when checking the code with the light bulb. As what I've found out on www.ni, it seems one can avoid the error by initializing some data for the chart. 

 

Not sure if I understood it 100% correct though. Here is the link:

 

http://digital.ni.com/public.nsf/allkb/A647A1BE3DA8336786257AAA0066B45B

 

 

I have no other loop in the setup. I'm sorry for the confusing with the name "producer loop". This is the only loop in the code, I deleted the rest to narrow down the error.

 

Is the conclusion that the program is alright? Or should I do something to remove the error?

 


The chart has nothing to do with your error.  It is strictly the highlight execution.

 

When you set up a continuous sampling, it starts collecting data at a given rate.  There is only so large of a buffer setup.  There is a KB article that tells how much room it is exactly, but for the sake of argument here, we'll say 10 seconds worth of data.  In normal execution, your code runs fast enough that it is able to empty the buffer as fast as the data is acquired.  But when you turn on highlight execution, your VI slows down to a crawl so that it can show you step by step what is happening on each wire.  Your data acquisition still occurs in the background.  The slowed down execution is taking much longer than the data is being acquired.  Within one or a few loop iterations, you've filled up the buffer and will receive the error.

 

You can't use highlight execution when you are using a DAQ device in this manner (or VISA ports either) where data is being sent continuously at a rate independent of how fast the code is executing.

0 Kudos
Message 6 of 9
(3,327 Views)

Additional question:

 

I have an updated version of the program, where I'm running 4 extra channels of distance probes, besides the first channel acquring from a load cell. The two modules are set to run at same rate. Is it then okay to have it all in the same loop as I have done? It seems to run fine. 

 

Best regards 

Anders

blockdiagramtest2.pngfrontpaneltest2.png

0 Kudos
Message 7 of 9
(3,325 Views)

Your program is just fine.  The only reason you got that error is because highlight execution slows everything to crawl.  Like I said, you need to do that read no slower than 100ms.  With the highlight execution, you are doing the read more like every 10 seconds.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(3,323 Views)

Thanks a lot to you and Crossrulz that explanation makes sense. Sorry for posting an error that is not real, when highlight execution is turned off. I didn't understand it till now.

0 Kudos
Message 9 of 9
(3,315 Views)