CNC Milling in the Workshop - Marcus Bowman - E-Book

CNC Milling in the Workshop E-Book

Marcus Bowman

0,0
16,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

CNC control of milling machines is now available to even the smallest of workshops. This allows designers to be more ambitious and machinists to be more confident of the production of parts, and thereby greatly increase the potential of milling at home.This new accessible guide takes a practical approach to software and techniques, and explains how you can make full use of your CNC mill to produce ambitious work of a high standard. Includes: Authoritative advice on programming and operating a CNC mill; Guide to the major CAD/CAM/CNC software such as Mach3, LinuxCNC and Vectric packages, without being restricted to any particular make of machine; Practical projects throughout and examples of a wide range of finished work; A practical approach to how you can make full use of your CNC mill to produce ambitious work. Aimed at everyone with a workshop - particularly modelmakers and horologists. Superbly illustrated with 280 colour illustrations. Dr Marcus Bowman has been machining metal for forty years and is a lifelong maker of models, clocks and tools.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 336

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



First published in 2013 by

The Crowood Press Ltd

Ramsbury, Marlborough

Wiltshire SN8 2HR

www.crowood.com

This e-book first published in 2013

© Dr Marcus Bowman 2013

All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publishers.

British Library Cataloguing-in-Publication Data

A catalogue record for this book is available from the British Library.

ISBN 978 1 84797 630 7

Frontispiece: machined aluminium face by Tommi Salminen

Contents

  Introduction

1   Fundamental Concepts

2   The Controlled Point

3   Basic Movement

4   Tooling

5   Linear Programming

6   Arcs, Circles and Polylines

7   Subroutines, Loops and Decisions

8   Making Multiple Parts

9   Tool Tables, Cutter Compensation and Tool Length Offsets

10 Engraving

11 From 2½D to 3D

  Appendix I: Health and Safety

  Appendix II: G Codes, M Codes and Other Codes

  Appendix III: Initialization Block

  Further Information

  Index

Introduction

The aim of this book is to introduce a range of concepts and techniques for producing parts using a computer-controlled milling machine. This is a practical book containing techniques to put your own CNC machine tool to work.

The book explains the machines, the software and the methods for producing a range of parts varying from the simple to the complex and the functional to the artistic, and includes guidance on tooling, speeds, feeds and fixtures. Throughout the book there are a number of projects that you can use to try out the various techniques.

SOME ASSUMPTIONS

This is a practical book about using a computer-controlled machine tool to do useful work, and assumes you have a CNC milling machine set up to move under software control.

The book makes reference to Mach3, LinuxCNC, software from the Vectric range (including Cut2D and VCarve Pro) and software packages from other companies, but the techniques are applicable to most similar software.

A Word about the Hardware

This book assumes that you will be using a benchtop CNC mill designed for metalworking, or a larger knee mill such as a Bridgeport. A range of materials is used throughout the book, so it is not restricted to metalworking. The workpieces in the projects are relatively small and will fit on most benchtop CNC mills. This means that they will fit on most gantry mills, of course. However, when it comes to chewing substantial lumps out of steel, most gantry mills are just not designed for that. If you use a softer material, they will work just fine.

A Word about the Software

This book does not provide detailed stepby-step instructions for any software package. There are detailed instructions for two of the most popular packages in the section on basic movement, just to make sure you can get your machine moving, but the rest of the book assumes you can read the software manuals for the packages you are using.

The book deals both with programming and with the use of software that will generate a program for you from a drawing. The program generators are easy to use and are essential for many jobs, but they can be used for very simple tasks too.

Programming by hand is another kettle of fish entirely, and simple jobs can often be programmed directly, instead of always having to use a program generator. Sometimes, too, the program generators cannot cope with the way a workpiece has been set up on the mill, so the technique there is to use the program generator to create the main parts of the program and to add a few lines of your own program instructions to link those elements.

So you, as the user, will need a knowledge of both programming and program generators. In the real world, one cannot wholly exist without the other. Besides, some knowledge of what is going on under the hood is useful.

