LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Joystick

Hi,
     May i know how to use the values i get from my USB joystick and give out  data(5v) to control the USB NI- 6009 .. Like controlling a robot wirelessly.. When i move the joystick to the left, data can be send into the NI-6009 and hence control the motor...
 
 
0 Kudos
Message 1 of 8
(4,052 Views)
Have you tried the Acquire Input Data function? You can select the type to be joystick. look on the Connectivity>Input Device Control palette. the outputs of the function include button info, direction info, and axis info.
0 Kudos
Message 2 of 8
(4,026 Views)

Yes the acquire input function is most likly the way to go.  I have done several apps where the joystick controls motors using a MS sidewinder via USB and the acquire input functions.  What joystick/controller are you using

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 8
(4,017 Views)
I'm using the Logic3 STAR FIGHTER joystick.. How am i able to link TCP/IP with joystick? cause i need to send the joystick data to another computer..
0 Kudos
Message 4 of 8
(4,000 Views)

See the examples of tcp/ip in the example finder.  Esentially, you need to call acquire input for your joystick, flatten this to some string format the client program can understand and do this in a timmed loop, outside the loop open connection with client tcpip and initialize input. after the loop is done (terminating joystick control is ever), close the port and input conection.

Paul 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 8
(3,983 Views)

Hi,

     I tried using the acquire input form the joystick already.. This is what my vi looks lik now.. below... but somehow i was unable to get the signal i wanted when the click the buttons on my joystick, or is it that i can only view my results on the client?

0 Kudos
Message 6 of 8
(3,956 Views)
Hi Sena Scott,
 
Any data that you send to the client you should also be able to see on the server.  Are you getting any errors?  I would recommend troubleshooting the server VI before you move on to test the data transfer between the two machines.  How are you determing whether or not you get the signal that you want?
0 Kudos
Message 7 of 8
(3,926 Views)
You also need to know that the way you are passing data to the tcp write is not correct. You have an inner while loop and until it stops, no data while be passed out of the while loop. You would want to put the tcp write inside the while loop and to avoid continuous writes, you would want to d a write only when the data changes.
0 Kudos
Message 8 of 8
(3,922 Views)