Example Code

Xbee 802.15.4 RF Modules and LabVIEW commands

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Sends serial commands to a Digi Xbee Pro RF module.

 

Description

Use the attached VIs to communicate serially with your Xbee device. The serial command has the format "ATCOMMAND*", where COMMAND can be found in the device's product manual.

 

Requirements 
1. LabVIEW 2012 (or compatible).
2. Digi product that uses the AT command structure.

 

Steps to Implement or Execute Code
1. To send a command to your Xbee module, use the VIs in this order:
2. Enter-AT-Cmd-Mode.vi to enter AT command mode
3. AT_SetCmd.vi to send the command
4. AT_GetCmd.vi. to receive the information requested

 

Additional Information or References

Xbee example.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Double_Dee
Member
Member
on

Can you show a wiring sample of these?... I want to send Values from my joystick through my  Xbee Pro S2B

This is my post... http://forums.ni.com/t5/LabVIEW/Send-Joystick-Values-through-Xbee-PRO-S2B-USB/td-p/2262742

Thanks in Advance

bobWalt
Member
Member
on

Yeah can i see the pinout for this?

Leez
Member
Member
on

I don't understand how it works.

If I want to read a digital input D0... is it right if the strings are "3" in  Set_ATCmd and

string "D0" in  Get_ATCmd???

Set_ATCmd: 3     (set to 3 if it corresponds to a digital input)

Get_ATCmd: D0   (AT Command for PIN0)

bgiesbrecht
Member
Member
on

Do you have a VI for API mode?