Sorry, my mistake about the 5000 - it is the expected maximum rate - however, I do wish to divide this by 16, so should the expected maximum rate now fall to 312.5 or say 400?
I have tried the code you suggested (or something very close) and I get an error stating that the Sample Rate exceeds the maximum sample rate for the number of samples specified, as shown in the attached bitmap.
The relevant lines of code are:
DAQmxErrChk(DAQmxCfgSampClkTiming (taskOut, "OnboardClock", 5000, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 100));
From the code generated by the task wizard, and
DAQmxCreateTask ("Read Analogue Inputs", &ReadAITask);
CreateReadAnalogInputs(&ReadAITask);
DAQmxSetTimingAttribute (ReadAITask, DAQmx_SampC
lk_Timebase_Src, "PFI0");
DAQmxSetTimingAttribute (ReadAITask, DAQmx_SampClk_TimebaseDiv, 16);
from within my program. CreateReadAnalogInputs calls the code generated by the wizard and ultimately runs the first line typed above. The error occurs when the task is started.
I couldn't find the exact functions you quoted, but assume that the ones that I am using are right.
So, I'm still stuck - well, not entirely as I could just read in all the samples but then discard 15/16s of them - not very elegant though.