02-10-2015 10:52 AM
Hi. I have a large set of data files in .tdms format - they were captured using a custom VI and previous VI author had different time clocks per channel - so that start times are all different, even though the sample rates are the same. Trying to change the wf_start_time on each channel so that all the values are the same, but I can't seem to get Diadem to show this parameter and let me change it.
I can't use the TDMS importer in excel as the files are too big and I need to save them back to tdms format.
I guess that I could write a custom VI to manipulate the wf_start_time parameter?
Tips appreciated. Thanks!
02-11-2015 11:29 AM
Hi,
Some waveform properties in a .tdms file are read only, such as wf_start_time and wf_start_offset. You can find the property description in LabVIEW Help about TDMS Set Properties Function. So there is not a direct way to reset property wf_start_time by a VI.
If you do not want to write a new file, you can rewrite the binaries of the .tdms file based on TDMS file format to change the value of wf_start_time. The value type of wf_start_time is time, so the property value is not easy to change. But you can change the value of wf_start_offset, whose type is double. The time stamp of a data sample is the value of wf_start_time plus wf_start_offset.
The attached two files are used to show you how to reset the value of wf_start_offset in binary. The only difference between the two files are the value of wf_start_offset. You can watch each of the files by TDMS File Viewer to check the time stamp of the first data sample.
Jie Zheng | TDMS | LabVIEW R&D