29 lines
671 B
Plaintext
Executable File
29 lines
671 B
Plaintext
Executable File
; Semi-manual drill with Z retract - positions X/Y, retracts Z, pauses for manual drill
|
|
; Params: #1=x, #2=y, #3=z_clearance
|
|
; BUG: endsub name (drill_man_retract) doesn't match sub name (drill_retr)
|
|
o<drill_retr> sub
|
|
; x1, y1, z_clr
|
|
; #1 #2, #3
|
|
|
|
G90 ; absolute x,y,z
|
|
|
|
o1 if [EXISTS[#<_z_clearance>]]
|
|
#<z_clearance> = #<_z_clearance>
|
|
o1 else
|
|
#<z_clearance> = #3
|
|
o1 endif
|
|
|
|
;;;;;;;;;; PROGRAM ;;;;;;;;;
|
|
|
|
M101 ; enable Z for CNC retract
|
|
G0 Z#<z_clearance>
|
|
G0 X#1 Y#2
|
|
M102 ; disable Z-axis (M101 enables)
|
|
M0 ; pause for manual drilling
|
|
M101 ; re-enable Z for retract
|
|
G0 Z#<z_clearance>
|
|
|
|
o<drill_man_retract> endsub
|
|
|
|
M2
|