Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: calllib function for dll in Matlab - Init USMC
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Aylin

Posts: 5
Registered: 3/11/14
calllib function for dll in Matlab - Init USMC
Posted: Mar 11, 2014 12:35 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

hello everybody,

i am trying to control a stepper motor in a windows dll by using functions.
The library is loaded with loadlibrary('USMCDLL','USMCDLL.h');
and i can also look up the functions with libfunctionsview('USMCDLL');
Now i have to call the Init function as the user manual says:

The USMC_Init function initializes dll and/or searches for connected devices. It must be called before any other function of the dll.

DWORD USMC_Init( USMC_Devices &Str );


-> I tried it with the libstruct function - explained in the external interface in Matlab:
and than try to call the Init function with calllib.

Devices_st=libstruct('USMC_Devices_st');
calllib('USMCDLL', 'USMC_Init', Devices_st);

I get always the value 4.294967295000000e+09 as return and I don't know what these means.
When i try to call other functions to move the stepper motor it does not work.
I think the stepper is not initialized.
I don't know what i am doing wrong.
Thanks for any help



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.