05-27-2012 12:40 PM
Where does the time stamp come from in the TDMS file format? I assumed it was the system time and date, but this doesn't seem to be the case.
I have a vi that captures data, does some processing then saves some parameters using the TDMS format. I collected and saved 20 seconds of data (timed using a stop watch), but when I open the TDMS file, the time stamp is from 0 to 41 seconds. I have repeated this with various times and there doesn't appear to be any sensible relationship with the time given in the TDMS file and the actual time. I've also double checked by saving the system clock and it's still out.
Do I need to set a timing parameter before using the TDMS format?
Solved! Go to Solution.
05-27-2012 02:35 PM
I have used TDMS rarely until now. What I have been doing right now is wiring a waveform with t0 and dt to the TDMS Write function. The TDMS Viewer then shows the correct timestamps on the x-axis.
05-27-2012 07:42 PM
grahamwebb, could you provide a VI file to reproduce your issue so that others could get more details to help you?
05-28-2012 02:57 AM
The problem disappeared when I put together the attached vi. I must have occurred when a file is written to more than once. I'll see if this is true in my main code ..
05-28-2012 06:07 AM
I've added the rest of my code and the problem still occurs.
To see the problem start a stopwatch and press "stream to file" at the same time. Wait 10 seconds or so then stop, load the TDMS file and see that the length of time elapsed according to the TDMS file time axis isn't the same as your stop watch. Why?
The aim of this code is to be able to save to different files while the data are streaming, and avoid disrupting the data capture. It sits in a much bigger loop.
05-28-2012 08:33 AM
Anyone?
05-28-2012 09:15 AM
05-28-2012 09:31 AM
Hello Graham,
I am unsure exactly what you are describing. I have added a wait of half a second in your loop so you can see clearer the data. I have attached what I can see.
You have recorded a second channel of time data, when you view your data in the TDMS viewer graph it won't be plotting these values against each other. You would need to set each channels settings using the TDMS Set Properties VI.
If you open up the TDMS file in excel you will see the two channels in adjacent columns which will make for easy plotting there.
Hopefully this is of some help.
05-28-2012 02:22 PM
Hi Both,
The problem I have is that the time values on the x-axis of the graph in the TDMS viewer are meaningless. I assumed they would come from the system clock, hence why I saved the clock to check. I could use my own timestamp, but what do those TDMS time values refer to?
Thanks
Graham
05-28-2012 02:40 PM