LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5002 - Connecting LabView with Arduino Uno R3

Hello,

I have to program a Arduino Uno (Funduino Uno R3) using LabView and appareltnly have trouble with connecting Arduino with LabView.

I already installed the driver for Arduino (located at Port 3), installed the Arduino Toolkit for LabView and loaded LIFA_Base. However, I changed the Baudrate from 115200 to 9600 as it is the standard value shown in the device manager in Windows. (Using 115200 did not solve the problem below).

 

In order to check whether there is a connection between LabView and Arduino, I tried to write a program flashing the LED on Port 13 following: (German, I also attached my .vi)

 

https://forums.ni.com/t5/LabVIEW-Interface-for-Arduino/Arduino-Example-LabVIEW-communication-German/...

 

However, when I try to run the program in LabVieW, the LED on port 13 does not work. After starting LabView the LED on position 2 in the image (https://abload.de/thumb/sku146982anlfls.jpg) flashes for ~ 10 s and then I get Error 5002. I also get Error 5002 when I press the stop button. I read that this Error 5002 is originating from the Arduino and LabView not being properly connected. That is why I think, my problem is mainly that the connection is not working properly or the value for Baudrate is wrong (In addition to an overseen mistake in my code)?

As a possible solution, I then used NI-VISA driver wizard to install the Arduino driver, but got following error message:

 

Here, it says that Re-Installing of NI-Visa might help?

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P87BSAS

 

However, before trying out too much, I wanted to post my problem it here, and before starting to write my "real" program, I wanted to ensure that I established a connection between LabView and Arduino.

 

Thanks in advance,

pchw

 

 

0 Kudos
Message 1 of 5
(5,018 Views)

Hello,

 

Firstly you need to add set digital pin mode before write digital pin mode.

 

Secondly use arduino 1.0.5-r2 for upload lifa base to your arduino. I had same problems too and old version of ide worked. Dont forget to set your baudrate same as your arduino's baudrate.

 

Have a good day.

0 Kudos
Message 2 of 5
(4,685 Views)

Hi,

I have SOLVED this bug... thanks at this post... I had the same problem with Arduino Uno and Arduino Mega Boards (LabView error 5002 and 5003 on pinMode sub-VI). In particular, only RX LED on board blink, but TX LED is off, in all iterations of the main VI. This because compiled LIFABase on Arduino MCU doesn't reply at the request... Oddly, recompiled LIFABase with an old, for example, IDE 1.0.5.r2, the serial communication is restored.

I attach the correct LIFABase hex files for Arduino Uno (upload this files on Arduino Uno, for example, with USBtinyISP programmer without recompiled all with old IDE).

I image that this bug is caused by an incompatibility of Serial class with the old project LIFABase... If somebody expert can give me a tip, I will be very happy... I will soon migrate to the new LINX project... thanks at all.

AS

 

0 Kudos
Message 3 of 5
(4,645 Views)

I am using LabVIEW 2018, I installed all packages for Arduino but after running the VI it shows Arduino is not connected with an error code 5002, please help me to solve the problem

0 Kudos
Message 4 of 5
(4,576 Views)

Hello 

Please can you assist me with  LabView design for temperature controller which can interface with Arduino Uno R3

Thanks 

0 Kudos
Message 5 of 5
(1,960 Views)