≡ Menu

07 VISV Getting Started With the LabVIEW Interface for Arduino


In this video tutorial, I give an overview of what the Arduino hardware is and how the LabVIEW Interface for Arduino (LIFA) works. I demonstrate a simple program I wrote that scrolls 12 LEDs with a variable speed similar to a Larson Scanner.

Download Code Used in this Tutorial: (LabVIEW 2010)

There are many Arduino boards out there. A complete listing of all of them can be found here. More information about the Arduino can be found on the Arduino project website.


The Arduino, is a programmable micro controller board that has several analog inputs and digital IO lines. The Arduino language is text based and is used to create embedded programs which you download to the board.

The Arduino’s claim to fame, is that all of the hardware and software is open source. You can build your own Arduino board from published designs, or purchase one of the ready-made boards. The Arduino has a USB interface used for programming the device and reading data from it.

There are quite a few daughter boards on the market that you can plug onto the arduino. These are nicknamed: shields. For example, there’s an Ethernet interface, Xbee wireless, Bluetooth module, Motor control module, Can-Bus interface, GPS Receiver, Video output and hundreds of others.

The labview interface for arduino is a vi based API that was written and distributed by national instruments. The code also includes and arduino embedded program which must be downloaded to the device. This program which runs on the Arduino, responds to commands sent on the USB bus from the LabVIEW program. It then sends back data to the the computer via the USB.The LabVIEW VIs provided, allow you to read back the analog inputs, control the digital IO lines and use several other features of the Arduino hardware.

Step by Step Startup Guide

Here is a step by step process to get up and running with Arduino and LabVIEW:

  1. Purchase an Arduino board and accessories. You can find them at many locations. Here's the best place to buy:
  2. Make sure you have LabVIEW 2009 or newer installed. The VIs that are included in the LIFA are saved in LV 2009, so this is the version of LV that you must have to be able to use the LIFA. If you do not have this version of LabVIEW, you can download a 30day evaluation of it from ni.com/trylabview
  3. Install NI-VISA Drivers. To LabVIEW, the arduino appears as a serial instrument device. To communicate with serial instruments in LabVIEW, you need to have the latest version of the NI-VISA driver. You can get the latest NI-VISA drivers here. Make sure to select the latest Windows or Mac versions.
  4. Install the Arduino IDE and drivers for Windows. You can download them from the Arduino website here.
    • Step-by-step instructions for setting up the Arduino software on Windows can be found here.
    • For Mac look here. Mac does not need drivers but you still need the IDE environment.
  5. Install the LIFA. The LIFA is available as a VI package through the LabVIEW Tools Network. You must first install VIPM. Once VIPM is installed, click on this link to get and install the LIFA under LabVIEW 2009+.
  6. Upload the sketch ‘LIFA_Base.pde' to the Arduino. The LIFA comes with a sketch program that must be uploaded to the Arduino before you can use the VIs to communicate with it. You must use the Arduino IDE software (which you installed in step 4) to do this. I show how to do this in the video tutorial – above. The sketch is located at:
    • C:Program FilesNational InstrumentsLabVIEW 2010vi.libLabVIEW Interface for ArduinoFirmwareLVIFA_BaseLVIFA_Base.pde
  7. Start Playing. For support, join the Arduino LabVIEW community at ni.com/arduino

