LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple TDMS Questions

I haev a few questions on TDMS.

 

1. Is it true that TDMS file is a LabVIEW specific binary, and you can't read it without using LabVIEW?

2. I was able to read the TDMS file in excel.  Howcome I can do that?  Is excel supposed to be able to read TDMS?

3. Is it true that TDMS is smaller than a regular ASCII file, given the same data?  It seems so. 

4. If 3 is true, I don't understand why, since I was able to look at the raw data of the TDMS directly in excel, i assume that the data is stored as ASCII and not binary inside the TDMS file.

5. It seeems like TDMS comes in pair, a tdms file and a tdms_index file.  Can the tdms be accessed with only the tdms file without the tdms_index and vice versa?

 

Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 4
(2,531 Views)

Hi,

Pretty much every single question is readily answered by reading about TDMS ... that said, here is a summary for ya'!

 

1) No, TDMS is not LabVIEW specific. It is "fully documented" (though that can be argued a little) so it should be possible to write "plug-ins" for any computer programming language so that you can read TDMS files.

2) Since LabVIEW 2011 (or was it 2010?), when you install LabVIEW, it also installs a conversion utility that automatically converts/exports and then opens TDMS files in Excel if you have Excel installed on your system. Previously, this was done using a Macro you had to manually install into Excel and call up from inside Excel vs. now that you can just double-click the files in the explorer. Excel by it self can not read/understand TDMS.

3)/4) Yes, in general, TDMS are smaller than ASCII if they both store the same data, unless you have very little numeric data and you are just storing tons of meta-data (text etc.) in which case the TDMS may be same or slightly larger. And you assume incorrectly. TDMS is a combination of binary (raw) data and META/header data. As far as Excel goes, see 2) above.

5) You can delete the index file and still retrieve all the data from the TDMS file. The Index file is simply used to allow fast random access to any data in the TDMS file. If it does not exist, it will be created for you by the Excel plug-in, or if you do a TDMS - Open in LabVIEW.

 

Feel free to check out the help on the TDMS palette. 😉 

QFang
-------------
CLD LabVIEW 7.1 to 2016
Message 2 of 4
(2,522 Views)

Additionally, there are importers for (at least):

  • Diadem
  • Matlab

 

Ton 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 4
(2,515 Views)

And I suppose it should be mentioned that there are a few CAR's pertaining to some of the behavior of if you use the Advanced TDMS functions (which you only really need to use if you need to overwrite or replace data in an existing TDMS file).

 

And if you acquire data one point at a time, make sure you don't put the points in one at the time in the TDMS file as you will create a huge file consisting mostly of duplicated header information (which you can then use the TDMS defrag to fix). It can be better to collect the points in a software/memory array and only push them to the TDMS file once every xx samples.

 

I find that I enjoy working with TDMS files for my project, but of course my data is awesome  for TDMS too, I get my data in "traces" so each logical unit (channel) comes pre-packaged as an array of thusands of points, so my TDMS files tend to be very "efficient".

 

Here is a copy paste of one of the Advanced issues I ran into:

I have done some more research on the first issue you reported. (Error:

 

-2529 in [Adv] [TDMS Set Channel Information])

 

--------------

 

Issue/Feature A) Flush required after channel property writes:

 

Create some file level properties and write and over-write them.

 

Create a group and add and overwrite some properties Create a channel in the

 

group, add a property then try to do a synchronous write. You will get an

 

error message. Either do a flush between the property write OR write the

 

channel data first then do the channel property writes.

 

-----------------

 

As it turns out, there is already a Corrective Action Report (CAR) filed

 

with the LabVIEW Development Team. Here is the CAR#310023 You can look for

 

this number in the future releases of LabVIEW.  

QFang
-------------
CLD LabVIEW 7.1 to 2016
Message 4 of 4
(2,511 Views)