0 BEGIN PGM 5010-EN MM 1 ;Program for deburring a hole drilled into 2 ;a horizontal cylinder outer surface with 3 ;a ball nose cutter. 4 ;The cylinder axis must be parallel to 5 ;the Y axis. 6 ;The datum of the X and Z axis is in the 7 ;center of the cylinder 8 ; 9 BLK FORM 0.1 Z X-13 Y+0 Z+0 10 BLK FORM 0.2 X+0 Y+10 Z+13 11 ; 12 ;Input parameters 13 FN 0: Q1 =-8 ;HOLE CENTER IN X AXIS 14 FN 0: Q2 =+5 ;HOLE CENTER IN Y AXIS 15 FN 0: Q3 =+0.5 ;DEPTH OFFSET OF TOOL 16 FN 0: Q4 =+0.5 ;LATERAL OFFSET OF TOOL 17 FN 0: Q5 =+100 ;PITCH OF THE CIRCULAR PATH 18 FN 0: Q6 =+13 ;CYLINDER RADIUS 19 FN 0: Q7 =+180 ;STARTING ANGLE IN THE PLANE 20 FN 0: Q8 =+20 ;LENGTH OF CYLINDER 21 FN 0: Q9 =+3 ;HOLE RADIUS 22 FN 0: Q10 =+15 ;Z HEIGHT FOR PRE-POSITIONING 23 FN 0: Q11 =+200 ;FEED RATE FOR PLUNGING 24 FN 0: Q12 =+500 ;FEED RATE FOR MILLING 25 ; 26 ;Pre milling of the cylinder 27 ;Tool call ball-nose cutter 28 TOOL CALL 105 Z S5000 29 TOOL CALL DL-Q108 ;Length compensation by the ball radius 30 ;Call program 50101-en.h 31 CALL PGM 50101-en.h 32 L Z+50 R0 FMAX M5 33 ;Pre milling of the cylinder is completed 34 ; 35 ;Drilling 36 ;Tool call drilling tool 37 TOOL CALL 3 Z S1000 38 L Z+100 R0 FMAX M3 39 ;Definiton of the drilling cycle 40 CYCL DEF 1.0 PECKING 41 CYCL DEF 1.1 SET UP2 42 CYCL DEF 1.2 DEPTH-20 43 CYCL DEF 1.3 PLNGNG5 44 CYCL DEF 1.4 DWELL0 45 CYCL DEF 1.5 F300 46 L X+Q1 Y+Q2 R0 FMAX 47 L Z+Q15 R0 FMAX 48 CYCL CALL 49 L Z+50 R0 FMAX M5 50 ;Drilling is completed 51 ; 52 ;Tool call ball-nose cutter for deburring 53 TOOL CALL 101 Z S10000 54 TOOL CALL DL-Q108 ;Length compensation by the ball radius 55 ;Call sub program 56 CALL LBL 1 57 ; 58 ;End of program 59 L Z+50 R0 F5000 M2 60 ; 61 ;Subprogram 62 LBL 1 63 FN 0: Q25 =+0 ;Counter 64 FN 1: Q26 =+Q6 + +Q3 ;Effectiv tube radius 65 FN 0: Q27 =+Q7 ;Actual angle in plane 66 FN 4: Q37 =+360 DIV +Q5 ;Angle step in plane 67 FN 1: Q29 =+Q9 + +Q4 ;Effectiv hole radius 68 CC X+Q1 Y+Q2 ;Circle center 69 L Z+100 R0 FMAX M3 ;Pre positioning 70 LP PR+Q29 PA+Q27 RL F9999 ; 71 L Z+Q10 F9999 72 CALL LBL 11 ;Call calculation new Z value 73 L Z+Q23 FQ11 ;Z depth infeed 74 LBL 10 75 FN 1: Q27 =+Q27 + +Q37 ;Calculation new angle 76 Q25 = Q25 + 1 ;Counter update 77 CALL LBL 11 ;Call calculation new Z value 78 CP PA+Q27 Z+Q23 DR+ ;Move to the new angle and Z value 79 FN 12: IF +Q25 LT +Q5 GOTO LBL 10 80 LBL 0 81 LBL 11 ;Calculation new Z value 82 Q21 = Q1 + Q29 * COS Q27 83 Q23 = SQRT ( SQ Q26 - SQ Q21 ) 84 LBL 0 85 END PGM 5010-EN MM