Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while reading the analog data?

Hi,
 
I was trying to read the analog data from 4 voltage channels with -5,+5 voltages as minmum  and maximum values.Iwas using 250khz as sampling rate and 2seconds as duration.When I try to read the analog data using DAQmxReadBinaryU16 method.I was getting the following error :
 
ADC conversion attempted before the prior conversion was completed.Increase the period between ADC conversions.I f you are using external clock check your signal for the presence of  noise or glitches.Task Name _unnamed Task<0>.Status C.
 
I would appriciate if you could do this needful.
 
Thanks In Advance,
Meka
0 Kudos
Message 1 of 4
(4,272 Views)
 

Hi Meka,

What kind of DAQ card are you using?  Does this error happen immediately, or does the program run for a little while?  Take a look at this KnowledgeBase article I found, which deals with the error you are getting:

What Causes Error -200019 When Increasing the Sampling Rate of an Analog Input Task with an External... 

Try lowering the sampling rate, and see if you still get the error.  If you don't, then it looks like increasing the size of your buffer may fix the problem.

Let me know how it goes!

Justin M
National Instruments

0 Kudos
Message 2 of 4
(4,258 Views)

Hi Justin,

Iam using 6221 card.Iam getting this error,immediately when I try to read the data.Iam using 4 analog voltage channels as input.Iam creating the buffer size as NoOfChannels * samplingrate * duration.Iam getting the same error when I try to run the example program in VB  National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog In\Measure Voltage\Acq-Int Clk program by using the sampling rate as 250khz,and number of samples per channels as 500000.If I use low sampling rate I am not getting this type of error.

Regards,

Meka

0 Kudos
Message 3 of 4
(4,248 Views)
 

Meka,

The M Series devices have a specified maximum sampling rate for a single channel.  Past a single channel, the maximum sampling rate is then divided down depending on the number of channels sampled.  The reason for this is because each M Series device has one analog-to-digital converter (ADC).  Every channel in a scan list must pass its data through this one ADC. To allow for this, the M Series devices also have a multiplexer (MUX).  Because of settling time limitations with the MUX switching, the maximum sampling rate is the specified single channel sampling rate divided by the number of channels be scanned.  In your case, because you are using 4 channels, the maximum sampling rate you can achieve with the 6221 is:

250 KS/s / 4 = 62.5 KS/s

If you need a sampling rate of 250 KS/s for each channel, you may be interested in our S-Series devices.  These devices have a separate ADC for each channel, allowing all analog channels to run at the maximum sampling rate simultaneously.  Take a look at the PCI-6143, which can sample at 250 KS/s on all of its 8 channels at the same time.

I hope this helps!
 
Justin M
National Instruments
0 Kudos
Message 4 of 4
(4,241 Views)