09-02-2022 07:15 AM
Hi!
I have tried to use both an XBOX and a PS4 controller with LabVIEW on Windows 10 but have not been able to make it work.
I use LabVIEW 2020 SP1 f1 64bit on Windows 10 and have downloaded the MakerHub interface XBOX One and PS4 Controller packages with the VI Package Manager.
The controllers have been connected wirelessly or with USB cable and Windows can connect to the controllers and are visible under Bluetooth and other devices.
My problem is that no controller is found when running an example and I am not sure what the problem is. Are these packages too old and they have stopped working? Is there something missing so I have to install something more? Or should I use some other solution?
Anyone who can help me to get this to work?
Solved! Go to Solution.
09-02-2022 07:36 AM - edited 09-02-2022 07:39 AM
Hey LabEye,
why to use XBOX or PS4 if SNES is the only controller that you need? Jkidding
There are several ways to get data from USB or Wireless controllers. I'll point the one i use when i need a fast data acquisition.(by fast i mean testing and prototyping)
First, if you use hidHide for whatever reason, make them visible.
Then, on LabVIEW, under the connectivity pallete, there is the Joystick pallete.
all you have to do is, initialize the controller (you may check ID on the windows controller configuration 0 is the first on list, 1 is the second, so on...)
inside a loop you use the acquire input data.vi to get status from direction, axis and buttons.
outside the loop you use clos input device.vi to release serial communication so that you may play your games.
here is a picture (can't attach VI right now, sorry for that)
09-05-2022 03:59 AM
Hi Jorge,
Thank you for your help!
I have tried what you suggested below but for some reason LabVIEW does not seem to find my game controller(s).
The controller(s) is/are visible in Windows like you showed in your image and I can also test their functionality there. Using DS4Windows does not change anything (and I am not using hidHide).
Using the "Query Input Devices.vi" I can see my keyboard under "key info" and mouse under "mouse info" but under "joystick info" I get 7 devices and none of them is my game controller.
I am not sure what I can try next.
Best Regards,
Richard
09-05-2022 06:15 AM
Hey LabEye, since it is not a Hobbyist Toolkit Issue anymore, i would move this topic to LabVIEW section to get more visibility.
next, i would try:
- Installing LabVIEW 32bits
- Ensure Launching LabVIEW with administrator privileges
Is your LabVIEW isntalled in the same drive as your OS? Like c:/ ?
There are some more experienced guys in LabVIEW around this forum that may also contribute...
09-05-2022 06:39 AM
Hi Jorge,
Launching LabVIEW with administrator privileges solved the problem 🙂
Thanks,
Richard
09-05-2022 06:43 AM
yoooo nice!
Hey, just as curiosity, would you like to share what are you doing? just for fun?