Hello all,
a really noob question. I need to among other things count the output from a quadrature encoder with a normal CI task. Such as:
DAQmxErrChk (DAQmxCreateTask("CI",&taskHandleCI));
DAQmxErrChk (DAQmxCreateCICountEdgesChan(taskHandleCI,"Dev1/ctr0","",DAQmx_Val_Rising,0,DAQmx_Val_ExtControlled));
However, docs says I need a sample clock to make the counting, and that is must be an external clock. This text is from the examples:
"Note: An external sample clock must be used. Counters do not
have an internal sample clock available. You can use the
Gen Dig Pulse Train-Continuous example to generate a pulse
train on another counter and connect it to the Sample
Clock Source you are using in this example.
"
Is it really possible that I need an external input to the card? is it not possible to just use some on-board internal clock? (i am a total DAQ noob). I really dont want to connect anything more to my device.
Another unrelated question; if I read for instance a buffered AI input with
DAQmxErrChk (DAQmxReadAnalogF64(taskHandleAI,-1,1.0,DAQmx_Val_GroupByChannel,data,4000,&read,NULL));
, can I be sure that the buffer is cleared after the read so I don't get some samples twice the next time I read?
Thanks a lot!
/ Roland