LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Joystick on USB input

Doess anyone have any experience working with joystick inputs from a USB
device. I so, how did you implement that? I have thought about trying to use
DirextX8 with directinput.

Thanks
0 Kudos
Message 1 of 4
(3,332 Views)
The activeX interface for DirectInput (DirectX) will not work. (LV 6.02 and 6.1) This is apparently because DInput dynamically creates ActiveX objects on the fly and LV wants the object at the start. Some of the directInput methods work and some don't, which make it more confusing...

You can install DirectX and then access the USB joystick via the standard joystick routines available on this site. If you need more than the two traditional joysticks (I needed 4) you can edit the vi for additional joysticks sequential to the first two and this works also. What you get is the traditional 2-axis and button data, but none of the fancy (Z-axis, feedback, etc.) capabilities of USB and directInput.

You can search this forum for DirectX, joystick and USB for more d
etailed info. There is also a German company that has DirectX LV add-on libraries that I identified in an earlier post.

Good Luck!
0 Kudos
Message 2 of 4
(3,332 Views)
With LabVIEW 7.0, there are actually new joystick VIs. They allow you to get input from the joystick but you have to have DirectX 8.0 installed on your computer. It then uses the device index of your joystick to initialize the joystick and then acquire and send data to and from the device.
J.R. Allen
0 Kudos
Message 3 of 4
(3,332 Views)
I know that with DirectX8 you have to enumerate the devices which brings up
the problem that Spaz brought up about having a reference in labview. I
would think that if LV7.0 supports this DirectInput that LV6.0 would also
since they are still directx.

I haven't found any of the resources that Spaz wrote about in this
newsgroup. I am still on the learning curve with labview.

"JRA" wrote in message
news:506500000005000000FA060100-1042324653000@exchange.ni.com...
> With LabVIEW 7.0, there are actually new joystick VIs. They allow you
> to get input from the joystick but you have to have DirectX 8.0
> installed on your computer. It then uses the device index of your
> joystick to initialize the joystick and then acquire and send data to
>
and from the device.
0 Kudos
Message 4 of 4
(3,332 Views)