LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing a Phantom Desktop haptic device with LabVIEW

Solved!
Go to solution

I am currently using a compact RIO 9022  with Ni-9514 C-series modules to control the motion of a machine with multiple axes. As of now, I have used the SoftMotion module to create motion programs. 

 

Now I have inherited a Phantom Desktop haptic device by Sensable Inc. (now Geomagic) and I would like to use it to control two of the axes of the machine and also to feed back forces that I measuring using two load cells. 

 

So I need to interface the Phantom device to LabVIEW. I have read some things about .dll files and importing C++ functions into LabVIEW to do this, but I have no experience with C++ and I don't know where to start. 

 

Could anyone help get me started? 

Message 1 of 22
(4,748 Views)

Do you have a .dll file provided with your device? Do you have the function prototypes (typically a .h file)?

What information do you have to program your device?

Marc Dubois
0 Kudos
Message 2 of 22
(4,722 Views)

Hi Marc,

 

I do have .dll files. A few .dll files came with the installation of the haptic device drivers, but have no .h file with them so I don't know how to find out what functions there are in the .dll. 

 

 

I also downloaded the OpenHaptics Software Development Toolkit from the same company, which is a C/C++ environment used to create virtual environments to interact with, and there are many .dll in there too (sometimes with .lib files). But I don't know which of those may be relevant to my application, which is to communicate with a machine in a master/slave configuration rather than to interact with a virtual environment. 

 

0 Kudos
Message 3 of 22
(4,714 Views)
Solution
Accepted by topic author iacopo.russo

Have a look at the C++ examples provided witht the SD Toolkit that they provide and try to identify the functions that might be relevant to your applications. Those functions are likely linked to a .dll or a lib. You might then be able to call the .dll functions from LabVIEW, or more likely, you might have to build your own .dll that uses those functions. Then, calling your own .dll would be easy from LabVIEW since you should have all the information you need. This is not a trivial task but you will find a lot of documentation on this topic on ni.com, like this one.

Good luck.

Marc Dubois
0 Kudos
Message 4 of 22
(4,712 Views)

Thanks for the advice and the link, I'll give it a go! 

0 Kudos
Message 5 of 22
(4,696 Views)

Hello Iacopo,

 

Did you have any success with your project? Currently discussing a similar project here, accessing a Geomagic Touch from LabVIEW. Would be nice to get some insight from you!


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 6 of 22
(4,120 Views)

Hi Ingo,

 

Yes I did manage to get it connected in the end. I had to write my own DLL in C and then import the functions by creating a LabVIEW library using the Library Import Tool. I also created a few custom controls for the constants in the OpenHaptics API.

 

Now I can successfulyl read positions from the device in a while loop, and command forces as motor DACs.

 

Would you like me to send over some files/screenshots?

 

Iacopo.

Message 7 of 22
(4,102 Views)

Hi Iacopo,

Thank you very much for your quick reply! Yes, if you could attach the files here (or send them in case you cannot share publicly, will PM you my mail), that would be awesome!


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 8 of 22
(4,093 Views)

Sure, I can email some things to you.

 

Iacopo.

Message 9 of 22
(4,069 Views)

Hello Ikaiser,

    I was discussing a similar project too, accessing a Geomagic Touch from LabVIEW.  Have you got some

progess yet?  if i can get some support from you, that would be awesome!

0 Kudos
Message 10 of 22
(3,949 Views)