Set G54 offset with a physical (joypad) button
28 Apr 2020 00:36 #165883
by CFE
Set G54 offset with a physical (joypad) button was created by CFE
Hi all,
We are still fine tuning our plasma cutter, and adding a few features. I have added a joypad as a pendant, got it to work after finding out that many HAL pins had changed names compared to several years ago, Anyway, got that worked.
Now we would like to see if it is possible to use a button on the joypad to set the X and Y offset if G54 to zero with the press off a button. I got the HAL pins for the buttons, just don't know if there is something in HAL to set G54 to zero, on either the X or Y axis. Any ideas ?
Cheers, Peter
We are still fine tuning our plasma cutter, and adding a few features. I have added a joypad as a pendant, got it to work after finding out that many HAL pins had changed names compared to several years ago, Anyway, got that worked.
Now we would like to see if it is possible to use a button on the joypad to set the X and Y offset if G54 to zero with the press off a button. I got the HAL pins for the buttons, just don't know if there is something in HAL to set G54 to zero, on either the X or Y axis. Any ideas ?
Cheers, Peter
Please Log in or Create an account to join the conversation.
28 Apr 2020 01:59 - 28 Apr 2020 02:00 #165889
by rodw
Replied by rodw on topic Set G54 offset with a physical (joypad) button
I use this gcode in a gmocappy macro to centre my torch on a laser crosshair
Just fire a pierce at 0,0 and then move the laser to that position and record the offsets used below.
Just fire a pierce at 0,0 and then move the laser to that position and record the offsets used below.
O<laser_off> sub
G21
G91
G0 X -40.685 Y -26.595
g10 l20 p0 x0 y0
O<laser_off> endsub
M2
Last edit: 28 Apr 2020 02:00 by rodw.
Please Log in or Create an account to join the conversation.
28 Apr 2020 07:15 #165915
by bbsr_5a
Replied by bbsr_5a on topic Set G54 offset with a physical (joypad) button
hi in your INI file in HALUI section whatever number you need to set you can leve unused axis clear
in the POSTGUI file that holds the Joypad pins
net yourpinnamed halui.mdi-command-00 <= input.0.btn-thumbr
net nextpin halui.mdi-command-01 <= input.0.btn-thumbl
MDI_COMMAND=G10 L20 P1 X0 Y0 Z0 # MDI 00
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0
in the POSTGUI file that holds the Joypad pins
net yourpinnamed halui.mdi-command-00 <= input.0.btn-thumbr
net nextpin halui.mdi-command-01 <= input.0.btn-thumbl
Please Log in or Create an account to join the conversation.
03 May 2020 23:28 #166545
by CFE
Replied by CFE on topic Set G54 offset with a physical (joypad) button
Thank you so much, that works like a charm ! Really appreciate that !
Cheers, Peter
Cheers, Peter
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds