03-02-2011 02:22 PM
Hello all,
I'm having a hard time figuring out how to call a DLL in Labview. I've read a little bit about it but am still a newbie. The DLL in question is usbm.dll (http://www.usbmicro.com/, the list of functions & types is documented there). I use the call library node to call the DLL.
As long as I call functions with no input argument things work fine (for instance my first 2 calls check for device presence and number of devices, and work ok returning the proper output)
Then I try using functions with arguments (3rd step in the VI) and Labview doesn't take them (Error 1097). I'm going for function "int USBm_DeviceValid( unsigned char device )" , I believe the argument should be of type uint8 and output of type int8... I've tried all numeric types to no avail.
On top of that, if I skip step 3 of the VI and go to step 4 (calling a function which takes 2 parameters and sends a command to my device) : the function is executed (eg the device moves), but then Labview crashes (exits with no error message). Is this due to improperly calling the function ?
Any suggestions would be welcome, thanks !
Solved! Go to Solution.
03-02-2011 02:31 PM
What version of LV are you using? I have 2010 and can't even open the VI...LV crashes without any message?!
03-02-2011 02:36 PM
LV 10.0 32bit , under XP64. Yes, it closes with no message.
03-02-2011 03:27 PM
Wow that is what I am using. This seems to be an interesting issue. Did you try with any other DLL? maybe Windows DLL jst to test?
03-02-2011 04:49 PM
Hi lvrat, thanks for your suggestions.
I got around the problem. I recovered an older version of this usbm DLL (together with some LV example files) which works fine. Looks like the more recent DLL I was using has some issue with Labview...
I'm attaching these files (they were not easy to find), in case someone else tries to interface to an USBmicro device.