Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: Leed3 on May 03, 2009, 01:06:02 PM

Title: XBox360 Controller Plugin Update Available
Post by: Leed3 on May 03, 2009, 01:06:02 PM
Since the original topic was getting quite long, I added this one as a new topic.  A new version 2.2 of the plugin is available.  It includes the following:
1. Ability to disable diagonal movement of the axes when using the thumbstick.  I have found this to be needed for those times when I only want to move 1 axis and I accidentally move the thumbstick slightly diagonally.
2. Change to the RefAll Home option (button choice) to allow it to work with the Smooth Stepper.
3. Added support for HID 0x0291. This was added at the request of a user who wanted to use the rf module from a broken XBox360 as the wireless transmitter/Receiver.  Here is his solution (in Spanish):

http://www.elotrolado.net/hilo_tutorial-receptor-casero-wireles360-para-pc-ya-funciona_1022864

If you use the standard "360 wireless controller for Windows ", it comes with a wireless transmitter/receiver and Windows will use the HID of the Transmitter/Receiver rather than the HID of the Controller.  If you use some other wireless transmitter/receiver it may not have an HID.  Then Windows will see the Wireless Controller directly as though it were attached directly to the pc.  In this case, Windows will use the HID of the Wireless Controller rather than the Receiver/Transmitter.  So, if you make your own wireless transmitter/receiver as this person did, then this version should help you.

Thank you and enjoy,

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on May 04, 2009, 09:32:45 PM
I know it's too soon for another update, but.....  Someone expressed some concern about the fact that the wireless controller goes to sleep and then you have to restart Mach.  So.....

I have placed a test version of the plugin in the Yahoo Group Files section under VS2005 - VS2008 Lee's files named XBox360Controller.zip.  Would you please test it for me.  It should take care of the problem of the timeout on the controller causing it to stop working in Mach.  Now, when the controller is sleeping, you just wake it back up and it starts working again in Mach.  It works fine for me.  After you have tested it, if you find no problems, I'll have it posted to the Plugins page.

The file is a zip. So, just unzip the DLL and copy it to the /Plugins folder in /Mach.

Thanks
Lee

Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on May 06, 2009, 08:16:05 PM
Hi,

The latest version that allows for a wireless controller to go in and out of sleep mode without requiring a restart of Mach is now available on the Mach plugin page.

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: Chaoticone on May 06, 2009, 08:19:45 PM
Thanks Lee, I haven't had the time or need for it yet, but thank you all the same.

Brett
Title: Re: XBox360 Controller Plugin Update Available
Post by: mrmodfi on May 12, 2009, 11:12:38 AM
Lee,
     Great job with the x-box 360 controller. I have a shuttle pro on my cnc router that cost me around $100. I picked up a used 360 controller for under $20.00 and it works GREAT. So far I have only been able to use the inc. step with the X and Y axis. I would like to use the step feature with the Z axis. How do I set that up?
     Again, thank you for a great contribution to the comunity

Ken
Title: Re: XBox360 Controller Plugin Update Available
Post by: RICH on May 13, 2009, 01:52:29 PM
Lee,
Thanks for the upgrade. The ref all, disable diagonal movemet , and especially the time out fix are really
good upgrades and appreciated.
RICH
Title: Re: XBox360 Controller Plugin Update Available
Post by: budman68 on May 13, 2009, 02:41:00 PM
I actually built a "gamepad" into a console (not entirely finished but functioning) and I like the idea of the X Box and the plug-in rather than the KeyGrabber setup.

Can one of you tell me what the distance is center to center of the analog sticks is?

Also, for any of you who have taken one of these apart, are the analog sticks on their own circuit board like other gamepads?

Thanks for the help- :)
Dave
Title: Re: XBox360 Controller Plugin Update Available
Post by: RICH on May 13, 2009, 05:31:02 PM
Dave,
Is this what you wanted?
RICH
Title: Re: XBox360 Controller Plugin Update Available
Post by: budman68 on May 13, 2009, 05:33:14 PM
Sure is and unfortunately it won't work, thanks so much for the info, Rich-  :)

Thanks,
Dave
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on May 16, 2009, 12:30:47 AM
Hi Ken,

Thank you for the kind words.  Sorry for not responding sooner,. I have been away from my computer.

Here is how you set up the jog for the Z axis:

Let us say that you have X and Y set up on the left thumbstick and Z set up on the right thumbstick (side to side  movement). Take 2 of the buttons and set 1 button to "Jog+ Right Stick SideToSide" option and another button to "Jog - Right Stick SideToSide". Then you will have it for the Z.  It is unfortunate that the XBox360 controller does not have more butttons. For your 2 buttons, you may want to choose the forward and back buttons.  It is your choice.

Regards,
Lee,

     Great job with the x-box 360 controller. I have a shuttle pro on my cnc router that cost me around $100. I picked up a used 360 controller for under $20.00 and it works GREAT. So far I have only been able to use the inc. step with the X and Y axis. I would like to use the step feature with the Z axis. How do I set that up?
     Again, thank you for a great contribution to the comunity

Ken
[/quote]
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on June 23, 2009, 12:15:18 PM
A new version of my plugin is availalbe (Ver. 2.3).  It adds support for some new ProductIDs and ties the the grey box on the Config Page to all of the currrently supported ProductIDs.  It also adds Custom Macro and Custom OEM functionality.  See the new version of the instructions for more details.

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: zafarsalam on July 03, 2009, 12:07:45 AM
Thank you Lee for such a nice and useful accessory. I tried it for he first time yesterday and within 5 minutes I could configure it to my liking. It is going to be the pendant on all my machines now. Only thing I noticed missing is the safe zone before the soft limits. The axes come to an abrupt stop at the soft limits unlike the keyboard jogs which decelerate within the safe zone. This would be harmful for stepper systems.

