This is program listing for the drawing – one contour:
Note that the programmer used two different radius offsets for the same tool! This is very important. Also note that the roughing cut offset is D61, while maintain ing the finishing cut offset is D51, which follows the common addition of 50 to the tool number for controls with shared offset registry.
MACHINING A PART
(*** VERSION 1 ***) N1 G21 N2 G17 G40 G80 (T01 = 12 MM = IN SPINDLE) N3 G90 G54 GOO X-8.0 Y-8.0 $1200 MO3 N4 G43 Z2.0 101 MOS N5 Z-3.0 N6 GO1 641 X2.0 D51 F200.0 N7 Y61.0 N8 G02 X98.0 Y59.0 145.082 J-141.063 N9 G01 Y2.0 N10 X-8.0 N11 G40 GOO Y-8.0 MO9 N12 G28 Z-3.0 M05 N13 M30
Always watch for multiple offsets for a single tool
The above program could use a subprogram as well as two different tools for more control of dimensions.
Radius fromland J
The drawing for the example has an arc definition based on three points. In this case, the radius is not known and can be calculated during programming. Re gardless of whether the radius is or is not known, many programs containing arcs are programmed using arc vec tors I and J, rather than the direct radius R. In these cases, the arc radius is also not known, although listed in the drawing. That raises a question – is there a way to find the radius of an arc, if only I and J arc vectors are given?
The answer is YES and the method shown here can be very useful to verify that the IJ vectors in the program are correct. Here is a program section that matters:
The objective of producing a machined part made to specifications is and always should be the main – and the ultimate – objective of the complete CNC process. This is the area where a CNC machine shop can succeed – or fail. This area of manufacturing allows no compromises whatsoever. Either the part is machined to engineering specifications or it is not. There is no room for the ‘mid dle’ in here, and there should never be such descriptions as ‘close enough’ or ‘good enough’.
For the main machining objective, there should be only one expected outcome – that is to be ‘right on’ – to be exact – in all aspects of the part development. Part de velopment starts with the initial design, but in practical terms of a machine shop, it starts at the programming stage and ends when all parts have been machined.
The first time an engineering drawing is evaluated for production purposes, it happens at the desk of CNC pro grammer. The programmer evaluates the drawing, se lects the most suitable machine setup, cutting tools and method of machining. The whole part program is built on these decisions established by the programmer.
The second time the drawing is evaluated, is when it gets to the machine shop, together with the program and other information, such as a setup sheet. The purpose of this evaluation is much different from that of the pro grammer. Operators look for drawing data that directly influence the actual machining, such as:
Dimensional tolerances I Surface finish requirements
Stock left for subsequent operations … and other specifications
N71 G01 X12.893 748.117 N72 GO2 X80.508 Y100.0 167.615 J-18.117 N73 G01 X120.0
Keep in mind CNC operators have no control over the part program, but they do have a large control over the part setup. The program has to include those features that allow machining with certain degree of flexibility.
By including the cutter radius offset in block N6, the programmer provided the necessary function that allows flexibility at the machine. Setting the actual amount of D51 offset is done at the machine. As the program uses drawing dimensions and the tool diameter is 12 mm, the nominal offset amount will be D51 = 6.000.
On the other hand, only a single cutting tool is used for the contour. When only a few parts are to be machined, or when the tolerances are not critical, one tool program is more efficient than program with two tools.
One tool can also be programmed with roughing and finishing motions, contouring the part twice. Again, this is a programming decision. The above program will be changed to reflect the two tool motions: (*** VERSION 2 ***) N1 G21 N2 G17 G40 G80 (T01 = 12 MM = IN SPINDLE) N3 M06 N4 G90 G54 GOO X-8.0 Y-8.0 S1200 M03 N5 G43 z-3.0 H01 MOS ( ROUGHING WITA D61 ) N6 G41 G01 X2.0 061 F250.0 N7 Y61.0 N8 GO2 X98.0 Y59.0 145.082 J-141.063 N9 G01 Y2.0 N10 X-8.0 N11 G40 GOO Y-8.0 MO9 (= FINISHING WITH D51 = ) N12 G41 G01 X2.0 D51 F200.0 N13 Y61.0 N14 GO2 X98.0 159.0 145.082 J-141.063 N15 G01 Y2.0 N16 X-8.0 N17 G40 GOO Y-8.0 M09 N18 G28 2-3.0 M05 N19 M30
In order to ‘decifer’ the program and find the arc ra dius, you have to know what the arc vectors IJ represent. Both represent the distance and direction from the arc start point to the arc center – measured along the X-axis (I-vector) and the Y-axis (J-vector). Start point of the arc in the example is in the block N72.
PROCESS OF MACHINING
Large, medium and small companies all have their own ways of establishing a particular machining pro cess. A large company may involve several people, each with unique expertise, while a small company may only have one person or two persons, each assigned with mul tiple responsibilities. Regardless of any applied manage ment methods, the machining process itself shares many steps. In essence, the process of CNC machining a part narrows down to the responsibilities of the CNC opera- tor and/or the setup person. It can be summed up into a series of general steps:
• Material inspection
• Program evaluation I Part setup
Tooling and setup
• Program input I Program verification
Machining a part Part inspection
Machining flexibility can be illustrated by a program example and its influence on dimensional accuracy. Consider this 100 x 70 mm stock and the program that machines the contour (complexity of the part is not im portant for the example):
J = -18,117
This process is typical for a CNC operator who is re sponsible for both the setup and machining of a batch of parts on either a CNC machining center or a CNC lathe.
I = 67,615
A subprogram can be used for complex contours.
Depth of cut 3 mm
CNC Control Setup for Milling and Tuming MACHINING A PART
CNC Control Setup for Milling and Turning
MACHINING A PART
Once you identify the IJ vectors as two sides of a right triangle, the radius R can be calculated using the classic Pythagorean Theorem:
R = W12+y?
Programs Generated Manually
Manual programming, in contrast to programming us ing software such as Mastercam®, is still a common method in many shops. Manual programming is also used for simple parts, even if computer assisted software is available. Manual programming for CNC lathes is quite common, because of the powerful built-in cycles, which are themselves computer (control) based.
A program developed manually may have syntax er rors or logical errors. Syntax errors are detectable by the control, logical errors are not – those are the serious ones.
Address o Program number Address N Block number Address H Tool length offset number Address D Cutter radius offset number Address G G-codes (special codes do use decimal point)
Address M Machine and miscellaneous functions
• Address L Repetitive count for cycles and subprograms
Address K Only if used for the same purpose as address L Address P Adwell time in milliseconds (pause) Address S Spindle speed (r/min or cutting speed) Address T Tool number
Applying the known vectors I and J, the radius can be calculated:
R = N67.6152 + 18.1172 = 70.00009939
Checking the radius in the drawing, it should be R70.
As always, check the control system manual for exact representation of various addresses.
When evaluating a program, usually from a control display screen or from a printed copy, you should know that, for example, ….
When delivered to the CNC machine, blank material (stock) allocated for machining is not always what is should be. Programmers often base toolpath motions on supplied material data and do not have the opportunity to check the real material to be used for machining. This is one of the most common frustrations a CNC operator has to face. In addition, the lead time is increased and productivity goes down.
Ideally, all stock material used for a particular batch of machining should be the same. Practically, there are sev eral reasons why material will vary is size and condition. One is that two different sources were used. Another is a preparation of the material did not include quality con trol. There are other reasons as well, but for the operator, the most important reason is to know the differences.
Programmers are sometimes aware of a possible prob lem and incorporate suitable measures in the program. For example, they may provide an option for one or two facing cuts, using the block skip function (page 220). It is common for CNC operators to check a few samples from the supplied material before starting the job.
When evaluating a part program developed manually, the first thing you may be looking for is syntax errors.
de 100king for is syntax errors. The most common one is the letter O instead of the digit zero (0): GOO X23.5 … letter O is a syntax error
as compared with GOO X23.5 … digit 0 is slimmer than letter o
Fortunately, the control system can detect syntax er rors, and some operators actually count on it by running the program without any motions. In this respect, syntax errors are easy to find and correct. All non-syntax erTOTS are logical errors that are more difficult to find.
In metric units: x10.0 is the same as x10. as well as X10000 X0.1 is the same as X.1 as well as X100
> In imperial units: X10.0 is the same as X10. as well as X100000 xo.1 is the same as X.1 as well as X1000
Note the number of zeros for each unit when the dec imal point is absent.
It is not only the missing decimal point that can cause problems, it can also be a decimal point in the wrong place. For example, block numbers and spindle speeds do not accept a decimal point. Its presence in such com mands will cause an error at the control.
Surface finish is influenced by several factors, such as speeds and feedrates, depth and width of cut, the type of material, the diameter and length of tool, rigidity of setup and a number of other factors.
Typically, adjusting the speed and feed at the machine are the most common methods to improve surface finish, but other measures should also be applied in many cases. For example, using the same size end mill as directed by the program but with a different flute geometry will in fluence the surface finish. If applicable, a larger cutter radius will also have a positive effect on surface finish. Changing the offset amount for stock allowance be tween roughing and finishing operations may also im- prove the surface finish.
Other factors include suitable cutting fluids, direction of cut, geometry of the cutting tool, and others.
Dimensional errors are logical errors. Logical errors are much more difficult to detect in the program. Logical error is a correct syntax with incorrect data. For exam ple, X50.0 is a perfectly correct program entry, as long as the programmer did not mean X5.0, for example. Er rors of this type can generally be detected during pro gram proving, using various methods, such as single block, dry run, machine lock, Z-axis lock, etc.
Programming rules for decimal point also apply to setup data input at the control, including offsets
A short note on a feature called Calculator Input. Some machines, such as routers, hobby mills, and spe cial purpose machines do use the calculator input as a standard input of data that would normally use decimal point. The subject of calculator input is related to pro gramming a decimal point (or not). Program Version 1 on page 102 uses the standard method of programming decimal point.
Here is the same program using the calculator input feature, with underlined changes:
A missing decimal point has always been at the top of many programming errors of the logical type. In stan – dard programming, all dimensional addresses, including those in degrees, as well as arc vectors, use decimal point. Feedrates generally use decimal points, but there are more exceptions in this area. A brief list of addresses that do not use decimal point, at least not for Fanuc and similar controls follows:
Most CNC operators are not part programmers. Yet, their skills are often measured by the output of parts only – the more the better within the same time frame. This approach does not take into consideration that the oper ator – especially one who is also responsible for machine setup – has to know what the part program actually does. A few programmers offer a brief description of individ ual operations, many do not. Some companies provide a routing sheet or similar document describing individual operations at each stage of manufacturing. Small ma chine shops do not have such luxury.
In order to shorten the lead time, the part program is often used as is, without further examination. This ap proach can be justified for programs that had been used earlier – programs that had been verified. For new pro grams, it is always a good idea to evaluate the program before using it. Incidentally, it does not matter whether the program was developed manually or by using pro gramming software. Either method can produce its own errors. Errors generated by a computer software should be non-existent, or at least far between, but that is not al ways the case. Errors generated by manual program ming are much more frequent. Knowing what method of programming had been used will make a difference at the machine when the program is evaluated.
Typically, stock allowance is the amount of material left for finishing. As the amount of stock has a great deal to do with the final part quality, it is necessary for the op erator to set such amount correctly. Take the last pro gram example (Version 2). Using the nominal cutter radius, the finishing offset amount for D51 will be 6.000. It is the D61 offset amount that leaves the stock. Adding stock to the part means the offset has to be greater than 6 mm. There are no magic numbers here. If you set D61 to 6.500 mm, there will be 0.5 mm (about 0.02′) left – per side – for finishing. Even without any magic num bers, this is the amount of stock often used by operators as a starting point.
Program dimensional data normally uses the drawing dimensions (contour edge), so the exact setting of the offsets is in the hands of CNC operators.