Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: DazTheGas on November 01, 2015, 03:17:19 PM

Title: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 01, 2015, 03:17:19 PM
*** Can we please keep this one on topic - Although actually making this plugin for myself I would like to share it to the community so all comments welcome ***

I have recompiled the plugin to a release version and have tested it on win7 and win8 in mach4 v`s 2686 - 2763  will test xp asap but it should work as i have used xinput 9 which is compatible with xp.

You will of needed to have setup an xbox controller beforehand and the installer would of already installed the xinput lib required, although win7 and win8 come with it pre-installed, its compiled in studio 2013 so shouldnt need any other files to run.

X and Y are assigned to the DPad and Z assigned to R_thumbstick,

Button B is assigned to EStop

I have spent the whole day rewritting the xinput class I initially had which was for just xbox controllers, the new code allows for the setting up of other pc controllers too.  so theres a long way to go, when jogging there is *NO* incremental jog, just continuous as I still havnt decided on how I want to do the options etc, and its just a test,

Enjoy (I Hope)

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: patton on November 01, 2015, 04:03:42 PM
Hey Daz,
tested your plugin (just for a few minutes) on XPSP3 and Darwin.... everything seems to work good.....  and thanks for all the great information you put on here.

Dave
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 01, 2015, 04:28:01 PM
tested your plugin (just for a few minutes) on XPSP3 and Darwin.... everything seems to work good.....

Thanks Patton, I really didnt want to wipe me laptop and put xp on for testing.

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: dude1 on November 01, 2015, 04:58:23 PM
hay daz you can get a program from MS that lets you have Xp on a win 7 computer.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: polzsp on November 01, 2015, 07:52:41 PM
Thank you Daz.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: robertspark on November 02, 2015, 07:29:56 PM
Daz, works on XP with the ESS

Rob
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 03, 2015, 03:27:56 AM
Thanks Rob, away again later today but hoping to upload newer one before I go with incremental working etc, just got to compile and test.

DazTheGas
Title: mcX360 Mach4 Controller Plugin - UPDATED
Post by: DazTheGas on November 04, 2015, 04:41:36 PM
Tested on both wired and wireless xbox controllers

mcX360 Changelog:

Updated errorlog to show if controller has gone to sleep and when reactivated.
Left Thumbstick values in registry.
Works on both Incremental and Continuous
Inc steps are cancelled on release of button not accumulated giving the ability to canx an incremental move.
4 definable functions in mach4 - video on its way on how to use


Buttons:
Back = Continuous
Start = Incremental
B = EStop
A = CycleStart
Y = FeedHold
X = Machine Enable

Right Shoulder Button + ( All set at max 10mm at F25)-(G91 G31 Y10 F20)
A = Probe Y+
Y = Probe Y-
X = Probe X+
B = Probe X-

Left Shoulder Button +
A = User Function 1
Y = User Function 2
X = User Function 3
B = User Function 4

DPad is as it looks  left and right is X + and - .  up and down is Y + and -

Right Thumb up and down is Z + and -

To add yet:
User config screen for you
Left Thumbstick
Triggers
Title: Re: mcX360 Mach4 Controller Plugin
Post by: BR549 on November 04, 2015, 05:31:26 PM
I tried it on a licensed copy of M4( Industrial)  with no devices (Sim) and it does NOT work. It errors with device not found. Yes the device works just not in M4 setup this way.

Just a thought, (;-)TP
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 04, 2015, 06:02:01 PM
Have a look in you windows system32 directory and see if you have any xinput dll`s, the plugin is using XInput9_1_0.dll which is  compatible with all flavours of windows, other dlls are 1.3 and 1.4.

if this is the case I can either find a way for the plugin to use whatever it finds or could do an installer for the dll I use.

Daz
Title: Re: mcX360 Mach4 Controller Plugin
Post by: polzsp on November 04, 2015, 08:52:08 PM
Daz, working on Win10 using  Mach4 (2763). Thanks!
Title: Re: mcX360 Mach4 Controller Plugin
Post by: robertspark on November 04, 2015, 08:53:16 PM
... Think I had loaded the driver on my system given you need it for m3 and the Xbox 360 controller
https://www.microsoft.com/hardware/en-gb/d/xbox-360-controller-for-windows

Rob
Title: Re: mcX360 Mach4 Controller Plugin
Post by: BR549 on November 04, 2015, 09:47:04 PM
Yes there is that dll on this system.  Any other ideas ?

(;-) TP
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 05, 2015, 03:59:04 AM
BR549 this is a long shot, the plugin is set to use controller 1, is the light on your controller in the top left?

Daz
Title: Re: mcX360 Mach4 Controller Plugin
Post by: BR549 on November 05, 2015, 09:19:29 AM
OK Just to make sure this is CLEAR it is a Xbox360 clone.  Not a true xbox360. But it runs everything else I have tried it on.  It works the test screen in widows just fine. It runs fine with UCcnc .

There is only 1 light on the controller it is the analog ON light in between the thumb sticks.

(;-) TP
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on November 05, 2015, 10:03:01 AM
That makes things clearer for me, i have read some code that remaps some of the internals to accommodate a clone controller. will take a look, have u a link to the controller you have and I will get one for testing.

