LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using TDMS DLL in Matlab

Hi all -   I'm having a problem using the sample application to load TDMS files in Matlab (http://digital.ni.com/public.nsf/allkb/0EEADA99DC7D00A4862572E30037C3A2). 

In Matlab, when I run the script that's included, I get the following error:

??? There was an error loading the library "C:\Files\ClosedLoop\MatLab TDM Example\bin\nilibddc.dll"
Error using ==> loaddefinedlibrary
The specified procedure could not be found.

Some searching around on the Matlab website reveals that this usually happens when a DLL references a procedure that it can't find.  Sure enough, if I use the program Depends to examine the TDMS DLL (nilibddc.dll) it shows a dependency on a DLL called DWMAPI.dll, which appears to be something related to Windows Vista.  Since I'm running Windows XP, it's obviously not on my system.  I did try downloading it, but it references *other* procedures from Windows Vista, so that didn't solve my problem.

Any ideas how to get around this problem?  Has anyone encountered something similar?

Cheers, Eric Tytell
0 Kudos
Message 1 of 5
(3,709 Views)
Hey, got the exact same problem Eric. Which Matlab are you using? I am using Matlab 7.5 (r2007b) on Windows xp sp2.
 
If you get a workaround or any clue let me know, as so will i of course
 
Good luck,
 
Raphael
0 Kudos
Message 2 of 5
(3,675 Views)

Hi,

Did you ensure that you specified the following correctly?

"You can transfer the example code in the LoadTDM.m to any of your other M-script files. For example, if you copy the TDM dll and the header file into "C:\test\", you must specify the location in your m-script like this:

examplePath = 'C:\test';
hfile = [examplePath '\nilibddc_m.h'];
loadlibrary([examplePath '\nilibddc'], hfile);

Similar code can be found in lines 14 to 16 in the included m-script, which assumes that the TDM dll and the header file are in the same folder."

Also, which version of MATLAB® are you using? This example may only be used with version 6.5 or later. Are you using Windows XP?

MATLAB® is a registered trademark of The MathWorks, Inc.


 

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 3 of 5
(3,646 Views)
Hi Amanda -
  I'm using Matlab R2007b on Windows XP.  The library path is specified correctly.

I tried the program on a different computer running Matlab R2006b (last year's version) and it runs fine.  So it must be something in the latest version of Matlab.  Any idea what it could be?

Eric
0 Kudos
Message 4 of 5
(3,641 Views)
Corollary discussion here.
0 Kudos
Message 5 of 5
(3,635 Views)