09-14-2011 08:02 AM
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.
Solved! Go to Solution.
09-14-2011 12:38 PM
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.
09-15-2011 01:42 AM
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);
09-15-2011 01:52 AM
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?
09-15-2011 04:22 AM
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
09-15-2011 04:54 PM - edited 09-15-2011 04:55 PM
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.
09-16-2011 07:17 AM
Thank you. It works