Читать книгу Programming of CNC Machines - Ken Evans - Страница 10

Оглавление

PART 1

CNC BASICS

OBJECTIVES:

1.Recognize the importance of Safety when working with CNC Machines.

2.Become familiar with Tool and Work holding methods for CNC Machining.

3.Learn how to calculate proper Feeds and Speeds for CNC Machining.

4.Learn how to plan for CNC programming by using Process Planning Documents.

5.Become familiar with Coordinate Systems and their use in CNC Programming

6.Learn terminology and acronyms associated with the CNC Basics.

7.To learn the ABC’s of CNC program format.

SAFETY

As you begin to learn about CNC Programming, it is important to first become aware of and learn how to practice safe working habits. You should not operate any machine without first understanding the basic safety procedures necessary to protect yourself and others from injury, and the equipment from damage. Most CNC machines are provided with a number of safety devices (door interlocks, etc.), to protect personnel and equipment from injury or damage. However, operators should not rely solely on these safety devices, but should operate the machine only after reading and fully understanding the Safety Precautions and Basic Operating Procedures outlined in the maintenance and operation manuals provided with the equipment. The following are some Do’s and Don’ts that should be practiced when working with CNC Machines.

Safety Rules for NC and CNC Machines

Do’s:

•Wear safety glasses and safety shoes at all times.

•Know how to stop the machine under emergency conditions.

•Keep the surrounding area well lighted, dry and free from obstructions.

•Keep hands out of the path of moving parts during machining operations.

•All setup procedures and loading or unloading of workpieces must be performed with the spindle stopped.

•Follow recommended safety policies and procedures when operating machinery, handling parts or tooling, and when lifting.

•Machine guards should be in position during operation.

•Wrenches, tools and parts should be kept away from the machine’s moving parts.

•Make sure fixtures and workpieces are securely clamped before starting the machine.

•Cutting tools should be inspected for wear or damage prior to use.

Don’ts:

•Never operate a machine until properly instructed in its use.

•Never wear neckties, loose fitting long sleeves, wristwatches, rings, gloves or unrestrained long hair, when operating any machine.

•Never attempt to remove metal chips with hands or fingers.

•Never direct compressed air at yourself or others.

•Never operate an NC/CNC machine without first consulting the specific operator manual for the machine.

•Never place hands near a revolving spindle.

•Electrical cabinet doors are to be opened only by qualified personnel for maintenance purposes.

MAINTENANCE

A large investment has been made to purchase CNC equipment. It is very important to recognize the need for proper maintenance and a general upkeep of these machines. At the beginning of each opportunity to work on any Turning or Machining Center, verify that all lubrication reservoirs are properly filled with the correct oils. The recommended oils are listed in the operation or maintenance manuals typically provided with the equipment. Sometimes there is a placard (plate) with a diagram of the machine and numbered locations for lubrication and the oil type is found on the machine. Most modern CNC machines have sensors that will not allow operation of the machine when the Way or Spindle oil levels are too low. Pneumatic (air) pressures need to be at a specified level and regulated properly. If the pressure is too low, some machine functions will not operate until the pressure is restored to normal. The standard air pressure setting is listed in Pounds per Square Inch (PSI) and a pressure regulator is commonly located at the rear of the machine. Refer to the operator or maintenance manuals for recommended maintenance activities.

Coolant Reservoir

The Coolant tank level should be checked and adjusted as needed prior to use. A site glass is normally mounted on the tank for easy viewing. Use an acceptable water-soluble coolant mix, synthetic coolant or cutting oil. Periodically the coolant tank should be cleaned and refilled. And last but not the least important is the cleanliness of the work-table, tools and area. Be sure to clean off any metal chips and remove any nicks or burrs on the clamping or mating surfaces. Always clean the machine after use.

Daily Maintenance Activities

Do’s:

•Verify that all lubrication reservoirs are filled.

•Verify air pressure level by examining the regulator on the machine.

•Check the chip pan and coolant level and clean or fill, as needed.

•Make sure that automatic chip removal equipment is operational when the machine is cutting metal.

•Be sure that the worktable and all mating surfaces are clean and free from nicks or burrs.

•Check to see that the Chuck pressure setting is adequate for clamping the work to be machined.

•Clean up the machine at the end of use with a wet/dry vacuum or wash machine guards with coolant to remove chips from the working envelope.

Most new CNC machines are equipped with guards that envelope the worktable. The guards protect the Ways and sensitive micro-switches installed as limit switches for table movement. Guards also help keep the surrounding floor space clean but there is still the task of chip disposal. Some larger production machines incorporate a chip conveyor, which carries the chips to a drum on the floor on either side of the machine for easy removal. Even with these features, there is still a need for chip cleanup inside the working envelope at least once a day. If chips are allowed to gather within the guards, they will eventually find their way around the guards that protect the machine Ways. Over time, some of the chips might become embedded into the Ways and cause irreparable damage. Another problem that may occur as the chips collect, they bunch up and are pushed into contact with the micro-switches. This contact stops the machine from working since the switches send a signal to the control that indicates table travel limit has been exceeded. This message prevents the machine from operating until the chips are removed. If chips get within the guards around the micro-switches, it is necessary to remove those guards and clean. If this extent of cleaning becomes necessary the Machine should be turned off and a Lock-Out/Tag-Out should be incorporated to prevent injury. Remember, it is essential to replace the guards after cleanup.

It is very important to do a thorough machine cleanup when many chips are present. The exterior of the machine usually will only need wiping down with a clean rag. You can cleanup the Ways and the working envelope without damaging the machine by using coolant to wash the machine table and the guards free of chips. Another effective cleaning method is to use a wet/dry vacuum to pick up the chips. Along with the chip conveyor system, these two methods have proven hard to beat.

One cleanup method that is not recommended is to use compressed air to blow away the chips. It is appropriate to use compressed air to remove chips and coolant from the workpiece itself or work holding fixtures such as a vise. The problem with using compressed air to clean up around the Ways is that when chips are blasted away from the table, many are forced behind the guards, further worsening the micro-switch problem described above.

TOOL CLAMPING METHODS

