Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
37 rating:
 1.67 out of 5     Rate this Document

Why Do I Get Error 5002 When Using the LabVIEW Interface for Arduino?

Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

I have a VI that uses the LabVIEW Interface for Arduino toolkit that generates the following error when I run my application.

Error 5002 occurred at  Unable to establish connection with Arduino.  Please ensure that you have selected the correct COM port and that you have flashed the Arduino with the correct firmware.

This error occurs when LabVIEW cannot establish a connection with the Arduino microcontroller.  Several factors can cause this error so please check the following:

  1. Make sure that the correct firmware is flashed to the Arduino.  The correct firmware can be found in <LabVIEW>\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base
  2. Make sure you have selected the correct COM port for the or that the VI automatically locates the Arduino (this happens when no wire is connected to the VISA Resource input of the and only works for Arduinos that are connected to the PC via USB)
  3. If using an Arduino connected via USB make sure that the Arduino is listed as under Ports in Windows device manager.  If it is not listed you may need to install the Arduino drivers.
  4. If using a wireless connection (Xbee, BlueSMIRF) to LabVIEW try using a wired connection (USB , Serial).  Poor wireless signal strength can cause the Arduino to be unreachable by LabVIEW.
  5. Make sure that the baud rate specified as an input to Init.VI matches the baud rate specified in the firmware by #define DEFAULTBAUDRATE X (where X is the baud rate).

Related Links:
NI Arduino Community
Arduino HomePage


Report Date: 05/02/2011
Last Updated: 08/29/2013
Document ID: 5L1E2DYG

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit