LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Joystick Initialization

Is there a way to plug in a USB joystick while a VI is open or running and have it be recognized, without restarting Labview?
0 Kudos
Message 1 of 4
(3,170 Views)

Hi Gabe,

Thanks for contacting National Instruments.  I have been looking over your question and I have some information for you.  The only way that you would be able to have LabVIEW recognize the USB joystick while a VI is running is to ensure that the code has not reached any portion that involves using the joystick before you actually plug the device in.  This could be done by possibly putting the program into some kind of an idle state so that it waits for you to plug the joystick in and then you have to make sure that the device reference in your program is the correct one that is for the actual joystick once it is plugged in.  I am also attaching a link that goes through some of the basics of using a joystick inside of LabVIEW just in case you need some more help getting started with using it.  If you have any more questions about this, please reply back and we can go from there. Thanks!

http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE?OpenDocument

Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(3,134 Views)
Thanks for the advice, but I'm using the standard VI's to initialize and access the joysticks.  The only problem is that the only joysticks I can use are those that were plugged in before Labview started--not before the first run of the VI.  If a joystick is disconnected and reconnected once labview.exe is running, then there is no way to initialize the joystick or acquire data from the joystick, even if the related VI is not running yet...
0 Kudos
Message 3 of 4
(3,120 Views)

Hi Gabe,

Usually we do recommend that whatever device you are using actually be plugged into the PC before attempting to run your application.  This way, the proper configuration and device reference will be present, but if you are unable to plug the joystick in before the VI actually calls a reference to the device, then there isn't a way that you would be able to have LabVIEW recognize the device.  I hope that some of this helps and good luck with your application!

Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(3,115 Views)