LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging Data using TDMS

Hey peope of the world, I have a question about how to use the TDMS write function. I have never used this form of file I/O and even still I'm not very good at even using write to spreadhseet functions. My attached project is based of the continuous measurement and logging template, and I know that they use TDMS in their program. My only issue is I dont quite understand what all theyre doing and quite frankly I dont believe my program requires such detail in the logging loop. I have a logging loop setup with a open/write/close TDMS functions connected, but I'm pretty positive im doing it wrong. Any suggestions/feedback would be greatly appreciated, thank you!!!

0 Kudos
Message 1 of 4
(2,520 Views)

Basically, the point of TDMS is that it is fast, it's a binary format so you retain your data's full precision, and (most importantly) it's a structured file format that allows you to save properties with your data that allow you to save context data with the results.

 

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 4
(2,500 Views)

When you open a log from that test can you tell me when the log was started?  When was it stopped?  What computer was it ran on?  What user was logged in when it ran?  What is the time between samples, or sample rate?  Did the test end due to an error?  Or what was the test end reason?  What was the settings to the test?  Meaning what was the selected current, voltage, or loads?  What was the UUT type?  What was the UUT serial number?  And I just realized what is the name of the data you recorded?

 

TDMS allows for properties to be set, which can be like meta data.  Information about the data that can help you understand more about how the data was taken.  This information is very useful in helping to understand an event that likely took place when someone wasn't around to see what happened.

 

To set properties use the TDMS Set Properties.  If you give no group or channel name then the property is set on the file which will probably be fine for all the settings I mentioned.

 

Another thing is I highly recommend giving a Group name and Channel name to the data being logged.  I actually thought the write VI had these terminals as required.  Without it I have no idea what the data even is.  Is it a pressure sensor? Is it in Voltage, or Current?  Is it RPM?  Is it Analog 0 or Analog 1?  These types of things can be better understood with a channel name, and properties of the channel.

 

Oh and if your index file is too big at the end (it should be on the order of a few kb) then use a TDMS defrag on the file after the close to save space. 

Message 3 of 4
(2,497 Views)

Ditto the above but add:

 

Concurrent Access.  Thats right! you can open the file for import to excel or open it in the TDMS Viewer without stopping the logging!  Try that with a *.csv file! and then add Events! (Alarm occured, warning reported, operator annotated something, Test Equipment Maint performed.) Test Data Management Streaming files are almost TOO nice.  

 

The shipping examples are excellent study material.


"Should be" isn't "Is" -Jay
Message 4 of 4
(2,494 Views)