Showing results for 
Search instead for 
Did you mean: 

TDMS recording time

Labviewcode1.jpgHi All,


I have a question about TDMS recording time. At point A, there is a trigger signal at time Ta. The time for data (B) writing into TDMS is previous to this Ta. I am wondering what is going on during the TDMS recording.


The first column in the following picture is the trigger time and the fouth column is data(B) time.


Could everyone help me out. Thank you!



0 Kudos
Message 1 of 17

any replies will be appreciated.


0 Kudos
Message 2 of 17

Explain a litle more about the time difference... off by a day?


The Time stamps of triggered acquisitions does not work like timed acquisitions. Timed acq's can use the time the task started and track time ased on the delta T and the sample count.


Triggered acquisitions can not use this approach since the trigger governs the A/D conversions. The T0 MAYBE the time when the task is started (not sure, old brain).


One possible work-around is set up a counter task driven by an on-board clock that tracks the time of each sample and then masagging the data to fix the time stamps.



Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 17

It is unclear exactly what you are asking and we don't have enough information. The screenshot you show is not the full code and the Express VIs hide a lot of configuration information that may be critical for diagnosing your issue.  Please post your code, if you can (zip it if it is big - don't forget to include all the subVIs).  Post a better description of your problem as well - what you expect to get, what you are getting, etc.

This account is no longer active. Contact ShadesOfGray for current posts and information.
Message 4 of 17

Thank you very much, Ben and DFGray.


I upload the data log code and the tdms data file(I saved as excel). In the data file, the first column is the time when overspeed is triggered and the forth column is the time of other data acquistion. My question is why the time(column 1 and column 4) are different?


Have a nice day!



Download All
0 Kudos
Message 5 of 17

Please see above

0 Kudos
Message 6 of 17

Please see above

0 Kudos
Message 7 of 17

The details of how you generate your timestamps and triggers are still unknown from the above posts, so we still cannot really help you.  Please post your code.


However, from the image, the first data points in columns 1 and 4 are identical.  There is a lot more data in column 4 than in column 1.  I would guess that the timestamps are identical, if you pick the right ones, there are just a lot of extra ones in column 4.  Without the rest of your code, I cannot tell for sure.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 8 of 17

Hi DFGray,


I have post the code in above. In the code there there is a "sampling rate" of 36. So the # of column 4 is 36 times the # of column 1.

0 Kudos
Message 9 of 17

Hi IvyWang, 


Regarding the code you posted, there are three things missing when I try to load it:




I was able to download Boolean_Trigger_ogtk off the web, but I still am not able to test your code because I am missing the other two files. I also have to ask, how are you determining the timestamp to write to your file? 


If this is a timing issue, have you tried using execution highlighting to see if your signals arrive at different times? I've attached an image to show you what this button looks like. 

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments
Message 10 of 17