Proper selection of cutting tools and work holding methods are paramount to the success of any machining operation. The scope of this text is not intended to teach all of the necessary information regarding tooling. You must consult the appropriate tooling manuals for selection of tool holders and cutting tools that are relevant to the required operation. Least expensive is not necessarily best.

Sound machining principals require that the most rigid setup possible be used that does not allow large overhangs of tools or workpieces. Ignoring these basic principals can cause tool and workpiece deflection and vibration that will contribute to poor surface finish and, eventually, tool damage which also makes it difficult to maintain dimensional accuracy.

Just as with the rest of the machine tool, there are components used with the actual cutting tool that make it what it is. Obviously, the tool cutting edge is where the metal removal takes place. Without proper tool clamping, the cutting action may not produce the desired results. Therefore, it is very important to carefully select the most effective tool clamping method.

In the case of a simple operation of milling a contour on a part, we may select a collet or a positive locking (posi-lock) end mill holder for the end mill. The correct choice would depend on the actual features of the part to be machined. If the amount of metal to be removed is minimal, then a collet would probably suffice. But if a considerable amount of metal is to be removed (more than two thirds of the tool diameter on a single depth of cut pass), then the posi-lock end mill holder selection is important. The reason for selecting the posi-lock holder is that under heavy cuts, a collet may not be able to grip the tool tightly enough. This situation could allow the tool to spin within the collet while in cut, with the result of ruining the collet and possibly damaging the part being machined. There is a tendency for the tool to dive into the workpiece when the tool spins within the collet and damage to the part may occur. Note: Most High Speed Steel (HSS) end mills have a flat ground on them to facilitate the use of the posi-lock holder. This flat area allows for a set-screw to lock into it, creating a rigid and stable tool clamping method. The clamping method for drills could be either a collet or a drill chuck. A keyed drill chuck usually is used for heavier metal removal or larger holes, whereas the keyless- type drill chuck is suitable for small holes. Generally, in the case of larger drills, a collet will be necessary to hold the tool. When holes are to be drilled, remember to center-drill or spot-drill first, so that the tool does not have a tendency to wander off location. The center-drill may be held in the same manner as a drill.

In turning, the selection of the type of tool holder is determined by the finished part geometry and the part material. There are a variety of tool holder styles as well as insert shapes available to accomplish the desired part shape and size.

For more information on the proper selection of inserts and tool holders, refer to the Machinery’s Handbook section titled “Indexable Inserts”.

Another valuable resource for technical data regarding the selection of inserts and tool holding are the ordering catalogs from the tool and insert manufacturers.

CUTTING TOOL SELECTION

Cutting tools are a very important aspect of machining. If the improper tool and/or tool clamping method is used the result will most likely be a poorly machined part. Always research and use the best tool and clamping method for a given operation. With the high speed and high performance of CNC machines, the proper selection process becomes increasingly important. The entire CNC machining process can be compromised by a lack of good tool planning and improper use.

There are many different types of machining operations performed on either Turning or Machining Centers. The tool is where the action is, so if improper selection takes place here, the whole machining sequence will be affected. Years of study have been dedicated to this subject and are documented within reference manuals and buyer’s guides. Using these references will be helpful to correctly choose a tool for a given operation.

Remember that in your selection process, you are searching for the optimum metal-cutting conditions. The best way to understand how to choose the proper conditions is by studying the available data such as: the machine capabilities; the specific type of operation; the proper cutting tool(s) and tool clamping method(s); the geometry of the part to be made; the workpiece and cutter material; and, the method of clamping the part.

It is important to utilize the most technologically advanced methods of metal removal available. Do not hesitate to research this new technology. For example, in recent years, there have been numerous cutting tool innovations that include indexable insert coatings such as: Titanium Nitride (TiN); Titanium Carbon Nitride (TiCN) applied through Chemical Vapor Deposition (CVD), or Physical Vapor Deposition (PVD), and insert materials such as: Ceramic, Cubic Boron Nitride (CBN) and Polycrystalline Diamond (PCD), to name a few. These advances have enabled increased cutting speeds and decreased tool wear providing for higher production throughput. Another tool clamping innovation is modular tooling. This is a standardization of tool holders to facilitate the quick change of tools decreasing setup time. Refer to the tool and insert ordering catalogs from the tool and insert manufacturers for more information on modular tooling.

TOOL COMPENSATION FACTORS

Important information about the tool must be given to the machine control unit (MCU), for the machine to be able to use the tool efficiently. In other words, the MCU needs the tool identification number, the tool length offset (TLO), and the specific diameter of each tool. A TLO is a measurement given to the control unit to compensate for the tool length when movements are commanded. The cutter diameter compensation (CDC) offset is used by the control to compensate for the diameter of the tool, for end mill style tools, during commanded movements.

The tool number identifies where the tool is located within the storage magazine or turret and often is the order sequence in which it is used. Each is assigned a tool length offset number. This number correlates with the pocket or turret position number and is where the measured offset distance from the cutting tip to the spindle face, in the case of a milling machine, is stored. For example, Tool No. 1 will have TLO No. 1. Finally, when end milling is necessary the diameter of the tool is compensated for. In most cases, the programmer has taken the diameter of the tool into account. In other words, the programmed tool path is written with a specific tool size in mind. However, more commonly the part geometry is programmed in order to facilitate the use of different tool diameters for a specified operation. When using the part geometry rather than the toolpath centerline for a specific tool diameter, an additional offset is called from within the program called cutter diameter compensation (CDC).

TOOL CHANGING

CNC equipment enables more efficient machining by allowing the combination of several operations into a single setup. This combination of operations requires the use of multiple cutting tools. Automatic Tool Changers (ATC) are a standard feature on most CNC Machining Centers, while many CNC Knee-Mills still require manual installation of the tool. The illustrations in Figures 1 and 2 are two types of tool holders used on CNC machines; they have some distinct physical differences. Both of the holders are tapered. The one to the left has a single ring at the large end of the taper while the other has two rings. The tool holder that has only one ring is designed for machines that require manual tool changes. The tool with two rings is designed for machines that have Automatic Tool Changers. These rings act as a gripping surface for a tool changer.


