Automation Ch 7 PDF
Document Details
Uploaded by ImportantBixbite
Tags
Summary
This chapter introduces Computer Numerical Control (CNC). It details the fundamentals and components of an NC system, including coordinate systems and motion control systems. It also explains how computers are used in numerical control and the applications of CNC to various machine tools.
Full Transcript
Chapter 7 Computer Numerical Control Chapter Contents 7.1 Fundamentals of NC Technology 7.1.1 Basic Components of an NC System 7.1.2 NC Coordinate Systems 7.1.3 Motion Control Systems 7.2 Computers and Numerical Control 7.2.1 The CNC Machine Control Unit 7.2.2 CNC Software 7.2.3 Distributed Numeri...
Chapter 7 Computer Numerical Control Chapter Contents 7.1 Fundamentals of NC Technology 7.1.1 Basic Components of an NC System 7.1.2 NC Coordinate Systems 7.1.3 Motion Control Systems 7.2 Computers and Numerical Control 7.2.1 The CNC Machine Control Unit 7.2.2 CNC Software 7.2.3 Distributed Numerical Control 7.3 Applications of NC 7.3.1 Machine Tool Applications 7.3.2 Other NC Applications 7.3.3 Advantages and Disadvantages of NC 7.4 Analysis of Positioning Systems 7.4.1 Open-Loop Positioning Systems 7.4.2 Closed-Loop Positioning Systems 7.4.3 Precision in Positioning Systems 7.5 NC Part Programming 7.5.1 Manual Part Programming 7.5.2 Computer-Assisted Part Programming 7.5.3 CAD/CAM Part Programming 7.5.4 Manual Data Input Appendix 7A: Coding for Manual Part Programming 165 M07_GROO6119_04_GE_C07.indd 165 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 166 Numerical control (NC) is a form of programmable automation in which the mechanical actions of a machine tool or other equipment are controlled by a program containing coded alphanumeric data. The alphanumeric data represent relative positions between a work head and a work part as well as other instructions needed to operate the machine. The work head is a cutting tool or other processing apparatus, and the work part is the object being processed. When the current job is completed, the program of instructions can be changed to process a new job. The capability to change the program makes NC suitable for low and medium production. It is much easier to write new programs than to make major alterations in the processing equipment. Numerical control can be applied to a wide variety of processes. The applications divide into two categories: (1) machine tool applications, such as drilling, milling, turning, and other metal working; and (2) other applications, such as assembly, rapid prototyping, and inspection. The common operating feature of NC in all of these applications is control of the work head movement relative to the work part. The concept for NC dates from the late 1940s. The first NC machine was developed in 1952 (Historical Note 7.1). Historical Note 7.1 The First NC Machines [1], [4], [7], [9] The development of NC owes much to the U.S. Air Force and the early aerospace industry. The first work in the area of NC is attributed to John Parsons and his associate Frank Stulen at Parsons Corporation in Traverse City, Michigan. Parsons was a contractor for the Air Force during the 1940s and had experimented with the concept of using coordinate position data contained on punched cards to define and machine the surface contours of airfoil shapes. He had named his system the Cardamatic milling machine, since the numerical data was stored on punched cards. Parsons and his colleagues presented the idea to the WrightPatterson Air Force Base in 1948. The initial Air Force contract was awarded to Parsons in June 1949. A subcontract was awarded by Parsons in July 1949 to the Servomechanism Laboratories at the Massachusetts Institute of Technology to (1) perform a systems engineering study on machine tool controls and (2) develop a prototype machine tool based on the Cardamatic principle. Research commenced on the basis of this subcontract, which continued until April 1951, when a contract was signed by MIT and the Air Force to complete the development work. Early in the project, it became clear that the required data transfer rates between the controller and the machine tool could not be achieved using punched cards, so it was proposed to use either punched paper tape or magnetic tape to store the numerical data. These and other technical details of the control system for machine tool control had been defined by June 1950. The name numerical control was adopted in March 1951 based on a contest sponsored by John Parsons among “MIT personnel working on the project.” The first NC machine was developed by retrofitting a Cincinnati Milling Machine Company vertical Hydro-Tel milling machine (a 24@in * 60@in conventional tracer mill) that had been donated by the Air Force from surplus equipment. The controller combined analog and digital components, consisted of 292 vacuum tubes, and occupied a floor area greater than the machine tool itself. The prototype successfully performed simultaneous control of three-axis motion based on coordinate-axis data on punched binary tape. This experimental machine was in operation by March 1952. A patent for the machine tool system entitled Numerical Control Servo System was filed in August 1952, and awarded in December 1962. Inventors were listed as Jay Forrester, William Pease, James McDonough, and Alfred Susskind, all Servomechanisms Lab staff M07_GROO6119_04_GE_C07.indd 166 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 167 during the project. It is of interest to note that a patent was also filed by John Parsons and Frank Stulen in May 1952 for a Motor Controlled Apparatus for Positioning Machine Tool based on the idea of using punched cards and a mechanical rather than electronic controller. This patent was issued in January 1958. In hindsight, it is clear that the MIT research provided the prototype for subsequent developments in NC technology. As far as is known, no commercial machines were ever introduced using the Parsons–Stulen configuration. Once the NC machine was operational in March 1952, trial parts were solicited from aircraft companies across the country to learn about the operating features and economics of NC. Several potential advantages of NC were apparent from these trials. These included good accuracy and repeatability, reduction of noncutting time in the machining cycle, and the capability to machine complex geometries. Part programming was recognized as a difficulty with the new technology. A public demonstration of the machine was held in September 1952 for machine tool builders (anticipated to be the companies that would subsequently develop products in the new technology), aircraft component producers (expected to be the principal users of NC), and other interested parties. Reactions of the machine tool companies following the demonstrations “ranged from guarded optimism to outright negativism” [9, p. 61]. Most of the companies were concerned about a system that relied on vacuum tubes, not realizing that tubes would soon be displaced by transistors and integrated circuits. They were also worried about their staff’s qualifications to maintain such equipment and were generally skeptical of the NC concept. Anticipating this reaction, the Air Force sponsored two additional tasks: (1) information dissemination to industry and (2) an economic study. The information dissemination task included many visits by Servo Lab personnel to companies in the machine tool industry as well as visits to the Lab by industry personnel to observe demonstrations of the prototype machine. The economic study showed clearly that the applications of general-purpose NC machine tools were in lowand medium-quantity production, as opposed to Detroit-type transfer lines, which could be justified only for very large quantities. In 1956, the Air Force decided to sponsor the development of NC machine tools at several aircraft companies, and these machines were placed in operation between 1958 and 1960. The advantages of NC soon became apparent, and the aerospace companies began placing orders for new NC machines. In some cases, they even built their own units. This served as a stimulus to the remaining machine tool companies that had not yet embraced NC. Advances in computer technology also stimulated further development. The first application of the digital computer for NC was part programming. In 1956, MIT demonstrated the feasibility of a computer-aided part programming system using an early digital computer prototype that had been developed at MIT. Based on this demonstration, the Air Force sponsored development of a part programming language. This research resulted in the development of the APT language in 1958. The automatically programmed tool system (APT) was the brainchild of mathematician Douglas Ross, who worked in the MIT Servomechanisms Lab at the time. Recall that this project was started in the 1950s, a time when digital computer technology was in its infancy, as were the associated computer programming languages and methods. The APT project was a pioneering effort, not only in the development of NC technology, but also in computer programming concepts, computer graphics, and computer-aided design (CAD). Ross envisioned a part programming system in which (1) the user would prepare instructions for operating the machine tool using English-like words, (2) the digital computer would translate these instructions into a language that the computer could understand and process, (3) the computer would carry out the arithmetic and geometric calculations needed to execute the instructions, and (4) the computer would further process (post-process) the instructions so that they could be interpreted by the machine tool controller. He further recognized that the programming system should be expandable for applications beyond those considered in the immediate research at MIT (milling applications). M07_GROO6119_04_GE_C07.indd 167 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 168 Ross’s work at MIT became a focal point for NC programming, and a project was initiated to develop a two-dimensional version of APT, with nine aircraft companies plus IBM Corporation participating in the joint effort and MIT as project coordinator. The 2D-APT system was ready for field evaluation at plants of participating companies in April 1958. Testing, debugging, and refining the programming system took approximately three years. In 1961, the Illinois Institute of Technology Research Institute (IITRI) was selected to become responsible for long-range maintenance and upgrading of APT. In 1962, IITRI announced the completion of APT-III, a commercial version of APT for three-dimensional part programming. In 1974, APT was accepted as the U.S. standard for programming NC metal cutting machine tools. In 1978, it was accepted by the ISO as the international standard. Numerical control technology was in its second decade before computers were employed to actually control machine tool motions. In the mid-1960s, the concept of direct numerical control (DNC) was developed, in which individual machine tools were controlled by a mainframe computer located remotely from the machines. The computer bypassed the punched tape reader, instead transmitting instructions to the machine control unit (MCU) in real time, one block at a time. The first prototype system was demonstrated in 1966 [4]. Two companies that pioneered the development of DNC were General Electric Company and Cincinnati Milling Machine Company (which changed its name to Cincinnati Milacron in 1970). Several DNC systems were demonstrated at the National Machine Tool Show in 1970. Mainframe computers represented the state of the technology in the mid-1960s. There were no personal computers or microcomputers at that time. But the trend in computer technology was toward the use of integrated circuits of increasing levels of integration, which resulted in dramatic increases in computational performance at the same time that the size and cost of the computer were reduced. At the beginning of the 1970s, the economics were right for using a dedicated computer as the MCU. This application came to be known as computer numerical control (CNC). At first, minicomputers were used as the controllers; subsequently, microcomputers were used as the performance/size trend continued. 7.1 Fundamentals of NC Technology This section identifies the basic components of an NC system. Then, NC coordinate systems in common use and types of motion controls are described. 7.1.1 Basic Components of an NC System An NC system consists of three basic components: (1) a part program of instructions, (2) a machine control unit, and (3) processing equipment. The general relationship among the three components is illustrated in Figure 7.1. The part program is the set of detailed step-by-step commands that direct the actions of the processing equipment. In machine tool applications, the person who prepares the program is called a part programmer. In these applications, the individual commands refer to positions of a cutting tool relative to the worktable on which the work part is fixtured. Additional instructions are usually included, such as spindle speed, feed rate, cutting tool selection, and other functions. The program is coded on a suitable medium for submission to the machine control unit. For many years, the common medium was 1-in wide punched tape, using a standard format that could be interpreted by the machine control unit. Today, punched tape has largely been replaced by newer storage technologies in modern machine shops. These technologies include magnetic tape, diskettes, and electronic transfer of part programs from a computer. M07_GROO6119_04_GE_C07.indd 168 2/28/15 4:05 PM Sec. 7.1 / Fundamentals of NC Technology 169 Machine control unit Program Processing equipment Figure 7.1 Basic components of an NC system. In modern NC technology, the machine control unit (MCU) is a microcomputer and related control hardware that stores the program of instructions and executes it by converting each command into mechanical actions of the processing equipment, one command at a time. The related hardware of the MCU includes components to interface with the processing equipment and feedback control elements. The MCU also includes one or more reading devices for entering part programs into memory. Software residing in the MCU includes control system software, calculation algorithms, and translation software to convert the NC part program into a usable format for the MCU. Because the MCU is a computer, the term computer numerical control (CNC) is used to distinguish this type of NC from its technological ancestors that were based entirely on hardwired electronics. Today, virtually all new MCUs are based on computer technology. The third basic component of an NC system is the processing equipment that performs the actual productive work (e.g., machining). It accomplishes the processing steps to transform the starting workpiece into a completed part. Its operation is directed by the MCU, which in turn is driven by instructions contained in the part program. In the most common example of NC, machining, the processing equipment consists of the worktable and spindle as well as the motors and controls to drive them. 7.1.2 NC Coordinate Systems To program the NC processing equipment, a part programmer must define a standard axis system by which the position of the work head relative to the work part can be specified. There are two axis systems used in NC, one for flat and prismatic work parts and the other for rotational parts. Both systems are based on the Cartesian coordinates. The axis system for flat and block-like parts consists of the three linear axes (x, y, z) in the Cartesian coordinate system, plus three rotational axes (a, b, c), as shown in Figure 7.2(a). In most machine tool applications, the x- and y-axes are used to move and position the worktable to which the part is attached, and the z-axis is used to control the vertical position of the cutting tool. Such a positioning scheme is adequate for simple NC applications such as drilling and punching of flat sheet metal. Programming these machine tools consists of little more than specifying a sequence of x–y coordinates. The a-, b-, and c-rotational axes specify angular positions about the x-, y-, and z-axes, respectively. To distinguish positive from negative angles, the right-hand rule is used: Using the right hand with the thumb pointing in the positive linear axis direction ( +x, +y, or +z), the fingers of the hand are curled in the positive rotational direction. The rotational axes can be used for one or both of the following: (1) orientation of the work part to present different surfaces for machining or (2) orientation of the tool or work head at some angle relative to the part. These additional axes permit machining of M07_GROO6119_04_GE_C07.indd 169 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 170 +z +c +b Work part +z +y +a +x –x –x +x Worktable –y Work part –z (a) –z (b) Figure 7.2 Coordinate systems used in NC (a) for flat and prismatic work and (b) for rotational work. (On most turning m achines, the z-axis is horizontal rather than vertical as shown here.) complex work part geometries. Machine tools with rotational axis capability generally have either four or five axes: three linear axes plus one or two rotational axes. The coordinate axes for a rotational NC system are illustrated in Figure 7.2(b). These systems are associated with NC lathes and turning machines. Although the workpiece rotates, this is not one of the controlled axes on most turning machines. Consequently, the y-axis is not used. The path of the cutting tool relative to the rotating workpiece is defined in the x–z plane, where the x-axis is the radial location of the tool and the z-axis is parallel to the axis of rotation of the part. Some machine tools are equipped with more than the number of axes described above. The additional axes are usually included to control more than one tool or spindle. Examples of these machine tools are mill-turn centers and multitasking machines (Section 14.2.3). The part programmer must decide where the origin of the coordinate axis system should be located. This decision is usually based on programming convenience. For example, the origin might be located at one of the corners of the part. If the work part is symmetrical, the zero point might be most conveniently defined at the center of symmetry. Wherever the location, this zero point is communicated to the machine tool operator. At the beginning of the job, the operator must move the cutting tool under manual control to some target point on the worktable, where the tool can be easily and accurately positioned. The target point has been previously referenced to the origin of the coordinate axis system by the part programmer. When the tool has been accurately positioned at the target point, the operator indicates to the MCU where the origin is located for subsequent tool movements. 7.1.3 Motion Control Systems Some NC processes are performed at discrete locations on the work part (e.g., drilling and spot welding). Others are carried out while the work head is moving (e.g., turning, milling, and continuous arc welding). If the work head is moving, it may be necessary to follow a straight line path or a circular or other curvilinear path. These different types of movement are accomplished by the motion control system, whose features are explained below. Point-to-Point Versus Continuous Path Control. Motion control systems for NC (and robotics, Chapter 8) can be divided into two types: (1) point-to-point and M07_GROO6119_04_GE_C07.indd 170 2/28/15 4:05 PM Sec. 7.1 / Fundamentals of NC Technology 171 y Work part 2 Tool path 1 3 Tool starting point x Figure 7.3 Point-to-point (positioning) control in NC. At each x–y position, table movement stops to perform the hole-drilling operation. (2) continuous path. Point-to-point systems, also called positioning systems, move the worktable to a programmed location without regard for the path taken to get to that location. Once the move has been completed, some processing action is accomplished by the work head at the location, such as drilling or punching a hole. Thus, the program consists of a series of point locations at which operations are performed, as depicted in Figure 7.3. Continuous path systems are capable of continuous simultaneous control of two or more axes. This provides control of the tool trajectory relative to the work part. In this case, the tool performs the process while the worktable is moving, thus enabling the system to generate angular surfaces, two-dimensional curves, or three-dimensional contours in the work part. This control mode is required in many milling and turning operations. A simple two-dimensional profile milling operation is shown in Figure 7.4 to illustrate continuous path control. When continuous path control is utilized to move the tool parallel to only one of the major axes of the machine tool worktable, this is called straight-cut NC. When continuous path control is used for simultaneous control of two or more axes in machining operations, the term contouring is used. y Tool profile Tool path Work part Tool starting point x Figure 7.4 Continuous path (contouring) control in NC (x–y plane only). Note that cutting tool path must be offset from the part outline by a distance equal to its radius. M07_GROO6119_04_GE_C07.indd 171 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 172 Interpolation Methods. One of the important aspects of contouring is interpolation. The paths that a contouring-type NC system is required to generate often consist of circular arcs and other smooth nonlinear shapes. Some of these shapes can be defined mathematically by relatively simple geometric formulas (e.g., the equation for a circle is x2 + y2 = R2, where R = the radius of the circle and the center of the circle is at the origin), whereas others cannot be mathematically defined except by approximation. In any case, a fundamental problem in generating these shapes using NC equipment is that they are continuous, whereas NC is digital. To cut along a circular path, the circle must be divided into a series of straight line segments that approximate the curve. The tool is commanded to machine each line segment in succession so that the machined surface closely matches the desired shape. The maximum error between the nominal (desired) surface and the actual (machined) surface can be controlled by the lengths of the individual line segments, as shown in Figure 7.5. Straight line segment approximation Actual curve Inside tolerance (a) Straight line segment approximation Outside tolerance Actual curve (b) Straight line segment approximation Outside tolerance limit Actual curve Tolerance band Inside tolerance limit (c) Figure 7.5 Approximation of a curved path in NC by a s eries of straight line segments. The accuracy of the approximation is controlled by the maximum deviation (called the tolerance) between the nominal (desired) curve and the straight line segments that are machined by the NC system. In (a), the tolerance is defined on only the inside of the nominal curve. In (b), the tolerance is defined on only the outside of the desired curve. In (c), the tolerance is defined on both the inside and outside of the desired curve. M07_GROO6119_04_GE_C07.indd 172 2/28/15 4:05 PM Sec. 7.1 / Fundamentals of NC Technology 173 Table 7.1 Numerical Control Interpolation Methods for Continuous Path Control Linear interpolation. This is the most basic method and is used when a straight line path is to be generated in continuous path NC. Two-axis and three-axis linear interpolation routines are sometimes distinguished in practice, but conceptually they are the same. The programmer specifies the beginning point and endpoint of the straight line and the feed rate to be used along the straight line. The interpolator computes the feed rates for each of the two (or three) axes to achieve the specified feed rate. Circular interpolation. This method permits programming of a circular arc by specifying the following parameters: (1) the coordinates of the starting point, (2) the coordinates of the endpoint, (3) either the center or radius of the arc, and (4) the direction of the cutter along the arc. The generated tool path consists of a series of small straight line segments (see Figure 7.5) calculated by the interpolation module. The cutter is directed to move along each line segment one by one to generate the smooth circular path. A limitation of circular interpolation is that the plane in which the circular arc exists must be a plane defined by two axes of the NC system (x - y , x - z, or y - z). Helical interpolation. This method combines the circular interpolation scheme for two axes with linear movement of a third axis. This permits the definition of a helical path in three-dimensional space. Applications include the machining of large internal threads, either straight or tapered. Parabolic and cubic interpolations. These routines provide approximations of free-form curves using higher order equations. They generally require considerable computational power and are not as common as linear and circular interpolation. Most applications are in the aerospace and automotive industries for freeform designs that cannot accurately and conveniently be approximated by combining linear and circular interpolations. If the programmer were required to specify the endpoints for each of the line segments, the programming task would be extremely arduous and fraught with errors. Also, the part program would be extremely long because of the large number of points. To ease the burden, interpolation routines have been developed that calculate the intermediate points to be followed by the cutter to generate a particular mathematically defined or approximated path. A number of interpolation methods are available to deal with the problems encountered in generating a smooth continuous path in contouring. They include (1) linear interpolation, (2) circular interpolation, (3) helical interpolation, (4) parabolic interpolation, and (5) cubic interpolation. Each of these procedures, briefly described in Table 7.1, permits the programmer to generate machine instructions for linear or curvilinear paths using relatively few input parameters. The interpolation module in the MCU performs the calculations and directs the tool along the path. In CNC systems, the interpolator is generally accomplished by software. Linear and circular interpolators are almost always included in modern CNC systems, whereas helical interpolation is a common option. Parabolic and cubic interpolations are less common because they are only needed by machine shops that produce complex surface contours. Absolute Versus Incremental Positioning. Another aspect of motion control is concerned with whether positions are defined relative to the origin of the coordinate system (absolute positioning) or relative to the previous location of the tool (incremental positioning). In absolute positioning, the work head locations are always defined with respect to the origin of the axis system. In incremental positioning, the next work head position is defined relative to the present location. The difference is illustrated in Figure 7.6. M07_GROO6119_04_GE_C07.indd 173 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 174 y Next tool position (40, 50) 50 40 30 30 (20, 20) 20 10 0 Current tool position 10 20 20 30 40 50 x Figure 7.6 Absolute versus incremental positioning. The work head is presently at point (20, 20) and is to be moved to point (40, 50). In absolute positioning, the move is specified by x = 40, y = 50; whereas in incremental positioning, the move is specified by x = 20, y = 30. 7.2 Computers and Numerical Control Since the introduction of NC in 1952, there have been dramatic advances in digital computer technology. The physical size and cost of a digital computer have been significantly reduced at the same time that its computational capabilities have been substantially increased. The makers of NC equipment incorporated these advances in computer technology into their products, starting with large mainframe computers in the 1960s and followed by minicomputers in the 1970s and microcomputers in the 1980s. Today, NC means c omputer numerical control (CNC), which is defined as an NC system whose MCU consists of a dedicated microcomputer rather than a hardwired controller. The latest computer controllers for CNC feature highspeed processors, large memories, solid-state memory, improved servos, and bus architectures [12]. Computer NC systems include additional features beyond what is feasible with conventional hardwired NC. A list of many of these features is compiled in Table 7.2. 7.2.1 The CNC Machine Control Unit The MCU is the hardware that distinguishes CNC from conventional NC. The general configuration of the MCU in a CNC system is illustrated in Figure 7.7. The MCU consists of the following components and subsystems: (1) central processing unit, (2) memory, (3) I/O interface, (4) controls for machine tool axes and spindle speed, and (5) sequence controls for other machine tool functions. These subsystems are interconnected by means of a system bus, which communicates data and signals among the components of the network. M07_GROO6119_04_GE_C07.indd 174 2/28/15 4:05 PM Sec. 7.2 / Computers and Numerical Control 175 Table 7.2 Features of Computer Numerical Control that Distinguish It from Conventional NC Storage of more than one part program. With improvements in storage technology, newer CNC controllers have sufficient capacity to store multiple programs. Controller manufacturers generally offer one or more memory expansions as options to the MCU. Program editing at the machine tool. CNC permits a part program to be edited while it resides in the MCU computer memory. Hence, a program can be tested and corrected entirely at the machine site. Editing also permits cutting conditions in the machining cycle to be optimized. After the program has been corrected and optimized, the revised version can be stored for future use. Fixed cycles and programming subroutines. The increased memory capacity and the ability to program the control computer provide the opportunity to store frequently used machining cycles as macros that can be called by the part program. Instead of writing the full instructions for the particular cycle into every program, a programmer includes a call statement in the part program to indicate that the macro cycle should be executed. These cycles often require that certain parameters be defined, for example, a bolt hole circle, in which the diameter of the bolt circle, the spacing of the bolt holes, and other parameters must be specified. Adaptive control. In this feature, the MCU measures and analyzes machining variables, such as spindle torque, power, and tool-tip temperature, and adjusts cutting speed and/or feed rate to maximize machining performance. Benefits include reduced cycle time and improved surface finish. Interpolation. Some of the interpolation schemes described in Table 7.1 are normally executed on a CNC system because of the computational requirements. Linear and circular interpolations are sometimes hardwired into the control unit, but helical, parabolic, and cubic interpolations are usually executed by a stored program algorithm. Positioning features for setup. Setting up the machine tool for a given work part involves installing and aligning a fixture on the machine tool table. This must be accomplished so that the machine axes are established with respect to the work part. The alignment task can be facilitated using certain features made possible by software options in a CNC system, such as position set. With position set, the operator is not required to locate the fixture on the machine table with extreme accuracy. Instead, the machine tool axes are referenced to the location of the fixture using a target point or set of target points on the work or fixture. Acceleration and deceleration calculations. This feature is applicable when the cutter moves at high feed rates. It is designed to avoid tool marks on the work surface that would be generated due to machine tool dynamics when the cutter path changes abruptly. Instead, the feed rate is smoothly decelerated in anticipation of a tool path change and then accelerated back up to the programmed feed rate after the direction change. Communications interface. With the trend toward interfacing and networking in plants today, modern CNC controllers are equipped with a standard communications interface to link the machine to other computers and computer-driven devices. This is useful for applications such as (1) downloading part programs from a central data file; (2) collecting operational data such as workpiece counts, cycle times, and machine utilization; and (3) interfacing with peripheral equipment, such as robots that load and unload parts. Diagnostics. Many modern CNC systems possess a diagnostics capability that monitors certain aspects of the machine tool to detect malfunctions or signs of impending malfunctions or to diagnose system breakdowns. Memory • ROM - Operating system • RAM - Part programs Central processing unit (CPU) Input/output interface Operator panel Tape reader • • System bus Machine tool controls • Position control • Spindle speed control Figure 7.7 M07_GROO6119_04_GE_C07.indd 175 Sequence controls • Coolant • Fixture clamping • Tool changer Configuration of CNC machine control unit. 2/28/15 4:05 PM 176 Chap. 7 / Computer Numerical Control Central Processing Unit. The central processing unit (CPU) is the brain of the MCU. It manages the other components in the MCU based on software contained in main memory. The CPU can be divided into three sections: (1) control section, (2) arithmeticlogic unit, and (3) immediate access memory. The control section retrieves commands and data from memory and generates signals to activate other components in the MCU. In short, it sequences, coordinates, and regulates the activities of the MCU computer. The arithmetic-logic unit (ALU) consists of the circuitry to perform various calculations (addition, subtraction, multiplication), counting, and logical functions required by software residing in memory. The immediate access memory provides a temporary storage for data being processed by the CPU. It is connected to main memory by means of the system data bus. Memory. The immediate access memory in the CPU is not intended for storing CNC software. A much greater storage capacity is required for the various programs and data needed to operate the CNC system. As with most other computer systems, CNC memory can be divided into two categories: (1) main memory and (2) secondary memory. Main memory consists of ROM (read-only memory) and RAM (random access memory) devices. Operating system software and machine interface programs (Section 7.2.2) are generally stored in ROM. These programs are usually installed by the manufacturer of the MCU. NC part programs are stored in RAM devices. Current programs in RAM can be erased and replaced by new programs as jobs are changed. High-capacity secondary memory devices are used to store large programs and data files, which are transferred to main memory as needed. Common among the secondary memory devices are hard disks and solid-state memory devices to store part programs, macros, and other software. These high-capacity storage devices are permanently installed in the CNC machine control unit and have replaced most of the punched paper tape traditionally used to store part programs. Input/Output Interface. The I/O interface provides communication between the various components of the CNC system, other computer systems, and the machine operator. As its name suggests, the I/O interface transmits and receives data and signals to and from external devices, several of which are indicated in Figure 7.7. The operator control panel is the basic interface by which the machine operator communicates to the CNC system. This is used to enter commands related to part program editing, MCU operating mode (e.g., program control vs. manual control), speeds and feeds, cutting fluid pump on/off, and similar functions. Either an alphanumeric keypad or keyboard is usually included in the operator control panel. The I/O interface also includes a display to communicate data and information from the MCU to the machine operator. The display is used to indicate current status of the program as it is being executed and to warn the operator of any malfunctions in the system. Also included in the I/O interface are one or more means of entering part programs into storage. Programs can be entered manually by the machine operator or stored at a central computer site and transmitted via local area network (LAN) to the CNC system. Whichever means is employed by the plant, a suitable device must be included in the I/O interface to allow input of the programs into MCU memory. Controls for Machine Tool Axes and Spindle Speed. These are hardware components that control the position and velocity (feed rate) of each machine axis as well as the rotational speed of the machine tool spindle. Control signals generated by the MCU M07_GROO6119_04_GE_C07.indd 176 2/28/15 4:05 PM Sec. 7.2 / Computers and Numerical Control 177 must be converted to a form and power level suited to the particular position control systems used to drive the machine axes. Positioning systems can be classified as open loop or closed loop, and different hardware components are required in each case. A more detailed discussion of these hardware elements is presented in Section 7.4, together with an analysis of how they operate to achieve position and feed rate control. Some of the hardware components are resident in the MCU. Depending on the type of machine tool, the spindle is used to drive either (1) the workpiece, as in turning, or (2) a rotating cutter, as in milling and drilling. Spindle speed is a programmed parameter. Components for spindle speed control in the MCU usually consist of a drive control circuit and a feedback sensor interface. Sequence Controls for Other Machine Tool Functions. In addition to control of table position, feed rate, and spindle speed, several additional functions are accomplished under part program control. These auxiliary functions generally involve on/off (binary) actuations, interlocks, and discrete numerical data. The functions include cutting fluid control, fixture clamping, emergency warnings, and interlock communications for robot loading and unloading of the machine tool. 7.2.2 CNC Software The NC computer operates by means of software. There are three types of software programs used in CNC systems: (1) operating system software, (2) machine interface software, and (3) application software. The principal function of the operating system software is to interpret the NC part programs and generate the corresponding control signals to drive the machine tool axes. It is installed by the controller manufacturer and is stored in ROM in the MCU. The operating system software consists of the following: (1) an editor, which permits the machine operator to input and edit NC part programs and perform other file management functions; (2) a control program, which decodes the part program instructions, performs interpolation and acceleration/deceleration calculations, and accomplishes other related functions to produce the coordinate control signals for each axis; and (3) an executive program, which manages the execution of the CNC software as well as the I/O operations of the MCU. The operating system software also includes any diagnostic routines that are available in the CNC system. Machine interface software is used to operate the communication link between the CPU and the machine tool to accomplish the CNC auxiliary functions. The I/O signals associated with the auxiliary functions are sometimes implemented by means of a programmable logic controller interfaced to the MCU, so the machine interface software is often written in the form of ladder logic diagrams (Section 9.2). Finally, the application software consists of the NC part programs that are written for machining (or other) applications in the user’s plant. The topic of part programming is postponed to Section 7.5. 7.2.3 Distributed Numerical Control Historical Note 7.1 describes several ways in which digital computers have been used to implement NC. This section describes two approaches: (1) direct numerical control and (2) distributed numerical control. M07_GROO6119_04_GE_C07.indd 177 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 178 Direct numerical control (DNC) was the first attempt to use a digital computer to control NC machines. It was in the late 1960s, before the advent of CNC. As initially implemented, direct numerical control involved the control of a number of machine tools by a single (mainframe) computer through direct connection and in real time. Instead of using a punched tape reader to enter the part program into the MCU, the program was transmitted to the MCU directly from the computer, one block of instructions at a time. An instruction block provides the commands for one complete move of the machine tool, including location coordinates, speeds, feeds, and other data (Section 7.5.1). This mode of operation was referred to by the term behind the tape reader (BTR). The DNC computer provided instruction blocks to the machine tool on demand; when a machine needed control commands, they were communicated to it immediately. As each block was executed by the machine, the next block was transmitted. As far as the machine tool was concerned, the operation was no different from that of a conventional NC controller. In theory, DNC relieved the NC system of its least reliable components: the punched tape and tape reader. The general configuration of a DNC system is depicted in Figure 7.8. The system consisted of four components: (1) central computer, (2) bulk memory at the central computer site, (3) set of controlled machines, and (4) telecommunications lines to connect the machines to the central computer. In operation, the computer called the required part program from bulk memory and sent it (one block at a time) to the designated machine tool. This procedure was replicated for all machine tools under direct control of the computer. In addition to transmitting data to the machines, the central computer also received data back from the machines to indicate operating performance in the shop (e.g., number of machining cycles completed, machine utilization, and breakdowns). A central objective of DNC was to achieve two-way communication between the machines and the central computer. As the installed base of CNC machines grew during the 1970s and 1980s, a new form of DNC emerged, called distributed numerical control (DNC). The configuration of the new DNC is very similar to that shown in Figure 7.8 except that the central computer is connected to MCUs, which are themselves computers; basically this is a distributed control system (Section 5.3.3). Complete part programs are sent to the machine tools, not Central computer Bulk memory NC programs Telecommunication lines Machine tool BTR Tape reader MCU BTR MCU MCU MCU Figure 7.8 General configuration of a DNC system. Connection to MCU is behind the tape reader. Key: BTR = behind the tape reader, MCU = machine control unit. M07_GROO6119_04_GE_C07.indd 178 2/28/15 4:05 PM Sec. 7.3 / Applications of NC 179 Table 7.3 Flow of Data and Information Between Central Computer and Machine Tools in DNC Data and Information Downloaded from the Central Computer to the Machine Tools Data and Information Uploaded from the Machine Tools to the Central Computer NC part programs List of tools needed for job Machine tool setup instructions Machine operator instructions Machining cycle time for part program Data about when program was last used Production schedule information Piece counts Actual machining cycle times Tool life statistics Machine uptime and downtime statistics Product quality data Machine utilization one block at a time. The distributed NC approach permits easier and less costly installation of the overall system, because the individual CNC machines can be put into service and distributed NC can be added later. Redundant computers improve system reliability compared with the original DNC. The new DNC permits two-way communication of data between the shop floor and the central computer, which was one of the important features included in the old DNC. However, improvements in data collection devices as well as advances in computer and communications technologies have expanded the range and flexibility of the information that can be gathered and disseminated. Some of the data and information sets included in the two-way communication flow are itemized in Table 7.3. This flow of information in DNC is similar to the information flow in shop floor control, discussed in Chapter 25. 7.3 Applications of NC The operating principle of NC has many applications. There are many industrial operations in which the position of a work head must be controlled relative to a part or product being processed. The applications divide into two categories: (1) machine tool applications and (2) other applications. Most machine tool applications are associated with the metalworking industry. The other applications comprise a diverse group of operations in other industries. It should be noted that the applications are not always identified by the name “numerical control”; this term is used principally in the machine tool industry. 7.3.1 Machine Tool Applications The most common applications of NC are in machine tool control. Machining was the first application of NC, and it is still one of the most important commercially. Machining Operations and NC Machine Tools. Machining is a manufacturing process in which the geometry of the work is produced by removing excess material (Section 2.2.1). Control of the relative motion between a cutting tool and the workpiece creates the desired geometry. Machining is considered one of the most versatile processes because it can be used to create a wide variety of shapes and surface finishes. It can be performed at relatively high production rates to yield highly accurate parts at relatively low cost. M07_GROO6119_04_GE_C07.indd 179 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 180 Speed Work part Speed Chip New surface Drill bit Depth Feed Feed Workpiece Cutting tool (a) (b) Grinding wheel Cutter speed Wheel speed Depth Feed Workpiece Work speed (c) Workpiece (d) Figure 7.9 The four common machining operations are (a) turning, (b) drilling, (c) peripheral milling, and (d) surface grinding. There are four common types of machining operations: (a) turning, (b) drilling, (c) milling, and (d) grinding, shown in Figure 7.9. Each of the machining operations is carried out at a certain combination of speed, feed, and depth of cut, collectively called the cutting conditions. The terminology varies somewhat for grinding. These cutting conditions are illustrated in Figure 7.9 for turning, drilling, and milling. Consider milling. The cutting speed is the velocity of the milling cutter relative to the work surface, m/min (ft/min). This is usually programmed into the machine as a spindle rotation speed, rev/min. Cutting speed can be converted into spindle rotation speed by means of the equation N = v pD (7.1) where N = spindle rotation speed, rev/min; v = cutting speed, m/min (ft/min); and D = milling cutter diameter, m (ft). In milling, the feed usually means the size of the chip formed by each tooth in the milling cutter, often referred to as the chip load per tooth. This must normally be programmed into the NC machine as the feed rate (the travel rate of the machine tool table). Therefore, feed must be converted to feed rate as fr = Nn t f M07_GROO6119_04_GE_C07.indd 180 (7.2) 2/28/15 4:05 PM Sec. 7.3 / Applications of NC 181 where fr = feed rate, mm/min (in/min); N = spindle rotational speed, rev/min; nt = number of teeth on the milling cutter; and f = feed, mm/tooth (in/tooth). For a turning operation, feed is defined as the lateral movement of the cutting tool per revolution of the workpiece, mm/rev (in/rev). Depth of cut is the distance the tool penetrates below the original surface of the work, mm (in). For drilling, depth of cut refers to the depth of the hole. These are the parameters that must be controlled during the operation of an NC machine through motion or position commands in the part program. Each of the four machining processes is traditionally carried out on a machine tool designed to perform that process. Turning is performed on a lathe, drilling is done on a drill press, milling on a milling machine, and so on. The following is a list of the common material-removal CNC machine tools along with their typical features: • NC lathe, either horizontal or vertical axis. Turning requires two-axis, continuous path control, either to produce a straight cylindrical geometry (straight turning) or to create a profile (contour turning). • NC boring mill, horizontal or vertical spindle. Boring is similar to turning, except that an internal cylinder is created instead of an external cylinder. The operation requires continuous path, two-axis control. • NC drill press. This machine uses point-to-point control of a work head (spindle containing the drill bit) and two axis (x–y) control of a worktable. Some NC drill presses have turrets containing six or eight drill bits. The turret position is programmed under NC control, allowing different drill bits to be applied to the same work part during the machine cycle without requiring the machine operator to manually change the tool. • NC milling machine. A milling machine requires continuous path control to perform straight cut or contouring operations. Figure 7.10 illustrates the features of a CNC four-axis milling machine. • NC cylindrical grinder. This machine operates like a turning machine, except that the tool is a grinding wheel. It has continuous path two-axis control, similar to an NC lathe. Numerical control has had a profound influence on the design and operation of achine tools. One of the effects is that the proportion of time spent by the machine cutm ting metal is significantly greater than with manually operated machines. This causes certain components such as the spindle, drive gears, and feed screws to wear more rapidly. These components must be designed to last longer on NC machines. Secondly, the addition of the electronic control unit has increased the cost of the machine, requiring higher equipment utilization. Instead of running the machine during only one shift, which is the typical schedule with manually operated machines, NC machines are often operated during two or even three shifts to obtain the required economic payback. Third, the increasing cost of labor has altered the relative roles of the human operator and the machine tool. Instead of being the highly skilled worker who controlled every aspect of part production, the NC machine operator performs only part loading and unloading, tool-changing, chip clearing, and the like. With these reduced responsibilities, one operator can often run two or three NC machines. The functions performed by the machine tool have also changed. NC machines are designed to be highly automatic and capable of combining several operations in one setup that formerly required several different machines. They are also designed to reduce the time consumed by the noncutting elements in the operation cycle, such as changing tools M07_GROO6119_04_GE_C07.indd 181 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 182 y CNC controls Cutting tool z b x Access doors Viewing windows Worktable Safety panels surround work area (a) (b) Figure 7.10 (a) Four-axis CNC horizontal milling machine with safety panels installed and (b) with safety panels removed to show typical axis configuration for the horizontal spindle. and loading and unloading the work part. These changes are best exemplified by a new type of machine that did not exist prior to the development of NC: the machining center, which is a machine tool capable of performing multiple machining operations on a single workpiece in one setup. The operations involve rotating cutters, such as milling and drilling, and the feature that enables more than one operation to be performed in one setup is automatic tool-changing. Machining centers and related machine tools are discussed in Chapter 14 on single-station manufacturing cells (Section 14.2.3). NC Application Characteristics. In general, NC technology is appropriate for low-to-medium production of medium-to-high variety product. Using the terminology of Section 2.4.1, the product is low-to-medium Q, medium-to-high P. Over many years of machine shop practice, the following part characteristics have been identified as most suited to the application of NC: 1. Batch production. NC is most appropriate for parts produced in small or medium lot sizes (batch sizes ranging from one unit up to several hundred units). Dedicated automation would not be economical for these quantities because of the high fixed cost. Manual production would require many separate machine setups and would result in higher labor cost, longer lead time, and higher scrap rate. 2. Repeat orders. Batches of the same parts are produced at random or periodic intervals. Once the NC part program has been prepared, parts can be economically produced in subsequent batches using the same part program. M07_GROO6119_04_GE_C07.indd 182 2/28/15 4:05 PM Sec. 7.3 / Applications of NC 183 3. Complex part geometry. The part geometry includes complex curved surfaces such as those found on airfoils and turbine blades. Mathematically defined surfaces such as circles and helixes can also be accomplished with NC. Some of these geometries would be difficult if not impossible to achieve accurately using conventional machine tools. 4. Much metal needs to be removed from the work part. This condition is often associated with a complex part geometry. The volume and weight of the final machined part is a relatively small fraction of the starting block. Such parts are common in the aircraft industry to fabricate large structural sections with low weights. 5. Many separate machining operations on the part. This applies to parts consisting of many machined features requiring different cutting tools, such as drilled and/or tapped holes, slots, flats, and so on. If these operations were machined by a series of manual operations, many setups would be needed. The number of setups can be reduced significantly using NC. 6. The part is expensive. This factor is often a consequence of one or more of preceding factors 3, 4, and 5. It can also result from using a high-cost starting work material. When the part is expensive, and mistakes in processing would be costly, the use of NC helps to reduce rework and scrap losses. Although these characteristics pertain mainly to machining, they are adaptable to other production applications as well. NC for Other Metalworking Processes. NC machine tools have been developed for other metalworking processes besides machining. These machines include the following: • Punch presses for sheet metal hole punching. The two-axis NC operation is similar to that of a drill press except that holes are produced by punching rather than drilling. Different hole sizes and shapes are implemented using a tool turret. • Presses for sheet metal bending. Instead of cutting sheet metal, these systems bend sheet metal according to programmed commands. • Welding machines. Both spot welding and continuous arc welding machines are available with automatic controls based on NC. • Thermal cutting machines, such as oxy-fuel cutting, laser cutting, and plasma arc cutting. The stock is usually flat; thus, two-axis control is adequate. Some laser cutting machines can cut holes in preformed sheet metal stock, requiring four- or five-axis control. • Tube bending and wire bending machines. Automatic tube and wire bending machines are programmed to control the location (along the length of the stock) and the angle of the bend. Important tube bending applications include frames for bicycles and motorcycles. Wire bending applications include springs and paper clips. • Wire EDM. Electric discharge wire cutting operates in a manner similar to a band saw, except that the saw is a small diameter wire that uses sparks to cut metal stock that is positioned by an x–y positioning table. M07_GROO6119_04_GE_C07.indd 183 2/28/15 4:05 PM Chap. 7 / Computer Numerical Control 184 7.3.2 Other NC Applications The operating principle of NC has a host of other applications besides metalworking. Some of the machines with NC-type controls that position a work head relative to an object being processed are the following: • Rapid prototyping and additive manufacturing. These include a number of processes that add material, one thin layer at a time, to construct a part. Many of them operate by means of a work head that is manipulated by NC over the partially constructed part. Some processes use lasers to cure photosensitive liquid polymers (stereolithography) or fuse solid powders (selective laser sintering); others use extruder heads that add material (fused deposition modeling). • Water jet cutters and abrasive water jet cutters. These machines are used to cut various materials, including metals and nonmetals (e.g., plastic, cloth), by means of a fine, high-pressure, high-velocity stream of water. Abrasive particles are added to the stream in the case of abrasive water jet cutting to facilitate cutting of more difficult materials (e.g., metals). The work head is manipulated relative to the work material by means of numerical control. • Component placement machines. This equipment is used to position components on an x–y plane, usually a printed circuit board. The program specifies the x- and y-axis positions in the plane where the components are to be located. Component placement machines find extensive applications for placing electronic components on printed circuit boards. Machines are available for either through-hole or surfacemount applications as well as similar insertion-type mechanical assembly operations. • Coordinate measuring machines. A coordinate measuring machine (CMM) is an inspection machine used for measuring or checking dimensions of a part. A CMM has a probe that can be manipulated in three axes and that identifies when contact is made against a part surface. The location of the probe tip is determined by the CMM control unit, thereby indicating some dimension on the part. Many coordinate measuring machines are programmed to perform automated inspections under NC. Coordinate measuring machines are discussed in Section 22.3. • Wood routers and granite cutters. These machines perform operations similar to NC milling for metal machining, except the work materials are not metals. Many wood cutting lathes are also NC machines. • Tape laying machines for polymer composites. The work head of this machine is a dispenser of uncured polymer matrix composite tape. The machine is programmed to lay the tape onto the surface of a contoured mold, following a back-and-forth and crisscross pattern to build up a required thickness. The result is a multilayered panel of the same shape as the mold. • Filament winding machines for polymer composites. These are similar to the preceding machine except that a filament is dipped in uncured polymer and wrapped around a rotating pattern of roughly cylindrical shape. 7.3.3 Advantages and Disadvantages of NC When the production application satisfies the characteristics identified in Section 7.3.1, NC yields many advantages over manual production methods. These advantages translate in