LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send Joystick Values through Xbee PRO S2B - USB

This is a link i found in Google to interface Xbee PRO S2B with Labview https://decibel.ni.com/content/docs/DOC-3023 .. But im confused .... How to interface my Joystick VI with this Setup to send the commands to other Xbee connected? .. Anyone here, kindly help me in wiring these VIs together so my Joystick Vi could send the commands through Xbee connected through USB
Help needed..

0 Kudos
Message 1 of 8
(5,512 Views)

Your joy stick connect directly throw USB to labview why xbee

0 Kudos
Message 2 of 8
(4,946 Views)

hello there , did you find your solution for joystick command with xbee ? i am doing this project and need your help . reply please

0 Kudos
Message 3 of 8
(4,189 Views)

I'm not certain of the Protocol that LabVIEW uses to recognize USB Joysticks, but it seems to work pretty well.  If you plug a Joystick into a USB Port that LabVIEW can "see", it can detect the Joystick and read its values.

 

I presume that you want to impose an XBee in the path so that the XBee transmitter and receiver are "between" the Joystick and your PC's USB port.  If the XBee simply acts as a "transmission medium" and sends the bits and bytes unaltered from the Joystick to your PC's USB Port (so that the Joystick-XBee-XBee "looks like" a Joystick), the LabVIEW Joystick functions should just work.  If it doesn't, I suspect you are out of luck (unless you are very good at very low-level programming).

 

Bob Schor

0 Kudos
Message 4 of 8
(4,184 Views)

thankyou for reply

here is the sequence of what i want to do

JOYSTICK ----LABVIEW----XBEE (1)     ------------------------------->>   Xbee------>> motors control . 

 ( WHAT EVER KEY IS pressed on joystick it should be transmitted by xbee using labview  to another xbee ) . 

0 Kudos
Message 5 of 8
(4,165 Views)

Oh, that should be simple.  LabVIEW has functions (and probably examples) to handle reading information from the Joystick, giving you multiple axes (numeric values) and buttons (boolean values).  Now you need to think about how to package this data and transmit it using the XBee's -- packaging the data and "inventing" a protocol for XBee transmission is another LabVIEW Task, but handling the XBees is s non-LabVIEW question.

 

Have you tried a simple program that ignores the XBees and deals with the Joystick and LabVIEW?  Something like a routine that shows the X, Y, and Z axes, the velocity and other controls, and the state of all of the pushbuttons.  Work on the development of this, and if you need help, be sure to post your VIs (by attaching them, or a Zip file that contains all of them) so we can see what you are trying.

 

Bob Schor

0 Kudos
Message 6 of 8
(4,154 Views)

thankyou for your input.

i will start with your second question first, i have implemented joystick interface in labview, which ever key i will press on jotstick (in my case gaming pad)

that will be shown in labview (GUI). that was a simple one. it control x and y axis movement and all four buttons on right pad and four bottons on top. i have added the VI also.

 

Now your first and important question.......what u suyougest me to think over is actully what i need help in. i want to monitor my xbee through  labview.

0 Kudos
Message 7 of 8
(4,143 Views)

So I don't pretend to know anything about XBees, but there seem to be Tutorials on the Web under the topic "XBee Communication".  It looks like the XBee is controlled from an Arduino (though perhaps once set up, it can run "autonomously").

 

Let's assume that (using Arduino or other means) you have a pair of XBees configured so that what you send to one via a VISA Write to a USB port (with LabVIEW) arrives at the other end (talking, I presume, to an Arduino).  Your routine that reads the Joystick currently returns 2 I32 values (I would recommend keeping them as integers, as it is an "exact" representation and independent of Sgl/Dbl representations) and 8 Booleans (which can be transformed into a third I32 using Boolean Array to Number).  So your problem is now reduced to "Send three I32 numbers over USB to the XBee "Tranmitter".  This should be fairly simple VISA code -- there are (I'm sure) Examples included in LabVIEW's "Find Examples" entry on the Help page.

 

Bob Schor

0 Kudos
Message 8 of 8
(4,125 Views)