Copyright Goodheart-Willcox Co., Inc. 182 CNC Manufacturing Technology Workholding is a critical decision that has to be made in the prepro- gramming phase. If you do not know how you are going to hold the part, there is no way to determine how to machine it. 9.2.3 Tool Selection The next important decision before writing a program is determining what tools to use. It is impossible to write a program without knowing what tools are available. To reduce tool changes and cycle time, try to min- imize the number of tools used. Always evaluate the possibility of using the same tools for multiple features. For example, if cutting a .625″-wide slot and a .750″-wide slot on one part, a 1/2″ end mill can accomplish both without using a second tool. It is also best practice to spot drill every hole before drilling. If any specialized tooling is required, it is best to identify this in the planning phase so that it can be accounted for while programming. 9.3 Program Format After analyzing the print, workholding, and tooling, it is time to gener- ate code. Writing a program is simply telling a story. It has an opening statement, body, and closing statement. The code for each tool used within the program will have these same components. Writing programs consis- tently with this format will simplify the process and spotlight any missing information. 9.3.1 Opening Statement Each program should have a consistent opening statement based on the machine for which it is written. The opening statement will contain the program number and a default block that cancels any previous cycles that may still be active. These are the first few lines of a sample program code: O3283 G20 G17 G40 G80 G91 G28 Z0. In this example, O3283 is the program number. It starts with the let- ter “O.” This line will be the only instance of using the letter O in a CNC program. The program can carry any number, but it is best practice to use a number that correlates with the part number in some discernible way. Every program must start with the program number. G20 G17 G40 G80 is often called the default block. It cancels com- mands that may have activated in a previous program. This line can vary widely based on the programmer, but this example is a safe starting point. G codes will be covered in more depth in a later section, but it is worth analyzing the details of this block: G20 places the machine in inch mode (as opposed to metric, which uses code G21). G17 places all arcs in X,Y planes. G40 cancels cutter compensation. G80 cancels active canned cycles.
Previous Page Next Page