o sub O IF [#<_hal[probe.set_zero]> EQ 5] (cancel Z offsets) G92.1 G49 G10 L20 P0 Z[#<_hal[axis.2.joint-pos-cmd]>] O ENDIF #=#<_z> (save current Z position) G91 F #<_hal[probe.ps_searchvel]> G38.2 Z[-#<_hal[probe.ps_probe_max]>] G1 Z[#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED> F #<_hal[probe.ps_probevel]> G4 P0.5 G38.2 Z[-#<_hal[probe.ps_probe_latch]>*2] G90 (back to start point) G1 Z# F#<_ini[TOOLSENSOR]RAPID_SPEED> o endsub M2