Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200019 with a non-noisy 100Hz external sample clock

I'm trying to use a 6251 to do the following:

- Sample 6 analog inputs (AI0 - AI5)
- Use a 100Hz clock that I have generated as the external sample clock on PFI0
- Calculate N number of samples
- Using either MAX or the DAQmx C library

I've used an oscilloscope to verify that my 100Hz clock is not noisy (in fact, it's a very clean 0-4.86V square wave), but I get error -200019: "Measurements: ADC conversion attempted before the 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."

Any rate I specify in the timing settings does not eliminate the problem (from 1Hz - 1.42MHz).

Here is the setup when using C:


DAQmxCreateTask("", &AItaskHandle);
DAQmxCreateAIVoltageChan(AItaskHandle, "Dev2/ai0:5", "", DAQmx_Val_Diff, -5.0, 5.0, DAQmx_Val_Volts, NULL);
iStatus = DAQmxCfgSampClkTiming(AItaskHandle, "/Dev2/pfi0", 10000.0, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 7200);

DAQmxStartTask(AItaskHandle);


Can somebody point me in the right direction?

- edwarwl
0 Kudos
Message 1 of 5
(4,381 Views)
I'm just a beginner at this, but could it be that your convert rate is too low?  I'm not sure how the convert rate is chosen by the library if you don't specify it explicitly, but maybe calling DAQmxSetAIConvRate with a rate of 10000 before you start the task will get the six points converted before your next clock tick.

John Gourlay

0 Kudos
Message 2 of 5
(4,369 Views)

Hi edwarwl,

Can you try running an example that uses an internal clock to see if you receive an error? If it is possible, you can use an internal clock with a rate of 100Hz. You could also generate a 100Hz clock with one of the counters on the board if they are available. You will be able to make this same measurement with an internal clock and then make some adjustments for an external clock.

Steve B

0 Kudos
Message 3 of 5
(4,353 Views)
I think I've actually uncovered more of the issue since I last posted.

The very clean 100Hz signal that I generated is only clean when I do not have the cable to the DAQ plugged in. If the cable is plugged in to my device, it doesn't matter whether or not the other end of the cable is even hooked up to the 6251 or not, that 100Hz signal becomes a 4.6 MHz signal. Looks like this has now become a cable issue.

This cable is a 2M SHC68-68-EPM. However, I plugged one end of a SH68-68-D1 into my device and I do not see any problems.

Has anybody seen this issue with the SHC68-68-EPM? Should I try using another PFI input?

Note that I do have a 5.7MHz signal that is in PFI1 (close proximity to the 100Hz signal).
0 Kudos
Message 4 of 5
(4,350 Views)

Hi edwarwl,

You seem to be experiencing crosstalk between your signals in the cable. I have included a link to a document that explains how to handle several types of noise. You could try changing the lines that you are using in order to decrease the crosstalk. Which lines/pins are you currently using? The SHC68-68-EPM and the SH68-68-D1 have different pinouts and the conductors are not identical. This may be why one cable works with your application and the other does not. Filtering your signal may be an option if you can implement it into your application and have a quality clock signal.

Troubleshooting Unexpected Voltages, Floating, or Crosstalk on Analog Input Channels
http://digital.ni.com/public.nsf/websearch/B9BCDFD960C06B9186256A37007490CD?OpenDocument 

 

Steve B

0 Kudos
Message 5 of 5
(4,321 Views)