Skip lightly across the deeper waters at any point; move on and continue reading. You may wish to come back later to any of the sections of the book as you gain experience and feel the need.

The machine control software packages Mach3 and LinuxCNC are used for the examples throughout the book. Both packages do the same job, but while Mach3 is a more graphically oriented system, with many accessible menus for setting up the links between software and the machine tool, LinuxCNC provides a much more elegant programming environment.

Most CNC packages share a common core, and that includes many of the other CNC control programs that are available. By using examples from both Mach3 and LinuxCNC, this book should be applicable to most CNC control software currently available from commercial vendors as well as the packages being used by hobbyists who have built or assembled their own CNC systems.

It is quite possible to use both software packages with the same machine at different times, and reading about both software approaches might help you decide what is most appropriate for you.

Vectric software has been used in many examples in the book. Vectric has a range of software applicable to a lot of the techniques illustrated in this book. The Vectric packages are essentially program generators that can convert drawings or photographs into programs that can be used by a CNC control program to machine the end product.

A Word about the Approach

The approach throughout is focused on practical aspects of CNC machining. The book explains a range of techniques, from the simple to the ambitious, which can be used to machine various features on a workpiece. The simple techniques can be put to use straight away, while the more ambitious are there to encourage you to use your machine to the full. A manual mill can carry out a good range of machining tasks, and the point of owning a CNC mill is to push the boundaries of what can be machined on a workpiece. You might, for example, mill a simple rectangular lid for a box; but with a CNC mill, it is a very small step to engrave the top, give the edge a complex smooth and flowing curve, or texture one of the faces. These are all things that would be very difficult to do with a manual mill, but they really bring a piece of work to life.

There are suggested projects throughout the book that are designed to allow you to practise what you have read. Later projects deliberately provoke thought. They are all there for you to enjoy.

A BIT OF HISTORY TO SET THE CONTEXT

The modern machine tool has its origins in the fifteenth century, but computer control of machine tools is a much more modern phenomenon, dating from the 1950s.

Hand tools have a longer history, and since early times, skilled artisans have used tools like files, chisels, hammers and scrapers to produce work that has sometimes been of astonishing accuracy and beauty. Accurate clocks and scientific instruments, for example, were initially produced using hand tools. Skill is an important factor, though, and two craftsmen working from the same set of drawings or instructions will inevitably produce work that differs in accuracy and finish, according to their individual levels of skill.

The rise of mass production in the early 1900s demanded that components produced by individual workers be sufficiently similar to allow interchangeability of parts so that a complete assembly, like a car or a firearm, could be made from parts produced by any worker.

This also meant that repairs could be made by replacing individual parts from a stock of standard parts. The demands of mass production led to the development of standards for drawings, systems of measurement and tolerances on components, and repeatable accuracy in manufacture. All of those are important for CNC machines.

A machine tool eliminates the variability associated with the human hand and eye. The milling machine and lathe use slideways and feedscrews to guide a tool accurately and repeatably, often at a more consistent rate, ensuring that repeated movements produce repeatable results. This is a basic principle behind CNC machines.

The development of the electric motor in the 1890s led to the self-contained machine tool, and more recent developments in electronics have led to the creation of servos and stepper motors that can be used to move feedscrews repeatably, predictably and with considerable accuracy. In mass production, a machine tool is often used to produce many copies of the same part, so mechanical techniques were developed to control machine tools automatically using cams and levers. The cost of creating the cams, and the time taken to set up these mechanically automated machines, meant they were ideally suited to mass production, but were not economical for small quantities. Controlling a machine tool using a computer-based system means that the movements of the machine can be controlled by instructions in a computer program. Running the program guides the movement of the machine and it is only necessary to run the same program again to produce another set of identical movements. Changing the instructions changes the movements made by the machine and results in a different part being manufactured. This means that the same machine tool can be used much more flexibly, because different parts can be manufactured simply by changing the instructions in the computer program. An additional benefit is that complex shapes can easily be defined in software. This system is known as computer numerical control (CNC) and it brings significant benefits in flexibility of manufacture.

