LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract data from TDMS file

Hi all,

My DAQ stores approximately 10000 samples per second (interms of 1's and 0's) into a TDMS file.

But, those stored data are available not in the same sheet, i.e. Half of the data are available in sheet 1 and the other half in sheet 2.

How to extract both the data into an array.

Can anyone show or provide me the example program for that?

0 Kudos
Message 1 of 6
(4,450 Views)

Here is an example I made for someone who had similar problem, I suggest you have a look and try to play around with. If something is not clear enough I can translate or give further explanations.

 

Hope it helps

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 6
(4,440 Views)

Dear 

 

I have identical 1000 files with TDMS extension, I want to extract the same  data from sheet 4 and 5 from each file and put them in one file.

 

could any one help me please.

 

Thanks

 

0 Kudos
Message 3 of 6
(4,241 Views)

Mabrouka wrote:

I have identical 1000 files with TDMS extension, I want to extract the same  data from sheet 4 and 5 from each file and put them in one file.


If all 1000 files are identical, it would be redundant to read more than one of them. Please explain.

 

In any case, you could use "list folder" (or "recursive file list") with a sutable pattern, then iterate over all files. What you have tried so far?

0 Kudos
Message 4 of 6
(4,213 Views)

Thanks for replying, actullay, this is the first time i use Labview and don't have good kwnologe about it,. I am using simple Labview program to measure S11 at different times. The TDMS files are identical in the order of the data, I mean same number of cells, sheets and order.  In one folder I have 1000 file with TDMS extension, I want to extract the data for example in the cells B3 and D5 in the sheet 4 and 5 in each file and put them in the same file.

 

 

0 Kudos
Message 5 of 6
(4,204 Views)

TDMS is really setup as Groups and Channels.  So if you know what group and channel the data is in, you can simply open the TDMS file and use TDMS Read to get the exact data you want (there are inputs for group and channel).  There are also inputs for Offset and number of samples.  When you are done with the file, be sure to close it.

 

So a simple List Folder with a *.tdms filter should give you a list of TDMS files in your folder.  You then just use a FOR loop (autoindex on the file names) to open, read, and close the files.


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 6 of 6
(4,142 Views)