0 BEGIN PGM 4220_EN MM 1 ;Program for machining the sides and top of a cuboid. 2 ;The datum in X and Y must lie 3 ;in the center on the bottom in the Z axis. 4 ;You define the parameters of the blank 5 ;and finished part mass in the the individual axes. 6 ;Also, you define the tool, cutting data, 7 ;oversizes and safety clearances. 8 ;Then the control calculates the mass for the blank form 9 ;and the oversizes for the individual surfaces. 10 ;Then the blank form and tool call are defined 11 ;with the previously entered or calculated parameters. 12 ;Then the control compares the blank form 13 ;with finished part to decide which surfaces to machine. 14 ;Finally, the control machines the required surfaces. 15 ;IMPORTANT INFORMATION! 16 ;There must be no fixtures on the surfaces to be machined. 17 ;Before the rotary axes are moved, 18 ;a clearance position must be reached. 19 ;This position depends on the individual machine 20 ;and you have to adapt it. 21 ; 22 ;Parameter entry 23 Q1 = 550 ;FINISHED DIMENSION IN X 24 Q2 = 200 ;FINISHED DIMENSION IN Y 25 Q3 = 200 ;FINISHED DIMENSION IN Z 26 Q4 = 650 ;BLANK DIMENSION IN X 27 Q5 = 210 ;BLANK DIMENSION IN Y 28 Q6 = 210 ;BLANK DIMENSION IN Z 29 Q9 = 51 ;TOOL NUMBER 30 Q10 = 5200 ;SPINDLE SPEED 31 Q11 = 1200 ;FEED RATE FOR MILLING 32 Q15 = 3 ;PLUNGING DEPTH 33 Q16 = 0.3 ;FINISHING ALLOWANCE FOR DEPTH 34 Q17 = 800 ;FINISHING FEED RATE 35 Q18 = 3 ;SET-UP CLEARANCE 36 Q19 = 50 ;CLEARANCE HEIGHT FOR PRE-POSITIONING 37 ;End of parameter input 38 ; 39 ;Calculations 40 Q7 = Q4 / 2 ;Base dimension in X for BLK 41 Q8 = Q5 / 2 ;Base dimension in Y for BLK 42 Q12 = ( Q4 - Q1 ) / 2 ;Oversize in X per side 43 Q13 = Q1 / 2 ;Finished dimension in X from workpiece center 44 Q22 = ( Q5 - Q2 ) / 2 ;Oversize in Y per side 45 Q23 = Q2 / 2 ;Finished dimension in Y from workpiece center 46 Q30 = Q19 + Q12 ;Pre-positioning during machining in X 47 Q31 = Q19 + Q22 ;Pre-positioning during machining in Y 48 Q32 = Q19 + Q6 ;Pre-positioning during machining in Z 49 ;End of calculations 50 ; 51 BLK FORM 0.1 Z X-Q7 Y-Q8 Z+0 52 BLK FORM 0.2 X+Q7 Y+Q8 Z+Q6 53 ; 54 ;Tool call 55 TOOL CALL Q9 Z SQ10 FQ11 56 ; 57 M3 58 ; 59 ;Comparison of blank dimension and finished dimension 60 ;in X axis. If the operation is required, jump to LBL1 61 FN 11: IF +Q4 GT +Q1 GOTO LBL 1 62 ; 63 LBL 3 ;LBL for return jump 64 ;Comparison of blank dimension and finished dimension 65 ;in Y axis. If the operation is required, jump to LBL2 66 FN 11: IF +Q5 GT +Q2 GOTO LBL 2 67 ; 68 LBL 4 ;LBL for return jump 69 ;Comparison of blank dimension and finished dimension 70 ;in Z axis. If the operation is required, jump to LBL5 71 FN 11: IF +Q6 GT +Q3 GOTO LBL 5 72 ; 73 LBL 6 ;LBL for return jump 74 ; 75 M140 MB MAX F9999 ;Retract 76 M30 ;End of program 77 ; 78 ;Subprograms 79 ;Machining in X 80 LBL 1 81 ;Datum shift to finished part edge 82 CYCL DEF 7.0 DATUM SHIFT 83 CYCL DEF 7.1 X+Q13 84 L Z+Q32 R0 FMAX ;Move to clearance position in Z 85 L X+0 Y+0 R0 FMAX ;Move to tilt position 86 ;Tilt working plane 87 PLANE SPATIAL SPA+90 SPB+0 SPC+90 MOVE DIST200 FMAX 88 ;Pre-positioning in Z to clearance height 89 L Z+Q30 R0 FMAX 90 ;Pre-positioning in X and Y 91 L X+0 Y+0 R0 FMAX 92 ;Define the cycle 93 CYCL DEF 232 FACE MILLING ~ Q389=+2 ;STRATEGY ~ Q225=-Q8 ;STARTNG PNT 1ST AXIS ~ Q226=+0 ;STARTNG PNT 2ND AXIS ~ Q227=+Q12 ;STARTNG PNT 3RD AXIS ~ Q386=+0 ;END POINT 3RD AXIS ~ Q218=+Q5 ;FIRST SIDE LENGTH ~ Q219=+Q6 ;2ND SIDE LENGTH ~ Q202=+Q15 ;MAX. PLUNGING DEPTH ~ Q369=+Q16 ;ALLOWANCE FOR FLOOR ~ Q370=+1 ;MAX. OVERLAP ~ Q207=+Q11 ;FEED RATE FOR MILLNG ~ Q385=+Q17 ;FINISHING FEED RATE ~ Q253= MAX ;F PRE-POSITIONING ~ Q200=+5 ;SET-UP CLEARANCE ~ Q357=+5 ;CLEARANCE TO SIDE ~ Q204=+50 ;2ND SET-UP CLEARANCE 94 CYCL CALL 95 M140 MB+200 ;Retract 96 L X+0 Y+Q6 R0 FMAX ;Move to tilt position 97 PLANE RESET MOVE DIST200 FMAX ;Tilt back the working plane 98 ;Datum shift to 2nd edge of finished part 99 CYCL DEF 7.0 DATUM SHIFT 100 CYCL DEF 7.1 X-Q13 101 L X+0 R0 FMAX ;Move to tilt position 102 ;Tilt working plane 103 PLANE SPATIAL SPA+90 SPB+0 SPC+270 MOVE DIST200 FMAX 104 ;Pre-positioning in Z to clearance height 105 L Z+Q30 R0 FMAX 106 ;Pre-positioning in X and Y 107 L X+0 Y+0 R0 FMAX 108 ;Define the cycle 109 CYCL DEF 232 FACE MILLING ~ Q389=+2 ;STRATEGY ~ Q225=-Q8 ;STARTNG PNT 1ST AXIS ~ Q226=+0 ;STARTNG PNT 2ND AXIS ~ Q227=+Q12 ;STARTNG PNT 3RD AXIS ~ Q386=+0 ;END POINT 3RD AXIS ~ Q218=+Q5 ;FIRST SIDE LENGTH ~ Q219=+Q6 ;2ND SIDE LENGTH ~ Q202=+Q15 ;MAX. PLUNGING DEPTH ~ Q369=+Q16 ;ALLOWANCE FOR FLOOR ~ Q370=+1 ;MAX. OVERLAP ~ Q207=+Q11 ;FEED RATE FOR MILLNG ~ Q385=+Q17 ;FINISHING FEED RATE ~ Q253= MAX ;F PRE-POSITIONING ~ Q200=+5 ;SET-UP CLEARANCE ~ Q357=+5 ;CLEARANCE TO SIDE ~ Q204=+50 ;2ND SET-UP CLEARANCE 110 CYCL CALL 111 M140 MB+200 ;Retract 112 L X+0 Y+Q6 R0 FMAX ;Move to tilt position 113 ;Tilt back the working plane 114 PLANE RESET MOVE DIST200 FMAX 115 ;Reset the datum 116 CYCL DEF 7.0 DATUM SHIFT 117 CYCL DEF 7.1 X+0 118 CYCL DEF 7.2 Y+0 119 CYCL DEF 7.3 Z+0 120 FN 9: IF +0 EQU +0 GOTO LBL 3 ;Return jump 121 ;*************************************** 122 ;Machining in Y 123 LBL 2 124 ;Datum shift to finished part edge 125 CYCL DEF 7.0 DATUM SHIFT 126 CYCL DEF 7.1 Y+Q23 127 L X+0 Y+0 R0 FMAX ;Move to tilt position 128 ;Tilt working plane 129 PLANE SPATIAL SPA+90 SPB+0 SPC+180 MOVE DIST200 FMAX 130 ;Pre-positioning in Z to clearance height 131 L Z+Q31 R0 FMAX 132 ;Pre-positioning in X and Y 133 L X+0 Y+0 R0 FMAX 134 ;Define the cycle 135 CYCL DEF 232 FACE MILLING ~ Q389=+2 ;STRATEGY ~ Q225=-Q13 ;STARTNG PNT 1ST AXIS ~ Q226=+0 ;STARTNG PNT 2ND AXIS ~ Q227=+Q22 ;STARTNG PNT 3RD AXIS ~ Q386=+0 ;END POINT 3RD AXIS ~ Q218=+Q1 ;FIRST SIDE LENGTH ~ Q219=+Q6 ;2ND SIDE LENGTH ~ Q202=+Q15 ;MAX. PLUNGING DEPTH ~ Q369=+Q16 ;ALLOWANCE FOR FLOOR ~ Q370=+1 ;MAX. OVERLAP ~ Q207=+Q11 ;FEED RATE FOR MILLNG ~ Q385=+Q17 ;FINISHING FEED RATE ~ Q253= MAX ;F PRE-POSITIONING ~ Q200=+5 ;SET-UP CLEARANCE ~ Q357=+5 ;CLEARANCE TO SIDE ~ Q204=+50 ;2ND SET-UP CLEARANCE 136 CYCL CALL 137 M140 MB+200 ;Retract 138 L X+0 Y+Q6 R0 FMAX ;Move to tilt position 139 ;Tilt back the working plane 140 PLANE RESET MOVE DIST200 FMAX 141 ;Datum shift to 2nd edge of finished part 142 CYCL DEF 7.0 DATUM SHIFT 143 CYCL DEF 7.1 Y-Q23 144 L Y+0 R0 FMAX ;Move to tilt position 145 PLANE SPATIAL SPA+90 SPB+0 SPC+0 TURN MB100 FMAX 146 ;Pre-positioning in Z to clearance height 147 L Z+Q31 R0 FMAX 148 ;Pre-positioning in X and Y 149 L X+0 Y+0 R0 FMAX 150 ;Define the cycle 151 CYCL DEF 232 FACE MILLING ~ Q389=+2 ;STRATEGY ~ Q225=-Q13 ;STARTNG PNT 1ST AXIS ~ Q226=+0 ;STARTNG PNT 2ND AXIS ~ Q227=+Q22 ;STARTNG PNT 3RD AXIS ~ Q386=+0 ;END POINT 3RD AXIS ~ Q218=+Q1 ;FIRST SIDE LENGTH ~ Q219=+Q6 ;2ND SIDE LENGTH ~ Q202=+Q15 ;MAX. PLUNGING DEPTH ~ Q369=+Q16 ;ALLOWANCE FOR FLOOR ~ Q370=+1 ;MAX. OVERLAP ~ Q207=+Q11 ;FEED RATE FOR MILLNG ~ Q385=+Q17 ;FINISHING FEED RATE ~ Q253= MAX ;F PRE-POSITIONING ~ Q200=+5 ;SET-UP CLEARANCE ~ Q357=+5 ;CLEARANCE TO SIDE ~ Q204=+50 ;2ND SET-UP CLEARANCE 152 CYCL CALL 153 M140 MB+200 ;Retract 154 L X+0 Y+Q6 R0 FMAX ;Move to tilt position 155 ;Tilt back the working plane 156 PLANE RESET MOVE DIST200 FMAX 157 ;Reset the datum 158 CYCL DEF 7.0 DATUM SHIFT 159 CYCL DEF 7.1 X+0 160 CYCL DEF 7.2 Y+0 161 CYCL DEF 7.3 Z+0 162 FN 9: IF +0 EQU +0 GOTO LBL 4 ;Return jump 163 ;******************************************* 164 ;Machining in Z 165 LBL 5 166 ;Define the cycle 167 CYCL DEF 232 FACE MILLING ~ Q389=+2 ;STRATEGY ~ Q225=-Q7 ;STARTNG PNT 1ST AXIS ~ Q226=-Q8 ;STARTNG PNT 2ND AXIS ~ Q227=+Q6 ;STARTNG PNT 3RD AXIS ~ Q386=+Q3 ;END POINT 3RD AXIS ~ Q218=+Q4 ;FIRST SIDE LENGTH ~ Q219=+Q5 ;2ND SIDE LENGTH ~ Q202=+Q15 ;MAX. PLUNGING DEPTH ~ Q369=+Q16 ;ALLOWANCE FOR FLOOR ~ Q370=+1 ;MAX. OVERLAP ~ Q207=+Q11 ;FEED RATE FOR MILLNG ~ Q385=+Q17 ;FINISHING FEED RATE ~ Q253= MAX ;F PRE-POSITIONING ~ Q200=+5 ;SET-UP CLEARANCE ~ Q357=+5 ;CLEARANCE TO SIDE ~ Q204=+50 ;2ND SET-UP CLEARANCE 168 CYCL CALL 169 M140 MB+300 F5000 ;Retract 170 FN 9: IF +0 EQU +0 GOTO LBL 6 ;Return jump 171 END PGM 4220_EN MM