From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Stamp Offset Issue when Reading TDMS

Solved!
Go to solution

I am having an issue when reading a TDMS file and displaying it on a waveform chart in LabVIEW.  My waveform chart will always display the time stamp with a negative offset of 18,000 samples.

 

To make that easy, let's say I am sampling at 1000 samples per second and I log my data to TDMS. When I read that TDMS and display my waveform chart data, the chart displays the data read from the TDMS 18 seconds earlier than the recorded wf_start_time stated within the TDMS.  If my wf_start_time is  08:00:20.000 AM 12/02/2014, then my waveform chart displays a start time of 08:00:02.000 AM 12/02/2014.  Likewise if I sample at 4000 samples per second, my start time is off by starting 4.5 seconds earlier.    

 

I am setting my Xscale.offset = wf_start_time and it reads back correctly, but the start time on the waveform chart is still wrong.  

 

Because I am dealing with larger TDMS files (500mb+), I sometimes decimate the data to view it due to memory issues. Here, this issue occurs again.  If I decimate the data to only display 1 out of every 10 data points, that offset is further shifting by a factor of 10x; going from 18 seconds to 180 seconds.   

 

Is this some kind of UTC/system clock time stamp discrepancy or something else? 

0 Kudos
Message 1 of 3
(2,868 Views)
Solution
Accepted by topic author CNewPP

Looks like I figured it out.  I was copy-pasting a waveform graph from previous VIs.  On a whim, I designed a waveform graph from scratch, and the offset issue was eliminated.  There must have been some option or offset created in there that I couldn't see or edit.  But it is good now.  

Message 2 of 3
(2,848 Views)

It's okay to mark your own post as a solution if it really is the solution, as it is in your case.  That way, people that have the same problem know it was solved and they can see what you did to solve it.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 3
(2,827 Views)