Figure 1&2 Common Millling Tool Holders

The tapered portion of the holder is the actual surface that is in contact with the mating taper of the spindle. These tapers are standardized by the industry and are numbered according to size (No. 30, No. 40, No. 50).

One benefit of these tapers over the standard R-8 Bridgeport style of tool holder is the increased surface area in contact with the mating taper of the spindle. The increased surface area makes the tool setup more rigid and stable.


Figure 3 Tool Holder with Retention Knob

Another feature on the tool holder is the notch or cutout on centerline of the tool (there is an identical cutout on the opposite side). This enables axial orientation within the spindle and tool changer. As the holder is inserted into the spindle, the cutouts enable it to be locked into place in exactly the same orientation each and every time it is used. This orientation makes a real difference when trying to perform very precise operations such as boring a diameter. These notches also aid the spindle driving mechanism.

On CNC machines with a manual tool change, the holder is inserted into the machine and rotated until the holder pops into place (axial orientation is done by hand) and then, the draw bar is tightened to clamp the tool holder in place. Finally, another component of the CNC Automatic Tool Changing system is the Retention Knob or Pull-Stud. Machining Centers need the retention knob/pull-stud to pull the tool into the spindle and clamp the holder. This knob is threaded into the small end of the taper as shown. Note: There are several styles of knobs available. The operator should consult the appropriate manufacturer manual for specifications required in their situation.


Figure 4 Retention Knob

METAL CUTTING FACTORS

Many tool and work holding methods used on manual machines are also used on CNC machines. The machines themselves differ in their method of control but otherwise they are very similar. The major objective of CNC is to increase productivity and improve quality by consistently controlling the machining operation. Knowledge of the exact capabilities of the machine and its components as well as the tooling involved is imperative when working with CNC. It is necessary for the CNC programmer to have a thorough knowledge of the CNC machines they are responsible for programming. This may involve an ongoing process of research and update training with the ultimate goal of obtaining a near optimum metal-cutting process. From this research and training comes a decrease in the cycle time necessary to produce each part lowering per piece cost to the consumer. Fine tuning of the machining process for high-speed production gives more control over the quality of the product on a consistent basis. The following are some of the most important factors that affect the metal cutting process.

The Machine Tool

The machine used must have the physical ability to perform the machining. If the planned machining cut requires 10 horsepower from the spindle motor, a machine with only 5 horsepower will not be an efficient one to use. It is important to work within the capabilities of the machine tool. The stability, rigidity and repeatability of the machine are of paramount importance as well. Always take these things into consideration when planning for machining.

The Cutting Fluid or Coolant

The metal cutting process is one that creates friction between the cutting tool and the workpiece. A cutting fluid or coolant is necessary to lubricate and remove heat and chips from the tool and workpiece during cutting. Water alone is not sufficient because it only cools and does not lubricate, and it will also cause rust to develop on the machine Ways and table. Also, because of the heat produced, water vaporizes and thus compromises the cooling effect. A mixture of lard-based soluble oil and water creates a good coolant for most light metal-cutting operations. Harder materials, like stainless steel and high alloy composition steels, require the use of a cutting-oil for the optimum results. Advancements have been made with synthetic coolants, as well. Finally, the flow of coolant should be as strong as possible and be directed at the cutting edge to accomplish its purpose. Programmers and machine operators should research available resources like the Machinery’s Handbook and coolant manufacturer data, for information about the proper selection and use of cutting fluids for specific types of materials.

The Workpiece & the Work Holding Method

The material to be machined has a definite effect on decisions about what tools will be used, the type of coolant necessary, and the selection of proper speeds and feeds for the metal-cutting operation.

The shape or geometry of the workpiece affects the metal-cutting operation and determines the type of work holding method that will be used. This clamping method is important for CNC work because of the high performance expected. It must hold the workpiece securely, be rigid, and should minimize the possibility of any flex or movement of the part.

The Cutting Speed

Cutting speed is the rate at which the circumference of the tool moves past the workpiece in surface feet (sf/min) or meters per minute (m/min), to obtain satisfactory metal removal.

The cutting speed factor is most closely related to the tool life. Many years of research have been dedicated to this aspect of metal-cutting operations. The workpiece and the cutting tool material determine the recommended cutting speed. The Machinery’s Handbook is an excellent source for information pertaining to determining proper cutting speed. If incorrect cutting speeds, spindle speed or feedrates are used, the results will be poor tool life, poor surface finishes and even the possibility of damage to the tool and/or part.

The Spindle Speed

When referring to a milling or a turning operation, the spindle speed of the cutting tool or chuck must be accurately calculated relating to the conditions present. This speed is measured in revolutions per minute, r/min (formerly known as RPM) and is dependant upon the type and condition of material being machined. This factor, coupled with a depth of cut, gives the information necessary to find the required horsepower necessary to perform a given operation. In order to create a highly productive machining operation all these factors should be given careful consideration. Refer to the formulae below needed to calculate r/min.


where

CS = Cutting Speed from the charts in Machinery’s Handbook

π = 3.1417

D = Diameter of the workpiece or the cutter.

Many modern machine controllers have a feature that allows automatic calculation of feeds and speeds that is based on appropriate operator input of the cutting conditions.

The Feedrate

Feedrate is defined as the distance the tool travels along a given axis in a set amount of time, generally measured in inches per minute in/min (formerly known as IPM) for milling or inches per revolution in/rev (formerly known as IPR) for turning. This factor is dependent upon the selected tool type, the calculated spindle speed and the depth of cut. Refer to the Machinery’s Handbook for the chip load recommendations and review the formula below that is necessary to calculate this aspect of the metal-cutting operation.

where F = R × N × ƒ

F = Feed in in/min or mm/min

R = r/min calculated from the preceding formula

N = the number of cutting edges

ƒ = the chip load per tooth recommended from the Machinery’s Handbook

The Depth of Cut

The depth of cut is determined by the amount of material to be removed from the workpiece, cutting tool flute length or insert size and the power available from the machine spindle. Always use the largest depth of cut possible to ensure the least affect on the tool life.

