( Rectangular Probing ) ( ) ( This program is based on smartProbe, but is a bit different ) ( probed location to the file 'probe-results.ngc' in the same directory ) ( as the .ini file ) (Configuration section) G20 (Inches) F20 (probe speed) http://www.linuxcnc.org/index.php/english/component/kunena/?func=view&catid=38&id=13940&limit=6 # = 0 #= 1 #=-.5 #= 0.0 #=.125 #=.1 #=[#/4] #=1.1 (Z safety) #=1 (Z probe) #=-.1 (End configuration section) #5070=0 (LOGOPEN,probe-results.ngc) #=0 G0Z[#] G0 X[#] Y[#] o1 while [# lt fix[[#-#]/#]] G0 Y[#+#*#] o2 if [[[#/2] - fix[#/2]] eq 0] #=1 o2 else #=-1 o2 endIf (G38.3 Z[-.1]) o399 if [#5070 NE 0] (LOG,#5061 #5062 #5063) #=#5061 #=#5061 #=#5061 o399 else #=#5400 #=#5401 #=#5402 o399 endIf #=0 (0 for Z, 1 for x) o400 while [# lt #] o410 if [#lastContactDirection EQ 0] (code for the case that the last contact was in the z- direction) o410 endIf o420 if [#lastContactDirection EQ 1] (code for the case that the last contact was in the x+ direction) g01 X[-#*#] o420 endIf g38.3 Z[#+d] o430 while [#5070 NE 0] (back off the undercut and try again) g01 X[-#*#] g38.3 Z[#+d] o430 endWhile G38.3 X[#lastXLocation>+[d*#]] o440 if [#5070 NE 0] (LOG,#5061 #5062 #5063) #=#5061 #=#5062 #=#5063 #=1 o400 continue o440 endIf G38.3 Z[#] o440 if [#5070 NE 0] (LOG,#5061 #5062 #5063) #=#5061 #=#5062 #=#5063 #=0 o400 continue o440 endIf #=#5420 #=#5421 #=#5422 #=0 o400 endWhile G0Z[#] #=[#+1] O1 endWhile (LOGCLOSE) G0Z[#] G0X[#]Y[#] M2