LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading lenght of TDMS file

Solved!
Go to solution

Hi, I need to read in my labview vi the TDMS file lenght attribute. For example i've attached a TDMS file and i don't know how can i return 6 from the file attributes. How can i do? Thanks

0 Kudos
Message 1 of 9
(1,820 Views)

@tj1995 wrote:

Hi, I need to read in my labview vi the TDMS file lenght attribute. For example i've attached a TDMS file and i don't know how can i return 6 from the file attributes. How can i do? Thanks


Check TDMS Viewer to View the Information and you can get to know what's the Group/Channel and count you need to provide to Read TDMS File.

 

TDMS Read Function - NI

 

TDMS File Viewer VI - NI

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 9
(1,804 Views)

I save my DAQ acquisitions in this file TDMS that contains arrays with different rows. In my vi i need to know how many rows and columns the file has. This is my problem and i don't know how do that.

0 Kudos
Message 3 of 9
(1,793 Views)

The TDMS Viewer that was mentioned already is an open set of VIs that shows how to do this.  To read the number of groups, use the TDMS List Contents with nothing wired to the group name.  This will return the array of Group Names.  If you want to know the number of channels within a group, wire a group name to the TDMS List Contents and it will return an array of channels under that group.  If you want to know the number of samples under a channel, within a group, use the TDMS Get Properties, where you wire the group and channel, with the property to read being the string "NI_ChannelLength" and the data type being an I64 numeric.

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

I've tried in this way, but it doesn't work. Have I made some mistakes?

Immagine 2023-04-21 170957.jpg

0 Kudos
Message 5 of 9
(1,754 Views)

@tj1995 wrote:

I've tried in this way, but it doesn't work. Have I made some mistakes?

Immagine 2023-04-21 170957.jpg


PalanivelThiruvenkadam_1-1682090489516.png

Have you tried TDMS Viewer?

ReadTDMS.png

Try this you will get the measurements based on Channel Names.

 

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 9
(1,749 Views)

Yes, I've tried, but I can't get out from the file the information about the lenght (6) of the file...

0 Kudos
Message 7 of 9
(1,741 Views)
Solution
Accepted by topic author tj1995

 


@tj1995 wrote:

Yes, I've tried, but I can't get out from the file the information about the lenght (6) of the file...


ReadTDMSProperty.png

 

Sorry it was my fault i shared the read data instead of properties..

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 8 of 9
(1,731 Views)

thank you!!

0 Kudos
Message 9 of 9
(1,716 Views)