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