(author: Chris P, TooTall18) (version: 0.2) (date: 06/27/24) o sub # = #3004 (set from probe screen fast probe feed rate) # = #3005 (set from probe screen slow probe feedrate) # = #3006 (set from probe screen traverse probe feedrate) # = #3007 (max z distance the tool travels before erroring out if not contact is made) # = #3008 (max xy distance the tool travels before erroring out if not contact is made) # = #3009 (distance the tool retracts after making contact during fast feed mode) # = #3010 (G53 distance from home to spindle nose triggering point on touch plate) # = #3011 (activates the tool diameter probe subroutine section) # = #3012 (activates the tool diameter offset position for probe subroutine section) # = #3013 (sets tool setter offset direction to move tool) # = #5410 (current tool's diameter used for offseting probe position in x axis) G92.1 (Cancel G92 offset) M50 P0 # = #5181 # = #5182 # = #5183 # = [# / 2] # = [# - #] # = [# + #] # = [# - #] # = [# + #] o100 if [# EQ 1] o101 if [# EQ 0] # = # o101 else if [# EQ 1] # = # o101 else if [# EQ 2] # = # o101 else if [# EQ 3] # = # o101 endif o100 endif o110 if [2 EQ 2] G49 o110 endif G90 (set absolute coordinates) G53 G1 F[#] Z0 (move to z0 home position) G53 G1 F[#] X# Y# G53 G1 F[#] Z# # = #5422 ;Stores the offset of the current Z coordinate. G91 F # G38.2 Z-[#] (fast tool probe) # = #5063 (save probe result of fast probe to parameters) G1 F[#] Z[#] (retract tool retract distance amount) (Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed) o120 if [# GT 0] (Initiate Slow Z- Probe) G91 F[#] (set probe slow feedrate) G38.2 Z-[# * 2] (slow tool probe) # = #5063 G90 G1 F[#] Z[# + #] o120 endif o130 if [#5070 EQ 1] (verify probe event was succesful) # = #5063 (save slow probe result to parameters) o130 else (DEBUG,Tool Length Offset Probe Failed) o130 endif (Tool Diameter Probe Mode Section, User must define this section as needed) o140 if [# EQ 1] (DEBUG, Tool Diameter Probing is Not Defined in Subroutine) o140 endif o150 if [3 EQ 3] G49 o150 endif G90 (set absolute coordinates) G53 G1 F[#] Z0 (Send Spindle to home zero position) (define new tool length offset parameters) # = [ABS[# + #5063 - #]] G10 L1 P #5400 Z [#] (5400 = tool number) T #5400 G43 H #5400 (enable tool length offset) M50 P1 (reinstate feedrate override) o endsub M2 (end program)