With developments in software, parts can be designed and drawn in two or three dimensions using computer-aided design (CAD) software. A computer-aided manufacture (CAM) software package can then read the CAD file and create the instructions for the program that controls a CNC machine tool, and the part can be produced by running that program. A CAD/CAM/CNC system provides flexibility and is capable of controlling a range of machine tools. In some instances, parts can be produced using CAD/CAM/CNC that could not be produced using conventional manual machining methods.

The availability of relatively inexpensive control systems based on personal computers, servos and stepper motors means that second-hand industrial CNC machine tools, smaller inexpensive purpose-made CNC machines and home-constructed CNC machine tools are within the reach of a wide range of users. Alongside developments in control systems, standardized software packages allow anyone to use these CNC machines to produce complex parts with ease, in batches ranging from a single part to tens of thousands of similar parts with a considerable degree of accuracy.

The workshop has never been a more exciting place.

A medium-sized benchtop mill: the KX3 from Arc Euro Trade.

1 Fundamental Concepts

In this chapter you will learn about:

the process of getting from a design to a finished workpiece;

details of the software systems you might use;

some of the mechanical and electronic systems used in CNC milling machines.

FROM DESIGN TO COMPLETED PROJECT

The traditional explanation of what happens in the workshop is that an idea is turned into a pencil sketch on the back of an old envelope, and a machinist uses that information to produce a finished workpiece while standing at the mill.

That romantic and rather unrealistic view of the process needs some refinement for a CNC machine. Fig. 1-1 shows the stages in the journey from design to completed workpiece, indicating the relative contribution of a human (on the left) and a computer (on the right). The original idea, for example, is an entirely human contribution, whereas creating the program may require both human and computer contributions.

Fig. 1-1 The main software functions associated with a CNC system.

From a software point of view, there are three main stages in the process: create a design, turn the design into data and use the data to control a machine. These correspond to the conventional computer-aided design (CAD), computer-aided manufacture (CAM) and computer numerical control (CNC) stages shown in Fig. 1-2.

Fig. 1-2 Stages in the CAD/CAM/CNC process.

Creating a Design

Unlike the rough sketch on a small piece of paper, the design stage must result in a completely specified design in which all the geometric features are present, accurately sized and precisely positioned. Whether the design is produced on paper or on a computer monitor depends on the complexity of the design and the nature of the features.

Some designs consist of simple arrangements of easily defined shapes such as straight lines and circles, but anything other than the simplest of shapes will benefit from the use of appropriate design software.

The design shown in Fig. 1-3 is a simple shape that could be fully specified on a small piece of paper and hand coded directly into the editor of a CNC package without much trouble.

Fig. 1-3 A geometrically simple shape.

The design shown in Fig. 1-4 is an apparently simple design that can easily be sketched on paper, but cannot be fully specified without some significant mathematical calculations to identify the intersection points at A and B. Without those points, there is insufficient information to be able to create a CNC program.

Fig. 1-4 A shape that appears simple, but includes a geometric complexity.

The design shown in Fig. 1-5 is of a visually and geometrically rich object (a set of clock plates) that might be sketched on paper, depending on the skill of the artist, but because of the complex curves, it would take a very considerable effort to fully specify the geometry and a mastery of advanced mathematics to calculate and prepare the data required for a CNC machine.

Fig. 1-5 A clock plate – a geometrically rich and complex shape.

In fact, the design process itself is severely compromised if it is restricted to designs that can be sketched on paper and hand coded as CNC programs. On the other hand, consistent use of CAD software allows most designs to be created with relative ease and for those designs to incorporate features that might enhance the visual appeal of the design, in the knowledge that those additional features can be produced easily in the CAM and CNC stages of the process, usually for little additional human effort.

