LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does Labview crash when I try to use a joystick?

Solved!
Go to solution

I am trying to read a USB Logic3 game pad joystick in Labview.

 

Whenever I try to run any of the VI's in 'Functions/Connectivity/Input device' (ie get access to HID like keyboard/joystick/mouse via direct x) then Labview either crashes or I get the error message:

 

   -2000000008

   ERR_INVALIDDEVICEINDEX
   Please check to see if the device is attached correctly. Please make sure the deviceIndex you passed in to initDevice.vi is correct.

 

I have a new windows 7 (64-bit) PC with direct x 11 running Labview 2009 and until recently I was running Labview 8.6 on my old windows xp 32-bit pc and these VI's worked fine.

 

I know that direct x 11 can see the joystick connected as I have checked via command run 'dxdiag'

 

Please help - Thanks

0 Kudos
Message 1 of 8
(3,658 Views)

Also,  It's not just the Joystick, but any of the input device control vi's.  I have tryed to run the 'Keyboard Puzzle Game.vi' in the examples that uses the input device control vi's and the same thing happens.  This example used to work on my old 32-bit win xp pc with Labview 8.6 but not now with windows-7 64-bit with Labview 2009.  What do I need to do?

0 Kudos
Message 2 of 8
(3,635 Views)

Sounds like a problem with 64 Bit. Either you run LabVIEW 64 Bit and the Direct Input interface lvinput.dll in LabVIEW hasn't been properly ported to 64 Bit, or more likely you run LabVIEW 32 bit and there is a problem to access the 32 bit version of the DirectX interface on your machine. Your dxdiag is most likely a 64 bit version using the 64 Bit DirectX interface.

Rolf Kalbermatter
My Blog
Message 3 of 8
(3,619 Views)

Thank you Ralphk, this sounds plausable. It's Labview 32-bit on a 64-bit PC.  Is there anything I can do to get Labview 32-bit to access the 64-bit DirectX?  Has anyone else seen this problem? Unfortunatly, upgrading to 64-bit Labview is out of the question as there isn't the budget for this right now.

0 Kudos
Message 4 of 8
(3,616 Views)
Solution
Accepted by topic author Ed1974

You cannot access a 64-bit DLL from a 32-bit process, and vice-versa. Actually, in the other direction it's possible via a work-around that involves inter-process communication, but that's an advanced topic.

 

Be aware that you can install LabVIEW 64-bit for your specific version of LabVIEW. The license entitles you to run either the 32-bit or the 64-bit. LabVIEW 2009 64-bit was not included on the DVDs, but you can download it from the NI site.

Message 5 of 8
(3,606 Views)

Thank you!  I didn't know I could download the 64 bit version under my licence.  Cheers!

0 Kudos
Message 6 of 8
(3,602 Views)

have you by any chance found the solution to this problem? did installing the 64-bit version fix it because i am having the same problem and i just installed the 64 bit version and the problem is still there. i cannot find my joystick in labview when i use the query devices vi.

0 Kudos
Message 7 of 8
(3,532 Views)

Yes downloading the 64bit version fixed this problem for me.  Goodluck!

0 Kudos
Message 8 of 8
(3,528 Views)