Chapter 1 Introduction to Numerically Controlled Machines The primary building blocks of flexible manufacturing and computer integrated manufacturing systems are numerically controlled (CNC) machine tools. These computer controlled and programmable machines are currently available in a wide variety of types and sizes. The most common are lathes and milling machines, although drilling, grinding, blanking, shearing and flame-cutting machines are also readily available. A typical CNC machining centre is shown in Figure 1.1 and a CNC turning centre is shown in Figure 1.2. In many ways numerically controlled machines are similar to their manual counterparts. The primary relative generation motions of cutting tool and workpiece are identical, as are the machining techniques and approaches. The essential difference is that the manual positional movements are replaced by motor drives so that cutting tool positions are controlled by computers. This simple change has a dramatic effect on the capabilities of CNC machine tools. 1.1 MACHINE FEATURES The main features of a typical CNC milling machine are shown in Figure 1.3. The machine consists of a rigid base with a moveable horizontal worktable, vertical tool spindle, automatic tool changer, and controller unit. It is designed and built to maintain a high accuracy of movement and to reduce static and dynamic deflection as well as vibration, resulting from high cutting loads and thermal distortion. 1.1.1 Mechanical Drive Components The milling machine worktable is mounted on two sets of slideways which permit movement of the table, and hence the workpiece, in orthogonal horizontal directions. The vertical tool spindle is also mounted on a slideway to produce vertical movement and generate a third orthogonal motion. The conventional notation for the displacement of a cutting tool relative to a workpiece, in the X, Y and Z axes, is given in Figure 1.3. If a programmable rotary table is fitted to the machine, the rotation is referred to as the A axis. The corresponding notation for the X and Z axes in a CNC lathe is given in Figure 1.4. CNC machines are categorized by the number of axes of control milling machines normally have three, four or five axes while lathes normally have two axes.
12 Introduction to Numerically Controlled Machines [Ch.1 Figure 1.1 CNC machining centre Figure 1.2 CNC turning centre
Sec. 1.1] Machine Features 13 Figure 1.3 Main features of a CNC milling machine Figure 1.4 Main features of a CNC lathe Table movement along a slideway is normally controlled by a leadscrew with a recirculating ballbearing nut, as shown in Figure 1.5.
14 Introduction to Numerically Controlled Machines [Ch.1 Both leadscrew and nut have a precision ground form into which ballbearings are allowed to run. The ballbearings progress along the thread form and are recirculated through an interior passage in the ball nut. This type of drive replaces the acme leadscrew and plain bronze nut and helps eliminate backlash. Figure 1.5 Leadscrew with recirculating ballbearing nut 1.1.2 Motor Drive and Feedback Linear table motion is achieved by a controlled rotation of the leadscrew. Two types of motors are widely employed with CNC machines: DC servo motors and stepping motors. Servo motors are the most widely used for CNC applications. They have high power and speed capabilities with low inertia and smooth operation. Stepping motors are relatively cheap, generate high torque at low speed, and require simpler electronic controls than servo motors. Servo motors have a permanent magnet field housing and a wire wound, or printed circuit, armature. They are used in conjunction with rotary encoders which are mounted on the same shaft. Rotary encoders provide feedback to the DC servo motors on the absolute angular armature position. They consist of binary, or analogue, coded discs. The rotating discs can be optical or printed circuit type. In the case of optical encoders, the discs are divided into multiple track segments with transparent and opaque sections. Light sources and photocell receivers are placed on opposite sides of the rotating encoder disc. The pulses generated from the photocell receivers allow the absolute rotary position of the motor armature to be determined and thus control the actual rotational movement of the leadscrew.
Sec. 1.1] Machine Features 15 Stepping motors operate on the transmission of pulses. The total number of pulses determines the amount of rotation, and hence distance travelled, while the frequency of pulses determines the speed of movement. Encoders can be used on stepping motors, but in general their absolute position is precisely proportional to the number of pulses applied to them. A diagrammatic representation of a CNC machine table, leadscrew, recirculating ballbearing nut, DC servo motor and is given in Figure 1.6. Figure 1.6 CNC machine table and drive components 1.1.3 CNC Controller Unit Two photographs of typical CNC controller units are shown in Figure 1.7. They consist of an alphanumeric keyboard, dial control knobs, over-ride switches, and a CRT screen. Controller units contain all the electronics, control hardware, and computers required to read and interpret a program of instructions and to convert these instructions into machine tool movements and functions. They also enable programs to be stored, retrieved, and executed.
16 Introduction to Numerically Controlled Machines [Ch.1 Figure 1.7(a) Fanuc Series 6-MB controller unit Figure 1.7(b) Fanuc Series 15-M controller unit Controllers operate in the series of input modes as follows: manual - where movement of the dial control knobs moves the machine table in real time. This is used primarily for setting up the machine and workpiece.
Sec. 1.1] Machine Features 17 manual data input (MDI) - where machine code data (G-code) is entered into the CNC control unit via the console keyboard. Although complete part programs may be entered at the machine, MDI is most commonly used for editing part programs already resident in the controller's memory. tape - where paper tape programs entered at the tape reader are read and stored in the controller's memory. memory - where programs stored in memory can be accessed for running or editing. edit - where programs can be interactively altered and downloaded to punch paper tape for backup storage. An additional and increasingly common feature is the MDI conversational programming capability. Conversational programming is really a computer assisted method of programming and is discussed in detail in Chapter 3. Programming is carried out at the CNC controller console with the operator responding to a series of questions. In this way, the part material and cutting tool characteristics can be identified, a part shape and cutter path defined, and a coded program generated. The operator may display a graphical simulation of the part and cutter path with associated programming code on the CRT screen. 1.1.4 Program Storage and Transmission Programs for producing parts are arranged in the form of coded blocks of information. This code is interpreted by the machine tool controller in order to control the table, spindle movements and all auxiliary functions. Standard machine codes, called G-codes, and the development of manual part programs are given in Chapter 2. Part programs are usually fed into the machine in the form of punched paper tape, magnetic tape or through a standard RS-232 serial communication link, and are stored in the controller memory. The most common transmission medium for CNC machine tools is punched paper tape. An optical tape reader mounted on the machine is used to sense punched holes in the paper tape and transmit the data to the machine controller. As shown in Figure 1.8, the paper tape has eight tracks of coded holes and an additional feed sprocket hole. It is usually 25 mm wide and has 10 characters per 25 mm length. The alphanumeric code characters for paper tape are expressed in binary form in the ISO (International Organization for Standardization) format, based on the ASCII (American Standard Code for Information Interchange) format. As shown in Figure 1.9, the code is a 7-bit binary code with an eighth parity bit which is used as a means of checking the accuracy of transmission. In the binary system there are two numbers: 0 and 1. Successive digits are represented by the number 2 raised to successive powers. The values of the powers of 2 are 2 0 = 1, 2 1 = 2, 2 2 = 4, 2 3 = 8 etc., and so the binary equivalent of the decimal number 5 is 0101 as follows: 1 x 2 0 + 0 x 2 1 + 1 x 2 2 + 0 x 2 3 = 1 x 1 + 0 x 2 + 1 x 4 + 0 x 8 or decimal number 5 ~ binary number 0101
18 Introduction to Numerically Controlled Machines [Ch.1 Figure 1.8 Paper tape hole configuration Figure 1.9 ISO alphanumeric code characters With the transfer of part programs to the machine tool through an RS-232 serial communication link, coded data is transferred in ASCII code with each '0' bit being represented by a +3 volt signal and each '1' bit being represented by a zero volt signal. The transfer speed of data, called the baud rate and measured in bits per second, between the
Sec. 1.1] Machine Features 19 transmitting computer and the CNC machine has to be set at a compatible level. This method is the normal means of transferring data between electronic devices and is becoming increasingly common with CNC machines. It also has the potential for handling and editing large programs easily and for running the machine in real time, as discussed in Chapter 5. 1.1.5 Other Features Automatic tool changers are frequently fitted on machining centres to enable a variety of tools to be selected during machining. An automatic tool changer for storing and dispensing twenty tools is shown in Figure 1.10. Figure 1.10 Automatic tool changer
20 Introduction to Numerically Controlled Machines [Ch.1] Removable worktables are also used to reduce downtime on the machine. The tables operate on an automatic feed mechanism, which allows them to be routed to a number of machine tools. Component parts are located on the tables away from the machine tools and are inserted at the appropriate machine for manufacture. Devices for the automatic removal of swarf are also common. Parts can be inspected, while located on a CNC machine table, with the use of inspection probes. Probes are mounted in the machine tool spindle from the automatic tool changer and used to inspect any feature of the machined part. Sensors in the probe detect when contact has been made with the surface of the workpiece, and these signals are transmitted to the machine controller. An inspection probe is shown in Figure 1.11. Figure 1.11 CNC inspection probe 1.2 TYPES OF PROGRAMMING From a programmer's point of view, the control aspects of the CNC machine tool are all taken care of by the machine tool manufacture. Essentially, part programming consists of specifying geometric point-topoint moves of the tool in relation to the workpiece. All interpolated motion, either linear or circular, between the defined end points is provided by the machine controller. Velocity of motion is determined by the specified program feedrate, or by the fast traverse mode; and the acceleration profile of all motion is preset within the machine controller. There are a number of ways of programming a CNC machine tool. The most basic way is to program manually using standard G-codes. While this is the slowest and most laborious method, it is still commonly used in job shops and with standalone machines. The manual programming approach is given in Chapter 2 and is useful for a full
Sec. 1.2] Types of Programming 21 understanding of machine tool operations and interpretation of machine codes which are eventually used by all other methods. The first, and until recently the most comprehensive, computer assisted method of programming was APT (Automatically Programmed Tools). It consists of English-like geometry statements to describe the part shape in terms of points, lines and circles etc., and motion statements to describe the cutter path. A machine tool code program is thus developed automatically by computer processing of the APT program. However, the APT approach is non-graphical and does not use the more convenient and standard CAD means of defining parts and tool paths. Interactive computer aided graphic programs are being increasingly used to define parts and cutter paths. They are much faster and more reliable than the manual methods. One approach which is available with CNC machine tools is the interactive graphics or conversational programming method. In this method the programmer responds to questions and instructions at the control console in order to define the part and the tool path. The conversational method produces G-code programs directly in the controller memory. The G-code program may be viewed, edited and transmitted in exactly the same way as a manual G-code program. Also, the programming can be accomplished while the machine is running on another job (i.e., foreground\background mode), thus avoiding unnecessary machine downtime. One difficulty with this approach is that, in general, CNC controllers tend to have relatively small, special purpose, computer memory, which is adequate for storing only a few medium length programs. In fact modern machines have a storage memory equivalent to approximately 100 m of paper tape. Extended memory for CNC controllers is expensive, particularly when compared with the cost of memory for PC computers. There are other computer assisted CAM programs which run on personal computers. They use the part definition output from a standard CAD package, such as AutoCAD, and with interactive instructions produce a graphically displayed cutter path and a file defining the cutter motions, called a cutter location file (CLFile). An additional program, called a postprocessor, is then used to convert the CLFile to G-code instructions for controlling the machine. All of the above computer assisted programming methods are discussed in Chapter 3. The development of postprocessor programs and graphical simulation programs is given in Chapter 5. It is interesting to note that the trend in all CAD/CAM applications is away from packaged programs and special purpose computers towards the use of standard computers. With this trend it is likely that standard computers will be used increasingly for part and machine path definition and manipulation, program storage and other operations, while the machine controller will be restricted to controlling the hardware, i.e., the intelligence may move from the controller to external computers. An integrated approach to part definition (CAD) and machining definition (CAM) together with information management, data base support, and engineering analysis is available in a number of
22 Introduction to Numerically Controlled Machines [Ch.1] comprehensive although more expensive packages. In these programs the part can be defined in wire frame or solids modelling mode; it can be analysed and modified through finite element programs and the machining paths, with graphical interaction, produced. An example of an integrated CAD/CAM program, called Anvil 5000, is given in Chapter 4. The means for developing direct numerical link (DNC) programs, to enable programs to be downloaded to machine controllers or to be fed directly to a buffer behind the tape reader, is given in Chapter 5. In the latter approach, the data is transmitted to the controller as though it were reading paper tape, although it is actually taking data from a computer and thus the machine is effectively run in real time (or a block of code at a time) from a remote computer. These programs can be used to control a number of machines through a central computer and are the basic programming techniques for flexible manufacturing cells and integrated manufacturing systems. Definition and machining of curved surfaces is discussed in Chapter 6. The positioning of a variety of shaped milling cutters in relation to arbitrarily curved surface is considered and equations derived. The description and listing of a series of C-based computer programs are given for all aspects of surface definition and machining. Case studies of curved surface machining applications (from marine propellers to heart valves shapes) are given in Chapter 7 and integrated lofting, fairing, and manufacturing for small shipyards (based on many of the programs in Chapter 6) is given in Chapter 8. Development of a computer simulation program for checking the accuracy of all statements in G-code files and displaying the output on a graphics screen is given in Chapter 9. In Chapter 10 the means of retrofitting manual machine tools with motors and controllers in order to obtain programmable CNC machine tools is discussed.