Figs 1-6 and 1-7 show two versions of a design for a support bracket for a toolpost grinder. The first, in Fig. 1-6, is based on a geometrically simple shape that can be specified on paper and hand coded. The second version, in Fig. 1-7, contains enhancements to the design to improve the usefulness of the object as well as its aesthetic appeal. This second version was designed in a CAD package, coded by CAM software, and machined using a CNC program. Fig. 1-8 shows the bracket in use. Once drawn in a CAD package, even geometrically complex objects can easily be produced by employing a CAM package to do the sophisticated mathematics required for the toolpaths and a CNC package to follow the instructions generated by the CAM package.

Fig. 1-6 A simple bracket.

Fig. 1-7 An enhanced version of the bracket.

Fig. 1-8 The enhanced bracket in use on a toolpost grinder (note: wheel and guard removed for clarity).

2D design software has been in use since the early 1970s and ranges from simple freeware to powerful industry-standard proprietary packages. While there are many design packages, there are some important factors in the choice of package to use. In a CAD/CAM/CNC system, each stage in the process must be able to communicate with the next stage and this guides the choice of packages.

AutoCAD was an early entrant to the 2D design market on personal computers and its native DWG file format has become one of the standards for file interchange for drawings being passed between CAD and CAM systems. AutoCAD’s DXF file format (the Drawing eXchange Format) is another widely used file format for communicating data between the CAD and CAM stages of the CAD/CAM/CNC cycle.

These two file formats are widely recognized by all the useful drawing programs, to the extent that any drawing program not supporting these formats is not likely to be of use in the drawing office or the workshop.

Fortunately, a number of programs support these formats, so the choice is wide. Today, AutoCAD LT continues to be popular, but TurboCAD, DraftSight (free), and many others are all capable of producing 2D DXF drawing files.

2D drawing packages deal with flat shapes, such as parts made from sheet metal. 3D drawing packages deal with shapes such as a human head, or all sides of a locomotive smokebox, or the front, rear and sides of a car wheel.

2D shapes are useful, but relatively flat and featureless. True 3D shapes are difficult to hold for machining, especially if there are features to be cut on all sides like a 3D map of the world, for example. So, 2½D is the most useful kind of shape because, although based on a flat surface, the ability to machine down into the surface at any point allows designs for shapes that are like 3D but without features on the rear. Those shapes can be held on a conventional milling machine and they can be machined from one side, using movements along X, Y and Z axes.

While 2½D shapes are most common, some readily available software allows fully 3D shapes to be made from 2½D shapes by machining one side, then turning over and machining the reverse side so that the basic 2½D machining movements produce a fully 3D object.

Cut2D

The Vectric Cut2D package is one example of a CAD/CAM package that will allow simple 2½D machining with relative ease. It takes a DXF drawing, or allows the user to draw shapes within the program itself, then outputs the code required for separate CNC software to control a machine. Although there is more work required from the user in dealing with a 2½D object, the way in which the software does its job is essentially the same, whether the object is 2D or 2½D. The limitations on the program are that machined areas should generally have a flat bottom or that the shape of the bottom is formed by the shape of the end of the cutter (for example, a ball-nosed cutter producing a rounded groove).

In the CAD/CAM/CNC sequence, both the CAD design stage and the CAM stage using Cut2D are relatively straightforward. More fully shaped objects, contoured along the Z axis, require more sophisticated CAD software, such as Inventor or Solidworks, and more capable CAM software, such as Cut3D, VCarve Pro, PhotoVCarve, or Aspire.

VCarve Pro

This software package adds the capability of full 2½D machining and a more extended range of drawing tools. The more challenging part of the CAD/CAM/CNC sequence then becomes the CAD first stage, where the design is conceived, while the CAM stage is relatively easy, compared to the complexity of the design.

Other 2D and 3D CAD and CAD/CAM Software

