XBox 360 plugin update

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

XBox 360 plugin update

Postby eabrust » Sat Jan 28, 2017 3:55 am

Attached is an update to a rough plugin I posted on CNCZone.com a while back for using XBox controller as a 'pendant' with analog axis speed control.

Based on comments from Spumco in this thread: viewtopic.php?f=14&t=355 I've tried to address some of the wish list.

This version of the plugin allows:
1) selection of joystick / axis assignment
2) ability to set the triggers as speed increaser, or as safeties (single or double to enable)
3) Assignement of jog step settings in increments other than .001,.01, etc. The right stick x axis may be used to select the jog step size, or turned off completely.

If you have an actual XBox 360 controller, please give it a test. I believe it was tested before and shown to not work with 'generic' gamepad controls. Feedback welcome, but my available time to put much effort into this plugin is currently pretty small.

regards,
Eric Brust / CraftyCNC
Attachments
XBoxPlugin-CraftyCNC v1.0002 - 1-27-17.zip
XBox plugin for UCCNC
(62.17 KiB) Downloaded 172 times
eabrust
 
Posts: 33
Joined: Fri Sep 16, 2016 2:32 am

Re: XBox 360 plugin update

Postby spumco » Sun Jan 29, 2017 6:04 am

Eric,

THANKS!

I'll give it a shot first thing in the morning and report back.

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

Re: XBox 360 plugin update

Postby spumco » Sun Jan 29, 2017 9:15 pm

The new features work well, certainly appreciate your efforts.

One issue I noticed - when the L/R triggers are set to 'safeties', the keyboard and jog screen flyout jog buttons are also 'locked out.' So if the safety is enabled, I have to hold the Xbox trigger down to jog with the keyboard or screen buttons.

Just an FYI.

Thanks,
Spumco
spumco
 
Posts: 162
Joined: Mon Oct 03, 2016 10:10 pm

Re: XBox 360 plugin update

Postby eabrust » Mon Jan 30, 2017 3:30 am

Thanks for the feedback on the jog buttons. I'd have to think of how to work around that, or why it is doing that.

The plugin interface to UCCNC basically gives access to the jog buttons, and the safety in the plugin should just prevent the plugin from pushing the button. Not sure why it would prevent user from using the screen job buttons.

I have to admit, I do not use the screen jog buttons what so ever with the xbox controller plugged in, so I wouldn't have caught it :)

regards,
Eric Brust
eabrust
 
Posts: 33
Joined: Fri Sep 16, 2016 2:32 am

Re: XBox 360 plugin update

Postby spumco » Mon Jan 30, 2017 5:21 am

I have to admit, I do not use the screen jog buttons what so ever with the xbox controller plugged in, so I wouldn't have caught it


Me either, but when the keyboard didn't work without the Xbox safety I started poking around in the jog panel to see if was doing it there, too.

Noticed another thing - when in squared or cubed velocity rate the Z-axis isn't progressive right off the bat. What I mean is that when I just start to nudge the right joy stick up or down the Z-axis jumps about 0.010" at a high feed rate and then settles down to a creep. I've also seen it take off at a (relatively) higher feed rate and then slow down when I move the joy stick further. Of course it ramps back up when I push it further.

Feels like 0-5% joystick movement the velocity is random, and from 6%-100% is 'normal.'

Doesn't do it in 'linear' velocity rate setting, and the left joystick doesn't seem to do it.

I'm wondering if my joystick is glitchy or if there's something in the plugin. Using an MS Xbox wired controller, BTW.
spumco
 
Posts: 162
Joined: Mon Oct 03, 2016 10:10 pm

Re: XBox 360 plugin update

Postby spumco » Mon Jan 30, 2017 5:30 am

Yep, there's a difference between the L&R joysticks in the plugin behavior during initial stick movements.

Move right stick and the "Feed Rate" doesn't start to move until the stick % goes over +/-0.100. At that point the feed rate jumps to 0.100%. I can see the stick movement in the "test buttons" section go smoothly from 0.002% to 0.100%, but the feed rate doesn't kick in.

Left stick will trigger the feed rate immediately and smoothly. Nudging the left stick to +/-0.010% gets me a feed rate of 0.004% (more or less), and it's progressive from there. No jumping.
spumco
 
