Hello Daniel,
Thanks for your answer.
Did you try out my code with the same board (NI USB-6229) as I am using?
My DAQmx Read function returning 100 samples for each channel in the array, and I can see few iteration of Timed Loop 'Iteration Duration' of about 50ms and then it falling down to about 2ms. It seems like, DAQmx Read with samples per channel = -1 NOT clear the buffer, and Timed Loop 'period' > 50ms cause DAQmx Read to read old samples from the buffer (takes 2ms).
Reducing the period of timed loop to be 50ms makes it working correctly, but it's too fast for my application.
While using a regular while loop, the amount of time the loop takes to iterate is 50ms, but when I have added 'Wait Until Next ms Multiple' with 100ms, like in Timed Loop structure, the same symptom appears.
My goal is to read most recent samples in a fixed period of 100ms, so my crooked solution (see enclosed VI) is to add delay before DAQmx Read (to let DAQ acquire samples), use DAQmx Read Properties: OverWrite Unread Samples and RelativeTo Most Recent Sample, and then read data from buffer.
I hope it is working correctly...
Avivit.