08-29-2012 02:04 PM
Hello,
What my application requires is Analog Input Data & Counter Data stored in a TDMS file. Specifically, I need the ability for the DAQ to be on and reading/displaying all the time, but the user needs the ability to Start and Stop the TDMS logging using a button. After the stop it will automatically get saved using user preferences. I cannot find any examples or documentation on how to accomplish this.
Thanks,
08-30-2012 03:40 PM
Hi Matt0316,
There are two common ways to collect data as TDMS in VB.NET. The first way is to configure the DAQmx task to log to the TDMS files and then you can manipulate the data after the fact or you can stream to the TDMS files programmatically.
For the first option you can find an example of how to configure DAQmx to perform TDMS logging in the following location:
<Start> » All Programs » National Instruments » NI-DAQ » Text-Based Code Support » .NET 4.0 Examples
In the Examples folder navigate to: <Examples>/Analog In/Measure Voltage/TdmsContAcqVoltageSamples_IntClk
For the second option you can find an example of streaming to TDMS files in the following location:
<Start> » All Programs » National Instruments » Measurement Studio » .NET Examples
In the Examples folder navigate to: <Examples>/Tdms/Streaming/