Posts: 162
Joined: Mon Oct 03, 2016 10:10 pm

Re: XBox 360 plugin update

Postby eabrust » Tue Jan 31, 2017 3:23 am

Spumco,

Thanks for the feedback, there was an error in the 'deadband' value that got used on the right stick, good catch.

The attached plugin version should correct the issue you found in the right stick.

I don't yet have an idea about the screen jog buttons not working when trigger safety is enabled, but I'd consider that a low priority right now.

Please let me know if you find any other issues/comments.

regards
Eric Brust / CraftyCNC
Attachments
XBoxPlugin-CraftyCNC v1.0003 - 1-30-17 - Copy.zip
(62.17 KiB) Downloaded 182 times
eabrust
 
Posts: 33
Joined: Fri Sep 16, 2016 2:32 am

Re: XBox 360 plugin update

Postby cncdrive » Tue Jan 31, 2017 10:45 pm

Thanks Eric for your work with the plugin.

Do you call the Jogdisable function of the UCCNC for your safety button?
If so then that will disable the jog function for every sources, so if you doing it like that that explains why all jog keys and jog buttons are then disabled.
I think to overcome this issue you could handle the pendant safety button press in the plugin without asking the UCCNC to disable the jogging.
I mean you could simply create checking statements that if the button is pressed then just don't call the jog buttons in the UCCNC.
And if the safety button was released why jogging then call the button release codes.
This way you could make it work without fully disabling the jogging functionality of the UCCNC.

The Jogdisable function was basicly created to let plugins disable the jogging while the user inputs text into the forms,
so the plugin can sense when the user enters the Form or textfields on the Form and then can call the jog disable function,
so the machine will not jog when the user just moving inside the textfields with the arrow keyboard keys entering text.
cncdrive
Site Admin
 
Posts: 1938
Joined: Tue Aug 12, 2014 11:17 pm

Re: XBox 360 plugin update

Postby eabrust » Wed Feb 01, 2017 1:33 am

cncdrive wrote:Thanks Eric for your work with the plugin.

Do you call the Jogdisable function of the UCCNC for your safety button?
If so then that will disable the jog function for every sources, so if you doing it like that that explains why all jog keys and jog buttons are then disabled.
I think to overcome this issue you could handle the pendant safety button press in the plugin without asking the UCCNC to disable the jogging.
I mean you could simply create checking statements that if the button is pressed then just don't call the jog buttons in the UCCNC.
And if the safety button was released why jogging then call the button release codes.
This way you could make it work without fully disabling the jogging functionality of the UCCNC.

The Jogdisable function was basicly created to let plugins disable the jogging while the user inputs text into the forms,
so the plugin can sense when the user enters the Form or textfields on the Form and then can call the jog disable function,
so the machine will not jog when the user just moving inside the textfields with the arrow keyboard keys entering text.


Hi Balzas,
Thanks for the info.
I'm not using Jogdisable, but using checking statements like you hint at to determine if to send a jog command button push. I think I noticed the problem, it is that with the checking if jogging is 'enabled' for the pluggin within the running plugin loop, the plugin is continually sending the 'stop jogging' command for each axis when 'disabled' is set true.

I confirmed this by noticing that if the plugin is disabling jogging, pressing the arrows or the on screen jogs will make one tiny movement happen before the 25 hz loop hits the stop jog button again. I will have to make it so the 'stop jogging' command is only sent on a transition to the stick being released, no matter if 'disable' is on or off, and that it isn't sending 'stop' commands every loop.

regards,
Eric Brust / CraftyCNC
eabrust
 
Posts: 33
Joined: Fri Sep 16, 2016 2:32 am

Re: XBox 360 plugin update

Postby spumco » Tue Feb 07, 2017 4:16 am

Eric,

Finally got a chance to install the latest version - MAGIC.

Motion on the Z is superb. Very smooth and I can creep a 'thou at a time with no jumping. The trigger safeties are awesome, especially for clumsy me.

Having the keyboard jog enabled would be nice, but now that the controller is so sweet it seems a bit superfluous.

Thanks again so much for your work.

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

Next

Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests