Xbox360 plugin

This is where you talk about Plugins. How they are made and how they work, show examples.

Xbox360 plugin

Postby charliem » Sun Jan 08, 2017 11:24 am

Hello Everyone,

I use a Wireless Xbox 360 controller as a pendant to jog my machine around. I have it sort of working, but I have some issues with it.

1) the Z axis does not work with any of the joy sticks.( Yes I set up all the joysticks and buttons.)
2) When I move either the X or Y with the joystick It does not stop until I hit the Estop.

does anyone else use a xbox360 as a pendant adn do they have it working?

Charlie
Regards
Charlie M
charliem
 
Posts: 108
Joined: Sun Jan 01, 2017 5:37 pm

Re: Xbox360 plugin

Postby spumco » Sun Jan 08, 2017 10:03 pm

Charlie,

I'm having issues, too. I use an OEM wired Xbox controller and have been a bit annoyed at it. So far I've used three different plugins:
1. UCCNC OEM plugin. I suspect that's the one you're using.
2. Xbox plugin #1 found on CNCZone in the UCCNC forum. This is a beta(ish) plugin that uses the analog joystick functions as a proportional control. http://www.cnczone.com/forums/uccnc-control-software/300622-new-xbox-jogging-plugin-volunteers-test.html

3. Xbox plugin #2, also found on CNCZone. This one I haven't got working yet as I think it's dependent on some .dll I don't have. It throws up when I enable it. http://www.cnczone.com/forums/uccnc-control-software/314206-plasma-thc-amp-xbox360-controller-plugin.html

The OEM plugin must be configured for the buttons/switches/joysticks to work. In the default state only the A/B/X/Y buttons are mapped to movement functions. Everything else is blank. Do yourself a favor and print out the list of button commands from the Documentation folder where UCCNC is installed and go through it while the plugin configuration window is open. Map the button function number to the button and save it.

My problem is that even though I mapped the buttons and joysticks, the joystick are still binary (on/off, not prportional). I may not have mapped the buttons correctly. I'm used to the Mach3 Xbox plugin and that was wonderful.

The plugin #1 (above) I've tried works (joysticks are proportional), but the left/right triggers are not editable on the configuration screen. They are permanently set to be 'high-speed' buttons that increase the jog rate from 50%-100% Nice if you've got an 8 foot router; not so nice if you've got a small mill.

What I want is for the triggers to be a safety button - must hold a trigger to enable any movement. Other folks responding to the thread where the plugin was posted requested the same thing, but the thread died early last year.

The other irritating thing is the step value. The right joystick left/right is set up to switch between .001/.01/1/.1 steps. Way too easy to nudge it and crash a tool when I'm sneaking up on something. Because the step value is only displayed on the jogging flyout I have no idea what the step value is. The 'vibrate' feature is supposed to alert you to the step value, but I'm not comfortable with it. I've changed the step values while jogging the Z-axis accidentally.

If you get any of the pluging working to your satisfaction, please report back and let me know what you did. I'm seriously missing the Mach3 Xbox features.

Also, if you or anyone else knows how to change the default step value I'd be eternally grateful. UCCNC defaulting to 0.01" and not 0.001" is aggravating but I can't find a setting in the configuration tabs.

-Spumco
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Re: Xbox360 plugin

Postby cncdrive » Sun Jan 08, 2017 10:21 pm

Our Xbox plugin was developed using a cheap clone Xbox controller available on e-bay and other stores for a few bucks.
These controllers do not have analog joysticks, but the joysticks works only digital, they report only on/off states.
So, these can't be used like how yours can which I guess is an original Xbox controller which has analog sticks.
Also this controller has no vibration motors.

If I recall we have a Jogdisable function which you could use to implement a "safety button" to allow or disable the jogging with the other buttons/sticks.

The default step distance you could change from the constructor macro M99998.
The constructor macro is called once on the software starts up and so you could add a code which sets the step distance DRO, a AS3jog.Setfield function and a AS3jog.Validatefield on the same DRO,
so then when the UCCNC will startup the constructor macro will write and validate your step distance DRO.

