0 BEGIN PGM 10652_EN MM 1 FN 11: IF +Q8 GT +0 GOTO LBL 199 ;Jump if no machining possible 2 FN 11: IF +Q8 GT +Q2 GOTO LBL 199 ;Jump if no machining possible 3 FN 1: Q21 =+Q1 + +Q2 ;Absolute value of starting position 4 FN 1: Q22 =+Q1 + +Q2 ;Absolute value of pilot hole depth 5 FN 1: Q23 =+Q1 + +Q3 ;Height for chip removal 6 FN 1: Q24 =+Q22 + +Q11 ;Pilot hole depth with safety clearance 7 FN 1: Q28 =+Q1 + +Q8 ;Absolute value of final depth 8 FN 1: Q31 =+Q1 + +Q11 ;Absolute value of safety clearance 9 FN 1: Q32 =+Q1 + +Q12 ;Absolute value of 2nd safety position 10 FN 0: Q33 =+0 ;Infeed counter 11 TOOL CALL Z S100 ;Spindle speed for traverse into the pilot hole 12 L Z+Q31 R0 FMAX M4 ;Moving to safety clearance 13 L Z+Q24 FQ4 ;Moving to starting position 14 L M5 ;Spindle stop 15 TOOL CALL Z SQ6 ;Drilling speed 16 L Z+Q22 FQ5 M3 ;Working rpm and feed 17 LBL 2 ;Beginning of loop 18 FN 1: Q21 =+Q21 + -Q7 ;New depth 19 FN 1: Q30 =+Q21 + +Q10 ;Chip breaking height 20 FN 1: Q33 =+Q33 + +1 ;Chip breaking counter 21 FN 1: Q34 =+Q30 + +Q11 ;Z new infeed 22 FN 9: IF +Q21 EQU +Q28 GOTO LBL 99 ;Depth reached? 23 FN 12: IF +Q21 LT +Q28 GOTO LBL 99 ;To deep? 24 L Z+Q21 FQ5 ;Moving to new depth 25 L Z+Q30 FQ4 ;Chip breaking 26 FN 12: IF +Q33 LT +Q13 GOTO LBL 2 ;Counting the chip breaks 27 FN 0: Q33 =+0 ;Resetting the counter 28 L Z+Q23 FQ4 ;Moving to chip-breaking height 29 CYCL DEF 9.0 DWELL TIME 30 CYCL DEF 9.1 DWELLQ9 31 L Z+Q34 FQ4 ;Moving to position for next downfeed 32 FN 11: IF +Q21 GT +Q28 GOTO LBL 2 ;Depth reached? 33 LBL 99 34 L Z+Q28 FQ5 ;Traverse to total hole depth 35 LBL 100 36 CYCL DEF 9.0 DWELL TIME 37 CYCL DEF 9.1 DWELLQ9 38 TOOL CALL SQ14 ;Spindle speed for retraction 39 L Z+Q31 FQ4 ;Moving to safety clearance 40 L Z+Q32 FMAX ;Moving to 2nd safety clearance 41 L M5 ;Spindle stop 42 LBL 199 43 END PGM 10652_EN MM