Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I read the TDMS file with Daqmx .net library?

Hello!

 

I have only Labview program but not Measurement Studio.

 

Can I read the TDMS file with Visual Basic 2013 with the DaqMX .net library?

 

I add the reference "National Instruments Common".

 

But this code is not working.

 

Imports NationalInstruments

Public Class Form1
    Private Function ReadTdmsWaveform() As AnalogWaveform(Of Double)

        ' Open the file for read access.
        Dim file As TdmsFile = New TdmsFile("C:\waveforms.tdms", New TdmsFileOptions(TdmsFileFormat.Version20, TdmsFileAccess.Read))

        ' Get the channel group.
        Dim channelGroups As TdmsChannelGroupCollection = file.GetChannelGroups()
        Dim channelGroup As TdmsChannelGroup = channelGroups(0)

        ' Get the channel.
        Dim channels As TdmsChannelCollection = channelGroup.GetChannels()
        Dim dataChannel As TdmsChannel = channels(0)

        ' Read the data.
        Dim waveform As AnalogWaveform(Of Double) = channelGroup.GetAnalogWaveform(Of Double)(dataChannel)

        ' Close the file.
        file.Close()

        ' Return the waveform
        Return waveform
    End Function
End Class

 

I just want to read the TDMS file and save the data to memory.

 

What should I do for this?

 

Please help. Thank you for reading.

0 Kudos
Message 1 of 5
(5,652 Views)
0 Kudos
Message 2 of 5
(5,641 Views)

Thank you for your replying.

I found that information already.

But there is information about using C DLL not for Visual Basic.

I want to read the data in TDMS file in Visual Basic .NET environment.

Thanks for your concern.

0 Kudos
Message 3 of 5
(5,637 Views)

@GagCharacter wrote:

Thank you for your replying.

I found that information already.

But there is information about using C DLL not for Visual Basic.

I want to read the data in TDMS file in Visual Basic .NET environment.

Thanks for your concern.


If you don't want to pay for Measurement Studio, then you had better learn how to call a C DLL in VB.NET.

Apparently, that C DLL has limited capabilities.

0 Kudos
Message 4 of 5
(5,633 Views)

nyc 이(가) 작성함:

@GagCharacter wrote:

Thank you for your replying.

I found that information already.

But there is information about using C DLL not for Visual Basic.

I want to read the data in TDMS file in Visual Basic .NET environment.

Thanks for your concern.


If you don't want to pay for Measurement Studio, then you had better learn how to call a C DLL in VB.NET.

Apparently, that C DLL has limited capabilities.


Oh I understand now.

Thank you very much!

Have a nice day~ Smiley Happy

0 Kudos
Message 5 of 5
(5,628 Views)