10-02-2014 10:20 AM
Using a PCIe6323 to capture continuous analog inputs. I have 32 points of which I want to monitor the current state continuously. I can't seem to get this to work without various errors. Right this moment I have this:
DAQmxErrChk (DAQmxCreateTask("",&taskHandleAI));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAI,"Dev1/ai0:31","",DAQmx_Val_Cfg_Default, 0.0, 5.0, DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAI,"",10000.0,DAQmx_Val_Rising, DAQmx_Val_FiniteSamps,1000));
DAQmxErrChk (DAQmxReadAnalogF64(taskHandleAI,2,10.0,DAQmx_Val_GroupByScanNumber,dataAi,1000,&readAi,NULL));
I have to Stop and Clear the tasks and re-create each cycle in the continuous loop, which seems like the wrong way to do it but it's the closest I've been to proper function. Right now I get error -200019.
How can I get this to sample continuously?
Thanks
10-03-2014 02:45 PM
Hi gsochurek,
The error you are currently receiving (-200019) occurs when an ADC conversion is attempted before the prior conversion completes. Generally the solution is to decrease the sampling rate so that there is time for each conversion to complete.
More information can be found in this KnowledgeBase article: http://digital.ni.com/public.nsf/allkb/1275F44215D5C13F862579AE006CA222?OpenDocument