Difficulty using callib (using a dll) in Matlab 2013

2 visualizzazioni (ultimi 30 giorni)
Joel
Joel il 21 Ago 2014
Modificato: Joel il 21 Ago 2014
In Matlab 2011b and earlier, I am able to load and execute commands from a *.DLL using loadlibrary and calllib.
On the SAME computer using Matlab 2013 (release A I think) the library loads but the calllib lines don't execute correctly. No syntax error is returned in Matlab, but the attached hardware it controls does now respond.
I am wondering what is different in the way Matlab 2011 and 2013 load and call such libraries that might cause this? Is there a new syntax or optional input arguments I am not aware of?
First I execute mex -setup (at prompts Yes, 1, Yes) Then my code basically looks like this: loadlibrary('RobotDll','RobotDll.h'); HardwareWorks = calllib('RobotDll','RIsInitDone'); % returns a 1 if working and a 0 if not
In 2011 >> HardwareWorks = 1 and attached robot moves
In 2013 >> HardwareWorks = 0 and attached robot does not move.
Thank you in advance.

Risposte (0)

Categorie

Scopri di più su C Shared Library Integration in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by