0 BEGIN PGM 7100-EN MM 1 ;Program for outside machining of a 2 ;hemisphere with a ball-nose cutter. 3 ;The process is done in contour lines, so 4 ;that the milling path is in the X/Y 5 ;plane and the plunging is in the plane X/Z. 6 ; 7 BLK FORM 0.1 Z X-50 Y-50 Z-55 8 BLK FORM 0.2 X+50 Y+50 Z+0 9 ; 10 ;Input parameter 11 FN 0: Q1 =+0 ;SPHERE CENTER IN THE X-AXIS 12 FN 0: Q2 =+0 ;SPHERE CENTER IN THE Y-AXIS 13 FN 0: Q3 =-50 ;SPHERE CENTER IN THE Z-AXIS 14 FN 0: Q4 =+50 ;SPHERE RADIUS 15 FN 0: Q5 =+45 ;NUMBER OF CONTOUR LINES 16 FN 0: Q6 =+3 ;SET UP CLEARANCE 17 FN 0: Q7 =+500 ;FEED RATE FOR PLUNGING 18 FN 0: Q8 =+800 ;FEED RATE FOR MILLING 19 FN 0: Q9 =+5 ;BALL RADIUS OF THE TOOL 20 ;Parameter input completed 21 ; 22 ;Tool call ball-nose cutter 23 TOOL CALL 157 Z S8000 DL-Q9 24 ; 25 ; 26 ;Calculations 27 FN 1: Q10 =+Q4 + +Q9 ;Effective radius in the tool center 28 FN 1: Q11 =+Q10 + +Q6 ;Radius for Pre-positioning 29 FN 4: Q12 =+90 DIV +Q5 ;Angle step 30 FN 2: Q13 =+Q5 - +1 ;Number of repetitions 31 ;Calculation completed 32 ; 33 ;Pre-positioning 34 L Z+200 R0 FMAX 35 L X+Q1 Y+Q2 R0 F9999 M3 36 CC X+Q1 Z+Q3 37 LP PR+Q11 PA+0 R0 FMAX 38 LP PR+Q10 R0 FQ7 39 LBL 1 ;Repetitions 40 CC Z+Q3 X+Q1 41 CP IPA+Q12 DR+ FQ7 42 CC X+Q1 Y+Q2 43 CP IPA+360 DR+ FQ8 44 CALL LBL 1 REPQ13 45 ; 46 ;End of program 47 L Z+100 R0 FMAX M30 48 END PGM 7100-EN MM