NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
maleport
Posts: 16
0 Kudos

Re: 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

Member
MilanR
Posts: 139
0 Kudos

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

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
Applications Engineering
National Instruments
ni.com/support
Member
maleport
Posts: 16
0 Kudos

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

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

Active Participant
D_Biel
Posts: 640
0 Kudos

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

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
Product Support Engineer
Member
maleport
Posts: 16
0 Kudos

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

That worked beautifully! Thanks!

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

 

Joel

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page