Cutting Speed, Spindle Speed, Feedrate and Depth of cut are all important factors in the metal-cutting process. When properly calculated, the optimum metal-cutting conditions will result. Refer to the Machinery’s Handbook and the tool and insert ordering catalogs from the tool and insert manufacturers for more information on recommended depths of cut for particular tooling.

PROCESS PLANNING FOR CNC

Certain steps must be followed in order to produce a machined part that meets specifications given on a blueprint. These steps need to be organized in a logical sequence to produce the finished part in the most efficient manner. Before machining begins, it is essential to go through the procedure called Process Planning. The following are the steps in the process:

1.Study the working drawing or blueprint.

2.Select the proper raw material or rough stock as described on the blueprint.

3.Study the blueprint and determine the best sequence of individual operations needed to machine the required geometry.

4.Transfer the information onto planning charts.

5.Use in-process inspection to check dimensional values as they are completed while the part is still mounted on the machine.

6.Make necessary corrections and deburr.

7.Perform a 100% dimensional inspection when the part is finished and log the results of the first article inspection on the quality control check sheet.

8.Take corrective action if any problems are identified.

9.Begin production.

Planning Documents

A blueprint may be thought of as a map that defines the destination. This destination is the end product. The roads available to get to this destination may be numerous. We do not start the trip without first determining what the destination is and how we are going to get there.

Planning sheets resemble the required path to the destination. They are written descriptions of how to get there (to the end product). The following are descriptions of sample planning documents.

The Blueprint

The information given on the blueprint will include the material, overall shape and the dimensions for part features. The geometry determines the type of machine (mill or lathe) to be used to produce the part. By studying the blueprint, material and operations (drilling, milling, boring, etc.) can be identified. The tools and work holding method can also be determined. Occasionally, the geometry will require multiple machines to manufacture the part, and thus additional operations will be necessary.


Figure 5 Machined Part Blueprint


Operation Sheet

The purpose of this planning document is to identify the correct order for operations to be performed and the machine to be used. For example, suppose you are required to produce the part shown in Figure 5 above. Saw cutting the rough stock into blanks would come first. Then the part must be turned on a lathe to create the five-inch diameter and rough turn the diameter for the hexagon. Next a milling machine is used to cut the hexagon and drill the bolthole circle. Before any inspection can be carried out, the part must be deburred. Finally the part can be inspected for accuracy.

The operation sheet is particularly useful when many identical parts are machined (production run). The operation sheet is similar to directions or a how-to approach. The process needed to manufacture the finished part has been decided in advance and is documented for future use.

When small batches of parts are to be made, there may not be an operation sheet. It is the machinist’s responsibility to study the blueprint and decide the necessary steps to machine the part. The operation sheet can aid in this decision making process.

With CNC machining, multiple part geometry features can be performed in one setup. In some cases, when using a CNC Mill Turn Center, a part might be machined to its completed status without ever using another machine. This is very efficient and another advantage of the use of CNC equipment.

To complete an operation sheet, study the blueprint; then decide on the steps necessary to machine the part. Document the machining process and refine any problems the process has, then list the operations in the correct sequence in which they will be performed.

The top section of the operation sheet is for reference information and includes:

The date the document is prepared or revised

The name of the person preparing it

The part name and the part number (from the blueprint)

The quantity of parts to be manufactured

Since some parts may require a large number of operations, it is possible that more than one operation sheet will be needed to document the whole process. The top section also includes a sheet numbering system (Sheet _____ of _____). This information must be included. Other information included on the operation sheet header is the material, the raw stock size for the part, followed by the operations list.

CNC Setup Sheet

The CNC Setup Sheet is the document that tells the machinist what tools are to be used and any specific information related to tools. For instance, it may be necessary to have a certain amount of extension for a drill to be able to completely machine through a part. This document is where the Operator/CNC Machinist finds this information. In Part 5 or 6 of this text you will be introduced to Computer Aided Design and Computer Aided Manufacturing (CAD/CAM) and how you can develop CNC Setup Sheets within the CAD/CAM programs. Many companies today are going to electronic “paperless” factories. The CNC Setup Sheet has two sections. The top section is for reference information and includes:

The date the document is prepared or revised

The name of the person preparing it

The part name and part number (from the blueprint)

The machine being used

Note: If more than one machine is to be used to manufacture a single part, separate setup sheets are completed for each machine.

The CNC part program used in the manufacturing process

Workpiece Zero reference points for the part (program zero)

Work holding devices

Note: If more than one device is needed, the operation number(s) and process are also included.

The lower half of this form lists the tool(s) by number, description and offset. There is a column for comments, remarks or explanations, if needed. Specific tool requirements, like minimum tool length extension, can be entered in the comments section

Quality Control Check Sheet

This planning document is used for the final inspection stage of the machining process. Once the part is completed, it is necessary to check all of the dimensions listed on the blueprint to verify they are within the specified tolerance. The Quality Control Check Sheet is an excellent method to document the results of this inspection and a valuable tracking tool.


Reference information is similar to the other planning documents. Included are:

The date the document is prepared or revised

The name of the person checking the part

The part name and part number (from the blueprint).

On the check sheet, 100 % of the blueprint dimensions and their tolerances are written down in list form. Using this method, sequentially go through each of the print dimensions and log the results. This assures that the machined part meets the specifications given on the blueprint. As the part is checked and verified, some dimensions may not meet specifications. It is important to make sure that these incorrect values are noticed. A good method for relating this is to write those dimensions that are out of print in red ink or use a highlighter pen to emphasize them. You could also include details in the comments section of the QC Check Sheet. If dimensions are found that do not meet specifications, corrective action must be taken.


TYPES OF NUMERICALLY CONTROLLED MACHINES

There are two basic groups of numerically controlled machines, Numerical Control (NC) and Computer Numerical Control (CNC).

In an NC system, the program is run from a punched tape, it is impossible to store such a program in memory. For a punched tape to be used again to machine another part, it must be rewound and read from the beginning. This routine is repeated every time the program is executed. If there are errors in the program and changes are necessary, the tape will need to be discarded and a new one punched. The process is costly and error prone and while this type is still in use, it is becoming obsolete.

