A basic .hal file for a simple gamepad

More
1 year 1 month ago #334877 by juergen-home
This is a basic .hal file for a simple gamepad.
I use this for manual milling on the diy cnc.
For my safety I removed the joysticks and only use the buttons pressed by a 3d printed plug.

#
# jog with 1,2,3,4,11,12
# select jog speed with 9,10
# select increment with 5,6,7,8
# start program with 16
# pause program with 14
# mist-coolant  with 15
# e-stop with 13
#
 

Attachment not found


 

Attachment not found




 

Please Log in to join the conversation.

More
1 year 3 weeks ago #336185 by juergen-home
I found a safety issue with the toggle2nist function in my gamepad.hal file.
if you e-stop while switching in pause, than switch on and start program again, pause will often not work.
this is a safety problem if you want to trust your pause function.
Therfore I use a special version of toggle2nist: forum.linuxcnc post 05 Oct 2025 18:50 #335873 special  toggle2nist.comp from user Aciera. You have to compile that in by hand.
www.forum.linuxcnc.org/24-hal-components...ton-at-the-same-time
With "pulse-length" parameter set to 50 the problem of the hanging pause is gone.
Therefore, the default toggle positioned before the toggle2nist component must be removed across all implementations to ensure correct toggle functionality.

also changed: e-stop with 13 to stop with 13
 

Attachment not found


 

Please Log in to join the conversation.

Time to create page: 1.504 seconds
Powered by Kunena Forum