Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200019: ADC Conversion error using USB-6218, Sampling same AI channel multiple times

Hi there,

 

I am new to using the DAQ in this manner, but I have encountered a strange problem with my USB-6218 DAQ. I am collecting 18 channels of data, a mix of RSE and Differential. If all channels in the scan task are different (i.e. different AI channels), the program runs fine. I tried a variety of sampling rates and buffer sizes, however always ensured that my overall aggregate sampling rate was much less than the 250kS/s specified for my device. I am using the simple internal clock, continuous sampling.

 

Where I run into problems is when I try to scan the same AI channel again in the scan list. For example, I scan AI0, several other AI RSE and Differential signals, and then AI0 again. I always get the -200019 error, 

 

"ADC conversion attempted before prior conversion was complete. Increase the period between ADC conversions. If you are using an external clock, check your signal for the presence of noise or glitches.".

 

I have tried putting the sampling rate unbearably low just to see if this would fix the problem, but it doesn't. Can anyone help me? My aim is to re-sample the same AI channel repeatedly in a sampling cycle, given that my USB has only one ADC to make use of.

 

I tried searching the other forum topics associated with this error, but they didn't seem to fit the bill. Any help or insight would be greatly appreciated.

 

Cheers,

Jessica

0 Kudos
Message 1 of 8
(4,650 Views)

Hi Jessica,

 

The error -200019 happens due to an external clock or due to higher sampling rate or due to a lower buffer size. Since you are using a internal clock, the first option can be discarded. I would suggest you read AI0 line alone repeatedly using a while loop. By this you can find out whether it is the sampling rate that causes this error. If this works fine, you can go ahead and add the other channels. By this , you can short-list when the problem is occurring. If your PC RAM is good, I would suggest you to increase the buffer size for faster updates from the channel. But this is appropriate when you have a time-consuming post processing to do. Let me know the results when you have tried out.

 

Satish  

0 Kudos
Message 2 of 8
(4,631 Views)

Jessica,

 

I don't believe it is possible to use the same channel multiple times within a task. But you are right that the error message you are getting is not explanatory. Instead, you can increase sampling frequency for whole task, and just ignore data from other channels which you don't need.

 

regards,

stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 3 of 8
(4,630 Views)

Sorry, i misunderstood Smiley Tongue

 

Jessica, let me ask most important question - if you configure your measurement in MAX, does it work? Please send us how the configuration look like.

 

regards,

stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 4 of 8
(4,626 Views)

Hi Stefo,

 

I will agree with your first point but not the second. If Jessica is using AI0 channel multiple times inside the same task, she will face problems. But I guess the error will be different. I couldn't try this out in my DAQ since it's running in a system. But I am pretty sure that your 2nd suggestion will give you error -200019. When the aggregate sampling rate exceeds the max sampling rate specified, it will result in this error. Also when the buffer overflows, you might end up with this error.

0 Kudos
Message 5 of 8
(4,618 Views)

As I said. I missunderstood original problem. With adding the same channel miltiple times, the error would be:

Error -200489 occurred at DAQmx Create Channel (AI-Voltage-Basic).vi:2

Possible reason(s):

Specified channel cannot be added to the task, because a channel with the same name is already in the task.

Channel Name: Dev1/ai0

Task Name: _unnamedTask<0>

 

If Convert Clock signal exceeds 250kHz, then you get error -200019. If buffer overflows, then you get Error -200361 (if i'm not mistaken).

 

Therefore, I believe that Error -200019 occurs just when convert clock signal is too fast - because Jessica says that she uses internal clock, I would like she to try the task in MAX and I would also like to see how the configuration looks like - then we can be smarter.

 

 

regards,

stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 6 of 8
(4,615 Views)

Hi both,

 

Thank you kindly for your replies. Since I posted this problem, I was able to sample the same channel multiple times within one DAQ Assist. The issue was that part of my system was overriding my sampling rate, and given the number of channels I had, the aggregate ended up being higher than 250kS/s. That is why I saw Error -200019. But, it is indeed possible to sample the same channel within the same task.

 

An interesting new development though is that if I sample the same channel say 10 times, an offset is generated of ~2V. However, if I sample the same channel 4 times, it looks fine, and all data comes in appropriately without offset. Any idea why that is happening? Is there a limitation on the DAQ or the ADC? At first I thought it was because the ADC had to continuously switch voltage ranges, but then I set all voltage ranges to the same (+/- 10V) and still saw the same problem. I am switching between RSE and Differential signals though, could that be a problem?

 

And as for the configuration, it is literally a DAQ Assist block connected to a Write to Measurement File. I then use Read Measurement File to display it on a graph.

0 Kudos
Message 7 of 8
(4,598 Views)

Hi Jessica,

 

As of now, I have no clear idea why this is happening.But I would try the following if I were you. If the offset is on the lower side, it's most probably the switching between RSE and differential signals. You can confirm this by reading all channels in RSE mode and checking the offset. One more thing I wanted to know. Is the offset present right from the 1st time or it happens only after 4th or 5th loops. By loops I mean number of times you are sampling the same channel.

0 Kudos
Message 8 of 8
(4,576 Views)