Hi,
Using the NI6281 device I am trying to aqcuire a sine wavefrom from an external generator of about 1kHz (In LabWindows CVI). When the waveform is plotted there are random jumps in the sampled voltage, almost as if the ai/SamlpleClk paused for a short time. At first I thought it may be because there were multimule tasks running but this still occurs when only the ai task is running. When the array is examined the missing / pause in ai/clk is easily seen. Code is below
int airead = 0;
float64 aidatain[1000] = {0};
//Analog AC Sine capture
DAQmxCreateTask ("", &AItask);
DAQmxCreateAIVoltageChan (AItask, "Dev1/ai5", "", DAQmx_Val_RSE, -2.0, 2.0, DAQmx_Val_Volts, "");
DAQmxReadAnalogF64 (AItask, 1000, 10.0, DAQmx_Val_GroupByChannel, aidatain, 1000, &airead, 0);
DAQmxWaitUntilTaskDone (AItask, 10.0);
DAQmxClearTask (AItask);
PlotY (toppanel, TOPPANEL_aoWAVEFORM, aidatain, 1000, VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1,
VAL_RED);
This frequency should be easily sampled for such a fast device, what am I doing wrong?