10-13-2016 01:26 AM
Hi,
I'm looking for a solution to read the TDMS file that is being generated from the C# API package. I need to post process the data from it.
I'm logging the data using the built in function ConfigureLogging() but I cannot find a simple way to read it back. I know it is being saved correctly because when I am looking into it I can see the binary data according to the formal file structure:
http://www.ni.com/white-paper/5696/en/
I used HxD (https://mh-nexus.de/en/hxd/) to look into it.
The only solution that I found is:
https://github.com/mikeobrien/TDMSReader
https://www.nuget.org/packages/TDMSReader/
But, it doesn't support TDMS2.0.
How can read DAQmx raw data TDMS2.0 files using C# without rolling my own TDMS reader?
Cheers
Maayan
10-14-2016 03:20 PM - edited 10-14-2016 03:21 PM
It is not possible to read DAQmx raw data TDMS2.0 files using C#. But it depends on exactly what you want to do.
If he wants to log data to disk, read it back for processing, and then re save the processed data, then you need to write your own TDMS reader.
If you only want raw data written to disk and then wants to display some analyzed data, take a look at the following link:
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/ad45ab87/
If you want to get what's in the file then youneed to get a reference to the file and open it with read only access, then consider looking at the following link:
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/66a6caf6/
Otherwise, the following link may also be useful to you:
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/9f2a8634/
10-14-2016 03:21 PM
Hi Maayan,
It is not possible to read DAQmx raw data TDMS2.0 files using C#. But it depends on exactly what you want to do.
If he wants to log data to disk, read it back for processing, and then re save the processed data, then you need to write your own TDMS reader.
If you only want raw data written to disk and then wants to display some analyzed data, take a look at the following link:
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/ad45ab87/
If you want to get what's in the file then you need to get a reference to the file and open it with read only access, then consider looking at the following link:
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/66a6caf6/
Otherwise, the following link may also be useful to you:
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/9f2a8634/
10-17-2016 01:28 AM
Hi Roxana,
Thanks, I reckon I'll just implementing my own class/code to be used in C#.
Cheers
Maayan