LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Interface for Arduino using Xbee Module

Wen you upload a sketch to the Arduno Board the switch must be in the Dline position.

When using Xbee to send data between your computer and the Arduino Board the switch must be in the UART position.

What position is the switch in when you say "just the xbee communication is not working."

hfrh1818

0 Kudos
Message 61 of 98
(1,827 Views)

i have tried both Dline and UART positions when trying to communicate wirelessly in labview and neither work.  if i plug the arduino into the computer with the shield on and try to connect via usb when the UART is on it does not connect, and when the Dline is on it does, so it seems like what you said is correct and works.  So now i just need to get the wireless part right.  when i try wireless i get 5002 error. 

As i mentioned before and attached the picture, i can communicate to the xbee sitting on the arduino when its not plugged in however i noticed that the "packets" all are lost.  so it looks like it connects with the card but doesnt exchange any data between the two.  Maybe that is the problem.  they connect to each other but then labview tries to int. theres no data being transmitted.

Any ideas on how to start troubleshooting to narrow down whats not working right.  Im sure its just a setting but theres so many i have not idea where to start.

0 Kudos
Message 62 of 98
(1,827 Views)

What COM Port is the Arduino IDE using when  a USB cable is used to connect your Arduino board to your PC?

What COM Port is the Xbee Explorer using?  

Please perform the following test.

1. Connect the Arduino board to your PC using a USB cable.

2. On the Xbee Shield set the DPDT switch to the Dline position.

3. Compile and upload the AnalogReadSerial example to your Arduino Board. The example is found in the Examples > Basics folder.

4. On the Xbee Shield set the DPDT switch to the UART position. .

5  Use the IDE Serial monitor to see if the Arduino board is sending or is not  sending data to the Serial Monitor.

6. Does the Arduino serial monitor show a steady stream of 3 digit numbers being printed on the screen?

hrh1818

0 Kudos
Message 63 of 98
(1,827 Views)

Ok i did the test to see if the arduino using the serial monitor.  Yes it prints a set of 3 digit numbers.  a lot of them and continues to print them.  I loaded the analogread just like you said and had the shield on the Dline switch and it looks like that works. 

My arduino is com4 when connected and the Xbee Explorerr the one that isnt on the shield is com6 when plugged in via USB

What should i do next?

0 Kudos
Message 64 of 98
(1,827 Views)

Capture (800x569).jpg

0 Kudos
Message 65 of 98
(1,827 Views)

Good to read you have the Xbees working with the Arduino IDE. 

You need to know what COM port the SBee Explorer is connected to as the next step is manual setting the COM port in the LIFA VI you are using as per the following instructions.

Re: LabVIEW Interface for Arduino using Xbee Module     

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

Re: LabVIEW Interface for Arduino using Xbee Module     

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

Don 't forget you need to reinstall LIFA.

hrh1818

0 Kudos
Message 66 of 98
(1,827 Views)

I have the com port set in the INT.VI set manually i dont let it try to find it.  Im pretty positive its the setting in the xbees themselves.  when i run the range test, they do not send packets back and forth to each other  I looked at the \post you attached in the other link and if you look at what the guy posted in the pics he attached this:(ill reattach his picture). 

When i run this same test in the X-CTU mine does not do that.

0 Kudos
Message 67 of 98
(1,827 Views)

Capture.PNG

This is what the other guy posted

0 Kudos
Message 68 of 98
(1,827 Views)

Capture.PNG

this is what mine do

0 Kudos
Message 69 of 98
(1,827 Views)

Dir you change the DPDT switch to the UART position when you ran the range test?

hrh1818

0 Kudos
Message 70 of 98
(1,827 Views)