From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview and Arduino mega communication

Hello! I had a small problem when it came to communicating labview with arduino mega.

The problem is that the labview only recognizes a port (COM18, view image Puerto). The same port with which I am connecting with the Arduino.

 

Arduino sends data correctly through the arduino's own software. But at the time of sending that data to the labview does not send them because the labview only recognizes a port (the same one that is connected the arduino)

 

The labview program works fine, it has been tested by sending proteus data (using a virtual port). I work properly.

 

The problem I got was trying in real life with a mega arduino. (Attached image of the program)

 

(translate by translate.google)

Download All
0 Kudos
Message 1 of 3
(2,871 Views)

Hello Carlos

 

LabVIEW is only going to recognize ports that are showed as connected. So having only COM18 showing it is actually an expected behavior. 

 

You can try using the VISA interactive control and "ping" the device to confirm it is actually working fine. I assume you are serial printing in the arduino ADE correctly to be able to send data via serial. 

 

As well, I suggest checking the Continuous Serial write and Read example in LabVIEW to verify you are configuring it correctly.

 

Diego H

National Instruments

0 Kudos
Message 2 of 3
(2,751 Views)

First off always attach code, even if you think its unimportant.

 

Youre loop does not stop on an error and if the arduino IDE is connected to the arduino while you try to connect laview to the same port you will get an error.  Have you performed highlighted execution to check if the COM port connects from to the arduino properly?

 

Also, are you using a termination character to send and recieve commands with the arduino?

 

Attached is an example to improve your serial comsmunication and properly use the bytes at port.



-Matt
0 Kudos
Message 3 of 3
(2,736 Views)