Machines with a CNC system are equipped with a computer, consisting of one or more microprocessors and memory storage facilities. Some CNC Machines have hard drives and are network configurable. Program data is entered through Manual Data Input (MDI) at the control panel keyboard, via an RS232 communications interface port or via Ethernet from a remote source like a Personal Computer (PC) network. The control panel enables the operator to make corrections (edits) to the program stored in memory, thereby eliminating the need for new punched tape.

Types of CNC Machines have expanded vastly over the last decade. Turning and Machining Centers are the focus of this book but there are many other types of machines using Computerized Numerical Control. For example there are: Electrical Discharge Machines (EDM), Grinders, Lasers, Turret Punches, and many more. Also, there are many different designs of Machining and Turning Centers. Some of the Machining Centers have rotary axes and some Turning Centers have live tooling and secondary spindles. For this text, the focus will be limited to Vertical Machining Centers with three axes and Turning Centers with two axes. These types of machines are considered the foundation of all CNC learning. All operations on these machines can be carried out automatically. Human involvement is limited to setting up, loading and unloading the workpiece and entering the amounts of dimensional offsets.

WHAT IS CNC PROGRAMMING?

CNC programming is a method of defining machine tool movements through the application of numbers and corresponding coded letter symbols. As shown in the list below, all phases of production are considered in programming, beginning with the technical part drawing and ending with the final product:

Technical Part Drawing

Work Holding Considerations

Tool Selection

Preparation of the Part Program

Part Program Tool Path Verification

Measuring of Tool and Work Offsets

Program Test by Dry Run

Automatic Operation or CNC Machining

All programming begins by a close evaluation of the technical drawing and emphasizes assigned tolerances for particular operations, tool selection, and the choice of a machine. The next step is the selection of the machining process. The machining process refers to the selection of fixtures and determination of the operation sequence. Following that, is a selection of the appropriate tools and determination of the sequence of their application. Before writing a program, spindle speeds and feed rates must be calculated.

When program writing begins, special attention is given to the specific tool movements necessary to complete the finished part geometry, including non-cutting movements. Individual tools are identified and noted in the program manuscript. Miscellaneous functions are noted for each tool such as; flood coolant, spindle direction, r/min and feedrates (these items will be covered in greater detail in the following chapters). Then, once the program is written, it must be transferred to the machine through an input medium like one of the following: punched tape, floppy disk, USB, by RS-232 interface or by Ethernet.

Machining is initiated by preparing the machine for use, commonly called setup (for example, input of Workpiece Zero and Tool Length Offset into CNC memory registers). Many modern controllers have a function for graphical simulation of the programmed tool path on the Cathode Ray Tube (CRT). This enables the machinist or setup person to verify that the program has no errors, and to visually inspect the tool path movements. If all looks well, the first part can be machined with increased confidence. After completion, a thorough dimensional inspection will compare dimensions of the final product to those on the part drawing. Any differences between the actual dimensions and the dimensions on the drawing are corrected by values inserted into the offset register of the machine. In this manner, the correct dimensions of consecutively machined parts can be obtained.

INTRODUCTION TO THE COORDINATE SYSTEM

All machines are equipped with the basic traveling components, which move in relation to one another as well as in perpendicular directions. CNC Turning Centers are equipped with a tool carrier, which travels along two axes (see Figures 6 and 7).

Note that in the following drawings of lathes, the cutting tool and turret is located on the positive side of spindle centerline. This is a common design of modern CNC Turning Centers. For visualization purposes in this book the cutting tool will be shown upright. In reality it is mounted with the insert facing down and the spindle is rotated clockwise for cutting.

Note: the direction of spindle rotation, clockwise (CW) or Counterclockwise (CCW), in turning, is determined by looking from the headstock towards the tailstock and tool orientation.

Machining Centers are milling machines equipped with a traversing worktable, which travels along two axes, and a spindle with a driven tool that travels along a third axis.

All axes of machines are oriented in an orthogonal (each axis is perpendicular to the other) coordinate system, for example, the Cartesian coordinate system (right-hand rule system). (See Figure 9)



Figure 6 Turning Center Axes


Figure 7 Two Axis Turning Center Courtesy MAZAK Corporation


Figure 8 Three Axis Machining Center Courtesy MAZAK Corporation


Figure 9 Right Hand Rule

The Right-Hand Rule System

In discussing the X, Y, and Z axes, the right hand rule establishes the orientation and the description of tool motions along a positive or negative direction for each axis. This rule is recognized worldwide and is the standard for which axis identification was established.

Use Figure 9 above to help you visualize this concept. For the vertical representation, the palm of your right hand is laid out flat in front, face up the thumb will point in the positive X direction. The forefinger will be pointing the positive Y direction. Now fold over the little finger and the ring finger and allow the middle finger to point up. This forms the third axis, Z, and points in the Z positive direction. The point where all three of these axes intersect is called the origin or zero point. When looking at any vertical milling machine, you can apply this rule. For the Horizontal mill the same steps described above could be applied if you were lying on your back.

COORDINATE SYSTEMS

Visualize a grid on a sheet of paper (graph paper) with each segment of the grid having a specific value. Now place two solid lines through the exact center of the grid and perpendicular to each other. By doing this, you have constructed a simple, two-dimensional coordinate system. Carry the thought a little further and add a third imaginary line. This line passes through the same center point as the first two lines but as vertical; that is, it rises above and below the sheet on which the grid is placed. This additional line would represent the third axis in the three-dimensional coordinate system which is called the Z axis.

Two-Dimensional Coordinate System

A two-dimensional coordinate system, such as the one used on a lathe, uses the X and Z axes for measurement. The X runs perpendicular to the workpiece and the Z axis is parallel with the spindle centerline. When working on the lathe, we are working with a workpiece that has only two dimensions, the diameter and the length. On blueprints, the front view generally shows the features that define the finished shape of the part for turning. In order to see how to apply this type of coordinate system, study the following diagrams. (See Figures 10, 11 and 12)


