
Originally Posted by
EFI-Unlimited
Here is the post code:
inches_per_rev : .1
step : 1
step_z : 0
step_depth : 0
step_degrees : 0
----
pparameter$
if prmcode$ = 20007, met_tool = rparsngl(sparameter$,11) #Check for "Metric Tool" check box in tool dialog
----
fmt Z 1 refht$ # reference height for drilling (where drilling starts from)
fmt Z 1 peck1$ # peck value
fmt F 16 tap_feed # Tapping Feedrate.
fmt H 17 step_degrees #peck tapping degrees
fmt Z 1 step_z # holds the absolute Z value for peck tapping
----
pmisc2$ # Canned Misc #2 Cycle - Pecktap cycle
n$, "M19", e$
n$, "H0", e$
if met_tool = 1,
inches_per_rev = n_tap_thds$ * 0.0393700787
else,
inches_per_rev = 1 / n_tap_thds$
tap_feed = inches_per_rev * ss$
step = 1
step_z = z$ + 1
while step_z > z$,[
step_z = refht$ - (peck1$ * step)
if step_z < z$, step_z = z$
step_depth = refht$ - step_z
step_degrees = (step_depth / inches_per_rev) * 360
n$, *sg01, *tap_feed, *step_z, *step_degrees, e$ #Feed down
step_degrees = 0
n$, *sg01, *refht$, *step_degrees, e$ #feed back out
step = step + 1
]
n$, "M05", e$
n$, *ss$, "M03", e$
Brian
EFI-Unlimited