Joystick hal file with axis lockout

More
07 Nov 2011 14:54 - 07 Nov 2011 14:59 #14638 by Davenc
Davenc created the topic: Joystick hal file with axis lockout
Thought I would share this to save people the headache of doing what I had to do to get it working. This is for a 3 axis x,y, z cnc mill. I cannot take the credit for the code as I pieced it together from various sources but the molten metal guy Ed provided the base for the axis lockout and I just altered it for my machine. I'm happy with it and it does everything I need it to do for now. My X2 has the cncfusion kit and I'm using the xylotex motor kit with the latest version of EMC2 2.4xxx. Almost forgot but I'm using the logitec $20 joypad.

This configuration offers:
Estop shut down and power up on the two left front buttons.

Axis lockout on both the hat and left joystick. This is important in that it prevents you from accidentally moving the X & Y axis at the same time thereby trashing your work piece. With the mode switch on (red LED lit) the hat is locked out and with the mode switch off the left X & Y joystick is locked out.

Three different speeds using the left buttons. The lowest speed when using the joystick can be jogged at .00025 increments. Note that you have to hold one of the speed buttons down to start movement and then you can let it up. This prevents an accidental movement of and axis when one of the buttons are inadvertently pushed.

File Attachment:

File Name: custom_pos...f1ad.hal
File Size:5 KB
Attachments:
Last Edit: 07 Nov 2011 14:59 by Davenc.
More
07 Nov 2011 18:09 #14655 by BigJohnT
BigJohnT replied the topic: Re:Joystick hal file with axis lockout
Thanks for sharing.

Sounds similar to my Simple Remote Pendant on the wiki with the added bonus of the e-stop and power buttons.

John
More
07 Nov 2011 20:29 - 07 Nov 2011 23:56 #14660 by Davenc
Davenc replied the topic: Re:Joystick hal file with axis lockout
The one on wiki does not have the axis lock out like mine does. I used the one on wiki as an example for mine but if you use the x & y joystick to jog the table it's very easy to move both axis's at the same time if you move the joystick at anything but a perfect 360, 180, 270 or 90 degree angle. With mine it's not possible to do that as it locks out the other axis. Unless there is different hal file in wiki that I'm not aware of this file is different.
Last Edit: 07 Nov 2011 23:56 by Davenc.
More
07 Nov 2011 21:22 #14663 by BigJohnT
BigJohnT replied the topic: Re:Joystick hal file with axis lockout
No, your correct the one on the wiki is just a basic jogging one... I need the X and Y lockout on my plasma.

John
More
08 Nov 2011 10:57 #14668 by Rick G
Rick G replied the topic: Re:Joystick hal file with axis lockout
The lock out is an Interesting idea. Nice addition.

but if you use the x & y joystick to jog the table it's very easy to move both axis's at the same time if you move the joystick at anything but a perfect 360, 180, 270 or 90 degree angle

You can also use "deadzone" for the sticks to avoid that problem in jogging and a similar set up to avoid it with incremental moves.

Rick G
More
08 Nov 2011 15:32 #14676 by BigJohnT
BigJohnT replied the topic: Re:Joystick hal file with axis lockout
I have a couple of buttons that feel natural to use when holding down the top buttons... hmmm all I ever use is fast and slow... I need to change mine to have an axis lock out.

John
Time to create page: 0.119 seconds
Powered by Kunena Forum