Figure 10 Two-Dimensional Coordinate System


Figure 11 Part Drawing with a 2D Coordinate System Overlay


Figure 12 Two-Dimensional Turned Part Drawing

Think of the cylindrical work piece as if it were flat or as shown in the front view of the part blueprint. Next, visualize the coordinate system superimposed over the blueprint of the workpiece, aligning the X axis with the centerline of the diameter shown. Then align the Z axis with the end of the part, which will be used as an origin or zero-point. In most cases, the finished part surface nearest the spindle face will represent this Z axis datum and the centerline will represent the X axis. Where the two axes intersect is the origin or zero point. By laying out this “grid,” we now can apply the coordinate system and define where the points are located to enable programmed creation of the geometry from the blueprint. Another point to consider: on a lathe, is that the cutting takes place on only one side of the part or the radius, because the part rotates and it is symmetrical about the centerline. In order to apply the coordinate system in this case, all we need is the basic contour features of one-half of the part (on one side of the diameter). The other half is a mirror image; when given this program coordinate information, the lathe will automatically produce the mirror image.

Three-Dimensional Coordinate System

Although the mill uses a three-dimensional coordinate system, the same concept (using the top view of the blueprint) can be used with rectangular workpieces. As with the lathe, the Z axis is related to the spindle. However, in the case of the three dimensional rectangular workpiece, the origin or zero-point must be defined differently. In the example shown in Figure13, the upper left hand corner of the workpiece is chosen as the zero-point for defining movements using the coordinate system. The thickness of the part is the third dimension or Z axis. When selecting a zero-point for the Z axis of a particular part, it is common to use the top surface.


Figure 13 Three-Dimensional Coordinate System

The Polar Coordinate System

If a circle is drawn on a piece of graph paper so that the center of the circle is at the intersection of two lines and the edges of the circle are tangent to any line on the paper this will help in visualizing the following statements. Let’s consider the circle center as the origin or zero-point of the coordinate system. This means that some of the points defined within this grid will be negative numbers. Now draw a horizontal line through the center and passing through each side of the circle. Then draw a vertical line through the center also passing through each side of the circle. Basically, we’ve made a pie with four pieces. Each of the four pieces or segments of the circle is known as a quadrant. The quadrants are numbered and progress counter-clockwise. In Quadrant No. 1, both the X and Y axis point values are positive. In Quadrant No. 2, the X axis point values are negative and the Y axis point values are positive. In Quadrant No. 3, both the X and Y axis point values are negative. Finally, in Quadrant No. 4, the X axis point values are positive while the Y axis values are negative. This quadrant system is true regardless of the axis that rotation is about. The following drawings illustrate the values (negative or positive) of the coordinates, depending on the quarter circle (quadrant) in which they appear.

Although the rectangular coordinate system can be used to define points on the circle, a method using angular values may also be specified. We still use the same origin or zero-point for the X and Y axes. However, the two values that are being considered are an angular value for the position of a point on the circle and the length of the radius joining that point with the center of the circle. To understand the polar coordinate system, imagine that the radius is a line circling around the center origin or zero-point. Thinking in terms of hand movements on a clock, the three-o’clock position has an angular value of 0° counted as the “starting point” for the radius line. The twelve-o’clock position is referred to as the 90° position, nine-o’clock is 180°, and the six-o’clock position is 270°. When the radius line lies on the X axis in the three-o’clock position, we have at least two possible angular measurements. If the radius line has not moved from its starting point, the angular measurement is known as 0°. On the other hand, if the radius line has circled once around the zero point, the angular measurement is known as 360°. Therefore, the movement of the radius determines the angular measurement. If the direction in which the radius rotates is counter-clockwise, angular values will be positive. A negative angular value (such as -90°) indicates that the radius has rotated in a clockwise direction. Note: A 90° angle (clockwise rotation) places the radius at the same position on the grid as a +270° (counter-clockwise) rotation.


Figure 14 Polar Coordinate System Quadrants

Sometimes the blueprint will not specify a rectangular coordinate but will give a polar system in the form of an angle for the location of a feature. With some basic trigonometric calculations, this information can be converted to the rectangular coordinate system.

The same polar coordinates system applies regardless of the axis of rotation as is shown once again in Figure 14. When rotation is around the X axis, the rotational axis is designated as A, the Y axis, the rotational axis is designated as B, and the Z axis, the rotational axis is designated as C. These are considered an additional axes and are known as the fourth axis.

All operations of CNC machines are based on three axes: X, Y, and Z.

1. (X0, Y0, Z0)

2. (X0, Y0, Z+)

3. (X0, Y-, Z+)

4. (X0, Y-, Z0)

5. (X-, Y-, Z0)

6. (X-, Y0, Z0)

7. (X-, Y0, Z+)

8. (X-, Y- Z+)


Figure 15

Figure 15 illustrates a box-like object in which one vertex (point 1) is located at the origin of the coordinate system. At the side of the drawing, the coordinate signs are given for each the numbered locations. Note the position of the coordinate system on the following machines.


Figure 16 Axis Designation for a Three Axis Mill

On vertical milling machines the spindle axis is perpendicular to the surface of the worktable.


Figure 17 Axis Designation for a Three Axis Horizontal Mill

On lathes, the spindle axis is also the workpiece axis.


Figure 18 Axis Designation for a Two Axis Turning Center

On horizontal milling machines the spindle axis is parallel to the surface of the worktable.

POINTS OF REFERENCE

When using CNC machines, any tool location is controlled within the coordinate system. The accuracy of this positional information is established by specific Zero Points (reference points). The first is Machine Zero, a fixed point established by the manufacturer that is the basis for all coordinate system measurements. On a typical lathe, this is usually the spindle centerline in the X axis and the face of the spindle nose for the Z axis. For a milling machine, this position is often at the furthest end of travel in all three axes in the positive direction. Occasionally, this X axis position is at the center of the table travel.

This Machine Zero Point establishes the coordinate system for operation of the machine and is commonly called Machine Home (Home Position). Upon startup of the machine, all axes need to be moved to this position to establish the coordinate system origin (commonly called Homing the machine or Zero Return). The Machine Zero Point identifies to the machine controller where the origin for each axis is located.

