LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

t0 Offest

When I use the DAQmx Read function to acquire data on a task at a specified time for a specific period, the t0 information in the waveform seems to contain the end time instead of the start time.  This is consistent for nearly all occurrences, but has shown the correct time stamp before.

0 Kudos
Message 1 of 2
(2,399 Views)

Hello,

When acquiring a waveform your timestamp should always be the time when the waveform starts being acquired.  I attached two example programs that will show you how to verify if your timestamps are working correctly.  In the .zip file you will find timestamp.vi.  When you run this VI you should see the Initial Time equal the t0 in the waveform.  If you do not see this then something might not be working correctly.  You might want to make sure that you have the newest version of the DAQmx driver installed.

If the timestamp.vi works for you but your code doesn't it might just be the way your code is reading the waveforms.  The other VI that I included in the .zip file is named "timestamp in loop.vi" and it shows how the timestamps might appear incorrect if you are acquiring in a loop.  If you run this VI you will see that the initial, waveform, and final timestamps are all different.  This is because when the For Loop is run more than once it starts reading over again and gets a new timestamp each time.  Therefore if you want the original timestamp you will need to add some extra code to store the first timestamp when the loop runs the first time.

Hopefully this will help solve your problem.  If you have any questions about this please let me know.

Have a great day,

Brian P. -  Applications Engineer

0 Kudos
Message 2 of 2
(2,378 Views)