Showing results for 
Search instead for 
Did you mean: 

Help required when using TDM C-DLL to convert TDMS files to .mat files with x64 windows

Dear all,


I am using the library and .dll files posted as per the link below to convert logged data in TDMS format to the .mat format for post - processing.


 I have a working .m file when using x32 windows, but when using x64 windows matlab generates the following error:


 ??? Error using ==> loadlibrary at 454
There was an error loading the library "D😕MATLAB\R2008a\work\DAS\TDMS_conv_files\dev\bin\nilibddc.dll"
D😕MATLAB\R2008a\work\DAS\TDMS_conv_files\dev\bin\nilibddc.dll is not a valid Win32 application.


The line of .m code which generates this error is:



I wish to use x64 windows as some of the files are large (1 --> 2GB) and at the moment the conversion will crash on the larger files.




Martin Butcher

0 Kudos
Message 1 of 11

Hi Martin,


Hope you are well today!


Although I have still not been able to confirm it with the author of this DLL, but I presume it is very unlikely this DLL is compatible with 64-bit Windows.


I will provide you with more information on this as soon as I can have a confimation.

Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
Message 2 of 11



You may wish to look at a Matlab script another user wrote since they were having issues with NI's matlab support:


The script supposedly converts TDMS files directly in Matlab with no use of NI generated external DLLs.  He was having issues because the NI tools hadn't been updated for the new version of Matlab. 

Message 3 of 11

Thankyou for the prompt replies.


I have had some info back from the Mathworks regarding the service request. It seems to boil down to the following:

1) The NI library is a 32 bit dll.

2) The error returned (not a valid Win32 application) is misleading - but this is a function of the error message returned by the windows API functions that are used to load the libraries.

3) The position stated by the Mathworks is that a x64 bit version of this function is required for this to work.

I will have a look at the code below, but I suspect it will not solve the problem. The basic issue is that with win32 the biggest lump of contiguous memory that can be accessed in MATLAB is about 500MB. This can be improved by running with the -nojvm which disables all Java and MATLAB therefore uses less memory increasing the maximum contiguous area of memory to 1GB. However, this is still limited in win32 because of the 3.5GB limit to max addressable memory space.


At the moment I have a 'half baked' solution which works by modifying the original example code such that it reads one TDM variable at a time, writes to the output file, then clears it the read data from the work space, reads the next, appends to file .... Taking perhaps an hour to convert a 2GB file.


I hope to post again with where this ends up.


What would be extremely useful is for NI to release a x64 version of these libraries. This would really help with handling larger datasets.




Martin Butcher

0 Kudos
Message 4 of 11

Hi Martin,


It would be great if you could fill in a Product Suggestion here so we could plan for the development of a library for x64 DLLs.



Best regards,

Mark M.
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 5 of 11



Product Suggestion completed.







0 Kudos
Message 6 of 11

Can anyone update on any new developments for this topic please?

0 Kudos
Message 7 of 11

You can find a 64bit version of the TDM-C-DLL here:




Message 8 of 11




0 Kudos
Message 9 of 11

Hi Stefan


I am getting a following error after clicking the download link:


550 No such file.

It would be great if you could post any latest download link. 




0 Kudos
Message 10 of 11