LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to read only a portion of a TDMS file without pulling the entire file into LabVIEW?

I have a TDMS file created by a 3rd  party.  It is a rather large file, but I am only interested in a portion of the file.  I want to programmatically pull the portion I'm interested in into LabVIEW. The TDMS contains an EVENT LOG which will specify an EVENT TIME, and each Group will have a Channel TIME.  I want to only pull the data from each Group (All Channels) that correlates to EVENT TIME (+/- a given number of entries).  Right now, I am reading in the entire TDMS File and populating data arrays with all the data.  Then searching the arrays for the data I want.   This whole process takes about 10 seconds with the sample TDMS file I am using. While 10 seconds is not too bad for my application, the Sample TDMS File I'm using is only a fraction of the size of the TDMS Files I will eventually be working with.

0 Kudos
Message 1 of 3
(2,657 Views)

Hi Roese,

 

Yes, the TDMS read function VI allows you to read only a certain part of a TDMS file. This can be acomplished by specifying the "channels name(s) in". Channel name(s) in indicates the channel to perform the operation on. If you do not wire data to this input, LabVIEW reads data from all channels under the same group. If you wire waveform data to the data type input, LabVIEW uses waveform names. The data type that the channel name(s) in input accepts can be a string or a 1D array of strings. The data type varies according to the data you wire to the data type input.

 

Capture.JPG

 

I hope this helps! If there is anything else I can clarify let me know.

 

Best Regards

 

Carlos O

Applications Engineer

National Instruments

0 Kudos
Message 2 of 3
(2,643 Views)

With the Count and Offset parameter you should also be able to read a pleasant chunk of data.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,638 Views)