Zafar
Title: Re: XBox360 Controller Plugin Update Available
Post by: zafarsalam on July 03, 2009, 01:21:23 AM
Same controller, same driver, different machine. The "right stick up down" jog speed is 10% of the other axis. It's a 3 axis machine so this doesn't hurt. I am just curious about it.

Zafar
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on July 06, 2009, 12:40:01 AM
Hi,

I will look at the safe limits question when I have time.  As for the 10% jog, I suspect that you have some settings different on that axis - settings such as motor tuning.  You could compare XML files to see what is different.

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: zafarsalam on July 06, 2009, 04:47:07 AM
The settings are the same for all the 3 axes. In fact whichever axis I put on "right stick up down" control goes to 10% of other controls. This doesn't happen on another machine that I tried it on. I guess I'll try to uninstall and then install it again sometime.

Zafar
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on July 07, 2009, 01:46:45 AM
Hi Zafar,

That is a very strange problem that I have never seen before.  The only other possibilities that I can think of are:

1. The pc has a different version of of the Microsoft SDK than Nov 2007 (see my instructions PDF)
2. The pc has a mechanical problem with the port or the cable.
3. The USB port has a problem - try another USB port (USB 2.0).

You said it works on another machine.  Have you tried it again?  It may have failed after you put it on the last pc. 

Other than that, I am stumped.
Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: oodanner on July 11, 2009, 10:57:20 PM
Just wanted to say first that this is a really awesome plugin and appreciate the hard work on it.  The one thing I did notice was when I jog with the controller I don't get 100% of the available jog speed.  I checked all of the settings in the config for the plugin and I also checked to make sure I wasn't running a lower percentage of jog in Mach3.  If I use the arrow keys I get 125 IPM but, if I use the controller I only get around 85 IPM.  If I set something less than 100% then the triggers increase the speed but, again only to a maximum of 85 IPM.  At any rate it is still extremely functional and I'm really happy to be using it.  Thanks again!
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on July 12, 2009, 01:24:56 AM
Hi oodanner,

You are correct. I designed it that way.  It has to be that way for a number of coding reasons.

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: oodanner on July 12, 2009, 01:10:20 PM
Okay, well thanks for the response and again this is extremely useful and much appreciated.
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on July 16, 2009, 08:18:56 PM
A new update to the XBox360 Controller plugin is available (2.3.1).  It adds support for Soft Limits. Thanks to oodanner for pointing out that it was missing.  Now the moving axis will slow down as it approaches the Soft Limit.  It will do this whether or not the trigger is pressed while the axis is moving.

Regards,
Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: zafarsalam on July 17, 2009, 02:40:45 AM
Thanks Lee for the update. I'll give it a try today sometime.

Zafar
Title: Re: XBox360 Controller Plugin Update Available
Post by: xnaron on September 29, 2009, 06:05:04 PM
Thanks for the excellent work on the controller plug in!  I sent you a PM about this but I am also going to post here in case it is a known issue and someone here might have a fix or a work around.

I am using the latest 360 controller plug in (2.3.1) for mach (thanks!) and it is working great.  I did encounter an issue with it when I upped my Kernel Speed setting in Mach 3 from the default 25000hz.  I have the axes set to 350ipm and it works fine at 25000hz with the plug in using the 360 controller.  If I set the kernel to 45000hz and restart mach it will only jog at 180IPM with the 360 controller. However if I bring up the on screen mach jog controls with the tab key it jogs at 350ipm.  Is this a bug?

Thanks,
Brendin
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on September 29, 2009, 10:08:07 PM
Hi xnaron,

I checked with Art about your Kernel Speed problem and he indicated that you need to retune the motors when you change kernel speed otherwise they will run slow.  Try retuning and let me know if it solves the problem or not.

Lee
Title: Re: XBox360 Controller Plugin Update Available
Post by: xnaron on September 30, 2009, 09:40:49 AM
Hi Lee,

Thanks for checking into it.  I did retune the motors after (I set acceleration to 350 again) and followed the mach manual in sec 5.5.2 regarding retuning.  When I use the arrow keys to jog or the arrows on the on screen pop up jog controls I get full speed jogging at 350IPM.  Also mdi gcode commands move at 350IPM as well.   It is only with the xbox controller that I get 180IPM max for jogging.  It's probably a config issue on my machine or a mach bug then if your code does not factor in kernel speed.  I will keep trying different things on my end.  Were you able to reproduce the issue on your end?  It would be interesting to see if it is reproducible on a different computer/machine.  I wonder if this issue is also encountered with other pendant plugins like the shuttle pro.

thanks,
Brendin
Title: Re: XBox360 Controller Plugin Update Available
Post by: Leed3 on October 03, 2009, 11:52:35 PM
A new version of my XBox360 controller plugin has been placed in the files section of the Yahoo Mach3 site.  It is under VS2005-VS2008 and then under Lees' Files.  It is named XBox360Controller.zip.  Brendin has been testing it and it is working fine.  I am looking for others to download it and test it.  Please give it a try and let me know what you find.  It should track just slightly slower than the keyboard at any frequency and at any motor tuning settings. Previously, it would slow down as you increased the frequency from 25000 to 45000.

Thanks,
Lee