Cancel
Showing results for 
Search instead for 
Did you mean: 

[MCD] Xbox 360 Joystick/Game Pad Input AddOn & Example

Siemens Legend Siemens Legend
Siemens Legend

Hey Everyone,

I have created a simple Mechatronics Concept Designer addon that allows you to connect a Microsoft Xbox 360 Gamepad/Joystick to control basicly any MCD simulation in real time.

AcroRd32_2017-01-23_18-04-51.pngMCD - Xbox 360 Gamepad Example

What is required?

  1. An wired or wireless Xbox 360 controller 
    If you use an existing xbox 360 wireless controller (for the console not for windows) you will probably need the Microsoft Xbox 360 Wireless Receiver (USB) aswell.

  2. Installed original Microsoft Xbox 360 Driver for Windows (Windows 7 & Windows 10 should work) on your computer

  3. NX11.0 and / or Mechatronics Concept Designer 11.0 installed

  4. The Package in the attachment that includes the Runtime Behavior Code for the MCD Simulation as well as the libraries for SharpDX from Alexandre Mutel can also be downloaded from his website (http://sharpdx.org/)

Installation

copy this files:

SharpDX.dll
SharpDX.XInput.dll
SharpDX.xml
SharpDX.XInput.xml

into the following path:  "<Your NX11 Install Path>/nxbin/managed/" 

It should look like in the following picture:

vmware_2017-01-23_18-33-11.png/nxbin/managed/ path after SharpDX copy

After driver Installation & coping of the SharpDX files, start the example assembly (_NX11_ASM_MCD_VakuumGripper_GamepadControl_Sample.prt), connect your gamepad to you computer (make sure the upper left led in the center is glowing consistently and hit "Play" in MCD.

You can use the included "_NX11_MCD_Template_ControllerInput.prt" file in any MCD assembly to connect your MCD elements to the Gamepad inputs (digital & analog buttons) and outputs (motors for vibration).

 

Have Fun & Enjoy MCD!

 

Best Regards

Viktor Braun

 

Special Thanks to Alexandre Mutel for creating SharpDX!

2 REPLIES

Re: [MCD] Xbox 360 Joystick/Game Pad Input AddOn & Example

Experimenter
Experimenter

Hi Viktor,

 

I followed the instructions as shown in your example but am unable to have the controller connect.  The controller is seen and can be tested in Windows 10.  Do I need to register the provided dll's other than putting them in the NX directory?  I do not receive any errors from NX when playing it.

 

Thanks in advance,

Craig Stevens

Re: [MCD] Xbox 360 Joystick/Game Pad Input AddOn & Example

Siemens Legend Siemens Legend
Siemens Legend

Hi Craig,

 

have you tried to reinstall the Windows drivers for the gamepad?

For me it works on Windows 10 just fine.

Could you share the logfile after running the simulation with the gamepad input.

 

Best regards

Viktor