LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Joystick Device Stops Updating when alt-tabbing or changing to another app.

Hi

 

I am having a weird problem where the Joystick Input stops updating its values and actually zeroes them whenever I change app, eg. when I select my Web Browser. Surely I can just be carefull and keep the Labview app selected, but I'd prefer if a more robust solution is available as if for any reason my joystick would stop working, could mean serious harm.

 

I attach a test code with which I can replicate it perfectly fine with my Xbox Controller. Just alt-tab (change app) with anything (even the Block Diagram), have both of them displaying on screen and you should see how the variables stop updating and become zero. Something like this picture.

oscarjgv24_0-1651417283114.png

 

Not sure why this is happening or how to solve it. Can anyone replicate this?

 

Thanks in advance!

 

Regards,

Oscar

0 Kudos
Message 1 of 2
(780 Views)

It's designed behavior. The joystick is an input device just like the keyboard and mouse and the OS will only direct the according messages to whatever application has the keyfocus.

 

Capturing joystick input as it is entering the system rather than when it is directed to an application by the OS is a little more tricky and requires system filter callback functions being installed. Nothing you can do with LabVIEW only, but it requires a DLL programmed in C(++). Or maybe a .Net assembly.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(768 Views)