The Operator’s manual supplied with the machine should be consulted to identify where this location is and how to properly Home the machine.

The second zero point can be located anywhere within the machine work envelope and is called Workpiece Zero and is used as the basis for programmed coordinate values used to produce the workpiece. It is established within the part program by a special code and the coordinates are taken from the distance from the Machine Zero point. The code number in the program identifies the location of offset values to the machine control where the exact coordinate distance of the X, Y and Z axes of Workpiece Zero is in relationship to the Machine Zero. All dimensional data on the part will be established by accurately setting the Workpiece Zero. A way of looking at the Workpiece Zero is like another coordinate system within the machine coordinate system, established by the Home Position.

Tool offsets are also considered to be Zero Points as well and are compensated for with Tool Length and Diameter Offsets. The tool setting point for a lathe has two dimensions; the distance on diameter from the tool tip to the centerline of the tool turret, and the distance from the tool turret face to the tool tip. The tool setting point for the mill is the distance from the spindle face to the tool tip, and the distance from the tool tip to the spindle centerline.

Blueprint Relationship to CNC

The standard called ASME Y14.5-1994 establishes a method for communicating part dimensional values, in a uniform way, on the engineering drawing or blueprint. The drawing information will be translated to the coordinate system in order for dimensional values and part features to be manufactured.

On the blueprint, Datum features are identified as Primary (A), Secondary (B) and Tertiary (C). Dimensions for the workpiece are derived from these datum features. On the drawing, the point where these three datum features meet is called the origin or zero point for the part. When possible, this same point should be used for Workpiece Zero. This allows the use of actual blueprint dimensions within the part program and often results in fewer calculations. Most drawings are developed using an absolute dimensioning system based on Datum dimensions derived from the same fixed point (origin or zero point). Occasionally, some features may be dimensioned from the location of another feature. An example of this might be a row of holes exactly one half of an inch apart. This type of dimensioning is called relative or incremental.

Note: A thorough knowledge of blueprint reading is imperative for successful results using manual or CNC equipment.

Machine Zero

Each CNC machine is assigned a fixed point, which is referred to as Machine Zero (or Machine Home). For most machines, Machine Zero is defined as the extreme travel end position of main machine components that are oriented in a given coordinate system. From Machine Zero, we can determine the values of the coordinates that, in turn, determine the position of the points commanded in a CNC program. Electromechanical sensors called micro-switches (limit switches) are located in the extreme end positions of traveling machine components. These sensors send a signal to the controller when they are activated and thus setting the Home position. In the case of milling machines, Machine Zero on the table is set with respect to the X and Y axes. Machine Zero on the spindle is set with respect to the Z axis, whereas Machine Zero of the tool carrier on lathes is set with respect to the X and Z axes. Positioning the traveling components at zero can be performed manually, as well as with the use of the control panel or directly from within the program by employing a Reference Point Return function (G28). At the initial start up of any CNC Machine, it is required that the machine be “Homed” or sent to Machine Zero before proceeding any further. From that point on, all machine components will always automatically return to the same exact position when commanded to do so in the program.

Machine Zero is frequently the position in which tool changes take place. Therefore, if you intend to change the tool before a given operation, then the machine must be positioned at Machine Zero for the Z axis on vertical machines and the Y axis on horizontal machines.

Workpiece Zero

So far, for all main traveling components of CNC machines, we have assigned an oriented axis within the coordinate system. Any movement of machine components must be described by points, which actually determine the traveling path of the tool. Changes in the position tool are determined with respect to the stationary reference point of Machine Zero.

In order to better understand this concept, this situation can be illustrated with a rectangular plate in which all coordinates are described at their four corners (P1, P2, P3, P4).

P1 = X -15.0, Y-10.0

P2 = X -15.0, Y-12.0

P3 = X -20.0, Y-12.0

P4 = X -20.0, Y-10.0


Figure 19 Machine Zero to Workpiece Zero

Determine the coordinates of these points. The rectangle has been placed in such a manner that each side is parallel to one axis of the coordinate system. If the distance from Machine Zero is measured to any point on the workpiece, the coordinates of the remaining points can be determined from the dimensions given on the drawing.

All programmed point coordinates, whose values are determined with respect to Machine Zero, must be calculated with respect to Machine Zero every time which is time consuming. It may also cause errors due to the fact that all the given dimensions determining the points do not always refer to those on the drawing. As previously mentioned, in order to determine the coordinates for the four corners of the rectangular part illustrated, it is necessary to find the distance between Machine Zero and a specific point of reference on the part. Then, all the remaining dimensional data to be used are taken from the blueprint.

For all CNC machines, we follow certain principles to define the method of selecting Workpiece Zero from within the part program. At the beginning of the program, we input the value of the distance between Machine Zero and the selected Workpiece Zero, by employing function G92 or G54 through G59 for Machining Centers and function G50 or G54 for Turning Centers. These measured values are either input directly into the program, as in the case of G92 for Mills and G50 for Lathes, or in offset registers in the control for G54 through 59. Let us review the same situation as above and note the changes of the point coordinates when applying Workpiece Zero.

G92X15.0Y10.0 or G54-59X0.0Y0.0

P1 = X0, Y0

P2 = X0, Y-2.0

P3 = X-5.0, Y-2.0

P4 = X-5.0, Y0


Figure 20 Workpiece Zero Point

The values X15.0 and Y10.0 for G92 or G54 through 59 are valid until they are recalled by the same function, but with different coordinates, for X and Y. When programming Machining Centers, we place function G92 or G54 through 59 only at the beginning of the program, whereas the values assigned to function G50 for Turning Centers will need to be added to the program with respect to each tools position. Once this activation is read by the control, all coordinates will be measured from the new Workpiece Zero allowing the use of part dimensions for programmed moves.


Figure 21 Workpiece Zero for Turning Centers

With Turning Centers, Workpiece Zero in the direction of the Z axis is most often on the face surface of the workpiece, and the centerline axis of the spindle is Workpiece Zero in the direction of the X axis.

