From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

PlayStation 3/DualShock 3 Controller in LabVIEW Using 3rd Party Drivers

Code and Documents

Attachment

Overview:

Untitled.png

Using 3rd Party "MotionInJoy" drivers to use a DualShock 3 controller in LabVIEW.


Description:

This example shows how any user with Windows and LabVIEW can use a DualShock 3 controller in their applications by using three LabVIEW items:

  1. A Type-Def Control which contains all the information about the controller.
  2. A subVI to detect the MotionInJoy controlled DualShock 3 device.
  3. A subVI to read the information from the controller.

Prerequisite Setup

  1. Download and install the MotioninJoy Gamepad tool (The application to run in the future is called DS3 Tool.exe)  attached.
  2. Run the application if has not opened automatically.
  3. Connect the PS3 controller by USB and wait for Windows to install the default drivers.
  4. Go to Driver Manager, and click "Load Driver" when selecting the apropriate MotioninJoy compatible controller.
  5. Go to Profiles and select the Dualshock 3 controller (you may need to disconnect and recconect the USB controller.)
  6. Check Playstation 3 under "Select One Mode" and then click options to edit the controls.
  7. Edit the controls to match these LabVIEW compatible controls and then click save changes:

Untitled2.png

The controller should now be configured.

Steps on How to Use the Code:

  1. Extract the appropriate zip file below and open PS3 Control.lvproj in LabVIEW.
  2. Open "main.vi" from within the project.
  3. Run the code
  4. You can use the SubVIs included in the project to make you own applications with a controller.

Note: MotioninJoy Gamepad tool is a 3rd Party Tool is a free to use tool but contains ads. I cannot offer any support for dealing with issues in this program.

Regards,

Ben Clark

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
gmacca01
Member
Member
on

Hello,

Thanks you for this VI and library, it works great. One question though. How can I keep the driver active and upon restart of the computer. It seems I have to go through the DS3 Tool.exe every timje I restart the computer, and require internet access to setup? Any suggestions or advisement would be great.

Thanks!

-Gmac

confusedbme
Member
Member
on

Will this work with other controllers like a steel series controller? similar to the ps3 controller.

Contributors