And the cnczone plugin I think was made by Eric who is also a member of this forum and that plugin is DirectX dependent, so for that to work DirectX has to be installed. (I'm not sure which version though).
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Xbox360 plugin

Postby spumco » Mon Jan 09, 2017 3:04 am

Eric's plugin works perfectly as designed; it uses SlimDx which I had to add to the UCCNC folder. The problem is that he designed it so that the trigger functions are not editable.

If I recall we have a Jogdisable function which you could use to implement a "safety button" to allow or disable the jogging with the other buttons/sticks.


There is no JogDisable button or function in the "Buttons by Number" document. There's nothing in the user manual about JogDisable, either. There's nothing I can find that disables all jogging motion. If you could point me to a specific button number or some other method to disable jogging, I'd appreciate it.

The default step distance you could change from the constructor macro M99998.
The constructor macro is called once on the software starts up and so you could add a code which sets the step distance DRO, a AS3jog.Setfield function and a AS3jog.Validatefield on the same DRO,
so then when the UCCNC will startup the constructor macro will write and validate your step distance DRO.


As far as macros go, I'm utterly, completely, lost. I have no idea how to write one, where to put it, and so forth. I will eventually learn how to write a macro but for now I'm dependent on buttons, checkboxes, and text fields to interact with the software. My brain is full having spent the last 6 months about electronics, and now that I'm essentially done (thanks again for all the help) with the hardware and electronics, I need to learn how to machine...

This is why I want to pay Ger for his screen set, and why I want to pay someone for a working Xbox plugin - I don't want to spend time learning how to edit the screens or writing plugins when I could be making chips and destroying expensive tooling.

-Spumco
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Re: Xbox360 plugin

Postby ger21 » Mon Jan 09, 2017 3:54 am

I think that toggling the feedhold will prevent jogging. It does in demo mode. Button #522
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Xbox360 plugin

Postby eabrust » Wed Jan 11, 2017 2:58 am

spumco wrote:There is no JogDisable button or function in the "Buttons by Number" document. There's nothing in the user manual about JogDisable, either. There's nothing I can find that disables all jogging motion. If you could point me to a specific button number or some other method to disable jogging, I'd appreciate it.


Hi Spumco,
I'm afaid I haven't been able to spend much time working on any plugin creation/update, including for the xbox controller plugin I wrote. I'll admit I wrote it quickly to do what I wanted/needed, and that is how it has stalled since I didn't get much intrest/response when I put it out for trial on CNCZone.

The plugin is written with an enable/disable checkbox on the plugin form, so you can prevent stick movements from jogging as a safety, but it has to be done from the screen/mouse insead of a button press on the controller currnetly.

I can try to take a look at updating it to be an assignable button function to toggle it on/off at the controller, but my day job has been preventing me from doing much fun stuff lately :(

Regards,
Eric Brust
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Xbox360 plugin

Postby spumco » Wed Jan 11, 2017 6:12 am

Eric,

Thanks so much for the reply, and for writing the plugin. I also understand about day jobs interfering with more important pursuits, which is why I haven't had time to learn how to write/edit plugins. I'd rather learn how to make chips.

As I mentioned in my email and earlier in the thread, there are a couple of things I'd like to see:

1. Triggers assignable, or at least re-purposed to be an 'enable' safety switch. Having a different button as an enable would make it difficult to use the controller one-handed, but the triggers are perfect. The Mach3 xbox plugin was pretty handy with that.

2. Joystick (specifically the right one) assignable. The step value change feature is interesting, but I would really like to just turn it off or map it to my 4th (A) axis. I've unintentionally changed the step value a couple of times (big thanks for the vibration feedback!).

3. Have a drop down list with the steps/unit value just like your Jog Feed % menu, and have it be persistent when opening the software & plugin. I'd very much like to have 0.001 as a default value, and a menu on your plugin would allow me to not have to learn about macros quite yet. Values of 0.0001, 001, 01, etc could be in the drop list

While the disable checkbox is dead useful for mapping buttons and configuring, it's clumsy for me to use as a safety feature. If I'm grabbing the mouse to check the box I might as well just jog around with the keyboard or mouse. It's very handy to grab the controller while I'm setting Z-height or sneaking up on a part with a dial indicator, but I've nudged a joystick a couple of times unintentionally and sent the table or head flying.

So, there's my wishlist. If all you have time to do is #1 & #2 above, that would make it 100% more useful for me. #3 is frosting on the cake. If it's a question of time, can I offer to subsidize a nice dinner out for you as an enticement? Feel free to email or PM me and I can PayPal you a bribe. I'll also buy one of your probes if that helps - I was planning to anyway once I got my mill renovation sorted out.

Regards,
Spumco
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 11 guests