(author: Chris P) (version: 0.4) (date: 06/27/24) (Probe back top side for y,z 0,0 position) (Start probe position is over back edge of stock) (inside the step off width distance and within max z distance) (ensure all settings have been set properly according to help diagrams) o sub (uses NGCGUI style arg spec) (number after "=" in comment is default value) # = #3014 (=99) # = #3015 (=0) # = #3016 (=10.0) # = #3017 (=50) # = #3018 (=0.5000) # = #3019 (=0.1000) # = #3020 (=0.5000) # = #3021 (=0.1000) # = #3022 (=0.0000) # = #3023 (=0.5000) # = #3030 (=0) # = #3032 (=0) (Cancel G92 offsets) G92.1 (Cancel Feedrate Override) M50 P0 # = #[5202 + [20 * #5220]] (Probe Tool Safety Check) o100 if [#5400 NE #] (DEBUG, Specified probe tool %d# not in spindle, aborting) M50 P1 o return o100 endif (Probe Diameter) # = #5410 (Probing depth from the z probed clearance height, used for z moves) # = [# + # + #] (Call sub "probe_z_minus_sub" to Probe top of Workpiece) o call [#3014][#3015][#3016][#3017][#3020][#3021][#3030] (Probe Y Positioning Move, Step Off Width) G91 F[#] G38.3 Y[#] (Probe Y Positioning Move, to Probing Depth) F[#] G38.3 Z-[#] (Call sub "probe_y_minus" to Probe y- side of Workpiece) o call [#3014][#3015][#3016][#3017][#3018][#3019][#3032] # = #<_value> (value returned safety check, aborts if no value returned) o110 if [# EQ 1 AND #<_value_returned> NE 1] (DEBUG, Missing Y Sub returned edge parameter, aborting) M50 P1 o return o110 endif (Probe Completion Move to Z Clearance Plane, and Y Zero) G91 F[#] G38.3 Z[#] G90 F[#] G38.3 Y[#] (probe mode rules for WCO or probe position measuring only) o120 if [# EQ 0] (Record Zero in selected axes and WCO) G10 L2 P#5220 Y[# + #] o120 endif (Reinstate Feedrate Override) M50 P1 o endsub M2 (end program)