On Machining Centers, Workpiece Zero is frequently located on the corner of the workpiece or in alignment with the Datum of the workpiece.

The application of Workpiece Zero is quite advantageous to the programmer because the input values of X, Y, and Z in the program can be taken directly from the drawing. If the program is used another time, the values of coordinates X and Y (assigned to functions G50 and G92 or G54 through G59) will have to be inserted again, prior to automatic operation.


Figure 22 Absolute and Incremental Coordinate System Points

Absolute and Incremental Coordinate Systems

When programming in an absolute coordinate system, the positions of all the coordinates are based upon a fixed point or origin of the coordinate system. The tool path from point P1 to P10, for example, is illustrated on the next page:

XY
P10.00.0
P20.010.5
P32.510.5
P42.58.5
P55.58.5
P66.59.5
P76.512.0
P811.012.0
P911.01.0
P1010.00.0

Programming with an incremental coordinate system is based upon the determination of the tool path from its current position to its next consecutive position and in the direction of all the axes. Sign determines the direction of motion. Based on the drawing from the previous example, we can illustrate the tool path in an incremental coordinate system, starting and ending at P1.

XY
P20.010.5
P32.50.0
P40.0-2.0
P53.00.0
P61.01.0
P70.02.5
P84.50.0
P90.0-11.0
P10-1.0-1.0
P1-10.00.0

Coordinate Input Format

CNC machines allow input values of inches specified by the command G20, or millimeters specified by the command G21, and degrees with a decimal point and significant zeros in front of (leading) or at the end (trailing) of the values. When using inch programming the two ways distances can be specified:

Programming with a decimal point

1 inch = 1. or 1.0
1 1/4 inch = 1.250 or 1.25
1/16 inch = 0.0625 or .0625

Programming with significant trailing zeros

In this case, the zero furthest to the right corresponds with the ten thousandths of an inch.

1 inch = 10000
1 1/8 inch = 11250
1 1/32 inch = 10313

These two coordinate input formats are the standard on all CNC machines

With modern controllers neither leading nor trailing zeros are required, the decimal placement is the significant factor. In this case the input is as follows:

1 inch = 1. or 1.0
1 1/4 inch = 1.25
1/16 inch = .0625 or 0.0625

PROGRAM FORMAT

The language described in this book is used for controlling machine tools is known informally as “G-Code”. This language is used worldwide and is reasonably consistent. The standard it is governed by was established by the Electronics Industries Association and the International Standards Organization called EIA/ISO for short. Because of this standardization a program created for a particular part on one machine may be used on other similar machines with minimal changes required.

Each program is a set of instructions that controls the tool path. The program is made up from blocks of information separated by the semicolon symbol (;). This symbol (;) is defined as the end of the block (EOB) character. Each block contains one or more program words. For example:

WordWordWordWordWord
N02G01X3.5Y4.728F8.0

Each word contains an address, followed by specific data. For example:

AddressDataAddressDataAddressData
N02G01X3.5

The following chart is a list for all of the letter addresses that are applicable in programming, along with brief explanations for each:

Address Characters

CHARACTERMEANING
AAdditional rotary axis parallel and around the X axis
BAdditional rotary axis parallel and around the Y axis
CAdditional rotary axis parallel and around the Z axis
DTool radius offset number(Turning) Depth of cut for multiple repetitive cycles
EUser macro character
FFeed rate(Turning) Precise designation of thread lead
GPreparatory function
HTool length offset number
IIncremental X coordinate of circle center or parameter of fixed cycle
JIncremental Y coordinate of circle center
KIncremental Z coordinate of circle center(Turning) parameter of fixed cycle
LNumber of repetitions (subprogram, hole pattern)Fixed offset group number
MMiscellaneous function
NSequence or block number
OProgram number
PDwell time, program number, and sequence number designation in subprogram(Turning) Sequence number start for multiple repetitive cycles
QDepth of cut, shift of canned cycles(Turning) Sequence number end for multiple repetitive cycles
RPoint R for canned cycles, as a reference return valueRadius designation of a circle arcAngular displacement value for coordinate system rotation
SSpindle-speed function
TTool function
UAdditional linear axis parallel to X axis
VAdditional linear axis parallel to Y axis
WAdditional linear axis parallel to Z axis
XX coordinate
YY coordinate
ZZ coordinate

Common Symbols Used in Programs

SYMBOLMEANING
Minus Sign, Used for Negative Values
/Slash, Used for Block Skip Function
%Percent Sign, Necessary at program beginning and end for communications only
( )Parentheses, Used for comments within programs
:Colon, Designation of Program Number
.Decimal Point, Designation of fractional portion of a number

Part 1 Study Questions

1. Programming is a method of defining tool movements through the application of numbers and corresponding coded letter symbols.

T or F

2. A lathe has the following axes:

a. X, Y & Z

b. X & Y only

c. X & Z only

d. Y & Z only

3. Program coordinates that are based on a fixed origin are called:

a. Incremental

b. Absolute

c. Relative

d. Polar

4. On a two axis turning center the diameter controlling axis is:

a. B

b. A

c. X

d. Z

5. The letter addresses used to identify axes of rotation are:

a. U, V & W

b. X, Y & Z

c. A, Z & X

d. A, B & C

6. The acronym TLO stands for:

a. Tool Length Offsets

b. Total Length Offset

c. Taper Length Offset

d. Time Length Offset

7. When referring to the polar coordinate system, the clockwise rotation direction has a positive value

T or F

8. In Figure 15 of Part 1, which quadrant is the part placed in?

9. A program block is a single line of code followed by an end-of-block character

T or F

10. Each block contains one or more program words

T or F

11. Using Figure 13 in Part 1, list the X and Y absolute coordinates for the part profile where Workpiece Zero is at the upper left corner. (The corner cutoff is at a 45° angle).

12. Using Figure 13 in Part 1, list the X and Y incremental coordinates for the part profile where Workpiece Zero is at the upper left corner.

13. How often should the machine lubrication levels be checked?

Programming of CNC Machines

Подняться наверх