0 BEGIN PGM 4215_EN MM 1 ;Program for milling a slot 2 ;in the cylindrical surface of a shaft. 3 ;The program makes it possible to machine 4 ;the slot with increasing core diameter. 5 ;If you define the parameter "taper length" 6 ;to be smaller than the total length of machining, 7 ;then the machined core diameter 8 ;is kept constant starting from the time point 9 ;at which the taper length is reached 10 ;and ending at the total length. 11 ;If you do not want to machine a taper, 12 ;define the diameter at X0 equal to that 13 ;at the end of the taper. 14 ;This mills a constant slot depth 15 ;up until the total length is reached. 16 ;Also, the programs enables you to continually 17 ;change the pitch of the spiral. 18 ;To do so, enter in the parameter 19 ;"pitch increases per revolution" 20 ;the change in millimeters per shaft revolution. 21 ;The control divides tool paths into individual steps. 22 ;For each of these steps you calculate an X 23 ;and Z coordinate as well as an angle in the A axis. 24 ;With the parameter "Pitch", you define 25 ;the number of steps a 360-degree movement is divided into. 26 ;IMPORTANT INFORMATION! 27 ;The shaft has to be fixed in the center of the A axis. 28 ;The A axis has to be rotated by more than 360 degrees. 29 ;Machining starts a X=0 and move in positive direction. 30 ; 31 BLK FORM CYLINDER X R20 L150 DIST+150 32 ; 33 ;Tool call 34 TOOL CALL 155 Z S5000 35 ; 36 ;Parameter entry 37 Q1 = 15 ;DIAMETER ON SLOT FLOOR 38 ; ;AT X0 39 Q2 = 35 ;DIAMETER ON SLOT FLOOR 40 ; ;AT END OF TAPER 41 Q3 = 75 ;TAPER LENGTH 42 Q4 = 150 ;TOTAL LENGTH OF MACHINING 43 Q5 = 6 ;PITCH AT BEGINNING 44 Q6 = 1.5 ;PITCH INCREASE PER REVOLUTION 45 Q7 = 50 ;SUBDIVISION 46 Q8 = 100 ;CLEARANCE HEIGHT 47 Q9 = 0 ;STARTING ANGLE 48 Q40 = 300 ;FEED RATE FOR PLUNGING 49 Q41 = 1000 ;FEED RATE FOR MILLING 50 ;End of parameter input 51 ; 52 ;Call of operation 53 CALL LBL 10 54 ; 55 ;Retract and end program 56 L Z+100 R0 FMAX M30 57 ; 58 ;Machining 59 LBL 10 60 ;Calculations 61 Q10 = Q2 / 2 - Q1 / 2 ;Change in taper radius 62 Q11 = ATAN ( Q10 / Q3 ) ;Taper angle 63 Q12 = Q1 / 2 ;Starting position in Z 64 Q13 = Q2 / 2 ;End position in Z 65 Q17 = 360 / Q7 ;Stepping angle 66 Q18 = 0 ;Starting position in X 67 Q27 = Q9 ;Starting angle 68 ; 69 L Z+Q8 R0 FMAX M3 ;Move to clearance height 70 L X+0 Y+0 R0 FMAX ;Move to start position in X and Y 71 L X+0 Y+0 Z+Q8 A+Q9 R0 FMAX ;Move to start angle 72 L Z+Q12 R0 FQ40 ;Move to starting depth 73 ; 74 ;Repetition for taper 75 LBL 1 76 Q27 = Q27 + Q17 ;Calculate new angle 77 Q30 = Q27 / 360 * ( Q5 + Q6 * Q27 / 360 ) ;Calculate new X coordinate 78 Q33 = Q12 + TAN Q11 * Q30 ;Calculate new Z coordinate 79 ; 80 L X+Q30 Y+0 Z+Q33 A+Q27 R0 FQ41 ;Move to new coordinate and angle 81 FN 12: IF +Q33 LT +Q13 GOTO LBL 1 ;Comparison of whether end height in Z has been reached 82 ; 83 ;Repetition for shaft 84 LBL 2 85 Q27 = Q27 + Q17 ;Calculate new angle 86 Q30 = Q27 / 360 * ( Q5 + Q6 * Q27 / 360 ) ;Calculate new X coordinate 87 L X+Q30 Y+0 Z+Q13 A+Q27 R0 FQ41 ;Move to new X coordinate and new angle 88 FN 12: IF +Q30 LT +Q4 GOTO LBL 2 ;Comparison of whether end point in X has been reached 89 ;End of machining 90 LBL 0 91 END PGM 4215_EN MM