0 BEGIN PGM 3200_EN MM 1 ;NC program for machining a cable 2 ;feedthrough. It consists of a hole and a 3 ;slot that is roundet at a radius to prevent 4 ;kinking. The workpiece is machined with 5 ;only one tool. 6 ;At program beginning, you define all 7 ;parameters and the tool required for 8 ;machining. Here it is important to remember 9 ;that it can plunge vertically and that the 10 ;cutting length in the tool axis is greater 11 ;than the arc radius to be machined. 12 ;After this, the control moves the tool at the 13 ;drilling porsition and then to the safety 14 ;clearance. Then the control moves the tool 15 ;at a defined feed rate to the drilling depth. 16 ;When the drilling depth is reached, the tool 17 ;retracts to the slot detph and then moves 18 ;at the milling feed rate around the length 19 ;of the slot. Please note that this movement 20 ;is allways in the positiv X direction. You 21 ;define the direction of the slot with the 22 ;"rotation" parameter. When the end point of 23 ;the slot has been reached, the control moves 24 ;the tool to the safety clearance and then 25 ;back to the hole center. There the tool moves 26 ;in the Z axis to the starting point of the 27 ;radius. The control divides the radius into 28 ;individual linear sections and traverses 29 ;them in a program section repeat. You specify 30 ;the number of repetitions in the parameter 31 ;Q12. 32 ; 33 ; 34 ; 35 BLK FORM 0.1 Z X-10 Y-10 Z-30 36 BLK FORM 0.2 X+30 Y+10 Z+0 37 ; 38 ;INPUT 39 FN 0: Q1 =+0 ;X POSITION OF HOLE 40 FN 0: Q2 =+0 ;Y POSITION OF HOLE 41 FN 0: Q3 =+10 ;ANGLE OF ROTATION 42 FN 0: Q4 =+2 ;SAFETY CLEARANCE 43 FN 0: Q5 =-30 ;TOTAL HOLE DEPTH 44 FN 0: Q6 =+300 ;FEED RATE FOR PLUNGING 45 FN 0: Q7 =-5 ;SLOT DEPTH 46 FN 0: Q8 =+6000 ;FEED RATE FOR RETRACTION 47 FN 0: Q9 =+20 ;SLOT LENGTH 48 FN 0: Q10 =+1000 ;FEED RATE FOR MILLING 49 FN 0: Q11 =+10 ;ROUNDING RADIUS 50 FN 0: Q12 =+45 ;NO. OF STEPS IN THE RADIUS 51 ;END OF INPUT 52 ; 53 ;Tool call for cutter 54 TOOL CALL 5 Z S9000 55 L Z+100 R0 FMAX M3 ;Retract 56 ; 57 ;Calculations 58 FN 2: Q21 =+Q7 - +Q11 ;Circle center in Z 59 FN 4: Q22 =+90 DIV +Q12 ;Stepping angle 60 FN 2: Q23 =+Q12 - +1 ;Number of repetitions 61 ;End of calculations 62 ; 63 ;Shift datum to the hole center 64 CYCL DEF 7.0 DATUM SHIFT 65 CYCL DEF 7.1 X+Q1 66 CYCL DEF 7.2 Y+Q2 67 ;Rotation 68 CYCL DEF 10.0 ROTATION 69 CYCL DEF 10.1 ROT+Q3 70 ; 71 L X+0 Y+0 R0 FMAX ;Pre-position to hole center 72 L Z+Q4 F9999 ;Move to safety clearance 73 L Z+Q5 FQ6 ;Drilling 74 L Z+Q7 FQ8 ;Retract to slot depth 75 L X+Q9 FQ10 ;Slot milling 76 L Z+Q4 FQ8 ;Retraction of safety clearance 77 L X+0 Y+0 R0 FMAX ;Pre-position to hole center 78 CC Z+Q21 X+Q11 ;Center of radius 79 LP PR+Q11 PA-90 R0 FQ6 ;Move to radius strat point 80 LBL 2 ;Loop 81 LP IPA+Q22 FQ10 ;Move bz stepping angle 82 CALL LBL 2 REPQ23 ;Repetition of loop 83 L Z+Q4 R0 FMAX ;Move to safety clearance 84 L Z+100 R0 FMAX M5 ;Retract 85 ; 86 ;Reset datum shift and rotation 87 CYCL DEF 10.0 ROTATION 88 CYCL DEF 10.1 ROT+0 89 CYCL DEF 7.0 DATUM SHIFT 90 CYCL DEF 7.1 X+0 91 CYCL DEF 7.2 Y+0 92 CYCL DEF 7.3 Z+0 93 M30 ;Program end 94 END PGM 3200_EN MM