Incorporate Xbee in Arduino and LabView

Hello I am new to Xbee and I have trouble making my two Xbees communicate. I am working on a project where the arduino can send data wirelessly to the pc. I have already successfully made them communicate in XCTU. I am using series 1 for both Xbees, arduino uno, Xbee shield and the XBee Explorer Dongle.

I would like to know whether is there anything that i have to add to my LabView and the additional arduino codes too. Below I will provide you with the codes, a image of my LabView and the things I am using for this project. Thank you much help needed.

https://www.sparkfun.com/products/8666

Above are the Xbees that I am using.
Below is the Xbee shield and explorer.

AHRS_v4_arduino.ino (5.44 KB)

I don't have any experience in LabView, but I can't help but notice that your baud is 115200.

That's pretty high for XBee comms. I've tried 115200 with mine and they don't like it. Resetting them to 9600 baud fixed the problem. This might be the problem for you, too.

Even if I change the baud rate, I don't think anything will change

Use a terminal emulator program to see if any data is being received by the USB serial port.
If you see nothing use an oscilloscope to look for data at the Rx pin on the XBee Explorer.

Have you configured the half dozen or so critical settings on both XBees or are they still at their default factory settings?

Yes i have already configured both the Xbees using XCTU. The problem now is I don't know how to make one of the Xbee communicate wirelessly with the other Xbee that is connected to the pc. And im having difficulties with the LabView too.

Elizabethykl:
Even if I change the baud rate, I don't think anything will change

Did you even try???

Yes I tried(: Nothing changed. I want to send data from the arduino with one Xbee to the pc without using any usb connection. But LabView needs to first read Xbee. If I connect using the usb, the LabView input is to the particular com port. I don't know how to make it wireless.

Elizabethykl:
Yes I tried(: Nothing changed. I want to send data from the arduino with one Xbee to the pc without using any usb connection. But LabView needs to first read Xbee. If I connect using the usb, the LabView input is to the particular com port. I don't know how to make it wireless.

Hmmm

Like I said, I can't help with the LabView, but you should first to test the XBees themselves without LabView. You can do this by hooking one XBee up to the Arduino with the shield and the other to your computer using XCTU. From the XCTU you should be able to send and receive data from the Arduino without having to mess with LabView.

Yes i have already configured both the Xbees using XCTU.

But you are not going to tell us how you configured them. Well, be that way. As long as you don't intend to ask us why the don't communicate.

Why are you using two different kinds of antennas? Communication between the XBees is bidirectional. Having one XBee with a better antenna isn't much help to the one with the weaker antenna.

Miles of code is useless when the XBees apparently are not even talking to each other. Ditch 95% of that code until one Arduino with XBee can send "Hey, there, babe" to the other. Then, make the other Arduino/XBee reply "Get lost". Only after that happens, does it make sense to replace the lame chit-chat with real data.

And, LabView will NOT be part of the overall process until the simple stuff works.

PaulS:
But you are not going to tell us how you configured them. Well, be that way. As long as you don't intend to ask us why the don't communicate.

Miles of code is useless when the XBees apparently are not even talking to each other. Ditch 95% of that code until one Arduino with XBee can send "Hey, there, babe" to the other. Then, make the other Arduino/XBee reply "Get lost". Only after that happens, does it make sense to replace the lame chit-chat with real data.

And, LabView will NOT be part of the overall process until the simple stuff works.

^ Very, very good debugging advice.

PaulS:
Why are you using two different kinds of antennas? Communication between the XBees is bidirectional. Having one XBee with a better antenna isn't much help to the one with the weaker antenna.

Meh, only if distance between them is bigger than the max range of the weak XBee (probably not the case here?)

PaulS:
But you are not going to tell us how you configured them. Well, be that way. As long as you don't intend to ask us why the don't communicate.

Why are you using two different kinds of antennas? Communication between the XBees is bidirectional. Having one XBee with a better antenna isn't much help to the one with the weaker antenna.

Miles of code is useless when the XBees apparently are not even talking to each other. Ditch 95% of that code until one Arduino with XBee can send "Hey, there, babe" to the other. Then, make the other Arduino/XBee reply "Get lost". Only after that happens, does it make sense to replace the lame chit-chat with real data.

And, LabView will NOT be part of the overall process until the simple stuff works.

Both of the Xbees that I'm using are series 1 so there wasn't much configuration to do. I'm using two different kinds of antennas cause I have no choice... It's a project. I just make do with what I have.

Okay, so would it be nice of you if you could help me? I'm lost. I don't even know where to start from... So how do I even start off? If you don't want to help me then it's okay...

I'll try to help with getting one XBee to talk to another, but after that, you'll need to use a LabView forum to get that program debugged.

Follow these steps in order:

  • plug each XBee into your PC one at a time and reset the configuration parameters the the factory defaults with XCTU

  • plug one XBee into your PC and connect it to XCTU

  • plug the other into your shield (and plug the shield into your Arduino)

  • write a very simple program that uses softserial to read and send data via the XBees. Have the Arduino send a byte, maybe "+" or something and see if you can see it in XCTU.

  • upload the code

  • verify on your shield that the serial port jumper is in the position selecting the XBee to talk on the softserial pins and not the hardware TX/RX pins. Look at your shield user manual for a better explanation.

  • test it out by trying to get the XBees to send and receive from each other. On the Arduino side you can use the serial monitor to send/receive data. On the PC side you can use the XCTU feature for testing XBee connectivity (I think you've already used this).

Let us now if you can't get it working.