0 BEGIN PGM 2070_EN MM 1 ;Program for milling an elliptical path. 2 ;The contour is divided into individual 3 ;linear elements. The number of these linear 4 ;movements determines how precisely the 5 ;linearized path and the elliptical path are 6 ;equal. The motion is driven counterclockwise. 7 ;You define all necessary values in 8 ;parameters. 9 ; 10 ;Input parameter 11 FN 0: Q1 =+0 ;CENTER OF THE ELLIPSE IN X-AXIS 12 FN 0: Q2 =+0 ;CENTER OF THE ELLIPSE IN Y-AXIS 13 FN 0: Q3 =-10 ;DEPTH 14 FN 0: Q5 =+50 ;PITCH 15 ; ;DEFINES IN HOW MANY LINEAR 16 ; ;ELEMENTS THE PATH IS DIVIDED 17 FN 0: Q6 =+45 ;ELLIPSE SEMIAXIS X 18 FN 0: Q16 =+25 ;ELLIPSE SEMIAXIS Y 19 FN 0: Q7 =+0 ;STARTING ANGLE PLANE X/Y 20 FN 0: Q17 =+360 ;END ANGLE IN PLANE X/Y 21 FN 0: Q8 =+0 ;ROTATION OF THE ELLIPSE 22 FN 0: Q10 =+2 ;SET UP CLEARANCE 23 FN 0: Q11 =+300 ;FEED RATE FOR PLUNGING 24 FN 0: Q12 =+555 ;FEED RATE FOR MILLING 25 FN 0: Q14 =+0 ;ALLOWANCE FOR SIDE 26 ; ;VALUE BY WHICH THE SEMIAXIS 27 ; ;ARE CHANGED 28 FN 0: Q15 =+2 ;RADIUS COMPENSATION 29 ; ;0=NO COMPENSATION 30 ; ;1=RADIUS COMPENSATION TO THE LEFT 31 ; ;2=RADIUS COMPENSATION TO THE RIGHT 32 ;Input parameter completed 33 ; 34 BLK FORM 0.1 Z X-60 Y-50 Z-40 35 BLK FORM 0.2 X+60 Y+50 Z+0 36 ; 37 ;Tool call milling tool 38 TOOL CALL 10 Z S3000 39 ; 40 ;Call motion 41 CALL LBL 1 42 ; 43 ;Move back and end of program 44 L Z+100 R0 FMAX M30 45 ; 46 ;Motion 47 LBL 1 48 ;Coordinaten tranformation 49 CYCL DEF 7.0 DATUM SHIFT 50 CYCL DEF 7.1 X+Q1 51 CYCL DEF 7.2 Y+Q2 52 CYCL DEF 10.0 ROTATION 53 CYCL DEF 10.1 ROT+Q8 54 ; 55 FN 0: Q23 =+Q3 ;Copy Z-value 56 FN 0: Q27 =+Q7 ;Current angle=starting angle 57 FN 1: Q31 =+Q6 + +Q14 ;Effective X-semiaxis 58 FN 1: Q32 =+Q16 + +Q14 ;Effective Y-semiaxis 59 FN 0: Q35 =+0 ;Counter 60 FN 2: Q37 =+Q17 - +Q7 ;Angle step 61 FN 4: Q37 =+Q37 DIV +Q5 ;Angle step 62 CALL LBL 4 ;Call position calculation 63 ; 64 ;Consideration of the radius compensation 65 ;and approach to the first position 66 FN 9: IF +Q15 EQU +1 GOTO LBL 11 67 FN 9: IF +Q15 EQU +2 GOTO LBL 12 68 LBL 10 69 L X+Q21 Y+Q22 R0 FMAX M3 70 FN 9: IF +0 EQU +0 GOTO LBL 2 71 LBL 11 72 L X+Q21 Y+Q22 RL FMAX M3 73 FN 9: IF +0 EQU +0 GOTO LBL 2 74 LBL 12 75 L X+Q21 Y+Q22 RR FMAX M3 76 ; 77 LBL 2 78 L Z+Q10 FMAX ;Pre positioning of the Z-axis 79 L Z+Q3 FQ11 ;Plunging 80 ; 81 LBL 3 ;Repetition 82 FN 1: Q27 =+Q27 + +Q37 ;Update angle 83 FN 1: Q35 =+Q35 + +1 ;Update counter 84 FN 11: IF +Q35 GT +Q5 GOTO LBL 99 ;Comparison whether the end angle is reached 85 CALL LBL 4 ;Call position calculation 86 L X+Q21 Y+Q22 Z+Q23 FQ11 ;Move to the new position 87 FN 12: IF +Q35 LT +Q5 GOTO LBL 3 ;Comparison whether more repetitions are necessary 88 ; 89 LBL 99 90 L Z+Q10 R0 FMAX ;Move back Z-axis 91 ;Reset coordinate transfers 92 CYCL DEF 10.0 ROTATION 93 CYCL DEF 10.1 ROT+0 94 CYCL DEF 7.0 DATUM SHIFT 95 CYCL DEF 7.1 X+0 96 CYCL DEF 7.2 Y+0 97 LBL 0 98 ; 99 LBL 4 ;Calculate new X and Y position 100 FN 7: Q21 = COS +Q27 101 FN 3: Q21 =+Q21 * +Q31 102 FN 6: Q22 = SIN +Q27 103 FN 3: Q22 =+Q32 * +Q22 104 LBL 0 105 END PGM 2070_EN MM