0 BEGIN PGM 7110-EN MM 1 ;Program for outside machining of a 2 ;hemisphere with an end mill. 3 ;The motion is done on a X/Z path from the 4 ;bottom to the top. This movement is 5 ;devided in individual linear 6 ;movements. After this path the coordinate 7 ;system gets rotated and the next motion 8 ;start. The pitches define in how many 9 ;linear movements the path is devided, and 10 ;thus influence the accuracy and quality 11 ;of the surface. 12 ; 13 ;Input parameter 14 FN 0: Q1 =+55 ;SPHERE CENTER IN THE X-AXIS 15 FN 0: Q2 =+55 ;SPHERE CENTER IN THE Y-AXIS 16 FN 0: Q3 =-50 ;SPHERE CENTER IN THE Z-AXIS 17 FN 0: Q4 =+50 ;SPHERE RADIUS 18 FN 0: Q5 =+60 ;PITCH IN THE PLANE X/Y 19 ; ;DEFINES IN HOW MANY MILLING 20 ; ;PATHS THE 360DEGREE IN PLANE 21 ; ;X/Y ARE DIVIDED 22 FN 0: Q6 =+15 ;PITCH IN THE PLANE X/Z 23 ; ;DEFINES IN HOW MANY LINEAR 24 ; ;MOTIONS THE 3D PATH IN X,Y 25 ; ;AND Z-AXIS IS DIVIDED 26 FN 0: Q7 =+20 ;CLEARANCE TO SIDE 27 ; ;DISTANCE BETWEEN SPHERE AND 28 ; ;TOOL IN THE PRE POSITIONING 29 FN 0: Q8 =+3 ;SET UP CLEARANCE 30 FN 0: Q9 =+2000 ;FEED RATE FOR PREPOSITIONING 31 FN 0: Q10 =+500 ;FEED RATE FOR PLUNGING 32 FN 0: Q11 =+800 ;FEED RATE FOR MILLING 33 ;Iput parameter completed 34 ; 35 BLK FORM 0.1 Z X+0 Y+0 Z-55 36 BLK FORM 0.2 X+110 Y+110 Z+0 37 ; 38 ;Tool call end mill 39 TOOL CALL 20 Z S6000 40 ; 41 ;Calculation 42 FN 4: Q15 =+360 DIV +Q5 ;Angle step in plane X/Y 43 FN 2: Q25 =+Q5 - +1 ;Number of repetitions in plane X/Y 44 FN 4: Q16 =+90 DIV +Q6 ;Angle step in plane X/Z 45 FN 2: Q26 =+Q6 - +1 ;Number of repetitions in plane X/Z 46 FN 1: Q17 =+Q7 + +Q4 ;Position for pre positioning 47 FN 1: Q18 =+Q4 + +Q8 ;Safe position in Z-axis 48 ;calculations completed 49 ; 50 ;Datum shift to sphere center 51 CYCL DEF 7.0 DATUM SHIFT 52 CYCL DEF 7.1 X+Q1 53 CYCL DEF 7.2 Y+Q2 54 CYCL DEF 7.3 Z+Q3 55 ; 56 ;Pre positioning 57 L X+Q17 Y+0 R0 FMAX M3 58 L Z+Q8 R0 FMAX 59 ; 60 L Y+0 Z+0 R0 FQ10 ;First plunging 61 LBL 2 62 CC Z+0 X+Q108 63 L Y+0 R0 FQ11 64 LP PR+Q4 PA+90 R0 FQ11 ;Approach to contour 65 LBL 3 66 LP IPA-Q16 FQ11 ;Linear step in plane X/Z 67 CALL LBL 3 REPQ26 ;Repeat the linear step 68 L Z+Q18 R0 FQ9 ;Move to safe postion 69 L X+Q17 R0 FQ9 ;New prepositioning 70 L Z+0 Y+0 R0 FQ10 71 ;Rotate coordinate system 72 CYCL DEF 10.0 ROTATION 73 CYCL DEF 10.1 IROT+Q15 74 CALL LBL 2 REPQ25 ;Repeat circle path 75 ;Reset all coordinate transformations 76 CYCL DEF 10.0 ROTATION 77 CYCL DEF 10.1 ROT+0 78 CYCL DEF 7.0 DATUM SHIFT 79 CYCL DEF 7.1 X+0 80 CYCL DEF 7.2 Y+0 81 CYCL DEF 7.3 Z+0 82 ;Move back and end of program 83 L Z+100 R0 FMAX M30 84 END PGM 7110-EN MM