Why Do I Get Error 5002 When Using the LabVIEW Interface for Arduino?
LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version:
Primary Software Fixed Version:
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 Init.vi. 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:
Related Links: NI Arduino Community Arduino HomePage
- 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
- Make sure you have selected the correct COM port for the Init.vi or that the VI automatically locates the Arduino (this happens when no wire is connected to the VISA Resource input of the Initi.vi and only works for Arduinos that are connected to the PC via USB)
- 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.
- 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.
- 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).