From Peter Smid,CNC Programming Handbook: A Comprehensive Guide to Practical CNC Programming, Second Edition, Industrial Press, Inc. 200 Madison Avenue, New York, 2003.CHAPTER 6: PROGRAMMING PLANNINGThe development of any CNC program begins with a very carefully planned process. Such a process starts with the engineering drawing of the required part. Before the part is machined, several steps have to considered and carefully evaluated. The more effort is put into the planning stage of the program, the better results may be expected at the end.STEPS IN PROGRAM PLANNINGThe steps required in program planning are decided by the nature of the work. There is no formula for all the jobs, but some basic steps should be considered:* Initial information / Machine tools features* Part complexity* Manual programming / computerized programming* Typical programming procedure* Part drawing / Engineering data* Methods sheet / Materials specifications* Machining sequence* Tooling selection* Part setup* Technological decisions* Work sketch and calculations* Quality considerations in CNC programmingThe steps in the list are suggestions only a guideline. They are quite flexible and should always be adapted for each job and to the specific conditions of the work.INITIAL INFORMATIONMost drawings define only the shape and size of the completed part and normally do not specify data about the initial blank material. For programming, a good knowledge of the material is an essential start - mainly in terms of its size, type, shape, condition, hardness, etc. The drawing and material data are the primary information about the part. At this point, CNC program can be planned. The objectiveof such a plan is to use the initial information and establish the most efficient method of machining, with all related consideration – mainly part accuracy, productivity, safety and convenience.The initial part information is not limited to the drawing and the material data, it also includes conditions not covered in the drawing, such as pro- and post- machining, grinding allowances, assembly features, requirements for hardening, next machine setup, and others. Collecting all this information provides enough material to start planning the CNC program.MACHINE TOOLS FEATURESNo amount of initial information is useful if the CNC machine is not suitable for the job. During program planning, programmer concentrates on a particular machine tool, using a particular CNC system. Each part has to be setup in a fixture, the CNC machine has to be large enough to handle the size of the part, the part should not be heavier than the maximum weight allowed. The control system must be capable to provide the needed tool path, and so on. In the most cases, the CNC equipment is already available in the shop. Very few companies go and buy a new CNC machine just to suit a particular job. Such cases are rather rare and happen on if they make economic sense.* Machine Type and SizeThe most important considerations in program planning are the type and the size of the CNC machine, particularly its work space or work area. Other features, equally important, are the machine power rating, spindle speed and feed rate range, number of tool stations, tool changing system, available accessories, etc. Typically, small CNC machines have higher spindle speeds and lower power rating, large machines have lower spindle speeds available, but their power rating is higher.* Control SystemThe control system is the heart of a CNC machine. Being familiar with all the standard and optional features available on the control is a must. This knowledge allows the use of a variety of advanced programming methods, such as the machining cycles, subprograms, macros and other timesaving features of a modern CNC system.A programmer does not have to physically run a CNC machine. Yet, the programs will become better and more creative with good understanding of the machine and its control system. Program development reflects programmer’s knowledge of the CNC machine operation.One of the main concerns in program planning should be the operator’s perception of the program. To a large degree, such a perception is quite subjective, in the sense that different operators will express their personal preferences. On the other hand, every operator appreciates an err-free, concise, well-documented and professionally prepared part program, consistently and one after another. A poorly designed program is disliked by any operator, regardless of personal preferences.PART COMPLEXITYAt the time the drawing, material and the available CNC equipment are evaluated, the complexity of the programming task becomes much clearer. How difficult is to program the part manually? What are the capabilities of the machines? What are the costs? Many questions have to be answered before starting the program.Simple programming jobs may be assigned to a less experienced programmer of the CNC operator. It makes sense from the management perspective and it is also a good way to gain experience.Difficult or complex jobs will benefit from a computerized programming system. Technologies such as Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM) have been a strong part of the manufacturing process for many years. The cost of a CAD/CAM system is only a fraction of what it used to be only a few years ago. Even small shops now find that the benefits offeredby modern technology are too significant to be ignored. Several programming systems are available various computers and can handle any job. For a typical machine shop, a Windows based programming software can be very beneficial. A typical example of this kind of application is the very popular and powerful MasterCAM, form CNC Software, Inc. Tolland. CT. There are several others.MANUAL PROGRAMMINGManual programming (without a computer) has the most common method of preparing a part program for many years. The latest CNC controls make manual programming much easier than ever before by using fixed or repetitive machining cycles, variable type programming, graphic tool motion simulation, standard mathematical input and other timesaving features. In manual programming, all calculations are done by hand – with the aid of a pocket calculator – no computer programming is used. Programmed data can be transferred to the CNC machine via a cable, using an inexpensive desktop or a laptop computer. This process is faster and more reliable than other methods. Short programs can also be entered manually, by keyboard entry, directly at the machine. A punched tape used to be the popular media of the past but has virtually disappeared from machine shops.* DisadvantagesThere are some disadvantages associated with manual programming. Perhaps the most common is the length of time required to actually develop a fully functioning CNC program. The manual calculation, verification and other related activities in manual programming are very time consuming. Other disadvantages, also very high on the list, are a large percentage of errors, a lack of tool path verification, the difficulty is making changes to a program, and many others.* AdvantagesOn the positive side, manual part programming does have quite a few unmatched qualities. Manual programming is so intense that it requires the total involvement of the CNC programmer and yet offers virtually unlimited freedom in the development of the program structure. Programming manually does have some disadvantages, but it teaches a tight discipline and organization in program development. It forces the programmer to understand programming techniques to the last detail. In fact, many useful skill learned in manual programming are directly applied to CAD/CAM programming. Programmer has to know what is happening at all times and why it is happening. Very important is the in-depth understanding of every detail during the program development.Contrary to many beliefs, a thorough knowledge of manual programming methods is absolutely essential for efficient management of CAD/CAM programming.CAD/CAM AND CNCThe need for important improved efficiency and accuracy in CNC programming has been the major reason for development of a variety of methods that use a computer to prepare part programs. Computer assisted CNC programming has been around for many years. First, in the form of language based programming, such as APT™or Compact Ⅱ™. Since the late 1970’s, CAD/CAM has played a significant role by adding the visual aspect to the programming process. The acronym CAD/CAM means Computer Aided Design and Computer Aided Manufacturing. The first three letters (CAD) cover the area of engineering design and drafting. The second three letters (CAM), covers the area of computerize manufacturing, where CNC programming is only a small part. The whole subject ofCAD/CAM covers much more than just design, drafting and programming. It is a part of modern technology also known as CIM –Computer Integrated Manufacturing.In the area of numerical control, computers have played a major role for a long time. Machine controls have become more sophisticated, incorporating the latest techniques of data processing,storage, tool path graphics, machining cycles, etc. Programs can now be prepared with the use of inexpensive computers, using graphical interface. Cost is no longer an issue; even small machine shops can afford a programming system in house. These systems are also popular because of their flexibility.A typical computerized programming system does not have to be dedicated only to programming – all related tasks, often done by the programmer, can be implemented on the same computer, for example, cutting tool inventory management, database of part programs, material information sheet, setup sheets and tooling sheets, etc. The same computer could also be used for uploading and downloading CNC programs.* IntegrationThe keyword in the acronym CIM is – integration. It means putting all the elements of manufacturing together and work with them as a single unit and more efficiently. The main idea behind a successful integration is to avoid duplication. One of the most important rules of using a CAD/CAM computer software is: Never Do Anything Twice!When a drawing is made in a CAD software (such as AutoCAD), then done again in a CAM software (such as MasterCAM), there is a duplication. Duplication breeds errors. In order to avoid duplication, most of the CAD system incorporate a transfer method of the design to the selected CAM system to be use for CNC programming. Typical transfers are achieved through special DXF or IGES files. The DXF stands for Data Exchange Files or Drawing Exchange Files, and the IGES abbreviation is a short form of Initial Graphics Exchange Specification files. Once the geometry is transferred form the CAD system to the CAM system, only the tool path related process is needed. Using a post processor (special kind of formatter), the computer software will prepare a part program, ready to be loaded directly to the CNC machine.* Future of Manual ProgrammingIt may seem that the manual programming is on the decline. In terms of actual use, this is probably true. However, it is necessary to keep in perspective that any computerized technology is based on the already well established methods of manual programming. Manual programming for CNC machines serves as the source of the new technology – it is the very elementary concept on which the computerized programming is based. This knowledge base opens the door for development of more powerful hardware and software applications.The manual programming may be use somewhat less frequently today and eventually will be used even less – but knowing it well – really understanding it – is and always will be the key to control the power of CAM software. Even computers cannot do everything. There are some special programming projects that a CAM software, regardless of the price, may handle to an absolute satisfaction. If the control system can handle it, manual programming is the way to the ultimate control over such a project, when any other methods may not be suitable.Even with a well customized and organized computerized programming system, how can the generated program output be exactly as intended? How can the CNC operator change any part of the program on the machine, without knowing its rules and structure? Successful use of computerized programming requires understanding of manual programming methods.TYPICAL PROGRAMMING PROCEDUREPlanning of a CNC program is no different than any other planning; it must be approached in a logical and methodical way. The first decisions relate to what tasks have to be done and what goals have to be reached. The other decisions relate to how to achieve the set goals in an efficient and safemanner. Such a progressive method not only isolates individual problems as they develop, it also forces their solution before the next step can be taken.The following items form a fairly common and logical sequence of tasks done in CNC programming. The items are only in a suggested order, offered for further evaluation. This order may be changed to reflect special conditions or working habits. Some items may be missing or redundant:1.Study of initial information (drawing and methods)2.Material stock (blank) evaluation3.Machine tool specifications4.Control system features5.Sequence of machining operations6.Tooling selection and arrangement of cutting tools7.Set of the part8.Technological data (speed, feed rates, etc.)9.Determination of the tool path10.Working sketches and mathematical calculations11.Program writing and preparation for transfer to CNC12.Program testing and debugging13.Program documentationThere is only one goal in CNC program planning and that is the completion of all instructions in the form of a program that will result in an error- free, safe and efficient CNC machining. The suggested procedures may require some changes – for example, should the tooling be selected before or after the part setup is determined? Can the manual part programming methods be used efficiently? Can the manual part programming methods be used efficiently? Are the working sketches necessary? Do not be afraid to modify any so called ideal procedure – either temporarily, for a given job, or permanently, to reflect a particular CNC programming style. Remember, there are no ideal procedures.第六章:制定编程计划编写任何CNC程序都必须经过周密计划后开始。