Hello Guest it is October 18, 2019, 10:40:21 AM

Author Topic: mcX360 Mach4 Controller Plugin  (Read 11161 times)

0 Members and 1 Guest are viewing this topic.

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
mcX360 Mach4 Controller Plugin
« 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
Theres always time for a choccy biccy
Re: mcX360 Mach4 Controller Plugin
« Reply #1 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

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: mcX360 Mach4 Controller Plugin
« Reply #2 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
Theres always time for a choccy biccy

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: mcX360 Mach4 Controller Plugin
« Reply #3 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.
Re: mcX360 Mach4 Controller Plugin
« Reply #4 on: November 01, 2015, 07:52:41 PM »
Thank you Daz.
Re: mcX360 Mach4 Controller Plugin
« Reply #5 on: November 02, 2015, 07:29:56 PM »
Daz, works on XP with the ESS

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: mcX360 Mach4 Controller Plugin
« Reply #6 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
Theres always time for a choccy biccy

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
mcX360 Mach4 Controller Plugin - UPDATED
« Reply #7 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
Theres always time for a choccy biccy

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: mcX360 Mach4 Controller Plugin
« Reply #8 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

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: mcX360 Mach4 Controller Plugin
« Reply #9 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
Theres always time for a choccy biccy