Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing sbRIO to Xbee

Solved!
Go to solution

I'm currently trying to do a project which invovles sbRIO 9642. Is it possible to connect a sbRIO 9642 to a arduino xbee attached with xbee antenna.

Later the data will be transmitted to another xbee antenna linked to a servo controller. This servo controller will control multiple servos based on input from the sbRIO via Labview.

 

Possible?

0 Kudos
Message 1 of 6
(7,333 Views)

Hi augustg,

 

The sbRIO 9642 actually has an RS232 serial port for communicating with peripherals. There's no reason why you couldn't connect use the Data in (Rx) and Data out (Tx) pins on this port on the sbRIO, and connect it to the serial port on your Arduino or XBee.

 

You should then be able to send out simple data with a LabVIEW VI (make sure that you disable handshaking, since you will only be using Tx and Rx). Also make sure that the Baud rate and other communication parameters are the same on both the Arduino/XBee and the sbRIO.

 

Kind regards,

Josh E
Applications Engineer
National Instruments UK & Ireland
Message 2 of 6
(7,222 Views)

Is there a VI that can be used in this kind project? I am wondering if it is better to use the build in RS232 ports or just create a Tx and Rx in the DIO. 

0 Kudos
Message 3 of 6
(6,824 Views)
Solution
Accepted by LiliMcDonald

Hi MathDumlao,

 

Either is an acceptable method, and there may be some pre-existing FPGA code that can implement a simple serial port.

 

Generally, using the serial port on the Real-Time processor of the sbRIO will involve less low level bit manipulation, so should be the easiest method.

 

Of course, by doing the communication on the FPGA, the processor is free-ed up for other tasks.

 

Kind regards,

Josh E
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 6
(6,708 Views)

Its been a long time since this thread was solved, but, i am succesfuly sending and receiving data from a singleboard rio through an XBEE PRO 900 HP. Do not try to use the RS232 port on the SBRIO, i have a sbRIO 9636, the logical levels ar non compatible. 

 

Instead, try making a DO0 TX and DO1 RX. I found some example code of how to do it HERE: http://www.ni.com/example/27164/en/

 

Remember, this code is probably not adapted to the sbRIO you are using, so please spend some time doing setup and configuring the code for yor sbRIO. 

 

From the PC Side, use VISA to receive from your XBEE, and from the RT side, use the VIs attached on the link i provided, there are some subVIs tha read and write and another one that starts the FPGA. 

 

Remember, after configuring both your xbees for their Serial addresses to communicate with each other (SH and SL), set them both on TRANSPARENT MODE, otherwise they wont transmit


Just another LabVIEW guy
CLA I CTA I LabVIEW Champion
0 Kudos
Message 5 of 6
(4,620 Views)

Hi

i try to communicate xbee to sbrio and i did not read data from xbee.i connected on serial port and i configurated xbee but i try read data from xbee use sbrio 9636 and how i read data from xbee use sbrio pls help me?

0 Kudos
Message 6 of 6
(4,542 Views)