530 probing

This commit is contained in:
lovebird 2025-03-13 09:03:40 +01:00
parent a41d688757
commit 77cef44808

View File

@ -100,6 +100,10 @@ four := 4
five := 5
c9k := 9999
# Operation Codes
op_probe420 := 420 #Measure angle probe cycle
op_probe421 := 421 #Measure hole probe cycle
op_probe422 := 422 #Measure outside circle probe cycle
fastmode$ : yes$ #CD_VAR Enable Quick Post Processing, (set to no for debug)
bug1$ : 2 #0=No display, 1=Generic list box, 2=Editor
bug2$ : 40 #Append postline labels, non-zero is column position?
@ -172,6 +176,10 @@ min_speed : 50 #Minimum spindle speed
nobrk$ : no$ #Omit breakup of x, y & z rapid moves
progname$ : 1 #Use uppercase for program name (sprogname)
# Probe cycle postblock declarations
postblock pprobe420$ #Measure angle probe cycle
postblock pprobe421$ #Measure hole probe cycle
postblock pprobe422$ #Measure outside circle probe cycle
# --------------------------------------------------------------------------
# Rotary Axis Settings
# --------------------------------------------------------------------------
@ -654,6 +662,13 @@ fmt " DIA. OFF. - " 4 toffnote #Note format
fmt " LEN. - " 4 tlngnote #Note format
fmt " DIA. - " 1 tldia$ #Note format
# --------------------------------------------------------------------------
#Probe cycle format statements
fmt " Q320=" 20 probe_setup #Setup clearance
fmt " Q260=" 20 probe_height #Clearance height
fmt " Q261=" 20 probe_depth #Measuring height
fmt " Q262=" 20 probe_nom_dia #Nominal diameter
fmt " Q301=" 20 move_height #Move to clearance height
# --------------------------------------------------------------------------
fmt 4 stck_crnr$ #Origin corner of stock (0 - 8)
fmt X 2 stck_x$ #X origin of block
fmt Y 2 stck_y$ #Y origin of block
@ -882,6 +897,9 @@ psof$ #Start of file for non-zero tool number
if output_M6, n$, "M6", e$
#ptoolcomment
!opcode$
if opcode$ = op_probe420, pprobe420$
if opcode$ = op_probe421, pprobe421$
if opcode$ = op_probe422, pprobe422$
#pindex
if mi1$ > one, absinc$ = zero
pcan1, n$, *sgcode, pfxout, pfyout, strr0, smaxrate, *spindle, e$
@ -1671,13 +1689,67 @@ pcanceldc$ #Cancel canned drill cycle
pxyzcout
!zabs, !zinc
prv_gcode$ = zero
prv_gcode$ = zero
pprobe420$ #Function call for probe cycle 420
pprobe420
prv_gcode$ = zero
pprobe421$ #Function call for probe cycle 421
pprobe421
prv_gcode$ = zero
pprobe422$ #Function call for probe cycle 422
pprobe422
prv_gcode$ = zero
# --------------------------------------------------------------------------
#Subprogram postblocks
#sub_trnstyp - 0=mirror, 1=rotate, 2=scale, 3=translate
#sub_trnmthd (mirror) - 0=X axis, 1=Y axis, 2=line
#sub_trnmthd (rotate) - 0=tplane, 1=tplane origin only, 2=coordinates
# --------------------------------------------------------------------------
1669|# --------------------------------------------------------------------------
1670|pprobe420 #CYCL DEF 420 MEASURE ANGLE
1671| probe_setup = setup
1672| probe_height = clearht
1673| probe_depth = depth
1674| n$, *sdef, "420 MEASURE ANGLE ~", e$
1675| *probe_setup, " ;SET-UP CLEARANCE ~", e$
1676| *probe_height, " ;CLEARANCE HEIGHT ~", e$
1677| *probe_depth, " ;MEASURING HEIGHT ~", e$
1678| n$, *scyclcall, e$
1679|
1680|pprobe421 #CYCL DEF 421 MEASURE HOLE
1681| probe_setup = setup
1682| probe_height = clearht
1683| probe_depth = depth
1684| probe_nom_dia = tldia$
1685| move_height = 1 #1=Move to clearance height between measuring points
1686| n$, *sdef, "421 MEASURE HOLE ~", e$
1687| *probe_setup, " ;SET-UP CLEARANCE ~", e$
1688| *probe_height, " ;CLEARANCE HEIGHT ~", e$
1689| *probe_depth, " ;MEASURING HEIGHT ~", e$
1690| *probe_nom_dia, " ;NOMINAL DIAMETER ~", e$
1691| *move_height, " ;MOVE TO CLEARANCE HEIGHT ~", e$
1692| n$, *scyclcall, e$
1693|
1694|pprobe422 #CYCL DEF 422 MEAS. CIRCLE OUTSIDE
1695| probe_setup = setup
1696| probe_height = clearht
1697| probe_depth = depth
1698| probe_nom_dia = tldia$
1699| move_height = 1 #1=Move to clearance height between measuring points
1700| n$, *sdef, "422 MEAS. CIRCLE OUTSIDE ~", e$
1701| *probe_setup, " ;SET-UP CLEARANCE ~", e$
1702| *probe_height, " ;CLEARANCE HEIGHT ~", e$
1703| *probe_depth, " ;MEASURING HEIGHT ~", e$
1704| *probe_nom_dia, " ;NOMINAL DIAMETER ~", e$
1705| *move_height, " ;MOVE TO CLEARANCE HEIGHT ~", e$
1706| n$, *scyclcall, e$
1707|
1708|# --------------------------------------------------------------------------
1709|#Subprogram postblocks
1710|#sub_trnstyp - 0=mirror, 1=rotate, 2=scale, 3=translate
1711|#sub_trnmthd (mirror) - 0=X axis, 1=Y axis, 2=line
1712|#sub_trnmthd (rotate) - 0=tplane, 1=tplane origin only, 2=coordinates
1713|# --------------------------------------------------------------------------
psub_call_m$ #Call to main level, single tool
psub_call_trans