Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Group and Channel Names are missing when opening a TDMS file from .NET

That issues sounds just like mine. I downloaded and installed the new library. The version I had was 2.2.1546.609. After the install, I now have version 2.3.0.49159.

 

Unfortunately, the problem still persists. I cannot access any of the channel or group names from the .tdms file.

 

Any other ideas?

 

Joel

0 Kudos
Message 11 of 15
(2,420 Views)

Hi malreport,

 

Is there just a single TDMS file that you are having this problem with? If this is happening in multiple files does the program that is creating the TDMS files see the same behavior when using the new version of the TDMS dll?

 


Milan
0 Kudos
Message 12 of 15
(2,386 Views)

Hi Milan,

 

I have only tested with this first file so far. Someone else is generating the file from a CompactRIO and FTP'ng it to me. This file was a test file to see if I could read out some of the data. The most puzzling part to me is that when I use my Excel plugin to read the file, it pulls in all of the names without any problem at all. I have also used the reader example application that NI provides with the SDK (C:\Users\Public\Documents\National Instruments\MStudioVS2010\DotNET\Examples\Tdms\Reader\cs\bin\Debug\Reader.exe). It has the same problem.

 

Joel

0 Kudos
Message 13 of 15
(2,379 Views)

The problem is with an incompatibility with TDMS 1.0 because file itself is saved as a TDMS 1.0 file. In LabVIEW, some of the built-in properties such as channel names were saved differently in 1.0. In 2.0, the built-in properties are saved as actual properties. This was always the case for the .NET library and the CVI libraries in both 1.0 and 2.0. So TDMSChannel.Name is looking for a property called "name" in both 1.0 and 2.0. If that property does not exist, then it throws and exception because it "has" to exist. So if you have a 1.0 file that was created in .NET or CVI, then you are fine. But if the 1.0 file was created in LV, then unless you manually added these properties, they did not exist. The Excel plugin uses a different underlying code and is able to discover these hidden properties from the LV TDMS 1.0 files.

 

To resolve this, you simply need to update the files to TDMS 2.0. Use the NationalInstruments.Tdms.TdmsFile.ConvertFileFormat( ) static method to convert the file to 2.0. It may also be worthwhile for your colleague to update his LabVIEW code to save his TDMS files in 2.0.

National Instruments
Message 14 of 15
(2,361 Views)

That worked beautifully! Thanks!

Sorry for the late reply, I got pulled off on another task.

 

Joel

0 Kudos
Message 15 of 15
(2,341 Views)