Hello I am trying to get a Z stage working with matlab. The Vendor (Dover Motion) have shared their dll. This is the first time I've dived into this part of matlab, so please excuse my lack of knowledge (I'm not really a c or c++ programmer either)
So I've read I need to use loadlibrary (and I've used an alias)
loadlibrary(lib_name,h_name, 'alias','lib')
libisloaded('lib')
libfunctions('lib')
libfunctionsview('lib')
This works fine, and I get a nice graphic showing the methods/functions.
One of those functions I want to use is: PMDSetupAxisInterface_Serial
This is where I am stuck - with the argument (tagPMDAxisHandlePtr) - I don't really know what i'm doing but have tried.
I've read that to call a method inside a dll, to use calllib, so I have tried:
handle = libstruct('tagPMDAxisHandle');
calllib('lib','PMDSetupAxisInterface_Serial',handle,0,1)
But it cause matlab to crash.
Here's the output of
handle = libstruct('tagPMDAxisHandle');
handle =
lib.tagPMDAxisHandle
and
handle = libpointer('tagPMDAxisHandle');
handle =
libpointer
Thnaks for any help
Jason
0 Comments
Sign in to comment.