You are on page 1of 41
CNC y) MACHINE TOOLS 2 CNC MILL CANNED CYCLES (DENFORD NOVANILD TECHNOLOGY CONCEPTS B706B-BA CNC MILL CANNED CYCLES (DENFORD NOVAMILL) INTRODUCTION In this LAP you will learn how canned eycles and subprograms are used to simplify ‘CNC programs. These techniques will allow you to create programs much faster. You will work with sample parts which will help you see the effectiveness of canned cycles and subprograms. ITEMS NEEDED Amatrol or School Supplied 1 Denford Novamill Denford Programming Software Vise, manual or pneumatic Edgefinder 1/4” two-flute end mill #7 Drill 1 1 1 L 1 1 Set of Parallels School Suppl 1 Computer 1 Floppy Disk 1 Aluminum Stock, 3" x 3" x 1" 1 Aluminum Stock, 3° x 2" x 1" FIRST EDITION, LAP 2, REV. A ‘Amato, AMNET, CMSOFT, MCL, MINL.CIM, IST, ITC, VEST and Technovate are trademarks oF registered trademarks of Amat, In. Ail ther brand and produet names are rademarks or registered trademark of teit respoctve comparses. Copyright © 2003 by AMATROL INC. [Al rights Reserved. No part of this publication may be reproduced, anslated, or ranemitedin any form or by any means, electronic, opal, mechancal, or magnet, incixsng but nat ited to photographing, photocopying, recording oF any information storage and retioval system, without writen permission ol the copyright owner, ‘Amato, nc, P.O. Box 2607, Jotorsonile, indiana 47131 USA, Phone 812-296-8285, FAX 812-280-1584 {37088-8A LAP 2 CNC MILL CANNED CYCLES (OENFORD NOVAMILL) Copyright © 2008 Amato, ne 2 TABLE OF CONTENTS - SEGMENT OBJECTIVE OBJECTIVE OBJECTIVE ‘SKILL SEGMENT A OBJECTIVE SKILL a OBJECTIVE SKILL OBJECTIVE = SKILL H ‘SEGMENT OBJECTIVE a OBJECTIVE OBJECTIVE SKILL ‘THE DRILLING CYCLE Define a canned cyce and sve one advantage Erplan tho use ofthe canned sting cycle (881) Enplain the use of the cycle finish Grcode (S80) Use a canned ailing cycle in a CNC progiam ALTERNATE DRILLING CYCLES ....... Explain the use ofthe counterbore/spottace cyclo (G82) ‘Activity 1" Operation ofthe counterbore/spotiace canned cycle Desig a CNC program iat ues a countorboralpotace canned eye Exp the use of the peck dil canned cycle (080) city 2, Operator a peck aioe fa. CNC program that ses @ canned peck dil cycle Bipian te se o fhe Bove cannog cycle (obey ‘Acthty Operation of bore canned cyclo Design @ CNC program that uses a bore canned cycle SUBPROGRAMS......0 0.000000 ceeee Describe the function of a subprogram and ist two advantages Explain the function and oporaton of the M9 subprogram code xian the function and gperation of the M99 subprosram code ‘Acivly 4. Operation of subprograms in CNC programming Design'a GNC program that uses subprograms 'B7055-BA LAP 2_ CNC MILL CANNED GYGLES (OENFORD NOVAMILL) - Copyright © 2004 Amato, ne SEGMENT 1 DEFINE A CANNED CYCLE AND GIVE ONE ADVANTAGE on In many cases, part drawing will call for a hole ora series of holes to be drilled in a part. An easy way to create holes with a CNC machine commands that have been combined into one C-code for case of programming. By simply specifying the type of hole and the location of the hole, a canned eycle program command can be used to ereate a hole using fewer lines of CNC code. Examples of common canned cycles are shown in igure DRILL CYCLE (a@1) COUNTERBORE / SPOTFACE ‘CYCLE (G82) PECK DRILL CYCLE (689) BORE CYCLE (cas) Figure 1. Common Types of Holes Created By Canned Cycles {37088-BA LAP 2 GNC MILL CANNED CYCLES (OENFORD NOVAMILL) Copyright © 2004 Amato, Inc : Any operation can be performed without the use of canned cycles by programming each tool move individually using GO0, GO1, G02, and G03. However, there are many advantages to canned cycles, such as making part features easier to program and easier programs 10 understand. Because of these advantages, fewer mistakes are likely to be made in the program. To help show these advantages, examine the portion of a CNC rogram shown in figure 2. This program shows the individual program commands needed to drill three holes, at (4,4), (5,5), and (6,6). G00 x4 v4 20.5 G00 20.100. GOI 2025 FB... DRILL HOLE #1 G00 20.5 G00 x5¥5, - DRILL HOLE #2 + DRILL HOLE #3 Figure 2. CNC Program Drilling Holes Without a Canned Cycle Now look at the program shown in figure 3. In figure 3, the same three holes are drilled using a canned cycle. As you can see, the program is much simpler allowing less room for error. G00 20.5 GB! X4.¥4 2-025 RO.100 FB, ..... . .ORILL HOLE #1 Bs are *--DRILL HOLE #2 00 X6 6. DRILL HOLE #3 Figure 3. CNC Program Driling Holes With a Canned Cycle '87088-BA LAP 2. CNC MILL CANNED GYGLES (DENFORD NOVAMILL) Copyright © 2004 Amato ne bel S) Sea [2-8 EXPLAIN THE USE OF THE CANNED DRILLING CYCLE (G81) tile The G81 canned drilling cycle is used to drill a hole in a part using @ cone cutting pass. This G-code uses the following syntax. G81 X.. Y..Z..R..F. ‘The X.Y coordinates specify the first hole location on the part and the Z value specifies the depth of the hole to be drilled. The value specified for R indicates the distance above the part when the speed is changed from rapid traverse to the feed rate specified by the letter F. This is shown in figure 4, Notice that the measurements for Z and R Imm Slot Dil © 2mm Slot Dil © 3mm Slot Dil © 4am Slot Dil > Gmnm Slot Dil > 8inm Slot Dill #-© 10mm Slot Dill 12mm Slot Dill © Imm End Mil Figure 8. Tool Library B. Position your mouse over Tools and click the right mouse button, ‘The add tool menu will appear. C. Click Add Tool, ‘A new tool will be added to the bottom of the tool library D, Type #7 Drill in the new tool description ees ‘© 378 (0375 }End ME > 1/2"(0.5") End Mil 1/16" (0.0625"] Ball Nose 178" (0.125"} Bal Nose. 3/16" (0.1875") Ball Nose 1/4" (0.25") Bal Nose 5/16" 0.3125") Ball Nose 3/8" (0.375"] Ball Nose a Slot Mit Figure 9. New Tool 1B7086-BA LAP 2. GNG MILL CANNED CYCLES (OENFORD NOVAMILL) Copyright © 2008 Arata, ine 10 E. Click on the + to display the data fields for the #7 drill. The data fields for the #7 drill will appear. H-@ 3/8" 0.375") Bal Nose F Diameter = 0.0334 ¥ length = 0.0394 ¥ Tool Length offset = 0.0294 ¥ Fite length = 0.0334 F Flute Court = 2 {F Mexamum tool Life = 50 ¥ Curent tool Life = 0 Slot Mill Figure 10. #7 Drill F, Click on the slot mill image. A list of tools will appear. G. Select Drill An image of a drill bit will replace the slot mill image. © 3/8" 0.375") Bal Nose se F Diameter = 0.0394 F lenoth = 0.0394 F Tool Lenghh offset = 0.0394 F Flite length = 0.0394 F Flite Count = 2 Maximum tool Life = 50 ¥ Curent tool Life = 0 Figure 11. Drill Bit Image 1B706B-GALAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amat, ine, " H. Click on the data field below the #7 Drill ‘The too! data window will open. CEE Tool Dieter roast Tool Length Joos ToolLerah Ofeet (0034 Fide Length (oes Fite Count pi ||Masinum Tocltte [50 [Curent Toollie [0 Figure 12. Tool Data Window 1. Change the following information in the tool data window: Tool Diameter: 2.5527 Tool Length: 5.1054 ‘The remainder of the values can remain the same. J. Click on OK to accept the value changes. K. Close the tool library by clicking on it. 6. Load the #7 Drill into the Too! 1 slot. Q 7. Simulate the program to ensure that the program is working correctly. Q 8. Save program to your disk using the filename dri 9, Print the program and place it in your portfolio. 10. Perform the following substeps to perform a safety check out before operating the CNC milling machine. A. Are you wearing approved eye protection? B. Are you wearing the proper type of shoes? CC. Ifyou are wearing long sleeves, are they rolled up to the elbow? D. Have you removed your watch and all other jewelry? E, If you have long hair, is it properly secured? [B7068-8A LAP 2. GNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright© 2004 Arnal ne. 12 ps G11. Perform the following substeps to determine if all safely rules are being followed. A. Is the correct tooling properly installed? e B. Have all loose parts on the machined been tightened or removed? . Is the workpiece securely clamped? Check to verify that the spindle turns freely. . Is the work area clean and dry? Make sure that no other people are in your work area to avoid distractions. - G. Are you familiar with the machine? If you have any questions about its operation, review the LAPs or notify your instructor. H. Do you know where the Emergency Stop pushbutton is located? 1. Check the safety shield to make sure it is operating properly. A O12. Performa dry run, mmoo ‘A dry run is an important test for an untried program. O13. Place a piece of 90mm x 65mm x 6mm plastic stock in the CNC a machine. 14. Set the PRZ. at the lower left-hand comer of the material using an A edgefinder. a G15. Mount a #7 drill in the spindle and set the tool offset. 16. Machine the part 17. Remove the completed part. mn G18. Examine the holes. 19. Shut down the CNC mill and the programming software. [87088:8A LAP 2 CNC MILL CANNED CYCLES (OENFORO NOVAMILL) Copyright © 2004 Amato, ne 13 fe) a SELF REVIEW @ CNC programs are idemtified by an word Subprograms are identified by an word The use of subprograms can reduce the length of a CNC Program, make the program easier to read and edit, and avoid a common operation. The code is used to jump from a main program to a subprogram, The code is used to signal the return from a subprogram to a main program, {B706B.8ALAP2 CNG MILL CANNED CYCLES (DENFORD NOVAMILL) (Copyright © 2004 Amat, ne 14 ed ALTERNATE DRILLING CYCLES CEM aes EXPLAIN THE USE OF THE COUNTERBORE/SPOTFACE CYCLE (G82) ‘The G82 counterbore/spotface cycle is used to create a counterbore hole or a spotface hole on a part, as shown in figure 13. Its operation is similar to the canned drill cycle (G81). The only difference is that the G82 code causes the cutting tool to dwell at the bottom of the hole for a specified length of time which creates a smoother, more level surface. The syntax for the counterbore/spotface G-code is as follows: G82X... Y¥u.Z.. Ru Fa. P. ‘The values for X, Y, Z, R, and F have the same meaning as they did for the G81 G-code. The value for P specifies the duration of the dwell in seconds, usually from 0.01 to 99.99 seconds, ABSOLUTE POSITIONING INCREMENTAL POSITIONING (G90) (681) iia. 3 / POSITION > A (“oF TOOL Z Figure 13. Counterbore and Spotface Features Created Using a G82 Code [B7068-5A LAP 2 CNG MILL CANNED CYCLES (DENFORD NOVAMILL) ‘Copyright © 2008 Amato, nc. 15 ‘Activity 1. Operation of the Counterbore/Spotface Canned Cycle Procedure Overview In this procedure, you will program a part using the counterbore/spotface canned cycle command. This will help you understand how this code is used in a CNC program. O 2. Review the part shown in figure 14, ‘This part contains counterbored holes to allow the heads of the fasteners to sit flush with the surface of the part. Notice that a ‘two-flute end mill is being used to create the flat bottom of each hole. i G1. Star the CNC mill and the programming software. us 025 Foi | 925. NOTE: ALL DIMENSIONS ARE IN INCHES Figure 14. Counterbored Holes on a Part {B7086-BA LAP2 CNG MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2008 Amato, in. 16 Q 3. Create a header that contains the workpiece information from figure 14, 4. Perform the following substeps to write a CNC program to prepare the part for counterboring. A. Enter the following lines to begin the program. Noto G20 Noz0 Ge0 Nogo Mo6 T1 ‘Noo mos $2400 N00 G00 XO YO 20.1 This part of the program specifies English units of measurement, the size to the material, absolute positioning, spindle direction and speed, and sets the starting position for the cutting tool NOTE Zz The MOS command specties which tool will be used to drill Se the holes. This is added only to make the simulation show both types of holes. In the CNC programs you develop, you will only use one cutting tool for each program. B. Enter the following line of code to move the drill to the first hole location. No60 GOO x0.25 0.25, This will cause the CNC machine to rapid traverse to the position of the first hole. The drill is ready to plunge into the part. C. Add the following line of code to your program. N70 G81 2-0.375 RO.1 F2 This starts the G81 drilling canned cycle. It tells the cutting tool to plunge into the part to a depth of 0.375 inches. D. Add the following lines of code to your program to complete the drilling of the holes in the part. NNO8O Y1.75 Nogo x1.75 N100 0.25 ‘The G81 canned cycle is still active. Therefore, it is only necessary to specify the coordinates required for each hole. E, Add the following line of code to stop the canned drilling cycle. N10 G80 ‘The G80 code is used to turn off a canned cycle [B7068-BA LAP2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) ‘Copyright © 2004 Arata, ine. 7 G 5. Perform the following substeps to add the counterbore/spotface canned eycle to your CNC program, A, Add the following lines to your program, 120 M05 1N190 M06 Te Nia0 M03 ‘These lines are used only for the simulation. The frst line stops the spindle, the second line specifies the second cutting tool, and the third line restarts the spindle. B. Add the following line to your program to start the canned cycle that will be used to counterbore the holes. 1N180 G82 X0.25 ¥O.25 20.125 R0.100 F2.P100 This line of code specifies the counterbore/spotface cycle, the location of the first hole, the depth of cut, the distance above the part in which to return, the feed rate, and the length of ‘dwell specified in thousandths of seconds. Therefore, the dwell will last 0.1 seconds. C. Add the following lines of code to specify the other hole locations. 160 ¥1.75 NI70X1.75 180 ¥0.25 Notice that these locations are identical to the locations specified in the drilling cycle. This ensures that the centers of the holes are aligned. D. Add the finish cycle code to end the counterbore/spotface canned cycle. 1N190 G80 E, Add the following lines of code. 1N200 Mos Nato Moa ‘These shut down blocks will stop the spindle and end the program. {B7068-BA LAP 2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) ‘Copygnt ©2004 Amato, ne. 18 G2 6, Examine the completed program. It should look like this. (Author - Bryce Coulter (Date - 04 December 2003 (Machine - NOVAMILL (Description - Drill Cycle Noo10 G20. [BILLET x2 22.5 Noo20 G90 'Noo30 Mos T1 'Noo40 Mos $2400 'NO050 Go0 XO Yo Z0.1 'N0060 Go0 Xx0.25 ¥0.25 1NOO70 G8! Z-0.375 RO.1 F2 ‘Noo8o ¥1.75 1NO080 x1.75 Not00 0.25 No110 G80 No120 Mos No130 Mos T2 No140 Mos NO150 G82 X0.25 Y0.25 Z-0.125 RO.100 F2 P100 No160 Y1.75 NO170 X1.75 No180 0.25 No190 G80, No200 Mos: No210 Moz NoTE my You should notice that this program calls for two different a tools: T1 and T2, You must, therefore, configure the control software's tool settings for both tools, which you will do in the next step. 7. Load the following tools for Tool (1) and Tool (2): TOOL, DIAMETER (in) TOOL TYPE 1 0.125 ‘SLOT DRILL 2 025) ENDMILL A. Click on the Job/Tooling menu. {B700B-BA LAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2008 Amato, in. 19 8. Simulate the program in 2D and 3D. Figure 15. Counterbored Holes on a Part 9, Clear this program from memory. {B7086-BA LAP 2. GNG MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2008 Amato, inc 20 SKILL 2 DESIGN A CNC PROGRAM THAT USES A COUNTERBORE/SPOTFACE CANNED CYCLE Procedure Overview In this procedure, you will use the G82 countetbore/ spotface canned cycle to counterbore some of the holes you created on a workpiece in a previous skill, as shown in figure 16. pox nn 700 L Jenn tebe OV opts tom | sa 90mm >} 25m + “TS Figure 16. Counterbore Holes Created with a G82 Code G1, Examine the part shown in figure 16, This is the part you created in Skill 1. A counterbore has been added to the second column of holes you created. 2. Create a header that contains the workpiece information from figure 16. B706B-BA LAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, ine. 21 @ G2 3. Design a part program to machine the counterbore holes on the Part shown in figure 16. Use a G82 to perform all of the counterbore operations using a dwell of 1 second. Use a spindle speed of 2000 rpm and a feed rate of 100mm/min. Also, the cutter should rapid traverse 10 a height of 175mm above the surface of the part. . Enter the program into the CNC programming software. ‘Simulate the program to ensure that the program is working correctly. Save the program to your disk using the filename Counterbore. . Print the program and place it in your portfolio. . Perform the following substeps to perform a safety check out before operating the CNC milling machine. ‘A. Are you wearing approved eye protection? BB. Are you wearing the proper type of shoes? . IF you are wearing long sleeves, are they rolled up to the elbow? D. Have you removed your watch and all other jewelry? E. If you have long hai, is it properly secured? Q 9, Perform the following substeps to determine if all safely rules are being followed, Is the correct tooling properly installed”? Have all loose parts on the machined been tightened or removed? Is the workpiece securely clamped? Check to verify that the spindle turns freely. . Is the work area clean and dry? Make sure that no other people are in your work area to avoid distractions. Are you familiar with the machine? If you have any questions about its operation, review the LAPs or notify your instructor. H. Do you know where the Emergency Stop pushbutton is located? L. Check the safety shield to make sure it is operating properly. 10. Perform a dry run, 11, Place the piece of plastic stock from the previous skill into the CNC machine. 12. Set the PRZ.at the lower left-hand comer of the material. ‘This must be done accurately to make sure the counterbore feature is centered over the original holes. Otherwise, the counterbore holes will be misaligned with the drilled holes. occo eras o mmoop> 2 NOTE Because accuracy is required in this type of setup, the part would not normally be removed until all machining operations ‘were completed. ‘S706E-BALAP2. GNGMILL CANNED GYCLES (DENFORD NOVAMILL) Copyright © 2008 Amat, ne. G13. Mount a 6.35mm (1/4") two-fluted end mill in the spindle and set the tool offset The end mill will be used to create the flat-bottomed feature of a counterbore. 14, Machine the part. GIS, Remove the completed part 16. Examine the counterbored holes. Pay close attention to the flatness of the bottom edge of the counterbore. ‘The G82 causes a dwell at the bottom of the hole. Therefore, the finish should be flat and smooth, 17. Shut down the CNC mill and the programming software. fa" THE USE OF THE PECK DRILL CANNED CYCLE (G83) ge @ The peck drill canned cycle is used to drill deep holes. This canned cycle is called a peck drill cycle because it retracts the drill every so often from the hole to allow for the removal of chips and to allow cutting fluid to reach the bottom of the hole. Unless the hole can be drilled to its specified depth in one cutting pass, the peck drill canned cycle should be used. The syntax for this G-code is as follows: G83 X.. Yo. Zine Que Rew Fe For this drill cycle, the Q value represents the distance that the drill will cut into the part before itis retracted. It will increase the depth of cut each time by this amount until the full hole depth is reached which is specified by Z. Because Q is representing an increase in depth, its value should be negative. ‘ABSOLUTE POSITIONING INCREMENTAL POSITIONING (G0) (eon) / inmaL e TOOL osimion Figure 17. Peck Drill Cycle (G83) {87056-BA LAP 2. CNC MILL CANNED CYCLES (OENFORD NOVAMILL) ‘Copyright © 2004 Amat, ne. 23 Activity 2. Operation of a Peck Drill Cycle Procedure Overview In this procedure, you will program a part using the peck drill cycle to create holes. This will increase your understanding of how this canned cycle operates. 1. Examine the part shown in figure 18. Cy ‘This part has a pattern of six holes all of which have a depth of 0.85 inches. NOTE: ALL DIMENSIONS ARE IN INCHES. Figure 18. Part with 6-Hole Patter B7088-BA LAP 2. CNC MILL CANNED GYGLES (DENFORD NOVAMILL) Copyright © 2008 Amato, ne. 24 a2 a3 as. a6 ‘Start the programming software. Create a header that contains the workpiece information from figure 18. . Enter the following CNC program, No10 G20, Nozo G90 Nogo Mos T1 Nodo mos $2400 'Noso Goo x1 Yo.5 20.25 1NO6O G83 7-0.85 Q-0.1 RO.1 F4 1No70 x2 ‘NoB0 x3 ‘Nogo 1.5 N10 x2, Nt10 xt N120 G80 N130 Mos N140 Moz Configure the control software’s tool settings for a 1/4” drill. Simulate the program. Notice that the drilling cycle uses a pecking motion while drilling the holes, 'B706B-BA LAP 2. CNC MILL CANNED CYCLES (OENFORD NOVAMILL) ‘Copytight © 2004 Amat, nc. 25 SKILL 3 DESIGN A CNC PROGRAM THAT USES A CANNED PECK DRILL CYCLE Procedure Overview In this procedure, you will create a CNC program that ses a peck drill canned cycle to drill holes. You will use the same workpiece you used in previous ski 1. Examine the three new holes shown on the part in figure 19. You will continue to use the same piece of plastic used in previous skills. NOTE The area of the part that has already been machined is shaded to avoid confusion, 6 © -O ; ae eat le oa : x ea 2 Figure 19. Hole Patter '37068-BA LAP 2. CNC MILL CANNED CYCLES (OENFORO NOVAMILL) Copyright© 2004 Amat, inc. 26 aio. au. ai. an a4. Design the part program to create the new holes shown in figure 19. Use a G83 to perform all of the drilling operations with a depth of ‘Tmm, which will be deep enough to pass completely through the part. The cutting tool is to rapid traverse to 1.75mm above the part and peck drill in 0.5mm increments. Use a a spindle speed of 2000 ‘pm and a feed rate of 100mm/min. Create a header that contains the workpiece information from figure 19, Enter the program into the CNC programming software. Simulate the program to ensure that the program is working correctly. Save program to your disk using the filename Peck. Print the program and place it in your portfolio. Perform the following substeps to perform a safety check out before operating the CNC milling machine. A. Are you wearing approved eye protection? B. Are you wearing the proper type of shoes? . If you are wearing long sleeves, are they rolled up to the elbow? D. Have you removed your watch and all other jewelry? E, If you have long hair, is it properly secured? Perform the following substeps to determine if all safely rules are being followed. A. Is the correct tooling properly installed? B. Have all loose parts on the machined been tightened or removed? Is the workpiece securely clamped? Check to verify that the spindle turns freely. . Is the work area clean and dry? ‘Make sure that no other people are in your work area to avoid distractions. . Are you familiar with the machine? If you have any questions about its operation, review the LAPS or notify your instructor. H.Do you know where the Emergency Stop pushbutton is located? 1. Check the safety shield to make sure itis operating properly. Perform a dry run, Place the workpiece used in previous skills in the CNC machine. Set the PRZ at the lower left-hand corner of the material. Mount a #7 drill in the spindle and set the tool offset. Machine the part. You should notice the pecking motion of the drill as the holes are created. mmoo 2 [57068-BA LAP 2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amat, ne. 15. Remove the completed part. 16. Examine the holes. ‘They should pass completely through the part. 17. Shut down the CNC mill and the programming software. EXPLAIN THE USE OF THE BORE CANNED CYCLE (G85) hig The bore canned cycle feeds the cutting tool into the part at a specified feed rate just as did the G81 cycle. However, the bore canned cycle retracts the cutting tool out of the hole using the feed rate speed instead of rapid traverse. Because the feed rate speed is used to exit the hole, this canned cycle increases the run time of the CNC program. However, by using the feed rate during the exit, the surface finish of the sides of a hole is improved This canned cycle is used when a specific surface finish is required to meet drawing specifications. It is well-suited for reaming operations ‘The syntax for the bore G-code is as follows: GBS Xi Yous Zins Res Boe The values for X, Y, Z, R, and F all have the same meanings as they did for other canned cycles. ABSOLUTE POSITIONING INCREMENTAL PosTONING (690) (Gory INTIAL, POSITION Z, / OF TOOL Figure 20. G85 Bore Canned Cycle {B7058-8ALAP2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amata, ne. 28 Activity 3. Operation of a Bore Canned Cycle Procedure Overview In this procedure, you will use the programming software to simulate a CNC program containing the bore canned cycle. This will help you understand how the cycle works and. ‘enable you to use the code in a program of your own. 1. Examine the part shown in figure 21. This part contains four bored holes. A028 ‘Gone Figure 21. Part with Four Bored Holes Q 2. Create a header that contains the workpiece information from figure 21 Q 3. Enter the following CNC program. ‘Noto G20 'No20 G30 'NO30 Mo6 71 'No40 M03 $2000 NOSO Goo Xi 0.75 20.25 NQ6O G85 2-0.5 RO.1 F4 No70 x20 NoBo ¥1.25 Nogo xt N100 Gao N110 Mos N120 Mo2 1G 4. Configure the control software’s tool settings for a 1/4” drill G5. Simulate the program and watch the operation of the bore canned cycle. [B706B-BA LAP 2 CNC MILL CANNED CYCLES (DENFOAD NOVAMILL) Copyright © 2004 Amaro, ne 29 ae DESIGN A CNC PROGRAM THAT USES A BORE CANNED CYCLE Procedure Overview In this procedure, you will create a CNC program that uses the G85 bore canned cycle to create bored holes in the ‘same workpiece you used with the other canned cycles. iy 1, Examine the part shown in figure 22, +66 $6 joe ae} JS om {- 0025" BORE (@)Ptcs. ae ee onl WT a oe Figure 22. Holes Bored in a Pant 2. Create a header that contains the workpiece information from figure 22. 3. Design the part program to machine the bored holes. Use a G85 to create these holes where the cutter will rapid traverse to 1.75mm above the part. Use a spindle speed of 2000 rpm and a feed rate of 100mnvmin. Bore to a depth of Seam. {B7056-BA LAP 2 CNG MILL CANNED GYGLES (DENFORD NOVAMILL) Copyright © 2008 Amato, ne 30 G 4, Enter the program into the CNC programming software. Q 5. Simulate the program to ensure that the program is working correctly. 6. Save the program to your disk using the filename Bore. 7, Print the program and place it in your portfolio, 2 8. Perform the following substeps to perform a safety check out before operating the CNC milling machine. A. Are you wearing approved eye protection? B. Are you wearing the proper type of shoes? C. If you are wearing long sleeves, are they rolled up to the elbow? D. Have you removed your watch and all other jewelry? E, If you have long hair, is it properly secured? Q 9, Perform the following substeps to determine if all safely rules are being followed. A. Is the correct tooling properly installed? B. Have all loose parts on the machined been tightened or removed? Is the workpiece securely clamped? ). Check to verify that the spindle tums freely. Is the work area clean and dry? . Make sure that no other people are in your work area to avoid distractions. mmoa 2 . Are you familiar with the machine? If you have any questions about its operation, review the LAPS or notify your instructor. H. Do you know where the Emergency Stop pushbutton is located? L._ Check the safety shield to make sure it is operating properly. G10. Perform a dry run. 11. Place your workpiece in the CNC machine. ‘You will continue using the same workpiece that was used in the previous skills, G12. Set the PRZ at the lower left-hand corner of the material 13. Mount a 1/4" end mill in the spindle and set the tool offset 14, Machine the part. ‘Watch as the holes are bored. You should notice that the end mill is retracted using the same feed rate as was used to create the holes. 15. Remove the completed part. G16. Examine the holes to verify the smoothness of the holes. ‘The sides of the holes should have a smooth finish. However, the bottom may not due to the fact that the bore canned cycle does not have a dwell. G17. Shut down the CNC mill and the programming software [B7065-BALAP 2. CNC MILL CANNED GYGLES (DENFORD NOVAMILL) Copyright © 2004 Amaro, Inc. 3t SELF REVIEW 6 The G82 is used to create or features on a part. ‘The G82 is different than the G81 code because a has been added. The peck drill cycle, specified by G__ is used to drill deep holes. ‘The peck drill cycle is used to allow for the removal of and to allow to reach the bottom of the hole. ‘The G85 bore canned cycle retracts the cutting tool from a hole using a 1B7068-BALAP @. CNG MILL CANNED CYCLES (DENFORD NOVAMIL) Copyright © 2008 Amato, ne 5011) SUBPROGRAMS DESCRIBE THE FUNCTION OF A SUBPROGRAM AND LIST TWO ADVANTAGES CNC programs can become quite long. This makes them hard to follow. Many CNC programming languages have a technique called subprograms which can be used to simplify programs. Subprograms break programs into smaller, more manageable components. A subprogram is a small program usually designed to perform a single task. Although subprograms are really no different than regular CNC programs, they are called subprograms or subroutines because they are started from another CNC program, There are many advantages to switching or jumping from one CNC program to another, such as: + Less programming time + Easier to read Less Programming Time In manufacturing itis common to make more that one part at atime on a CNC machine as shown in figure 23. Notice that three parts are located on a fixture in a CNC milling machine. FIXTURE Figure 23. Three Parts Held on a Fixture in a CNC Milling Machine BTOGBBALAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, inc 33 ‘The program commands needed to cut each part are the same. The only difference is their reference points. Therefore, instead of repeating the same codes over and over, a subprogram can be called, over and ‘over, 10 perform its function. For example, the same three parts from figure 24 are created using a main program that repetitively calls a subprogram, as shown in figure 19. The subprogram that is called cuts all features on a par. Noto Startup Blocks No70 NOBO Move to reference point on first part NO80 Jump to Subprogram N100_ Move to reference point on second part N10. Jump to Subprogram N20. Move to reference point on third part N130 Jump subprogram ‘Shutdown blocks N220 Figure 24. Description of a CNC Program that Uses a Subprogram Easier to Read Subprograms make CNC program easier to read because each subprogram performs a specific operation. Therefore, when reading the CNC code, you know the operation for which this program was written There are also fewer program lines to read. Fewer lines results in easily finding and editing mistakes. [87068-BA LAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, inc. 34 OBJECTIVE 8 EXPLAIN THE FUNCTION AND OPERATION OF THE M98 SUBPROGRAM CODE ~ ‘The M98 is used to jump from a main program to a subprogram. It a uses the following syntax: M98 P..... L. ‘The M98 code is followed by a P-word. The P-word is used to specify the number of the program to which to jump. It consists of a one to four digit number which indicates the desired program. ‘The P-word is sometimes followed by an L-word. The L-word is used to specify the number of times the subprogram is to be repeated. If the L-word is not given in the syntax, the subprogram is only used once. ‘The operation of M98 can be seen in figure 25, WAIN PROGRAM ost37 G00 X2.0 ¥1.0 20.25 M98 P2031 M98 P2032 G90 G00 x14.0 Y1.0 20.25, M98 P2031 ge P2032 G90 (G00 x24.25 1,020.25, 98 P2031 N98 P2032 30 ‘SUBPROGRAM SUBPROGRAM 2031 02032 Got at Goi z05 G85 7.0.35 R-0.15 Fa Ya.0' Yio G09 20.5 x2. Goo x2'V-3 oo Go1Z0.5 Ya.0' G00 z0.5, M99 Figure 25. CNC Program Jumping To Subprograms. ENC programs are identified by an O-word followed by four numbers. For example, the main program in figure 20 is identified by the number 4137 preceded by the letter O. This number is assigned to the program by the programmer. [5706B-BA LAP 2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, nc. 35 It is important to note that different CNC machines handle subprograms differently. Some have subprograms stored as separate programs in the controller's memory. Others place subprograms at the end of the main CNC program. Some machines require an O-word to indicate the subprogram, while others ask the user to simply call out the first line number of the subprogram. Always check the documentation for the CNC machine you are using to be sure that your subprograms will be executed correctly. OBJECTIVE 9 EXPLAIN THE FUNCTION AND OPERATION OF ‘THE M99 SUBPROGRAM CODE @ ‘The M99 is used to signal the return from a subprogram to the main program. Itis the last statement in a subprogram. This code will return to the main program to the line immediately after the line containing the M98 code, Activity 4. Operation of Subprograms in CNC Programming Procedure Overview In this procedure, you will simulate a CNC program that uses subprograms. This will enable you to have a better understanding of how subprograms operate. G1. Examine the part shown in figure 26. This part contains a bored hole and a slot. NOTE: ALL DIMENSIONS ARE IN INCHES. Figure 26. Part Containing a Bored Hole and a Slot G 2 Start the programming software. {37056-BA.LAP2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) ‘Copyright © 2008 Amat, in. 36 | Q 3. Enter the following subprogram. It will be used to drill a hole. 02634 Noto Got 1No20 2-0.375 F4 1Noso 20.378 Noso G90 No50 M99 ‘A common practice in creating subprograms is to switch the positioning system of the CNC machine to incremental mode (i. G91) in the first line of each subprogram. Because incremental positioning relates to the last position of the cutting tool, the subprogram can be used in various locations on the part. Absolute positioning will only allow the subprogram to create a feature in the same place on the part Notice that line N40 returns the positioning system to absolute positioning before returning from the subprogram. NOTE we You will not need to specify the workpiece size or the tool number for the subprograms. You will specify the workpiece size and tool number in the main program. G 4, Save this program to your disk using the filename 2634. 1 5. Start another new program in the programming software, and enter the second subprogram, called 04323. 04323 Noto Gat 'No20 G01 2-0.375 Ngo 0.875 Noo G00 20.375 Nos0 G20 Noso M99 This will be the second CNC program to which the main program will jump. This subprogram mills a slot before returning to the ‘main program. This subprogram will be called twice, so two slots will be cut in the part. G 6. Save this program to your disk using the filename 4323. {B70GB-BA LAP2 CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, nc a7 Lo Q 7. Enter the following CNC program, called O1011. ‘This will be the main program. The O-word specifies that this program is number 1011. Notice in line 50 that the main program jumps to subprogram 2634. Then, after retuming to the main program the program switches to subprogram 4323 in lines 70 and 90. (Author - Bryce Coulter (Date - 08 December 2008 (Machine - MIGROMILL 2000 (Description - 01011 Noot0 G20 [BILLET x2 va z.25 Noozo Mos T1 No0s0 G90. Noo40 Mos $2400 'NO0S0 G00 Xt ¥0.75 20.25 NoD60 Moe P2634 1NOO70 G00 x1 1.5 'Noo80 M98 P4323 No080 G00 X1.8 1.5. No100 M98 P4323 NOt 10 Mos. 'No120 Moz Q 8. Save this program to your disk using the filename 1011 Q 9. Configure the control software’s tool settings for a 1/8” drill. 10. Configure the control software's billet settings for a 2” x 3” x 1/4" piece of stock. OIL. Simulate the program, ‘The program automatically executes each subprogram when specified. Notice that when a subprogram is being executed that it appears in the display window of the MDI panel 'B7068-BA LAP 2. CNC MILL CANNED GYCLES (OENFORD NOVAMILL) ‘Copyright® 2004 Amato, in. DESIGN A CNC PROGRAM THAT USES SUBPROGRAMS Procedure Overview In this program, you will create a CNC program that uses subprograms to simplify the programming. This will increase your ability to program CNC machines to perform various operations efficiently. © 1. Examine the part shown in figure 27. This is a piece of plastic stock which contains five pockets. PSA7Emm tcf (eaypLes, i ‘Ll ser 42.50 —>} —28.750m—H} 22m x a NOTE: ALL POCKETS CUT TO ‘ADEPTH OF Sire Figure 27. Part Drawing 2. Create and save a subprogram using the programming software to ccut one pocket in the part. Use a 1/4 inch two-fluted end mill, a speed of 2000 rpm, and a feed rate of 100mm/min. The material will be 90mm x 65mm x ‘6mm plastic. [G7068-8A LAP 2 CNG MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2004 Amato, Inc 39 © 53. Create and save a CNC program which calls your subprogram. The program should cut all five pockets, C1, Slamise the peogam (lonstre tint he programa wot niborogrim | are working correctly. 5. Print the programs and place them in your portfolio. | 6 Perform the following substeps to perform a safety check out before operating the CNC milling machine A. Are you wearing approved eye protection? B, Are you wearing the proper type of shoes? : . Ifyou are wearing long sleeves, are they rolled up to the elbow? D. Have you removed your watch and all other jewelry? E, If you have long hair, is it properly secured’? Q 7, Perform the following substeps to determine if all safely rules are being followed. A. Is te correct tooling properly installed? B. Have all loose parts on the machined been tightened or removed? . Is the workpiece securely clamped? Check to verify that the spindle turns freely. . Is the work area clean and dry? Make sure that no other people are in your work area to avoid distractions. m™moa a Are you familiar with the machine? If you have any questions about its operation, review the LAPs or notify your instructor. H. Do you know where the Emergency Stop pushbutton is located? I. Check the safety shield to make sure it is operating properly. 8. Perform a dry run. O 9. Place a piece of 90mm x 65mm x 6mm plastic stock in the CNC machine. 10. Set the PRZ at the lower left-hand corner of the material. 11. Mount a 1/4” two-flute end mill in the spindle and set the tool offset. 212. Machine the part 13, Remove the completed part. 14. Examine the part to make sure it has been machined correctly. IS. Shut down the CNC mill and the programming software. '37060-BA LAP 2 ONC MILL CANNED GYGLES (DENFORD NOVAMILL) Copyright© 2004 Amato, nc 40 a | SEGMENT 3 SELF REVIEW ee ® CNC programs are identified by an _ word Subprograms are identified by an word. The use of subprograms can reduce the length of a CNC program, make the program easier to read and edit, and avoid _a common operation. The code is used to jump from a main program toa subprogram, The code is used to signal the return from a lubprogram to a main program, ‘B706B-BA LAP 2. CNC MILL CANNED CYCLES (DENFORD NOVAMILL) Copyright © 2008 Amato, ne 4a

You might also like