Typical 2D CAD software includes Draft-Sight, RhinoCAD, AutoCAD and TurboCAD as well as vector drawing packages, such as Adobe Illustrator. Bit-mapped drawing packages, such as Adobe Photoshop, are not suitable for conventional CAD functions, although you will read later about some specialized applications that may benefit from bit-mapped images or drawing software. Typical 3D software includes Inventor, Solidworks and TurboCAD Pro.

There are references to AutoCAD, Turbo-CAD, Adobe Illustrator, Inventor and Solidworks in this book, but other similar packages may be used to achieve the same result.

Preparing for Manufacture

Once a design has been created, it must be translated into a form suitable for computeraided manufacture (CAM). Like the design stage, this can be done manually or with computer assistance. The start of this process is the design, and the end result is data in the form of instructions for a computer-controlled machine tool.

For a simple design, which could be machined using simple movements of a tool between known points, manual coding of the tool movements is perfectly possible. The challenge is in specifying the movements of a tool for a complex shape consisting of multiple curves or surfaces, requiring complex movements of the tool. For that reason, this stage is often carried out wholly or partly by computer. There is a trade-off between time and complexity, and while the tool movements for many designs can be specified by a human, this can quickly become a longer and more difficult task as the complexity of the design increases. Even in a small workshop, time is often a significant factor, and while there is much satisfaction to be gained from hand coding, CAM software can save time and allows more complex designs to be manufactured. Ideally, both hand coding and CAM software should be available, as a knowledge of hand coding is a valuable skill that allows CAM software to be used efficiently and intelligently in turning a design into data for a machine tool.

CAD and CAM are closely related and there are many software packages that perform both functions, differing mainly in the balance they strike between CAD and CAM. Lower-end packages tend to favour the CAM stage, while several of the high-end packages contain complete CAD and CAM tools, allowing complex designs to be created and turned into data for a machine tool. Single-purpose CAD or CAM packages tend to provide much more sophisticated design or CAM environments, but data normally has to be transferred between packages by a human operator.

CAM software ranges from the simple to the sophisticated, and prices reflect the power of the packages. Cut2D, for example, provides basic 2D and 2½D design tools and complete CAM facilities for turning the design into program instructions for a range of CNC machines. VCarve Pro provides much more capable design tools for 2D and 2½D work as well as the CAM facilities. Aspire provides a full 3D low-relief design capability and all the CAM facilities. The price and complexity of the packages reflect their capabilities.

As with CAD software, many other packages are available that perform the same function, and these include single-purpose DXF to G code convertors that take a DXF file generated by a CAD program and output a program to control a CNC machine, but offer no design tools.

Controlling the Machine

The final requirement is for software to control the motors on the machine tool. This is the CNC software, and if it is loaded with the instructions generated by the CAM software, it will use those instructions to carry out a machining sequence to produce a part.

In this book, the LinuxCNC and Mach3 CNC packages will be used to illustrate the process and provide the examples. Aside from minor differences, most other CNC software packages perform the same function, so that the examples should all be capable of producing the same machining sequence, irrespective of the CNC package used. The only change might be minor amendments to suit the specific requirements of packages provided by other manufacturers or software writers.

Both the LinuxCNC and Mach3 software packages provide a user-friendly environment for controlling a machine and allow direct manual control as well as accepting data from CAM software.

Mach3 runs on computers using the Windows operating system. The specific requirements to allow Mach3 to be installed and run on a computer can be found on the Mach3 website at www.mach3support.com.

LinuxCNC runs on computers using the Linux operating system and, in particular, specific versions of Ubuntu Linux. The specific requirements to allow LinuxCNC to be installed and run on a computer can be found at www.linuxcnc.org.

CNC software also provides facilities for common preparatory tasks such as homing axes, creating soft limits on slide travel, and defining coordinate systems in preparation for machining.

As with CAD and CAM packages, CNC control software is sometimes integrated with CAM or CAD/ CAM software as part of a multifunction software package. Fully integrated CAD/CAM/CNC packages are normally specific to a particular machine or range of machines by a specific manufacturer.

