0 BEGIN PGM 3045_EN MM 1 ;Program for machining 2 ;a horizontal truncated cone from inside. 3 ;The axis of rotation is parallel to the X axis. 4 ;The part is machine with a ball-nose cutter 5 ;in contour lines whose number you define 6 ;with the parameter SCALE (Q8). 7 ; 8 ;Parameter entry 9 FN 0: Q13 =+35 ;TAPER CENTER IN Y 10 FN 0: Q14 =+0 ;TAPER CENTER IN Z 11 FN 0: Q1 =+0 ;MINIMUM X COORDINATE 12 FN 0: Q5 =+100 ;MAXIMUM X COORDINATE 13 FN 0: Q6 =+30 ;RADIUS WITH X MINIMUM 14 FN 0: Q7 =+20 ;RADIUS WITH X MAXIMUM 15 FN 0: Q8 =+90 ;SCALE 16 FN 0: Q10 =+30 ;SAFETY CLEARANCE 17 FN 0: Q11 =+300 ;FEED RATE FOR PECKING 18 FN 0: Q12 =+1000 ;FEED RATE FOR MILLING 19 ;End of parameter input 20 ; 21 BLK FORM 0.1 Z X+0 Y+0 Z-35 22 BLK FORM 0.2 X+100 Y+70 Z+0 23 ; 24 ;Tool call for ball-nose cutter 25 TOOL CALL 157 Z S4000 26 TOOL CALL Z DL-Q108 ;Length compensation into ball center 27 ; 28 L X-20 Y+0 Z+28 R0 F5555 ;Pre-positioning 29 ; 30 CALL LBL 1 ;Call the machining operation 31 ; 32 ;Reset the coordinate transformation 33 CYCL DEF 7.0 DATUM SHIFT 34 CYCL DEF 7.1 X+0 35 CYCL DEF 7.2 Y+0 36 CYCL DEF 7.3 Z+0 37 ; 38 ;Retract and end program 39 L Z+100 R0 FMAX M2 40 ; 41 LBL 1 ;Machining 42 ;Calculations 43 FN 2: Q16 =+Q6 - +Q108 ;Radius to tool center with X min 44 FN 2: Q17 =+Q7 - +Q108 ;Radius to tool center with X max 45 FN 0: Q27 =+180 ;Starting angle 46 Q37 = 180 / Q8 ;Stepping angle 47 FN 0: Q28 =+0 ;Counter 48 ; 49 ;Move datum to taper center 50 CYCL DEF 7.0 DATUM SHIFT 51 CYCL DEF 7.1 Y+Q13 52 CYCL DEF 7.2 Z+Q14 53 ; 54 CALL LBL 10 55 L X+Q1 Y+Q22 R0 F5555 ;Advance to starting point 56 L Z+Q23 FQ11 ;Move to depth 57 L X+Q5 Y+Q42 Z+Q43 ;Move to end point 58 L IZ+Q10 ;Move to set-up clearance 59 ; 60 LBL 2 61 Q27 = Q27 + Q37 ;Increment the angle 62 Q28 = Q28 + 1 ;Increment the counter 63 FN 11: IF +Q28 GT +Q8 GOTO LBL 99 64 CALL LBL 10 65 L X+Q1 Y+Q22 R0 F5555 ;Advance to starting point 66 L Z+Q23 FQ11 ;Move to depth 67 L X+Q5 Y+Q42 Z+Q43 ;Move to end point 68 L IZ+Q10 ;Move to set-up clearance 69 FN 9: IF +0 EQU +0 GOTO LBL 2 ;Repetition 70 ; 71 LBL 10 ;Calculation of coordinates 72 Q22 = Q16 * COS Q27 ;Y coordinate at X min 73 Q42 = Q17 * COS Q27 ;Y coordinate at X max 74 Q23 = Q16 * SIN Q27 ;Z coordinate at X min 75 Q43 = Q17 * SIN Q27 ;Z coordinate at X max 76 LBL 0 77 LBL 99 ;End of machining 78 LBL 0 79 END PGM 3045_EN MM