10-20-2014 06:06 AM - edited 10-20-2014 06:11 AM
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.
10-20-2014 07:43 AM
Googling using the two words .net tdms
gets me https://forums.ni.com/t5/Measurement-Studio-for-NET/C-NET-TDMS-library/td-p/1641628
10-20-2014 08:29 AM
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.
10-20-2014 08:36 AM
@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.
10-20-2014 09:03 AM
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~