LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MotorWay dll

Solved!
Go to solution

I have a problem with MotorWay for the Motor-Bee with LabView 8.2. I used Tools»Import»Shared Library (.dll) with mt.h and mtb.dll and created a library with 3 Vi’s. Unfortunately if I start a Vi, I get a message that LabView must be closed.

Download All
0 Kudos
Message 1 of 7
(2,731 Views)

Can you provide the header (.h) file that came with the library, as well as any documentation for the functions you are trying to call?  Without that there is no way to know whether you're calling the DLL correctly.

0 Kudos
Message 2 of 7
(2,707 Views)

Thank you for the answer

mt.h
// Header file for use with mtb.dll

typedef bool    (*Type_InitMotoBee)();                               
typedef bool    (*Type_SetMotors)(int on1, int speed1, int on2, int speed2, int on3, int speed3, int on4, int speed4, int servo);
typedef void    (*Type_Digital_IO)(int *inputs, int outputs);
bool    InitMotoBee(void);                                
bool    SetMotors(int on1, int speed1, int on2, int speed2, int on3, int speed3, int on4, int speed4);
void    Digital_IO(int *inputs, int outputs); 

 

0 Kudos
Message 3 of 7
(2,700 Views)

Have you tried playing around with the settings a little? I noticed, that in the field "library name or path", the file ending is .* instead of .dll. Since you could select the functions this shouldn't be the problem, but I'd change that. you might as well try other options for the calling convention.

 

I don't suppose I could fully reproduce your problem without your hardware, could I? 



Remember Cunningham's Law
0 Kudos
Message 4 of 7
(2,698 Views)

I created mtb.lvlib with the help of Tools»Import»Shared Library (.dll). That’s why there is *mtb instead of dll. Then I created the same three Vi’s with library node and connected mtb.dll. Init Moto Bee did nothing. If I start Set Motors.vi or start Digital IO.vi, LabView crashes.

I work with WindowsXP and LabView 8.2


Here is a lvlog:

####

#Date: Di, 13. Sep 2011 15:19:32

#OSName: Windows NT

#OSVers: 5.1

#AppName: LabVIEW

#Version: 8.2

#AppKind: FDS

#AppModDate: 08/19/2006 19:22 GMT

.\manager\ThEvent.cpp(152) : DAbort:

$Id: //labview/branches/Europa/dev/source/manager/ThEvent.cpp#4 $

0x00C5C053 - LabVIEW <unknown> + 0

0x00C7C7CF - LabVIEW <unknown> + 0

0x081DCA2E - <unknown> <unknown> + 0

0x08350C74 - <unknown> <unknown> + 0

0xA000C4BB - <unknown> <unknown> + 0

0 Kudos
Message 5 of 7
(2,691 Views)
Solution
Accepted by topic author Ludmila57

Have you seen this post?  It's about "StepperBee" rather than "MotoBee" but appears to be the same issue.  Try modifying your header file (after saving a backup copy) so that it reads:

int    InitMotoBee();                                
int    SetMotors(int on1, int speed1, int on2, int speed2, int on3, int speed3, int on4, int speed4);
void    Digital_IO(int *inputs, int outputs);

 Then re-run the DLL import wizard and see if it works.  It seems to have solved the problem for the StepperBee user.

0 Kudos
Message 6 of 7
(2,680 Views)

Thank you. It works

0 Kudos
Message 7 of 7
(2,669 Views)