LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert .tdms to .lvm?

Solved!
Go to solution
Solution
Accepted by deskpilot
Hi Deskpilot,

No, the number of channels is not a problem. It turns out the problem is the initial time stamp each of the waveforms has in the output from the TDMS write. The Write to Measurement File express VI will start the X value column fresh each file if it finds a time stamp in the waveform. If you add a time stamp to the built waveform in my TDMS Sample Generator VI, you will see the same behavior with that TDMS file as well. This is normal and expected behavior for the Write to Measurement File VI. So in order for your X values to not reset at the beginning of each file, you will have to strip your timestamp from each of the waveforms created from the DAQmx Assistant.

I understand that you wish to keep your timestamp in the header of each excel file. To do this, and keep the same general structure provided by the Write to Measurment File VI, you will need to create a VI that uses the Write to Spreadsheet VIs instead. Unfortunately, you will need to create your own header and attach this to the measurements in each file created. You will also need to pull apart each waveform and create a sutibly formatted array that can be written using these VIs.

And just for fun (though it took much much longer then I expected,) I threw together a VI to get you started. This VI opens your TDMS file, converts the waveforms and creates a time value column. And it also converts the channel, group, time, date, and dt into a header that can be attached ahead of the formatted Array. I dont expect that this VI will be exactly what you need, but its a good starting point.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 11 of 15
(2,103 Views)
That sounds like exactly what I need. Unfortunately I can't tell because we haven't upgraded our 8.2.1 yet. Can you convert it to an older version? Again, thanks so much for your help on this.
0 Kudos
Message 12 of 15
(2,075 Views)
Sorry,

When I make a new example from scratch, I sometimes forget to save for previous versions. Here's the 8.2 Version.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 13 of 15
(2,064 Views)
That works great. I guess getting the channel names back out of the .tdms read was the key that I was missing when I tried to do something similar. I had to initialize the other shift register on the first for loop to prevent the final time from the previous use being the start of the time on the next use. Just thought I'd post it for anybody else that might be following this topic. Thanks again.

Message Edited by deskpilot on 07-22-2008 11:08 AM
Message 14 of 15
(2,054 Views)
Yup, you got me. Should have initialized that shift register. Thanks for helping me debug it! Smiley Happy I'm glad it will do the trick for you.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 15 of 15
(2,045 Views)