CNC software interprets instructions and sends out signals to control the motors attached to a machine tool. The motors turn feedscrews that move the slides or turn the spindle of the machine.

The beauty of this system is that using the same instructions will cause the same movements of the slides and spindle, so producing the same machining sequence time and time again.

MECHANICS

Typical CNC milling machines closely resemble their conventional manually operated equivalents and have slideways and tool holders, spindles and tables, so the movements made by the various slides is very similar, whether the machine is operated by hand or by CNC.

Fig. 1-9 shows a typical small CNC milling machine in which the manual controls have been replaced by computer-controlled motors that operate the slides.

Fig. 1-10 shows a somewhat larger mill with more powerful motors and larger table movements, but still based on the same principles by which a table moves side to side and back to front, and the head with the spindle, which holds the tool, moves up and down.

Fig. 1-9 A typical small CNC mill from Sherline.

Fig. 1-10 A larger CNC mill from Tormach. (Photo: Tormach LLC)

Some CNC machine designs have evolved to suit particular machining techniques or because of the size or shape of the material being machined. Woodworkers using mainly large sheets of flat material like particle board, for example, often use gantry mills in which the table or bed of the machine does not move, but a router is held in an overhead mount that can move horizontally above the work and vertically away from or towards the work. Fig. 1-11 shows an example of this kind of machine. Although the movements are different, the fact that the cutter moves instead of the table makes little difference to the way in which this type of machine is controlled.

Fig. 1-11 A ShopBot gantry mill. (Photo: ShopBot Tools Inc.)

All CNC machines feature mechanics driven by motors or actuators of some sort, and there are two basic types of motor available for powering slides and controlling their movement. The first is the stepper motor and the second is the servo system.

When a stepper motor receives a signal, its shaft will rotate through a small angle. The motor will then hold its position until it receives another signal. A typical stepper motor used on a machine tool will rotate through 1.8 degrees when it receives a signal, so it will require 200 signals and make 200 steps as it makes one complete turn. Stepper motors used in other applications may make fewer steps every turn, and small stepper motors used in some printers will turn through 7.5 degrees every time they receive a signal, so requiring only 48 signals and making only 48 steps in one complete revolution. The more steps required per revolution, the finer the control of whatever is attached to the stepper.

A servo produces much the same result, but uses a different technique involving continuous error correction. The motor may be one of a range of types, but is capable of rotating, and driving a slide. When the motor controller tries to move the servo (and the slide) to a particular position, the servo begins to turn. On the end of the motor shaft there is a device that will send an error signal if the position of the motor is not where it needs to be for the slide to be in the correct position. This device is most commonly an encoder or a resolver. The error signals are used to correct the movement of the motor until the slide has reached the required position. In this way a servo system incorporates feedback and that is what makes it different to a stepper motor system.

When a signal is sent to a stepper motor, the motor should move. If it is obstructed and is prevented from turning, the control software will not be able to detect that it has not been able to move as intended.

When a signal is sent to a servo, the motor should move. If it is obstructed, the error signals will continue to try to make the servo achieve its target position and the control software will receive signals indicating that the servo is not in the correct position.

It is possible to add a resolver or encoder to the end of the shaft of a stepper motor, effectively turning it into a servo system, but this adds to the cost of the system and the complexity of the electronics and, in cases where feedback is essential, it may be simpler and more effective to use a servo system instead.

At the present time, most small CNC machines for the hobbyist use stepper motors and, where these are of reasonable power, the system not only works well but is cost-effective. Industrial machinery normally uses servo systems, which are both powerful and expensive.

Exactly the same principles of operation apply to both stepper motors and servos, and similar software can be used in most cases. The range of stepper motors commonly available at a reasonable cost includes steppers that are sufficiently powerful to reliably move the slides on a machine as large as a Bridgeport manual mill. On the other hand, where precise control of position is essential, even on a small machine, servo systems are available in a range of sizes and powers.

