Start Programming a Falcon haptic with LabVIEW

If you already have the “hdl” library its time to start programming. Else you can learn how to build it by yourself here.

An impedance-type haptic link this one is a very simple device: it receives Cartesian forces and return its position. As this is a three degrees of freedom (DOF’s) system, only forces and positions along the X, Y and Z axes are exchanged. Also, the status of the tool-tip buttons can be read.

The Cartesian workspace is about 20 cm with with origin at the center position. The Y axis is pointing up and the Z is aiming toward the user.

The good news are that because the concurrent nature of LabVIEW language and the lack of conventional classes architecture, is easier

Minimum example

First you need to “init” the device to get a device ID. If this fail (the device is not ready), a -1 is returned and your program should stop. Else you can “start” the servo thread and make the ID the default ID value for the read and write operations. It is your responsibility to repeatedly read and write to the haptic at a rate of about 1000 times per second (yes, 1000). A lower rate just makes a poorer haptic illusion. At the end you must “Stop” the servo thread and “uninit” the used ID.

Waning: Always “uninit” your device ID before “initing” another one. Else your computer will have a bad digestion and you’ll need to restart LabVIEW. So don’t forget to stop your program using your panel Stop button, instead of the “Abort” button. You are warned!

Let’s start with the initialization:



Here, in case that the haptic is not ready you get a message and your program stops.


You can start by making a read only program like this. The haptic is not going to move so don’t be afraid to try:


Check in the user panel that the buttons and the position readings are working. You can use a chart and the default array indicators.


Remember to stop the program pressing the “Stop” boolean control.

Now you are ready for the next step.

Use the force, Luke

Let’s make another example with force generation. In this next case a simple elastic model is going to be used. The force output force is opposed, and proportional, to the displacement of the haptic from its workspace origin.


The elasticity constant can be changed on line, and the positions are shown in a chart.

VI_haptic_spring_panelYou can see the program in action in the following video.

Here you can see the behaviour of the haptic with different elasticities.

If you are lazy…

Here you can find the hdl library (hdl Library). Make sure you have installed the latest Falcon drivers and SDK and then copy the folder “hdl” into your LabVIEW’s user.lib folder.

The archive with the two examples VI from above are here (FalconLabVIEWExamples).

This is a very simple model and I’ll be happy to see your programs.



4 thoughts on “Start Programming a Falcon haptic with LabVIEW

  1. This is a comment to the webmaster. Your Start Programming a Falcon haptic with LabVIEW website is missing out on at least 300 visitors per day. I have found a company which offers to dramatically increase your visitors to your site: They offer 500 free visitors during their free trial period and I managed to get over 15,000 visitors per month using their services, you could also get lot more targeted traffic than you have now. Hope this helps 🙂 Take care.

  2. Hello, I am an electronic and computer engineering student in Cal Poly Pomona. I am working on a robotic arm project using LabVIEW to interface falcon with arduino. I installed all the driver, library and sdk. Also, I tried to do different things to get the device ID, but still having problem initialize the falcon and getting -1 as device ID. I am wondering what you did when you get the “Haptic couldn’t be initialized” message? I am pretty sure the device is connected to my computer probably because the falcon test application works perfectly. Please reply, thank you very much.

  3. Good evening M.S. Gomez,

    My name is Hugo Santacruz, I’m studying a master degree in mechatronics in Centro de Ingeniería y Desarrollo Industrial in Querétaro, México. I would like to use the Novint Falcon as a haptic device in a teleoperation task working under Labview. I follow the instructions of the tutorial but Labview does not recognize the device. I verify the position adquisition and the force sended with the “Test Tutorial” given by Novint. I hope you can help me to solve this issue.

    Regards and thank you.

    Hugo Santacruz.

  4. Hello
    If you are having trouble getting this to work, try the following in Labview:
    1. Double click any of the HDL VI’s (open VI in new window).
    2. Open the Block Diagram (Ctrl+E).
    3. Double click the yellow call library function node.
    4. Change the “Library name or path” to the hdl.dll location (example: C:\Program Files (x86)\Novint\Falcon\HDAL\bin\hdl.dll)
    The missing path in/out is now set and the program should work now.

    Thanks for the Labview guide. Regards Kristof

Leave a Reply

Your email address will not be published. Required fields are marked *