LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write two signals to file

Hi Playerz1,

 

I've linked an additional forum to this post that includes more information about writing a timestap into a tdms file in LabVIEW.

 

adding timestamp to tdms: https://forums.ni.com/t5/LabVIEW/adding-timestamp-to-tdms/td-p/3034201

 

Regards,

 

ShaneK

0 Kudos
Message 11 of 14
(1,513 Views)

Thanks, I've looked through that fourm numerous times but I still can't figure out how to get the time stamp. I have tried to setup the timestamp with the timing functions, changed the while loops to timed loops and changed dt, and changed the element data to waveform (but when I do that I only get one signal writing to file). I know that there has got to be something that I am overlooking, so if anyone else has an idea that they think might work please let me know.

0 Kudos
Message 12 of 14
(1,506 Views)

I have converted everything into waveform data, so now I am able to determine that both signals have a dt of .001. I kind of figured out how to get a timestamp, by using the get waveform time array, I placed it in the consumer loop and was able to get an accurate timestamp. But, I would like the time stamp to start at zero, .001, .002, etc., which I haven't figure out quite yet. However, I am now writing a fragmented file I was looking at https://devs.wiresmithtech.com/blog/tdms-fragmentation-cslug/ and it was talking about if you write in segments you will get a fragmented file. So, my question is how can I write two signals to one tdms file without writing them in segments?

 

Any help would be greatly appreciated! Thanks!

0 Kudos
Message 13 of 14
(1,488 Views)

I figured out how to write the timestamp on the same tdms file http://www.ni.com/white-paper/14252/en/ (use set tdms properties, wire get date/time in seconds to the "property values" on tdms set properties, then for the property name create constant and type "wf_xname". The names are case sensitive, which the link I attached talks about.

 

As for writing 2 channels to a tdms file I haven't figured that out, but I just record the raw data and read the file, apply the filter, and write the filtered data to file. 

0 Kudos
Message 14 of 14
(1,463 Views)