The feedscrews on a CNC machine tool may be of conventional screw form, like the Acme screw form (Fig. 1-12), or ball screws and nuts (Fig. 1-13). In either case, when the feedscrew turns, a nut attached to a slide is pushed or pulled to make the slide move. In the ball screw, the nut contains small balls that roll around the surface of the screw and this results in much lower friction compared to the conventional screw in which the flanks of the screw and the nut rub together, because rolling friction is less than the friction between sliding surfaces. But while the ball screw leads to lower friction and requires less powerful motors to move a slide, the main benefit is in the more predictable wear characteristics of the screw. Whereas a conventional leadscrew has a tendency to wear unevenly, ball screws are much less prone to this problem and wear in a more even fashion.

Fig. 1-12 An ACME leadscrew.

Fig. 1-13 A section of a ball screw and ball nut.

Wear in a leadscrew results in backlash, so that reversing the direction of rotation of the leadscrew results in a partial turn that causes no movement because the flanks of the screw take up the slack within the nut before pushing it in the opposite direction. This kind of lost motion of the nut and the slide results in steps moved by the stepper motors or servo system with no corresponding movement of the slide. The slide and the motors get out of sync both with each other and with the controlling software, which leads to errors in the machining path.

Servo systems may be able to cope with lost motion, especially if they are referencing to a scale mounted on the slide itself, but stepper systems cannot make up for lost steps.

The most popular software packages have a system for specifying the backlash in a leadscrew and can then compensate by recognizing the need for some extra steps when the direction of a slide changes and there is the potential for lost motion. What is more difficult is for software to compensate for backlash that is different at different points along the length of the leadscrew. So the next best thing to no backlash at all is uniform backlash, while the worst situation is a leadscrew that has significant backlash that varies from point to point along the leadscrew. Although ball screws tend to have a more consistent degree of backlash along their length, they are not without their own drawbacks. Backlash can be eliminated by using ground ball screws and preloaded nuts. These are expensive and the ball screws usually have to have a large diameter (16mm or more).

The low friction of a ball screw is not always an advantage and where there is backlash, the low friction can lead to the cutter snatching as the slide changes direction. The cutter grabs the work and moves the slide, ruining the machining pattern and perhaps damaging the workpiece and cutter. As with most engineering problems, there is a compromise between the ideal design and real-world reality.

Until recent times, most machine tools had dovetail slides (as on most mill tables) as can be seen at the front of the cross slide in Fig. 1-14. In an effort to reduce friction, manufacturers have adopted slideways based on the same rolling-ball technology used in ball screws, and modern large machine tools often use ball slides where the conventional mating surfaces are replaced by rails or rods on which roll tubular or rectangular nuts containing balls (Fig. 1-15). As with ball screws, rolling friction is less than sliding friction, so less power is needed to move the slides. Smaller machines have been slower to adopt this technology, simply because of the expense, but this is a design feature that is gradually being adopted in more expensive machine tools. It is also found on some older training machines that are now becoming available on the second-hand market.

Fig. 1-14 A dovetail slideway on a cross slide.

Fig. 1-15 Linear guide with rail and carriage. (Photo: Automotion Components Ltd.)

Stepper motors and servos may be directly connected to feedscrews or they may be connected via pulleys and belts. The pulleys must be coupled together in such a way that there is no lost motion between them as they turn, so that the pulley system does not introduce backlash. This is usually done by using toothed belts that contain a core of steel wire. There are different proprietary shapes for the teeth of these pulleys, but as long as the same make of pulleys and belts is used, this should cause little trouble.

Spindle motors may be free-running or under computer control. In most small machines, the speed of the spindle motor is not controlled by the CNC software. It may be switched on manually or the CNC software may switch the motor on but not control its speed. Ideally, the CNC software should be able to control the position of the spindle as it rotates, or at least sense its rotations, so that the rotation of the spindle can be coordinated with the movement of the various slides, perhaps for thread cutting or some spiral machining operations. At the present time, not all small CNC machines have spindle speed control or spindle position sensing, which places some limitations on operations like tapping, machining threads and dividing using the main spindle.

