02-01-2017 04:38 AM
I have a TDMS file having multiple excel sheets in it with a meta data file on excel as well. All the excel sheets have data acquired from multiple sensors and time column in it, My queation is how to get a particular data column from a particular excel sheet in that tdms file. Thanks
Solved! Go to Solution.
02-01-2017 04:46 AM - edited 02-01-2017 04:47 AM
02-01-2017 04:55 AM
1) I have NI6363 card,
2) i acquired triggered data from two sensors and selected tdms format in "write to measurement file" express vi.
2) I took data 3 times and saved it in same tdms file.
3) When i was done, i opened that tdms file which shown meta data and 3 excel sheets named untitled1, untitled2, untitled3. each sheet had 3 columns one time column and two for amplitudes of sensor data.
Is it sufficient sir or should i attach the file as well?
Thanks for your quick response,
02-01-2017 04:55 AM
Dear sir,
1) I have NI6363 card,
2) i acquired triggered data from two sensors and selected tdms format in "write to measurement file" express vi.
2) I took data 3 times and saved it in same tdms file.
3) When i was done, i opened that tdms file which shown meta data and 3 excel sheets named untitled1, untitled2, untitled3. each sheet had 3 columns one time column and two for amplitudes of sensor data.
Is it sufficient sir or should i attach the file as well?
Thanks for your quick response,
02-01-2017 06:00 AM
Hi Rao,
so you opened your TDMS file using Excel and the TDMS import plugin provided by NI!
To allow Excel to display each data block the plugin places the data in seperate sheets - but this is only done for Excel. There are no sheets in the data file, the TDMS contains several data blocks!
how to get a particular data column from a particular excel sheet in that tdms file
Use the TDMS file functions to read information about the file content first, then select/read the data as needed.
Did you examine the example VIs explaining how to use TDMS functions?
02-02-2017 09:23 AM
As Gerd said the Excel viewer is just a way to easily view the data in a TDMS file. Control over how it is displayed in Excel has little to do with what is in the TDMS file. That being said an interesting concept is to import your TDMS file into Excel, then modify the Excel sheets the way you'd like with ActiveX calls. I made a utility that converts TDMS files into XLSX and has some custom sheet formatting. You can start with this code and modify it to your liking.
http://forums.ni.com/t5/Community-Documents/TDMS-to-XLSX-Conversion/ta-p/3511652
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-02-2017 11:55 PM
Thanks sir, The code is good for custom formatting of excel sheet,
But can you help me how to read particular channel data from a tdms file using tdms read function?
02-02-2017 11:58 PM
Thanks sir, labview example finder helped me a lot,
it reads all channels data in tdms file,
can i read a particular channel data from that tdms file using TDMS read vi?
02-03-2017 07:39 AM
Read the documentation and help on the TDMS Read function. It has an input for what channel or channels it should read. If you only provide a scalar string it will only read one channel. Provide an array and it will read multiple channels.
http://zone.ni.com/reference/en-XX/help/371361M-01/glang/tdms_file_read/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord