LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert .tdms to .lvm?

Solved!
Go to solution
I am creating .tdms files during testing that I would like to convert to .lvm files post test. The files are around 500k lines so I need to split them up into multiple files for older versions of excel. When I read the .tdms data into a Write to Spreadhseet File set up to write to multiple files, it does not work. I get one file.
 
If I break the .tdms data up using offset and length on the .tdms read, I lose continuity on my time stamp.  I would really like to be able to share .lvm files rather than having people download the .tdms reader for excel. Any suggestions?
0 Kudos
Message 1 of 15
(5,909 Views)
Hi deskpilot,

How are you setting up the "Write to Spreadsheet File" to write to multiple files? Are you parsing the output from the TDMS read using string or numeric compare functions? This method should work if you parse correctly and assign new files correctly. Can you post what you currently have so we could see where the problem is?
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 2 of 15
(5,882 Views)

I have attached the vi that works but starts the time over on each spreadsheet. As noted on the block diagram, it is set to write one file because the file names are correct this way. The only change that occurs when you set it to write new files every 60,000 lines is that the file name is different.

0 Kudos
Message 3 of 15
(5,868 Views)
Hi deskpilot,

I'm a little confused, I ran your VI with a randomly generated TDMS file, and came out with a few text files, and the time on each of the text files seemed to be correct.

Time at the end of the first text file:


Time at the beginning of second text file:


The only change I made to your code was to generate the file name a bit more cleanly. In your method, the file name used as the base for name generation was interpreted as a folder, and you ended up with files with no extension and just an auto generated number.


Message Edited by Captain Kirby on 07-10-2008 05:59 PM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Download All
Message 4 of 15
(5,856 Views)
Hi deskpilot,

Here is a copy of my TDMS Sample generator I used to test your code, as well as two of the three generated text files.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 5 of 15
(5,854 Views)

Captain,

Thank you for your help so far. I see that it does work with the file you generated, can I perhaps email you the file that I am working with? I checked it with your modifications just to make sure, and it still starts the time over on the second file.

0 Kudos
Message 6 of 15
(5,841 Views)
Hi deskpilot,

Have you tried your code with a sample TDMS file created by the generator I posted? Is it possible for you to post a copy of your TDMS file to this forum? Or if it is too big, can you just post a suitable sample?
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 7 of 15
(5,822 Views)
Yes, when I convert your generated tdms file with my code, it works just as I want it to. I cannot post my whole data file, I also cannot post a .tdms file. The file attached is the first 15,000 lines of the data, with the file extension changed to .txt. You should be able to change it back to .tdms and then change the constants in my vi from 60,000 to 5,000 to see my problem. Again, thanks very much for the help.
0 Kudos
Message 8 of 15
(5,816 Views)
Hi Deskpilot,

I see what you mean. Using your sample, the time column resets at each iteration. I cant see anything in particular that is different between our two samples, but I don't necessarily know how yours was created. I would try to confirm that your TDMS file creation is similar to the example creator I posted. Also try to increase the number of dimensions of the input array to the TDMS file creator. It is possible that the high channel count is causing some problems.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 9 of 15
(5,793 Views)
High channel count Smiley Surprised ... That number will double or triple on my real tests.
 
I'm not sure what you mean by increasing the dimensions of the array. I wire the output of a Daq read 1D Waveform directly to the input of the .tdms file writer, which is basically the same idea as your generator. I can use a 2d array output from the Daq Read, but then I don't think I will get a time stamp at all?
 
I modified your sample generator to produce the same number of channels as my data, and it still works fine. So apparently I need to manipulate the data stream before I write it to .tdms? When I have tried to do this before, I lose channel information and the timestamp.
0 Kudos
Message 10 of 15
(5,781 Views)