ELECTRONICS

Fig. 1-16 shows some of the electronics forming a typical CNC control system. Details will vary from one system to another, but the core functions will be present in most machines.

Neither stepper motors nor servo systems are connected directly to the computer, because the motors require considerably more power than the computer could supply. Instead, the computer sends low-powered logic-level signals to a driver unit, which responds to the signals by generating pulses of much higher voltage and current to suit the motors. Typical voltages range from 5 to 70 volts or more, and typical currents depend on the rating of the motors, with some powerful stepper motors requiring up to 10 amps at 70 volts for each motor.

To protect the computer system, an interface board is often used to buffer or isolate signals passing from the computer to the motor drivers, so that there is no possibility of high voltage or current flowing from the motor drivers back into the computer. Isolation may be by opto-couplers that effectively transmit signals with no electrical connection between the computer side and motor side of the interface board.

Fig. 1-16 Schematic of typical electronic items associated with a CNC milling machine.

A CNC machine may incorporate sensors designed to indicate when slides reach particular positions (limit or home switches, for example) or the speed of rotation of a spindle. These sensors send signals to the computer system, but normally pass through an interface first where they are turned into a form suitable for the computer, with appropriate voltage levels or data formats. As with the signals to the motor drivers, the interface provides isolation between the sensors and the computer.

Because a machine tool is a potentially dangerous device, additional safeguards may include a charge pump that allows the hardware to operate provided the charge pump receives a constant set of signals from the control computer. If the CNC control software stops running or a fault develops in the computer, the charge pump will stop receiving the stream of signals from the computer and will disable the signals to the hardware to stop the machine.

On top of all of this, there may be an emergency manual cut-out switch for the spindle motor of the whole system, and the computer software can also be stopped by pressing an appropriate key on the keyboard.

Finding the shape of holes in an engine block using a probe. (Photo: Centroid Corporation.)

2 The Controlled Point

In this chapter you will learn about:

the Controlled Point, the axes of movement, and coordinate systems;

homing and touching off.

CNC software moves a Controlled Point in relation to the workpiece as it carries out a machining sequence. The Controlled Point may be anywhere, but is normally a reference point at the end of the tool, on the same axis as the spindle, as shown in Fig. 2-1.

It does not matter whether the head moves or the slides move, the software will always act as though it is moving the Controlled Point. It is best to focus on what happens to the Controlled Point, so what really matters is not the way the parts of the machine move, but the way the Controlled Point moves in relation to the work.

Fig. 2-1 The Controlled Point.

Looking directly down on to the table, the XY plane is parallel to the flat surface of the table, with the X axis running left to right and the Y axis running front to back (Fig. 2-2). The origin is the point where the X and Y axes cross and both axes have a value of zero at that point.

Fig. 2-2 The XY axes and the origin.

On the X axis, the X value becomes more positive as the Controlled Point moves to the right in relation to the table, and more negative (or just less positive) as the Controlled Point moves to the left. The Y value becomes more positive as the Controlled Point moves to the rear.

The Z axis runs vertically up and down at right angles to the XY plane (the table) and represents the vertical movement of the Controlled Point. The Z value becomes more positive as the Controlled Point moves further away from the table.

For a ‘tabletop’ vertical milling machine, in which the head moves up and down and the table is fixed to the cabinet or bench, Fig. 2-3 shows the orientation of the axes for movements parallel to the X axis (left and right), the Y axis (forwards and backwards) and the Z axis (vertically up and down).

Fig. 2-3 The axes on a tabletop mill.

Because the table remains fixed and the head moves up and down, the Z value becomes more positive as the head is raised and moves the Controlled Point in the positive Z direction and further away from the work.

On a ‘knee’ mill, in which the head is fixed but the knee moves the table up and down, the Z value becomes more positive as the table is lowered, taking the origin with it, and the distance between the Controlled Point and the work increases (Fig. 2-4).

Fig. 2-4 The axes on a knee mill.