Hey, this is Michael Aivaliotis! Thanks for reading my post, listening to the podcast or watching the video on this page. When I’m not posting content on this site, I help companies develop automation powered by LabVIEW. If you want to find out how I can help you succeed with your next LabVIEW project – Contact Me.

  • Pingback: A.Quarter.To.Seven » Blog Archive » LabVIEW Resources()

  • Fantastic! Just what I was looking for, love it. :)

  • Scott

    The IDE won’t compile the interface  .pde     Message is “As of Arduino 1.0, the ‘BYTE’ keyword is no longer supported.
    Please use Serial.write() instead.”
    I am not a programmer.  I can see where there is a Serial.print command with Byte in it.  I don’t know how to make the proper edits.  Will there be a new .pde released that doesn’t use the BYTE command??

    • Rich

      Just got my Arduino Uno/LabView combo today and I’m having the same issue during setup.

      • Me

        use the older version then it works fine

  • kenneth mccombs

    i have the 2011 of labview and the newest ver of ardunio 1.0 and i can not find the lvifa_base.pde.thanks

  • CristiB

    hy, i have an arduino board with ATmega 8 on it, i try to upload ‘LIFA_Base.pde’  on it but unfortunately AT8 it has only 8kb memory and the sketch has over 10k . Somebody knows a smaller variant of ‘LIFA_Base.pde’  which can be uploaded on AT8  too ? Many Thanks .

  • Hello, 
    I have read that LabView does not download code onto the Arduino.  It runs code on the PC and just operates the pins of the arduino which are sending code back to the PC via the USB.  But no code need be programmed for the Arduino?  Is this all correct?  If so, I have a question.  Could I do all this wirelessly?  Via some router or ethernet?

  • Derrell80

    Is it possible for you to post the actual arduino code for this project.

    • Don

      I am using LV2011 and Arduino 0023 ( also tried Arduino 1 after changing pde extention to ino ext) but either way when I try to upload the LIFA_Base.pde to the Arduino it gives the message

      synchLV() was not declared in this scope

      How do I get around this please

      • Don

         I just realised I had forgotten to put the library into the Arduino directory but now its worse , I get the ,messages..

        LVIFA_Base.cpp.o: In function `loop’:
        C:UsersDonAppDataLocalTempbuild8743998723181010940.tmp/LVIFA_Base.cpp:64: undefined reference to `checkForCommand()’
        C:UsersDonAppDataLocalTempbuild8743998723181010940.tmp/LVIFA_Base.cpp:70: undefined reference to `sampleContinously()’
        LVIFA_Base.cpp.o: In function `setup’:
        C:UsersDonAppDataLocalTempbuild8743998723181010940.tmp/LVIFA_Base.cpp:44: undefined reference to `syncLV()’

        What am I doing wrong ?
        and what files should I have in the Arduino Library ?


      • Don

         Its OK
        I must have been having a senior momment . its working ok now


      • Derrell80

        How did you solve your problem?

      • Derrell80

        Nevermind! I guess I had a senior moment too!

      • Laurent M

         well I am still in this senior moment here… I have the same issue, even though I had upload firmware before… how did you fix your issue? Thx.

      • Laurent M

         ok ok…  what happened is that when opening the LVIFA_BASE, one file was missing . The LabVIEWInterface.ino was missing. So by doing Sketch>>Add File in the menue, one can add the .ino file. Then the compile works.

  • Pingback: Usando Arduino como DAQ en Labview | Robótica Lúdica()

  • Thanks a lot, as a beginner in arduino and labview this was the video which got me started :)

  • Pingback: Labview – Arduino » Proyecto Ivki()

  • Jvindy15

    I am using a duemilanove, but did all the steps for an uno.  When I run my stepper motor example program it gives me error 5005 unable to find arduino.  Does the duemilanove work with labview or does it have to be an uno?

  • Trenton

    There is no Firmaware directory under the LabView 2012 file path, so where is the LVIFA_Base.pde file in LabView 2012

    • Fradihet

      Any news? Where can I find LVIFA_Base if Firmware folder does not exist??

      • Please see this thread. Looks like there is a new package released: https://decibel.ni.com/content/message/41549

      • Nidees


      • I never said it does.

  • Pingback: XBee Tutorial()

  • Pingback: Arduino to LabVIEW communication()

  • Aaditya

    Good morning sir,
    when i run the arduino IDE application 1st time it taken 1min. for launching then one dialog box shown error as:-
    an error occur while launching the application.

    Thank u.

  • i try to install this on my labview,
    but it tell my labview need to run on 2011+ engine labview
    then i download 2012 engine labview
    and install it
    but the VI package still wont install on my laptop
    because it keep telling me my labview dont run on 2011+ engine labview
    could someone help me on this
    thank you…

  • can i have the arduino coding too…

  • Pingback: LIFA & SHT21 / SHT25 ← misenso electronics()

  • Pingback: Arduino to LabVIEW communication()

  • Pingback: Useful Resources | ICF Technologies()