0 BEGIN PGM 7025_EN MM 1 ;Program for outside machining 2 ;of a reclining, torus-shaped object. 3 ;The machining operation is performed 4 ;with a ball-nose cutter in contour lines 5 ;so that the milling path runs in the X/Y plane 6 ;and the infeed is in the X/Z plane. 7 ; 8 ;Parameter entry 9 FN 0: Q1 =+50 ;CENTER IN 1ST AXIS 10 FN 0: Q2 =+50 ;CENTER IN 2ND AXIS 11 FN 0: Q3 =+25 ;TORUS RADIUS R 12 FN 0: Q4 =+0 ;Z-COORDINATE AT TORUS CENTER 13 FN 0: Q5 =+20 ;TORUS RADIUS r 14 FN 0: Q10 =+20 ;CLEARANCE HEIGHT 15 FN 0: Q11 =+90 ;NUMBER OF COUNTOUR LINES 16 FN 0: Q14 =+600 ;FEED RATE FOR MILLING 17 FN 0: Q15 =+9999 ;FEED RATE FOR PRE-POSITIONING 18 FN 0: Q16 =+300 ;PLUNGING FEED RATE 19 ;End of parameter input 20 ; 21 BLK FORM 0.1 Z X+0 Y+0 Z-5 22 BLK FORM 0.2 X+100 Y+100 Z+21 23 ; 24 ;Tool call for ball-nose cutter 25 TOOL CALL 155 Z S8000 26 TOOL CALL DL-Q108 ;Length compensation by ball radius 27 ; 28 ;Calculations 29 FN 1: Q6 =+Q5 + +Q108 ;COMPENSATED RADIUS 30 FN 1: Q7 =+Q1 + +Q3 ;Coordinate X at torus center 31 FN 4: Q12 =+180 DIV +Q11 ;Stepping angle 32 FN 2: Q13 =+Q11 - +1 ;Number of repeats 33 ;Calculations completed 34 ; 35 L X+Q1 Y+Q2 R0 FQ15 M3 ;Pre-position to center 36 L Z+Q10 FQ15 ;Move to clearance height 37 CC Z+Q4 X+Q7 ;Define center in X/Z plane 38 LP PR+Q6 PA-90 R0 FQ16 ;Move to first radius and depth 39 CC X+Q1 Y+Q2 ;Define center in X/Y plane 40 CP IPA-360 DR- FQ14 ;Move on a circular path 41 LBL 1 ;Repetition 42 CC Z+Q4 X+Q7 ;Define center in X/Z plane 43 CP IPA+Q12 DR+ FQ14 ;Move by stepping angle 44 CC X+Q1 Y+Q2 ;Define center in X/Y plane 45 CP IPA-360 DR- FQ14 ;Move on a circular path 46 CALL LBL 1 REPQ13 ;Call repetition 47 L Z+100 R0 FQ15 M2 ;Retract and end program 48 END PGM 7025_EN MM