Читать книгу Programmable Automation Technologies - Daniel Kandray - Страница 10
ОглавлениеIntroduction to Computer Numerical Control (CNC)
Contents
3.1 Introduction to CNC Technology
3.3 Coordinate Systems and Reference Points
3.4 The Ten Steps of CNC Programming
3.5 Advantages and Disadvantages of CNC
3.6 When to Use CNC Technology
3.7 Summary
3.8 Key Words
3.9 Review Questions
3.10 Bibliography
Objective
The objective of this chapter is to provide a thorough understanding of the terminology and basic operating concepts of computer numerical control (CNC) technology.
3.1 Introduction to CNC Technology
Computer numerical control (CNC) technology is, in the simplest of terms, the automation of traditional manual machining processes by electrical and computer technology. In traditional “manual” machining, a machinist (or operator) decides upon and directs the motion of a tool relative to the workpiece, thus creating the desired shape of a finished workpiece. In CNC technology, a computer controller plays the role of the machinist, so to speak, directing the motion of the tool by following a stored sequence of coded machine commands or directions called a program of instructions, or more traditionally, a part program. A sample CNC program of instructions is shown in Figure 3-0. The program directs the motion of the tool relative to the part and contains commands that control all essential machine functions, such as tool choice, spindle rotation speed, tool feed rate, and other functions. The program of instruction, written in a language that is understood by the CNC controller, is often called a G-code program because its commands are alphanumeric codes beginning with the letter “G.” This is evident in Figure 3-0.
Figure 3-0 Sample G-code program
3.1.1 Manual Machining and Numerical Control Technology
Manual machining is still used in industry for low volume applications, maintenance, and repair. In manual machining, mechanical technology in the form of slides, gears, belts, and feed screws implements a tool’s movement relative to a workpiece. A typical manual vertical milling machine is shown in Figure 3-1.
Figure 3-1 Manual vertical milling machine
A part is milled or machined by fastening the workpiece to the machine and moving the workpiece into the rotating cutter, held by the spindle, at a specific feed rate and depth of cut. Spindle rotational speed and direction is often controlled with gears or belts and pulleys. The workpiece is fastened to the machine with some type of fixturing. In Figure 3-1 the fixturing is a simple vise. The vise, in turn, is fastened to the mill table. The mill table, and hence the workpiece, can then be moved in three directions relative and perpendicular to the spindle.
The Cartesian coordinate system supplies the layout of the directions in which the mill table can be moved. Again, as shown in Figure 3-1, the mill table can move longitudinally across the front of the machine. This is shown as the x direction in the figure. The table can also be moved at a right angle to the x direction, into the machine, designated as the y direction. The third direction is along the spindle axis, and is shown as the z direction. Linear bearings, called slides, or ways, both short for “slipways,” guide the movement of the table along each axis.
Figure 3-2 shows a manual vertical milling machine with exploded views of the x-and y-axis slides and lead screws. The table is moved along a specific axis by turning the appropriate hand crank. This in turn drives the lead screw (or feed screw), which pushes or pulls the table along the slides. Figure 3-3 shows a closer view of the slides. Note that dovetail slides are used to constrain motion perpendicular to the sliding direction. The feed screws for each axis can also be powered by the machine and moved at specific speeds or rates.
Figure 3-3 shows such a machine, with the x-axis equipped with a power feed. Typically, in manual milling, powered table movement occurs in only one direction at a time. Standard operations for manual vertical mills are slot cutting, planing, and hole drilling. Movement that occurs between any pair of axes during the cutting operation is not very accurate and is difficult to accomplish. Cutting complex surfaces may require movement in the direction of all three axes. However, such an operation is not possible on a traditional manual mill; numerical control technology was developed to specifically address this limitation.
During the 1940s a contractor to the U.S. Air Force by the name of John Parsons began experimenting with methods to produce more accurate inspection templates for helicopter blades. The inspection templates were a complex airfoil shape. Machining these shapes accurately was a challenge. Parsons’ method involved calculating points along the airfoil’s shape and then, using two operators (one for each axis), manually moving the machine tool to each of these points. Because the calculations were so complex, Parsons used a punch card tabulating machine to perform the calculations. The punch cards would be fed into a card reader at the machine, which would read the data, then pass the information on to a machine controller, which in turn directed the motion of each of the machine axes.
Figure 3-2 Exploded view of manual vertical milling machine
Figure 3-3 View of dovetail slides of manual vertical milling machine
Figure 3-4 Manual machine with power-driven x-axis
This method, although much more accurate than manual machining, was still very time-consuming. However, the Air Force was much impressed and awarded Parsons a contract to develop a machine to provide automated control of the axes.
Parsons’ machine concept is, fundamentally, the system that all-modern CNC equipment uses today. However, today’s systems are substantially upgraded due to the rapid development of computer technology. Punch cards were replaced by magnetic tapes, which in turn were replaced by electronic files. These electronic files, or “part programs,” are now either created directly at the machine or developed offline at a separate computer. Figure 3-5 shows an older numerical control—or “NC”—machine, which used programs stored on magnetic tape. Note the size of the tape reader/machine controller. Drive motors for the axes are also visible. Prior to the advent of computer technology most machines were referred to as “NC machines.” They were hardwired using vacuum tubes, transistors, and relay technology. In the 1970s and 1980s, microcomputers replaced the aging hardwired technology. These machines were called computer numerical control, or CNC, machines. However, NC is still often used interchangeably with CNC. Figure 3-6 shows a modern CNC machine center.
Figure 3-5 Vintage numerical control (NC) machine
Figure 3-6 Modern computer numerical control (CNC) milling machine
CNC technology has been applied to numerous machine tools, including lathes, mills, electric discharge machines (EDM), and flame, laser, and plasma cutting machines. Non-machine tool examples include coordinate measuring machines (CMM), component insertion machines (assembly machines), wire-bending machines, and polymer composite filament winding machines. Figure 3-7 shows a numerical controlled wire-bending machine. Essentially, any type of processing equipment that needs to move a tool relative to a workpiece is a prime candidate for CNC technology. Thus, a CNC system can be broken into four major components:
1. Processing equipment/machine tool
2. Drive mechanism/positioning system
3. CNC controller
4. Program of instructions.
Figure 3-7 CNC wire-bending machine
3.2.1 Processing Equipment/Machine Tool
For processing equipment in general, the workpiece-tool relative motion is executed in two or three directions; however, as many as five different directions can be controlled in modern equipment. Each direction corresponds to an axis of the machine. A standard CNC mill has three axes: two horizontal axes corresponding to the x,y-plane and a vertical axis for movement of the spindle corresponding to the z-axis. The axis with the longest travel is generally labeled “x-axis.” Another standard in the machine tool industry is the correspondence of the axis of the machine’s spindle with the z-axis. Hence, for a lathe, the tool motion is specified in the direction of the x- and z-axes. The tool moves in the x direction, in and out of the workpiece orthogonal (at right angles) to its rotational axis. This is shown in Figure 3-8.
Figure 3-8 CNC lathe with axes labeled
Additional axes are often added to mills in the form of multiaxis rotational tables, or fixturing, resulting in four or five axis machines. This is discussed in greater detail in later chapters. As mentioned previously, any type of processing equipment where controlling the location of the workpiece relative to the location of a tool is important is a prime candidate for CNC control.
3.2.2 Drive Mechanism/Positioning System
Movement along the various axes of the machine is accomplished with mechanically guided high precision linear bearings, called slides or ways, and a lead screw. A carriage or table is moved along the slide (or axis) by the lead screw. The lead screw transforms rotational motion from an electric motor into linear movement along an axis. Early machines used hydraulic motors controlled with servo valves, an approach still used for very large machines.
The majority of modern CNC tools have electric servomotors to drive the lead screw. Figure 3-9 shows a cutaway view of a typical servomotor closed loop system, for controlling one axis. In order to perform complex contouring in the x,y-plane, two axes are required, one for each direction. This is accomplished by mounting one axis control system on top of another. This is evident in Figure 3-9. One axis control system moves the table across the machine, the other moves the saddle, and hence the table, in and out of the machine. By adding vertical axis control to the spindle, complicated three-dimensional shapes can be machined. Orchestrating and synchronizing the motion in all three directions is the task of the CNC controller.
Figure 3-9 CNC mill servodrive components
3.2.3 CNC Controller
The CNC controller directs all machine functions while executing the program of instructions. It interfaces with the machine operator during machine and tool setup. It selects the desired tooling and positions the workpiece in the correct location relative to the tool. It turns on spindle and coolant flow and moves the workpiece and/or tool along the correct tool path at the specified feed rate, often directing the motion along three axes simultaneously. It can also make decisions and instruct other machines to perform a specified task. For example, it can communicate with a machine-tending robot to load or unload a workpiece. When it does this, it must cease machining operations, open any guards or gates to allow easy access to the workpiece, release the automated fixture, and instruct the robot to proceed. Not only does the controller have to execute all of these impressive tasks accurately and in the correct order, but also the tasks must be carried out very quickly. This is particularly true for the motion control of the axes, which is perhaps the most important and complicated function the controller provides. Thus, the motion control is in a category among controller functions are listed. The other functions discussed above are categorized as either auxiliary control or part of the operator interface. This is shown in Figure 3-10.
Figure 3-10 CNC controller functions
Although the performance capabilities of a CNC machine are impressive, the machine cannot perform a single task without first being properly set up. In the machining industry the term “setup” refers to preparation of the machine or machines to process a specific workpiece in a specified manner. Setup typically involves acquisition and installation of the correct cutting tools and fixturing. In CNC machining, setup also entails the correct part program be loaded into memory and specifies the program reference zero (PRZ). The PRZ is the location of the x, y, and z zero positions of the coordinate system that the program references when providing relative positioning of the tool and workpiece. Setup-related tasks are performed through the operator interface of the machine. The PRZ is discussed in more detail in subsequent sections.
The operator interface typically (and minimally) consists of a CRT or LCD screen and keypad. Small nonindustrial machines used by hobbyists or by operators in the educational environment use a PC that runs operator interface software. Regardless of the type of operator interface, the functions it provides are the same, and they typically include manual motion control of the axes (for establishing the PRZ), manual control of spindle rotation speed and direction, tooling specifications and setup, starting and stopping the machine, program file management, and input and editing of programs—as well as other functions. An operator interface for a CNC lathe is shown in Figure 3-11.
Figure 3-11 CNC operator interface
Auxiliary control is essentially discrete control over machine functions that support the machining or processing operation—functions that are not directly related to motion (continuous) control of the axes. This is an important distinction because it affects the coding used in the program of instructions (see Chapter 4). Auxiliary control is considered a form of discrete control in the sense that the status of the function (spindle motor) changes at discrete or distinct moments in time. Additionally, the status is binary (1 or 0). As an example, consider the status of the spindle motor during a machining operation. Its status is either on or off. This can be represented in binary terms by either a 1 (on) or 0 (off). This is in stark contrast to the motion control of the axes. The status or position of an axis is continuously changing. Hence, motion control is a form of continuous control.
Figure 3-12 shows the motion control system for a single axis of a vertical mill. Based on a program of instructions, the CNC controller sends the desired position and sets the speed at which it travels to the motor drive unit. The motor drive unit then analyzes this signal and turns on and rotates the servomotor to obtain the desired position at the desired speed. The encoder informs, or feeds back, the position of the axis continuously to the motor drive unit, while the tachometer reports the rotational speed of the lead screw. The motor drive unit continuously compares the desired position and speed to the actual position and speed and adjusts the servomotor accordingly. This type of continuous control is termed a closed loop feedback control system. Most CNC machines used in industry employ this type of control. However, for smaller CNC machines used by hobbyists and in academia, an open loop control system is often used.
Figure 3-12 Single-axis closed loop motion control system
An open loop control system utilizes a stepper motor instead of a servomotor to control axis movement. Also, the system does not use a feedback device such as an encoder or tachometer. Hence, it cannot provide feedback to the motor controller regarding the actual axis position and speed. Thus, the signal sent to the stepper motor is the only means by which the speed and position of the axis is controlled. The signal is sent, and the controller assumes the axis has achieved the desired position at the desired speed, but this assumption cannot be verified. Even though open loop control systems are much simpler and less expensive than closed loop feedback control systems, they are generally only used where resistance to axis motion is low. High resistive forces could prevent the axis from achieving the desired position. A single-axis open loop control system is depicted in Figure 3-13.
Figure 3-13 Single-axis open loop motion control system
In a typical machining operation, simultaneous control of more than one axis is required. For a CNC lathe or a CNC plasma cutter, two axes will be controlled simultaneously. For a mill, at least three and up to five axes have to be controlled. Therefore, the motion control system has to perform complicated geometric computations to coordinate the motion of each axis to achieve the desired relative position of the tool to the workpiece. Additionally, the path taken to achieve that position may be of particular importance.
Consider Figure 3-14. Figure 3-14(a) shows the desired end product. Two holes are to be drilled at positions A and B. First, the tool is moved to position A and the hole drilled. Subsequently, the tool moves to position B to drill the second hole, as shown in Figure 3-14(b). The path taken to get to position B is of little importance. What is important is that tool position B be located accurately. This type of control, where the tool is moved from point A to point B without consideration of the path taken is called point-to-point control. To achieve this motion two single-axis motion control systems can be placed together, one to represent the x-axis and one to represent the y-axis. A signal is sent to the x-axis motor drive unit to move to position xB and another is sent to the y-axis motor drive unit to move to position yb. Each axis will move to the desired position without regard to the motion of the other axis. This is the essence of point-to-point control: to obtain the desired position without regard to the path taken. Figure 3-14(c) shows a graph of how the path may look on the (x,y)-coordinate system, depending on the values of xB and yB. This type of control is suitable for drilling operations, except when the path taken between the two positions is important, as is true in milling and turning (lathe) operations.
Figure 3-15(a) shows a block with a diagonal slot milled in it from point A to B. In order to perform this operation, the tool will be positioned above point A, then moved down into the workpiece to the desired depth. From this position it is moved to point B following a straight (linear) path, as shown in Figure 3-15(b). In this case, the path taken from point A to point B is important. Additionally, the speed at which the tool moves along this path is also very important because of speed’s effect on the surface finish of the final product. The resulting tool path is shown graphically in Figure 3-15(c). Consequently, the CNC controller must perform complicated calculations, and do so very quickly, to ensure that the desired path is followed at the desired speed. This is called continuous path control, which the controller must “interpolate” to achieve. This idea is now explained.