Hello,
I'm facing a problem.
With Ni USB 6343 I want to acquire synchronously some Ai chanels and two quadrature encoders
here under the flow of my program :
Create analog input task
Create counter task 1 for left position
Create counter task 2 for right position
Setup analog task (Sample rate, input voltage, …)
Setup counter task 1 & 2 with analog sampling clock as master clock
DAQmxRegisterEveryNSamplesEvent on analog input task
Start counter task 1 & 2
Start analog task as master task to synchronize the three task.
in callback :
DAQmxReadAnalogF64 to read analog samples,
DAQmxReadCounterU32 to read counter 1
DAQmxReadCounterU32 to read counter 2
Here is the issue :
On first (and sometime second) calling of the callback I get the right number of samples from analog task but 0 or 1 samples from counter tasks.
Any idea about this issue ?
Thanks by advance for your support.
B.Williot