Files
linuxcnc-configs/my-emco/custom-m-codes/mytouch.ngc
2026-03-21 23:48:08 +01:00

30 lines
666 B
Plaintext

o<mytouch> sub
o10 if [EXISTS[#<_hal[jog-axis-sel]>]]
#<selected-axis> = #<_hal[jog-axis-sel]>
;(DEBUG, my-mpg.axis-selector: #<selected-axis>)
(touch off z axis)
o20 if [#<selected-axis> EQ 0]
G10 L20 P0 Z0
M103
(MSG, touch off z axis)
o20 endif
(touch off y axis)
o30 if [#<selected-axis> EQ 1]
G10 L20 P0 Y0
M103
(MSG, touch off y axis)
o30 endif
(touch off x axis)
o40 if [#<selected-axis> EQ 2]
G10 L20 P0 X0
M103
(MSG, touch off x axis)
o40 endif
o10 else
(DEBUG, didn't exist)
o10 endif
o<mytouch> endsub
M2