LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert TDMS to TXT

Solved!
Go to solution

Hi,

I am trying to convert a TDMS file to a TXT file.  I want:

1. Convert Data Set (File) properties

2. Convert Channel Group properties

3.. Convert all the data.

The TDMS file "sc1616.tdms" is attached below. The attached "Convert TDMS.vi" can only convert one group data. I want to convert all the data. The TXT file will be like the attached "sc1616.txt".

Any help will be appreciated.

Steve

0 Kudos
Message 1 of 6
(9,808 Views)

First of all, I would have both the TDMS file and TXT file open until completion.  Then you complete each of your tasks one at a time.  First read the file properties and write those to the text file.  Use the TDMS List Contents to get the names of the groups.  Then you make a FOR loop with autoindexing the group names.  Inside of the FOR loop you get the group properties and write then to the text file and read the data and write those to the text file (much like you already have).

 

If you take it one step at a time, it will be a lot simpler.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(9,795 Views)

Thank you very much. I made it almost work. But there is one more problems. The data order I wanted in the text file (See the attached text file) is :

 

File Properties

 

Group Properties

Group Data

 

Group Properties

Group Data

 

Group Properties

Group Data

 

But now in the text file is:

 

File Properties

 

All Group Properties

All Group data

 

Any help will be appreciated.

 

Steve

 

Download All
0 Kudos
Message 3 of 6
(9,744 Views)
Solution
Accepted by topic author Shijie

Sorry I attached wrong files in previous reply. The attached files here is the correct files.

 

Steve

Download All
0 Kudos
Message 4 of 6
(9,729 Views)

Are the text files that you are attaching the files that you are getting as a result of the conversion or are the text files what you are wanting to get/expecting?

Ian M.
National Instruments
0 Kudos
Message 5 of 6
(9,690 Views)

The attached text file is what I want to get. The problem has been solved.

0 Kudos
Message 6 of 6
(9,677 Views)