LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS customized Read

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(4,267 Views)

Hi Rao,

 

a TDMS file does NOT store any Excel sheets.

 

Could you explain your problem with more details? Can you provide an example TDMS file?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,262 Views)

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,

 

 

0 Kudos
Message 3 of 9
(4,249 Views)

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,

0 Kudos
Message 4 of 9
(4,248 Views)
Solution
Accepted by topic author RaoJaved

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(4,232 Views)

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

0 Kudos
Message 6 of 9
(4,193 Views)

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?

0 Kudos
Message 7 of 9
(4,180 Views)

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?

0 Kudos
Message 8 of 9
(4,179 Views)

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/

0 Kudos
Message 9 of 9
(4,159 Views)