0 BEGIN PGM 7070-EN MM 1 ;Program for outside machining of a 2 ;cylindrical surface with a toroid cutter. 3 ;The cylinder axis is parallel to the Y-axis. 4 ;Machining is done in a circular path around 5 ;a center point in X- and Z-axis, and the 6 ;stepover is made in the Y-axis. The motion 7 ;on both sides is from bottom to top. The 8 ;pitch indicates in how many paths each side 9 ;is divided. The control calculates how great 10 ;the stepover must be. At the beginning the 11 ;tool is positioned with a correction of its 12 ;radius and at the end the last motion is 13 ;done at the defined position added up with 14 ;the radius. 15 ; 16 BLK FORM 0.1 Z X-55 Y+0 Z-55 17 BLK FORM 0.2 X+55 Y+100 Z+0 18 ; 19 ;Input parameter 20 FN 0: Q1 =+0 ;CYLINDER CENTER IN THE X-AXIS 21 FN 0: Q2 =-50.1 ;CYLINDER CENTER IN THE Z-AXIS 22 FN 0: Q3 =+0 ;STARTING POINT IN THE Y-AXIS 23 ; ;MINIMUM COORDINATE 24 FN 0: Q4 =+100 ;END POINT OF THE Y-AXIS 25 ; ;MAXIMUM COORDINATE 26 FN 0: Q5 =+50 ;PITCH 27 ; ;NUMBER OF MOTIONS EACH SIDE 28 FN 0: Q6 =+50 ;CYLINDER RADIUS 29 FN 0: Q7 =+10 ;SAFETY HIGHT 30 FN 0: Q8 =+600 ;FEED RATE FOR MILLING 31 FN 0: Q9 =+300 ;FEED RATE FOR PLUNGING 32 FN 0: Q30 =+5 ;TOOL CUTTING EDGE RADIUS 33 ;Input parameter completed 34 ; 35 ;Tool call toroid cutter 36 TOOL CALL 115 Z S8000 37 TOOL CALL Z DL-Q30 38 ; 39 ; 40 ;Calculation 41 FN 2: Q31 =+Q108 - +Q30 ;Calculate tool radius 42 FN 1: Q26 =+Q6 + +Q30 ;Effectiv radius to the center of the cuts 43 FN 1: Q10 =+Q1 + +Q31 ;Circle center in X for the first side 44 FN 2: Q11 =+Q1 - +Q31 ;Circle center in X for the second side 45 FN 2: Q13 =+Q3 - +Q108 ;Starting point 46 FN 1: Q14 =+Q4 + +Q108 ;End point 47 FN 2: Q15 =+Q14 - +Q13 ;Track 48 FN 4: Q16 =+Q15 DIV +Q5 ;Stepover 49 FN 2: Q17 =+Q5 - +1 ;Number of repetitions 50 FN 1: Q18 =+Q6 + +Q108 ;Pre-positioning 51 FN 1: Q19 =+Q1 + +Q18 ;Pre-positioning 52 FN 2: Q20 =+Q1 - +Q18 ;Pre-positioning second side 53 ;Calculations completed 54 ; 55 L Z+100 R0 FMAX ;Move to a safe position 56 ; 57 ;First side 58 L X+Q19 Y+Q13 R0 FMAX M3 ;Pre-positioning 59 L Z+Q7 R0 FMAX ;Move to the safety hight 60 CC X+Q10 Z+Q2 ;Center of circular path 61 LBL 1 62 L X+Q19 R0 FMAX 63 LP PR+Q26 PA+90 FQ9 ;Infeed 64 L IY+Q16 R0 FQ8 ;Stepover 65 CP IPA-90 DR- FQ8 ;Circular path 66 L Z+Q7 R0 FMAX ;Move to the safety hight 67 CALL LBL 1 REPQ17 ;Repetition 68 ; 69 ;Second side 70 L X+Q20 Y+Q14 R0 FMAX ;Pre-positioning second side 71 CC X+Q11 Z+Q2 ;Center of the circular path 72 LBL 2 73 L X+Q20 R0 FMAX 74 LP PR+Q26 PA-90 FQ9 ;Infeed 75 L IY-Q16 R0 FQ8 ;Stepover 76 CP IPA+90 DR+ FQ8 ;Circular path 77 L Z+Q7 R0 FMAX ;Move to the safety hight 78 CALL LBL 2 REPQ17 ;Repetition 79 ; 80 ;Move back and end of program 81 L Z+100 R0 FMAX M30 82 END PGM 7070-EN MM