0 BEGIN PGM 2080_EN MM 1 ;Program for machining radii larger than 2 ;the maximum value in the NC block. 3 ;The radius divided into individual 4 ;linear movements. 5 ;With the distribution, you specify 6 ;the number of these linear elements. 7 ;The chord of the arc goes from the starting point 8 ;in positive Y direction and can be rotated 9 ;into the desired direction. 10 ;You define the radius through a parameter (Q6) 11 ;and a factor (Q8). 12 ;The product of this multiplication is the radius 13 ;with which the control calculates the linearized 14 ;circular path. 15 ; 16 ;Parameter entry 17 FN 0: Q16 =+100 ;STARTING COORDINATE IN X 18 FN 0: Q17 =+0 ;STARTING COORDINATE IN Y 19 FN 0: Q7 =+1000 ;CHORD LENGTH IN Y 20 FN 0: Q3 =-30 ;MILLING DEPTH 21 FN 0: Q5 =+1000 ;SPACING 22 FN 0: Q6 =+5 ;RADIUS 23 FN 0: Q8 =+1000 ;RADIUS FACTOR 24 FN 0: Q10 =+2 ;SAFETY CLEARANCE 25 FN 0: Q11 =+500 ;FEED RATE FOR PECKING 26 FN 0: Q12 =+2000 ;FEED RATE FOR MILLING 27 FN 0: Q15 =+40 ;RADIUS COMPENSATION 28 ; ;+40=NO COMPENSATION 29 ; ;+41=RADIUS COMPENSATION AT LEFT 30 ; ;+42=RADIUS COMPENSATION AT RIGHT 31 FN 0: Q18 =+0 ;ROTATION 32 ;End of parameter input 33 ; 34 BLK FORM 0.1 Z X+0 Y+0 Z-100 35 BLK FORM 0.2 X+400 Y+1000 Z+0 36 ; 37 ;Tool call 38 TOOL CALL 51 Z S5000 39 ; 40 ;Pre-positioning 41 L Z+20 R0 F9999 M3 42 ; 43 ;Shift the datum to the starting point 44 CYCL DEF 7.0 DATUM SHIFT 45 CYCL DEF 7.1 X+Q16 46 CYCL DEF 7.2 Y+Q17 47 ;Activate rotation 48 CYCL DEF 10.0 ROTATION 49 CYCL DEF 10.1 ROT+Q18 50 ; 51 ;Call operation 52 CALL LBL 1 53 ; 54 ;Reset coordinate transformation 55 CYCL DEF 10.0 ROTATION 56 CYCL DEF 10.1 ROT+0 57 CYCL DEF 7.0 DATUM SHIFT 58 CYCL DEF 7.1 X+0 59 CYCL DEF 7.2 Y+0 60 ; 61 ;Retract and end program 62 L Z+20 R0 F9999 M2 63 ; 64 ;Machining 65 LBL 1 66 ;Calculations 67 FN 0: Q1 =+0 ;Starting point in X of datum shift 68 FN 0: Q2 =+0 ;Starting point in Y of datum shift 69 FN 0: Q31 =-Q7 ;Current axis section 70 FN 1: Q32 =+Q2 + +Q7 ;Y End 71 FN 0: Q33 =+0 ;Current length 72 FN 3: Q35 =+Q6 * +Q8 ;Radius conversion 73 FN 3: Q36 =+Q35 * +Q35 ;Radius squared 74 FN 4: Q37 =+Q7 DIV +2 ;Halve the chord 75 FN 4: Q38 =+Q7 DIV +Q5 ;Increment in Y 76 FN 3: Q30 =+Q38 * +2 ;Increment in axis 77 CALL LBL 10 78 FN 0: Q34 =+Q25 ;Change in X 79 FN 2: Q34 =+Q1 - +Q34 ;Starting point shift 80 FN 0: Q22 =+Q2 ;Starting point in Y 81 ; 82 ;Deciding the radius compensation and moving 83 ;to the starting point 84 FN 10: IF +Q15 NE +0 GOTO LBL Q15 85 LBL 40 ;No radius compensation 86 L X+Q1 Y+Q2 R0 FMAX M3 ;Starting position 87 FN 9: IF +0 EQU +0 GOTO LBL 43 88 LBL 41 ;Radius compensation at left 89 L X+Q1 Y+Q2 RL FMAX M3 ;Starting position 90 FN 9: IF +0 EQU +0 GOTO LBL 43 91 LBL 42 ;Radius compensation at right 92 L X+Q1 Y+Q2 RR FMAX M3 ;Starting position 93 LBL 43 94 L Z+Q10 FMAX ;Move to set-up clearance 95 L Z+Q3 FQ11 ;Move in Z to depth 96 ; 97 LBL 5 98 FN 1: Q22 =+Q22 + +Q38 ;Update Y 99 FN 1: Q33 =+Q33 + +Q38 ;Update the length 100 FN 11: IF +Q22 GT +Q32 GOTO LBL 99 ;End of Y reached? 101 FN 9: IF +Q22 EQU +Q32 GOTO LBL 99 ;End of Y reached? 102 FN 1: Q31 =+Q31 + +Q30 ;Update the axis section 103 CALL LBL 10 104 FN 1: Q21 =+Q34 + +Q25 ;New X coordinate 105 L X+Q21 Y+Q22 FQ12 ;Move to new X an Y coordinate 106 FN 12: IF +Q33 LT +Q32 GOTO LBL 5 ;End not reached? 107 FN 9: IF +Q33 EQU +Q32 GOTO LBL 5 108 ; 109 LBL 99 110 L X+Q1 Y+Q32 FMAX ;Move to last position 111 L Z+Q10 FMAX ;Move in Z to safety clearance 112 L IX+Q108 IY+Q108 R0 ;Cancel the radius compensation 113 LBL 0 114 ; 115 LBL 10 ;Calculate the X step 116 FN 4: Q25 =+Q31 DIV +2 117 FN 3: Q25 =+Q25 * +Q25 118 FN 2: Q25 =+Q36 - +Q25 119 FN 5: Q25 = SQRT +Q25 120 FN 2: Q25 =+Q35 - +Q25 ;Change of the X axis 121 LBL 0 122 END PGM 2080_EN MM