08-15-2013 05:19 PM
Hello, I am looking to do some analysis on .tdms file that is generated from my LabVIEW program. I have a program that generates a .TDMS file with several thousand of data points that list things like date/time stamp, pin status, encoder count, etc. What I would like to do is write a .vi that parses the data from the .tdms file in batches (.tdms files are produced every 15 minutes) and can do a min/max/average of a column of data. Finally the file should be exported to Excel. I have the last part covered but how would one proceed doing analysis on the .tdms file? Would you even use LabVIEW for this?
Solved! Go to Solution.
08-15-2013 05:27 PM
@sam.ferguson wrote:
Hello, I am looking to do some analysis on .tdms file that is generated from my LabVIEW program. I have a program that generates a .TDMS file with several thousand of data points that list things like date/time stamp, pin status, encoder count, etc. What I would like to do is write a .vi that parses the data from the .tdms file in batches (.tdms files are produced every 15 minutes) and can do a min/max/average of a column of data. Finally the file should be exported to Excel. I have the last part covered but how would one proceed doing analysis on the .tdms file? Would you even use LabVIEW for this?
Can you provide us with a sample TDMS file? FYI, NI provides a TDMS interface for Excel if that's of interest. Depending on how much data there is to process I would use Excel or LabVIEW. I find Excel to be really good at analyzing small amounts of data (<~20k rows of data) and almost any other tool (like LabVIEW) to be better for large datasets.
08-15-2013 05:29 PM
08-15-2013 05:41 PM
Here is an example of the .tdms file. The column Encoder 1 Diff. is what I'm after with the min/max/average.
08-15-2013 05:59 PM
What do you need help with? As Dennis mention there already exist functions for getting the min/max/mean from an array of data? Open quickdrop and type "Array Max & Min" or "Mean.vi" to find those functions. If you need help reading in the TDMS files, then I'll need to see the actual TDMS file. If you need help with concatenating multiple files, then please give me more information on that. Basically describe the input that you have and the output that you desire.
08-15-2013 06:22 PM
I had to post a different .tdms file because the excel file I posted earlier is from a much bigger .tdms file that won't let me upload.
The input in the .tdms file has a date/time stamp, an encoder count, and several other pieces of data arranged in columns as I posted before in the excel file version. I want to check the already created .tdms file as this is a post-processing application which I don't think I can use array min&max on. My .vi needs to open this .tdms file, check the column labeled "Encoder 1 Diff." for the maximum value, and record the values from that row starting with the time stamp to a file that can later be imported to Excel.
08-15-2013 06:34 PM
08-15-2013 06:40 PM
So, bear with me Dennis, I use the Read TDMS.vi to open up the file and then from there read the data into arrays? Is that what you are suggesting?
08-15-2013 07:06 PM
08-15-2013 08:57 PM
Hi sam.ferguson,
I'm a little bit curious of how you exported data from TDMS file to Excel? Do you mean you programmed to do this or just open Microsoft Excel to open the TDMS file. And if you programed to implement it, how did you do this?
Thank you!