LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Interface for Arduino using Xbee Module

Hi,

I'm currently trying to figure out how to use Xbee for wireless comm. between Arduino & LabVIEW. Right now, I configured the baud rates the same for LabVIEW and both Xbee modules. I set the COM port in the VI, and it says can not find Arduino. Any tips in setting this up would be helpful.

Thanks,

Logan

0 Kudos
Message 1 of 98
(52,039 Views)

Logan,

There are three places where the baud rate must be set: 1.) in the VI, 2.) in the Xbee module (using X-CTU program), and 3.) the LabVIEWInterface.h file?

Did you modify this line in the .h file?

#define DEFAULTBAUDRATE 9600 // Defines The Default Serial Baud Rate (This must match the baud rate specified in LabVIEW)

0 Kudos
Message 2 of 98
(9,275 Views)

After changing the .h file and reloading the sketch to the Arduino, everything worked!!

Thanks for the help,

Logan

Message 3 of 98
(9,275 Views)

Hi, I'm studying engineering in electronics, the problem is as you had in the beginning, I configured the baud rates and the Same for Both Xbee modules LabVIEW also the Arduino LabVIEWInterface.h file as logan said, although I have no success with the connection, you could show the code as you did, and how to configure x-ctu?, or any link? I would greatly appreciate it

0 Kudos
Message 4 of 98
(9,275 Views)

Start with a low baud rate; 9600 for example.  I was usally not able to get a good connection with a buad rate over 48,000 with the xbee.  Also keep in mind that by default the xbees are in broad cast / listen to all mode, which means every Xbee in range gets every packet from every other xbee within range.  If you have more than 2 talking to one another LIFA will die.  The solution is to edit the xbee firmware to only listen to one address so the PC Xbee and Arduino Xbee will only hear one another.

-Sam K

LIFA Developer

Message 5 of 98
(9,275 Views)

thanks for your answer Sammy_K

I did what you said, xbee modules only listen to each other, but the arduino still not responding, when I test the initialization of the Arduino with labview works, but when I run the entire program labview tells me "ERROR 5005 Unable to find occurs at arduino "I upload pictures of connection and a small code is my first time working with these devices, if I'm wrong I appreciate it that you corrected thanks for any help

Message 6 of 98
(9,275 Views)

Looking at your code, you do not have a constant set for the COM port in the  INIT VI on the Arduino. I know you can double click the block and set it. The INIT VI will show working, but not the entire VI if you don't have the constant. You need the constant there on the block diagram. Please see photo.

labview screen.jpg

Message 7 of 98
(9,275 Views)

All,

Dazgamer12 is correct.  You cannot us the 'Auto Connect' feature of the Init.vi when using a wirless connection.  The Auto connect feature works by searching for virtual com ports with the name Arduino (which the Uno and Mega 2560, the only officially supported boards, will have).  When using Xbee the USB to Xbee dongle will only show up as COMx so the auto connect will not find it. 

Try setting the COM Port manually as described above and I think you should be set.  If not let us know.

-Sam K

LIFA Developer

Message 8 of 98
(9,275 Views)

thanks dazgamer12 everything is working very well

Message 9 of 98
(9,275 Views)

Hey guys, does anybody have tried LIFA with wireless module APC220-43? My program only works through cable. I've set the baud rate in all 3 places properly but still can't get it to work.

0 Kudos
Message 10 of 98
(9,275 Views)