0 BEGIN PGM 1075_EN MM 1 ;Program for milling a taper on a helical path. 2 ;The part is machined depending on how 3 ;you define the parameter: 4 ;- Inside or outside 5 ;- From top to bottom or vice versa 6 ;- Clockwise or counterclockwise 7 ;- From the largest to the smallest diameter 8 ; or vice versa 9 ; 10 ;The control divides the required tool paths 11 ;into linear steps. 12 ;With the spacing you define the number 13 ;of linear element in a 360-degree path. 14 ;For each of these linear steps, 15 ;the control calculates an X,Y and Z 16 ;coordinate to be moved to. 17 ; 18 BLK FORM 0.1 Z X+0 Y+0 Z-32 19 BLK FORM 0.2 X+100 Y+100 Z+0 20 ; 21 ;Tool call for end mill 22 TOOL CALL 15 Z S5000 23 ; 24 ;Parameter entry 25 FN 0: Q1 =+50 ;CENTER IN X 26 FN 0: Q2 =+50 ;CENTER IN Y 27 FN 0: Q4 =-1 ;MACHINING DIRECTION 28 ; ;-1= CLOCKWISE 29 ; ;+1= COUNTERCLOCKWISE 30 FN 0: Q5 =+180 ;PITCH 31 FN 0: Q6 =+40 ;START OF RADIUS 32 FN 0: Q7 =+0 ;STARTING ANGLE 33 FN 0: Q8 =+15 ;TAPER ANGLE 34 FN 0: Q9 =+0.2 ;DEPTH CHANGE PER STEP 35 FN 0: Q10 =+2 ;CLEARANCE HEIGHT 36 FN 0: Q11 =+300 ;FEED RATE FOR PECKING 37 FN 0: Q12 =+1000 ;FEED RATE FOR MILLING 38 FN 0: Q3 =+0 ;Z-COORDINATE AT START 39 FN 0: Q13 =-30 ;Z-COORDINATE AT END 40 FN 0: Q14 =+0 ;LATERAL OVERSIZE 41 FN 0: Q15 =+1 ;RADIUS COMPENSATION 42 ; ;-1= INSIDE 43 ; ;+1= OUTSIDE 44 FN 0: Q16 =+2 ;LATERAL SAFETY CLEARANCE 45 ;End of parameter input 46 ; 47 ;Call of operation 48 CALL LBL 1 49 ; 50 ;Retract and end program 51 L Z+100 R0 FMAX M30 52 ; 53 ;Machining 54 LBL 1 55 FN 3: Q31 =+Q16 * +Q15 ;Calculation of lateral safety clearance 56 FN 3: Q38 =+Q108 * +Q15 ;Calculate tool radius 57 FN 3: Q39 =+Q14 * +Q15 ;Calculation of lateral oversize 58 FN 0: Q23 =+Q3 ;Current Z coordinate 59 FN 0: Q25 =+0 ;Counter 60 FN 1: Q26 =+Q6 + +Q38 ;Tool radius compensation 61 FN 1: Q26 =+Q26 + +Q39 ;Oversize compensation 62 FN 1: Q28 =+Q26 + +Q31 ;Radius for pre-positioning 63 FN 0: Q27 =+Q7 ;Current angle 64 Q36 = TAN Q8 * Q9 ;Radius change per 360 degrees 65 FN 4: Q36 =+Q36 DIV +Q5 ;Radius step size 66 FN 4: Q37 =+360 DIV +Q5 ;Angle step size 67 FN 3: Q37 =+Q37 * +Q4 ;Angle step in machining direction 68 FN 2: Q35 =+Q13 - +Q3 ;Z range 69 Q33 = Q9 / Q5 * SGN Q35 ;Step size in Z 70 Q35 = ( Q13 - Q3 ) / Q33 ;Number of Z steps 71 Q35 = ABS Q35 ;Positive counting value 72 ; 73 CC X+Q1 Y+Q2 ;Define the center point 74 LP PR+Q28 PA+Q7 R0 FMAX M3 ;Pre-positioning 75 L Z+Q10 R0 FMAX ;Move to set-up clearance 76 L Z+Q3 R0 FQ11 ;Move to start coordinate in Z 77 LP PR+Q26 PA+Q7 R0 FQ12 ;Move to start position 78 ; 79 ;Program repeats 80 LBL 2 81 FN 1: Q26 =+Q26 + +Q36 ;Update the radius 82 FN 1: Q27 =+Q27 + +Q37 ;Update the angle 83 FN 7: Q21 = COS +Q27 ;Calculation of X coordinate 84 FN 3: Q21 =+Q21 * +Q26 ;Calculation of X coordinate 85 FN 1: Q21 =+Q21 + +Q1 ;New X coordinate 86 FN 6: Q22 = SIN +Q27 ;Calculation of Y coordinate 87 FN 3: Q22 =+Q26 * +Q22 ;Calculation of Y coordinate 88 FN 1: Q22 =+Q22 + +Q2 ;New Y coordinate 89 FN 1: Q23 =+Q23 + +Q33 ;New Z coordinate 90 FN 1: Q25 =+Q25 + +1 ;Update the counter 91 L X+Q21 Y+Q22 Z+Q23 FQ12 ;Move to new coordinate 92 FN 12: IF +Q25 LT +Q35 GOTO LBL 2 ;Compare whether number of steps reached 93 LP IPR+Q31 ;Retract laterally 94 L Z+Q10 R0 FMAX ;Move to set-up clearance 95 LBL 0 96 END PGM 1075_EN MM