Daz
Title: Re: mcX360 Mach4 Controller Plugin
Post by: BR549 on November 05, 2015, 11:01:57 AM
(;-) It was a $7 xbox clone off of Amazon. Not really worth pursueing  .

Don't spend any time on this (;-) I had thought sense it ran as a HID device in windows it would be generic in nature. I guess the Plugin does not use the HID interface ??  

UCcnc runs it as an HID device.

(;-) TP
Title: Re: mcX360 Mach4 Controller Plugin
Post by: Haik on June 26, 2016, 06:56:09 PM
Hello Daz,

I'm so glad that you created this plugin. I have a very big Thermwood Router, it's over 4m wide so mobility is essential. My wireless xbox controller helps make setting up a breeze, without it setups would be far more painful.

Thank You!!

- Haik
Title: Re: mcX360 Mach4 Controller Plugin
Post by: divemasterbill on August 05, 2016, 10:46:25 PM
Thanks Daz for your great work . I am new to cnc machines and this will be very helpful . Works good on my LMS 3990. :)
Title: Re: mcX360 Mach4 Controller Plugin
Post by: Pedio on August 19, 2016, 02:35:32 PM
I have an Xbox One controller and it works GREAT!

Love it thanks
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on December 06, 2016, 10:41:08 PM
Hi.  I just started using Mach4.  This plugin is great but I have one question: Can the buttons be configured? I'm working on a lathe and I'd like to change the orientation of the X plus and X minus.

Thanks.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on December 07, 2016, 03:02:17 AM
I have replied to your email, I created the lua version that can be found in the plugins section as everyone is different, so with that version you can setup as required, i will however try and get a video on its usage over the coming weekend.

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on December 07, 2016, 07:05:40 AM
Please forgive my ignorance.  What is the "plugins section" and how to I find it?

I've searched around on a bit on the forum and the ArtSoft site, but I can't seem to find anything dedicated to Mach4 plugins.

Thanks
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on December 07, 2016, 07:07:34 AM
Here you go here is a direct link http://www.machsupport.com/forum/index.php/board,99.0.html (http://www.machsupport.com/forum/index.php/board,99.0.html)

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on December 07, 2016, 07:21:13 AM
You are awesome - Thanks!

I've been meaning to learn more about this Lua stuff - I guess this will be my opportunity.  I'll read that entire thread and see what I can accomplish. 
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on December 07, 2016, 07:30:32 AM
Your in luck, had that many emails lately about this ive given myself a written warning to get a video out this weekend and update plugin to latest sdk.

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: Leed3 on December 07, 2016, 05:12:50 PM
Hi,
I wanted to say thank you for all the work you have done porting the XBox360 controller to MACH4. I was going to take a look at porting my Mach XBox360 controller over to Mach4. But now with all your work, I do not see the need. If I can bee of any assistance in your efforts, let me know.

Lee Davis
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on December 07, 2016, 05:48:37 PM
 
Hi,
I wanted to say thank you for all the work you have done porting the XBox360 controller to MACH4. I was going to take a look at porting my Mach XBox360 controller over to Mach4. But now with all your work, I do not see the need. If I can bee of any assistance in your efforts, let me know.

Lee Davis

Cheers Lee, about half way through vid on general guidance of the lua version and hopefully be ready for weekend, havnt decided whether to do a version with a config screen yet as another project is taking most of my time.

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on December 17, 2016, 10:00:41 PM
Hi,
I wanted to say thank you for all the work you have done porting the XBox360 controller to MACH4. I was going to take a look at porting my Mach XBox360 controller over to Mach4. But now with all your work, I do not see the need. If I can bee of any assistance in your efforts, let me know.

Lee Davis

The Lee Davis XBox360 Plugin for Mach3 is AWESOME! It would be super cool to have the same functionality in Mach4.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: TPdesigns on September 18, 2017, 02:57:21 AM
Is this project still active as i wanted to give Mach4 a try with my xbox controller but i want to be able to configure it like it was in Mach3 ?  I see this post has not been updated since 2016 which is a worry it might be dead ?
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on September 18, 2017, 06:57:36 AM
DazTheGas has everything you need to make the Xbox controller work with Mach4. Watch his videos.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: TPdesigns on September 18, 2017, 08:05:54 AM
Yeah i'm not into writing script as its too hard for me.  I was looking for something with a configuration screen built in like it is on Mach3 ? Why cant there be a configurator made for Mach4 ?
Title: Re: mcX360 Mach4 Controller Plugin
Post by: francocncprojects on September 18, 2017, 09:07:18 AM
Send me a message at francocncprojects@gmail.com I have some information you may want to look at.
Title: Re: mcX360 Mach4 Controller Plugin
Post by: Klaus on July 10, 2018, 05:15:43 PM
DazTheGas has everything you need to make the Xbox controller work with Mach4. Watch his videos.

Where can I find his Video?
Title: Re: mcX360 Mach4 Controller Plugin
Post by: DazTheGas on July 10, 2018, 05:59:45 PM
http://www.machsupport.com/forum/index.php/topic,33792.0.html

DazTheGas
Title: Re: mcX360 Mach4 Controller Plugin
Post by: Klaus on July 10, 2018, 06:52:30 PM
Great thanks :)

So is the Plugin for Xbox360 working on the latest version of Mach4?

Thanks.