I have a cDAQ chassis with five modules. I have written a large VI to control it and acquire data but the time stamps seemed a bit strange so I have put together a simple VI to examine the problem.
![snippet2.png snippet2.png]()
It sets up one channel with 2 Hz sampling rate and displays the time stamps when DAQmx Read returns a waveform.
The task is set to start immediately but the first Read gets no points, even if one waits ?? seconds between task Start and Read.![screenshot_2.JPG screenshot_2.JPG]()
t0 in "data 2" is 0.5 sec (1 sample) after "Time 1" i.e. the first Read seems to triggered the data acquisition (not the Task Start vi). The time difference between Time 1 and Time 2 is 5 seconds, as one would expect from the Wait(ms) timer.
Increasing Wait_1 to 10 seconds gives 20 samples from the second Read i.e. the first sample should be at 16:50:00.729 - 10 seconds = 16:49:50.729, NOT the 16:49:56.22 timestamp in data 2. It seems to have started acquiring data half-way through the initial 10 second wait.
![screenshot_3.JPG screenshot_3.JPG]()
The difference between the data2 and data 3 timestamps seems OK (10 seconds, for the 20 samples in data2) but I cannot see why the first point in data 3 (t0 = 16:50:06.22) should be later than the time of the Read request, Time 3 = 16:50:05.738. Surely the data in the buffer should start 9 or 10 sample periods before Time 3, rather than 0.48 seconds later?
In my application, a few seconds does not matter much - it is more of an annoyance.
Thanks
Roger