LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200279

I'm continually getting error 200279, and none of the existing topics offer much for solutions. 

 

From the error description, the issue is a likely a buffer overflow. Experimenting with some of the variables I think should be contributing, the "rate" of the daqmx timing seems to be the biggest contributor and changing that impacts how quickly I get the error so I've made that as small as I can. I also had a "wait until next millisecond multiple" in the while loop that seemed to have a small impact so I removed that in case that was the issue. I thought the "number of samples" would factor in, and the help menu states it controls the buffer size in continuous mode, but I found changing that had no impact at all. 

rdobro_2-1764615040655.png rdobro_1-1764605130958.png

 

The slowest sample rate I can use without missing datapoints is ~60Hz and I'm still getting error 200279 after ~100 minutes. That sample rate seems like it should be slow enough that my while loop should be able to execute fast enough to keep up even if it is rather inefficient. I need this program to be able to run for a few days at a time without giving an error so I want to understand what part is not able to keep up. 

 

What am I missing that would cause the buffer to fill up and create this error? Does the number of input channels have an impact on this (I'm using 8 with this setup)?

0 Kudos
Message 1 of 8
(172 Views)

Without seeing any code, not much we can advise. There should be no timing functions in the read loop.

  1. Open one of the Continuous Acquisition Examples in the example finder. Run that and see if you get an error.
  2. How often are you reading the data? Every 100ms works well for most situations.
  3. Are you doing anything else in the read loop that can slow it down?
  4. Attach your code and save it for a previous version like 2020.
0 Kudos
Message 2 of 8
(156 Views)

"There should be no timing functions in the read loop." Yes, I already removed it when troubleshooting earlier. 

 

1. Open one of the Continuous Acquisition Examples in the example finder. Run that and see if you get an error.

 

Might be the issue, I don't think I had this part.

rdobro_0-1764620946561.png

2. How often are you reading the data? Every 100ms works well for most situations.

 

How do I specify this? Is it not the same as the sample rate? Is it what's pictured above?

 

3. Are you doing anything else in the read loop that can slow it down?

 

I don't think so.

 

4. Attach your code and save it for a previous version like 2020.

 

Ah shoot, I tried to attach the code but the page refreshed when I tried to post and removed it. Is attached now. 

 

0 Kudos
Message 3 of 8
(135 Views)

Hi rdobro,

 

on topic 2: setting the sample rate does not define the loop iteration rate!

 

Example: you set 60S/s sample rate and read 6 samples per Dawn read so the loop will iterate at 10Hz. Simple math: iteration rate=sample rate/number of samples...

 

Let DAQmx do the timing!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(125 Views)
  1. You are reading a single sample at time; there is no way you can keep up.
  2. You are consistently building arrays in your loop, you will eventually run out of memory. This will also slow down your loop as it takes time to do memory allocations.
  3. You want to specify Reading multiple samples at a time, around 100ms worth of samples.

I modified one of your reads to do multiple samples, then take the average so the rest of the array operations do not need to be modified.

 

You will need to decide if you need all the points; if so look into a producer consumer type architecture.

mcduff_0-1764622529957.png

 

Look in the example finder for a good start.

0 Kudos
Message 5 of 8
(121 Views)

"setting the sample rate does not define the loop iteration rate!"

 

Well yes, I've figured out that much. What I want to learn is what does define loop iteration rate. Is the following what defines it?

rdobro_0-1764623094058.png

 

My initial assumption was that the loop would iterate as fast as it could, and unless there was a delay in the loop or something intensive that would bog it down, that would be faster than 60Hz. I get why iterating too slowly like your example would be a problem, but is it also a problem if the loop iterates faster than the sample rate?

0 Kudos
Message 6 of 8
(112 Views)

1.You are reading a single sample at time; there is no way you can keep up.

 

So in what case would one actually use 1 Sample reading? Shouldn't it be able to keep up if the loop runs faster than the sample rate?

 

3. You want to specify Reading multiple samples at a time, around 100ms worth of samples.

I modified one of your reads to do multiple samples, then take the average so the rest of the array operations do not need to be modified.

 

So when changing it to "N samples" is that just changing every datapoint to an array and that's what breaks the subsequent steps?

 

With how I currently have it as "1 sample" is that just missing many of the samples?

 

You will need to decide if you need all the points; if so look into a producer consumer type architecture.

 

The way I have it now is orders of magnitude more datapoints than I need so that is absolutely what I want to do. I tried to ask how to set that up initially but the answer I got was to downsample the data after the loop. 

 

I need to run the program at at least 60Hz to get the cycle count portion to not miss datapoints. I was having trouble figuring out how to run that part fast enough, but have everything else much slower.

 

Sorry for being so inexperienced, but what would I even have to search to find a producer/consumer example in the finder? 

0 Kudos
Message 7 of 8
(106 Views)


So in what case would one actually use 1 Sample reading? Shouldn't it be able to keep up if the loop runs faster than the sample rate?

  1. There may be cases where only the most recent sample is needed; it really depends on your application. (This would be a lossy acquisition where you lose data points but really don't care.)
  2. Every time you call the DAQ device there is overhead, it does not transfer a sample instantaneously. In addition, your computer has jitter, so each loop is not deterministic. In time, this adds up and you get a buffer overflow.

So when changing it to "N samples" is that just changing every datapoint to an array and that's what breaks the subsequent steps? With how I currently have it as "1 sample" is that just missing many of the samples?

  1. Each read is an array of data points for each channel.
  2. You are not missing samples, but once you run out of buffer, then you miss samples.

Sorry for being so inexperienced, but what would I even have to search to find a producer/consumer example in the finder? 

  1. Go to File>>New>>From Template
  2. There should be examples in this forum if you search, and also the Example Programs on this website.

 

0 Kudos
Message 8 of 8
(90 Views)