LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert TDMS to CSV

Hi, im looking to convert a TDMS file to CSV, can anybody help with this ?

 

Regards

 

Birdy830

0 Kudos
Message 1 of 12
(22,878 Views)

Sure.  Where are you stuck?  What have you tried?


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 12
(22,865 Views)

@Birdy830 wrote:

Hi, im looking to convert a TDMS file to CSV, can anybody help with this ?

 

Regards

 

Birdy830


So this isn't always easy but in some cases it is.  If I ask to convert a Word file to Text can you do it?  Well it depends, does my Word file have charts, pictures graphs?  Does it have formatted text or hyperlinks?  Then if you saved it as text alot of that information will be lost.

 

Same with TDMS.  TDMS is not a flat file structure and saving it to a CSV which is essentially flat means you will lose some data.  But just like in Word, if you aren't using any of those extra fancy features then you might not care if that information is lost.

 

TDMS has 3 levels, File >> Groups >> Channels.  You start with just one file, but it may have multiple groups, which may have multiple channels, which generally have multiple samples.  If you have just one group then you can save just that group to a CSV where you have channels as columns and samples of those channels as rows.  But even if you only have one group, all of the properties of the File or Groups, or Channels will be lost unless you get creative on how to save that to a CSV too.

 

So so summarize, if you only have one group, and if you don't mind only saving the data and not the properties, then it is straight forward.  Use the TDMS Open, then TDMS read providing the group, channels, and the data type to read (hopefully they are all the same so you can read them all at once).  Then close the TDMS file.  Then use the Write To Spreedsheet File giving it the 2D array of signals you read and use the comma as the delimeter.

0 Kudos
Message 3 of 12
(22,851 Views)

Hi, I have similar problem. I have large tdms file(704 MB) that my friend generated with LabView. I opened it with DCM TDMS viewer and i can see time and voltage of the file, but it can't realize the wave graph that I want beacuse the system doesn't have memory enough.

Is there another program or method that I could use?

Thank you!

Henry

0 Kudos
Message 4 of 12
(22,740 Views)

Why not use Microsoft Excel with the TDMS add in to view the data?

0 Kudos
Message 5 of 12
(22,737 Views)

I used it, but the data file is too large and excel can't opened it....Anyway my problem is to realize wave graph..beacuse when I open my tdms file i have "untiled 1" with 20000 differents voltage at different time, "untiled 2" with 20000 differents voltage at different time.......untill "untiled 1500"...so I have 1500x20000=30000000 differents voltage value that I should have on my graph and system tell me that Labview memory is full.

0 Kudos
Message 6 of 12
(22,727 Views)

Do you have access to NI Diadem? Maybe this would be able to open the large file and produce the graphs you require.

 

I assume you get an out of memory message when you try to open the TDMS file using LabVIEW.

0 Kudos
Message 7 of 12
(22,721 Views)

I would highly recommend Scout by Signal X.  It is free, they just ask for you to register the software.

https://www.ni.com/en/support/downloads/tools-network/download.scout-tdms-editor.html

http://signalxtech.com/SX_Products_Scout.html


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 8 of 12
(22,711 Views)

The TDMS viewer that comes with LabVIEW (under the TDMS palette) has a graph function.  By default it won't load all the points on the graph.  But it does allow you to say how much data to read, and starting from an offset.  So you can load the first 100,000 values into a graph see what it looks like then load another 100,000 starting where the last graph left off.  

 

It sounds like you have lots and lots of data.  Do you really need all that much or would a subset work for a graph?  I mean if you have 1 Million points of data you can't graph all of that at once and see each point.  Your computer monitor is likely only 1920 X 1080 resolution or less.  Maybe it would make sence to load one point out of every 100 or 1000 and graph that.  This can be done using the TDMS Open and TDMS Read where you can specify the offset and number of samples to read.  Put this in a for loop, or a while loop until the whole file has been read and graph the values loaded.

0 Kudos
Message 9 of 12
(22,708 Views)

I've tried it now. But when I try to load the final graph Scout stops and appears the message: "LabView memory is full. The top level VI 1_Lic Check.vi was stopped ath unknown on the block diafrag of Set XY graph properties.vi; refer to VI memory  Usage topic in the Labview help for suggestion on monitoring and improving vi memory usage."

0 Kudos
Message 10 of 12
(22,658 Views)