12-15-2009 09:49 AM
Hi All,
I am working on a project that requires communication between Labview 7.1 and a SCORBOT ER9Pro. The robot uses a USB-Pro Controller. I would like to know if anyone has some experience communicating Labview 7.1 with a SCORBOT ER9Pro's USB-Pro Controller. I tried to use the Call Library Function Node to call functions from the controller's dynamic link library USBB.dll, but it didn't work. Currently I am trying to configure VISA to communicate with the controller as an USB device, but I really do not have much experience with this, so any advice will be greatly appreciated.
Thanks a lot,
Paulo
12-15-2009 11:57 AM
Hi Paulo,
Here's a very helpful document if you need some information about calling a DLL in LabVIEW:
http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33?OpenDocument
Be sure to take a look at the "Note:" near the bottom it will point you to a LabVIEW VI that can help you get your data into and out of the DLL code.
If this doesn't help you out can you give a location where to find the DLL you are trying to call or post it?
Good Luck!
Dustin
12-15-2009 01:29 PM
Hi Dustin,
Thank you very much for your reply. I have use the Call Library Function Node to call DLLs in other projects successfully. I am posting the SCORBOT ER9 Pro DLL with this message. I am able to view all the functions available in the DLL but when I run the VI I do not receive any answer from the controller. Is there any other method I could use to communicate with the usb controller? Thanks a lot for your help.
Best Regards,
Paulo
12-15-2009 02:55 PM
Paulo,
Sorry for the confusion, do you have a *.h file with that *.dll file as well? We'll have to have that, or details about the functions in the dll to create function prototypes. These are used to define the inputs and outputs of the functions. Once we know that we should be able to call, or import your DLL.
-Dustin
12-15-2009 03:15 PM
Hi Dustin,
Thanks again for your reply. I have attached a .zip containing all the files I found in the installation folder of the SCORBOT ER9PRO. There is a usbc.h file and also a usbcdef.h. Hope this helps.
Best Regards.
Paulo
12-16-2009 11:26 AM
Paulo,
After looking at your files and experimenting myself it seems that your DLL's functions are using complex data types which are difficult for LabVIEW to interface with. I think that you may need to investigate this as an option:
http://digital.ni.com/public.nsf/allkb/06ECDC689DDA0F3D862574440074CD95?OpenDocument
Be sure to look this document, the other document I linked earlier in this thread and all of the linked resources in the "Related Links" section near the bottom of the Knowledge Base. Everything you need to learn these techniques should be within. Also in LabVIEW, Help>Find Examples search for DLL and you will find a VI that you can run to help you figure out which data type to convert your DLL's inputs and outputs.
Again, Good Luck, and thanks for using our forums!
-Dustin
12-17-2009 08:32 AM
Hi Dustin,
Thanks a lot for all your help. I am going to try what you told me. I´ll let you know how it goes.
Best Regards,
Paulo