0 BEGIN PGM 7115-EN MM 1 ;Program for outside machining of a 2 ;hemisphere with a toroid cutter. 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 =+50 ;SPHERE CENTER IN THE X-AXIS 15 FN 0: Q2 =+50 ;SPHERE CENTER IN THE Y-AXIS 16 FN 0: Q3 =-45 ;SPHERE CENTER IN THE Z-AXIS 17 FN 0: Q4 =+45 ;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 FN 0: Q12 =+5 ;TOOL CUTTING EDGE RADIUS 34 ;Input parameter completed 35 ; 36 BLK FORM 0.1 Z X+0 Y+0 Z-55 37 BLK FORM 0.2 X+100 Y+100 Z+0 38 ; 39 ;Tool call toroid cutter 40 TOOL CALL 119 Z S8000 DL-Q12 41 ; 42 ;Calculations 43 Q21 = Q108 - Q12 ;Calculate tool and cutting edge radius 44 FN 1: Q19 =+Q4 + +Q12 ;Calculate tool and cutting edge radius 45 FN 4: Q15 =+360 DIV +Q5 ;Angle step in plane X/Y 46 FN 2: Q25 =+Q5 - +1 ;Number of repetitins in plane X/Y 47 FN 4: Q16 =+90 DIV +Q6 ;Angle step in plane X/Z 48 FN 2: Q26 =+Q6 - +1 ;Number of repetitions in plane X/Z 49 FN 1: Q17 =+Q7 + +Q4 ;Position for pre positioning 50 FN 1: Q18 =+Q4 + +Q8 ;Safe position in Z-axis 51 FN 1: Q18 =+Q18 + +Q12 ;Safe position in Z-axis 52 ;Calculations completed 53 ; 54 ;Datum shift to sphere center 55 CYCL DEF 7.0 DATUM SHIFT 56 CYCL DEF 7.1 X+Q1 57 CYCL DEF 7.2 Y+Q2 58 CYCL DEF 7.3 Z+Q3 59 ; 60 ;Pre positioning 61 L X+Q17 Y+0 R0 FMAX M3 62 L Z+Q18 R0 FMAX 63 ; 64 L Y+0 Z+0 R0 FQ10 ;First plunging 65 LBL 2 66 CC Z+0 X+Q21 67 L Y+0 R0 FQ11 68 LP PR+Q19 PA+90 R0 FQ11 ;Approach to contour 69 LBL 3 70 LP IPA-Q16 R0 FQ11 ;Linear step in plane X/Z 71 CALL LBL 3 REPQ26 ;Repeat linear step 72 L Z+Q18 R0 FQ9 ;Move to safe position 73 L X+Q17 R0 FQ9 ;New pre positioning 74 L Y+0 Z+0 R0 FQ10 75 ;Rotate coordinate system 76 CYCL DEF 10.0 ROTATION 77 CYCL DEF 10.1 IROT+Q15 78 CALL LBL 2 REPQ25 ;Repeat circle path 79 ;Reset all coordinate transformations 80 CYCL DEF 10.0 ROTATION 81 CYCL DEF 10.1 ROT+0 82 CYCL DEF 7.0 DATUM SHIFT 83 CYCL DEF 7.1 X+0 84 CYCL DEF 7.2 Y+0 85 CYCL DEF 7.3 Z+0 86 ;Move back and end of program 87 L Z+100 R0 FMAX M30 88 END PGM 7115-EN MM