06-30-2016 10:47 AM
Hello Everyone,
I have been searching information about how to delete a group in a TDMS file. Apparently this is not a simple task as I thought since first it is necessary to convert the TDMS file into a TDM file, delete the group in the TDM file and finally convert the TDM file into a TDMS file. There is a really nice example project here (I attached it in the post anyway!).
This project works nicely. Indeed I am able to delete the group of the TDMS file. Nevertheless I have realized that performing the deletion process increases the size of the file (approx. 4 times). If you visualize the TDMS file with the TDMS - File Viewer.vi you realize that several strange properties were added to each channel of all remaining groups. I supposed this is partially the cause of the size increment.
Does anyone know why this is happening?
I am using LabVIEW 2014 and I downloaded the project for LabVIEW 2014.
Any help is higlhy appreciated.
Best Regards,
Diego Ballen
Solved! Go to Solution.
06-30-2016 11:07 AM
I think it came out with LabVIEW 2015, but there is now a TDMS Delete Data Function. This might do what you want. You also might want to try to perform a TMDS Defrag on your file to see if that shrinks it down some.
07-01-2016 08:46 AM - edited 07-01-2016 08:47 AM
Thank you very much for your fast answer crossrulz!
Unfortunatelly I cannot test this VI since I have to work with the 2014 version. Nevertheless I read the description of the VI, and apparently what it does is to delete the information of the channel. But not the channel itself nor a particular group, which is what I need to do.
Any additional help is highly appreciated. Thanks!
Diego Ballen
07-01-2016 08:59 AM
07-01-2016 09:00 AM
You could try an approach similar to the one I'm taking in a LV2013 project:
-Open the original tdms and read the data
-Said data becomes an array (string, double, boolean, etc.)
-Manipulate the data in whatever way you want (delete channel, data, etc.)
-Replace the original tdms with a blank one (create or replace)
-Write the manipulated data to the new blank tdms
07-01-2016 09:10 AM - edited 07-01-2016 09:12 AM
Thank you mikeporter and Daikataro!
I will take this approach and will generete simply a new file only with the data Im interseted in.
Greetings and thanks again!
Diego Ballen
07-01-2016 09:43 AM