LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading a tdms file and saving it as a csv?

Hello,
I recently wrote a VI to acquire 4 channels of 50KHZ voltages from a 9233 card. Most files have about 1 million readings for each channel.
 
I am wondering if it's possible to write a short program to read the tdms file in, convert the waveform data to something that I can put into a csv file so the data can be viewed easier with other software.
 
Is there a simple way to do this?
 
 
Jeff
0 Kudos
Message 1 of 5
(10,058 Views)
You can certainly generate the file, all you have to do is read a chunk of it, convert it to comma delimited form, read and convert the next chunk and so on till you come to the end of the file.

The bigger question is what program will be able to open it. Last I checked Excel couldn't handle nearly that many datapoints - though maybe 2007 has changed things...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 5
(10,056 Views)

Thanks Mike, I figured it out.

Yes I can only see 65000 or so readings in Excel, but my engineer tells me he has software that can read unlimited values from a csv file.

I read the TDMS file in, extracted the four arrays of data by using the waveform element and extracting the Y arrays, recombined them into a 2D array, then wrote them to a spreadsheet file.

 

Thanks for the response!

Jeff

0 Kudos
Message 3 of 5
(10,051 Views)

Hi Jeff,

I have same issue, and I need to export the data in CSV file so that can be used in other software.

At the time of exctracting data from TDMS file and storing into CSV file, I need to write the time in first coloum of spreadsheet file.

Is it possible for you to upload your VI

Thank You.

Regards

Santosh

0 Kudos
Message 4 of 5
(9,666 Views)

Hi Santosh,

Attached is a VI that converts a TDMS file into a CSV file. This VI does not include the time stamps but that can be easily done by using the "Get Waveform Components" function and pulling out the d0 and dt times.

I hope this helps.

 

Jeff

Message 5 of 5
(9,651 Views)