fbpx

Linear and Circular Interpolation on CNC Machines





    Linear and Circular Interpolation on CNC Machines

    Parts machining on CNC machines does not always take place with cycle programs. In some cases, point coordinates are also treated. In such cases, codes G01, G02 and G03 come into play. The first of these provides linear interpolation, and the other two provide circular interpolation. The main purpose of CNC interpolation is to determine the interpoints between known contour points. Interpolation based on numerical analysis method improves the quality of CNC machining. It also prevents losses and increases productivity. The interpolation calculation that ensures the smooth operation of the cutting tools extends the life of the machine and its components. In this article, we will share useful information about linear and circular interpolation in CNC machines.

    What is Interpolation?

    First of all, let’s talk a little bit about interpolation. To put it briefly, interpolation is a method of estimating the possible values between points of unknown value based on the available information. Interpolation, a branch of applied mathematics, is basically a prediction method. However, this prediction gives near-perfect results thanks to a special set of algorithms. There are two main types of interpolation. One of them is linear, the other is circular interpolation. There are also different types such as polynomial, trigonometric and spline interpolation. Interpolation methods differ according to the distance between two points, the plane in which the points are located and other variables. In this context, linear and circular interpolation in CNC machines are two basic methods. In this article, we will discuss these two with their basic features.

    What is CNC Interpolation?

    In the process of machining on CNC machines, it is necessary to calculate the position of the cutting tool according to several intermediate points at different times. This process is called CNC interpolation. The necessary parameters for the contour line are loaded in the processing program. The most important among them are the starting and ending points. But these are not enough to better grasp the profile of the workpiece. That is why it is necessary to determine the intermediate positions. Linear and circular interpolation methods in CNC machines allow to determine these intermediate positions. Thus, the position of the cutting tools relative to the workpiece is clearly revealed. In other words, when making position adjustments on CNC lathes and milling machines, determining the coordinates of the cutter in different situations according to the workpiece is called CNC interpolation. Thanks to this process, many errors in part machining are prevented.

    In CNC machining parts it is necessary to take into account different lines. In accordance with this difference, the interpolation calculations differ. The interpolation method, depending on the feed speed, clarifies the position of the cutter. The stroke line shape thus takes on the appropriate shape. When the interpolation calculation is done correctly, the productivity of CNC lathe and machining centers increases. Interpolation algorithms developed to facilitate calculations perfectly determine the intermediate positions for different lines. In these calculations, the F value indicates the given feed speed. Fc is the actual synthetic feed rate. In a sense, linear and circular interpolation calculation in CNC machines is the conversion of the F value to the value Fc. However, even the slightest error in the algorithm leads to a deviation from the Fc value it should be.

    What is the Stability Index?

    Those who wonder what CNC interpolation is especially curious about the stability index. Briefly, the stability index indicates the stability of the interpolation algorithm. It is therefore an important variable in the evaluation index. As it is known, algorithm calculations are repetitive operations. And every calculation, no matter how flawless, involves a certain rounding. As the number of repetitions increases, the amount of rounding naturally increases. In addition, calculation errors cause deviations in the algorithm. In this context, the stability index refers to the fact that rounding and calculation errors do not accumulate in CNC machining. The more stable the algorithm, the higher the quality of CNC machining.

    Since the interpolation algorithm is a repetitive calculation, it requires regular tracking of rounding and calculation errors. In each calculation, some rounding inevitably occurs. Approximate calculations are very prone to errors and deviations in this respect. If the operator makes a mistake while rounding, the result is even more inaccurate. This is why it is important to observe the stability index in linear and circular interpolation calculations in CNC machines. The probability of deviation is especially high in nonlinear interpolations. The orbital error should not actually be more than the minimum motion command of the system. It should also not exceed the impact equivalent. When these are not taken into consideration, slippage at the contour points can reach serious dimensions.

    Those who wonder how CNC interpolation is done also wonder about the relationship of stability index with speed and axes in CNC machining. To put it briefly, if the synthesis rate is homogeneous in interpolation, the output amount of each axis is constant. This is called the uniformity index of the synthesis rate. In this context, it is also necessary to take into account

    CNC axes and cutting tools. As a matter of fact, in order to avoid deviation in axis movements, it is necessary to use large cutting tools at a close distance in large parts. The most important reason for this is that in large teams the shaft enclosure is large. Thus, the need for long and thin tools is reduced and the possibility of error is reduced. When you take into account speed and axes and cutting tools for linear and circular interpolation on CNC machines, machining stability is optimized.

    Linear Interpolation on CNC Machines

    Linear interpolation, also known as linear interpolation, performs the cutting motion in a linear plane. This cut shape is available both in CNC lathes and in machining centers. Linear interpolation, also known as straight cutting, occurs with G-codes, as in other processes. As a matter of fact, the G01 code is the linear interpolation code. In fact, this is one of the most common codes to use among G codes. Machining on CNC lathes and milling cutters does not always take place in cycles. Processing also takes place with a point coordinate system. CNC machines therefore require linear and circular interpolation. In this context, linear cutting movement is one of the most common movements in part processing. The C and R parameters, which are used with the G01 code, perform chamfer and radius operations.

    G01 Code in Linear Interpolation

    You may want to do point machining instead of producing cycles for toolpaths on your CNC machine. In this case, the code you need to use for linear interpolation is G01. Enter this code and your lathe or machining center will cut straight without producing cycles. G00 or another code continues until you enter it. If you enter the G00 code, the cutting tool will start working fast at idle without removing chips. This is a common situation for linear and circular interpolation in CNC machines. If you want to perform curvilinear motion on the part, you must type the codes G02 or G03 on the command screen.

    Among the G-codes, the G01 code puts the cutting tool in contact with the workpiece by removing chips in the linear plane. However, it is also necessary to enter the F (Feedrate) parameter for progress to take place. At this point, linear interpolation should not confused with fast positioning. As a matter of fact, fast tool movement moves between two positions on the work area without cutting. However, in linear interpolation, with the F value, contour or pocket formation, milling operations, etc. operations take place on the surface. In CNC machines, the F value has an important property in the context of linear and circular interpolation. If you do not enter this value, the cutting tool is based on the F-value that was last used in the system. The progress rate on the G01 command is relative to the current F value until you enter a new F-value.

    G90 and G91 Codes in Linear Interpolation

    The G90 and G91 codes, which used in CNC milling with the G01 code, ensure that the movement is absolute or incremental. Of these codes, the G90 code is absolute (absolute) programming code. In CNC lathes, the G90 provides a single pass turning cycle with tapered or straight bill on the outer diameter or work diameter. In absolute programming for motion, it is necessary to enter X and Z values. G91 code is incremental programming code. However, this code is only valid in CNC machining centers. Instead of using G91 on lathes, it is necessary to change the axis names on the command line. Then, when you select the motion type, linear interpolation progresses in increments. However, it is necessary to use U and W values in programming. In machining centers, G01 may be preceded by G90 or G91.

    CNC Lathe G01 Format:

    • G01 X… Z … F … (Absolute System)
    • G01 U… W … F … (Incremental System)

    G01 Format in CNC Machining Center:

    • G90 G01 X… Y … Z … F … (Absolute System)
    • G91 G01 X… Y … Z … F … (Incremental System)

    Chamfer and Radius Machining in Linear Interpolation

    Interpolation in CNC machines is also an important issue in chamfer and radius machining. As a matter of fact, those who wonder how to interpolate in CNC are also curious about chamfer and radius processing. To put it briefly, the C and R parameters, which used on the same lines, perform chamfering and radius. Of these, C refers to the amount of chamfer cuts. R is the measure of radius. When you enter lines N before G01 on the command line, chamfering occurs at the intersection. When you enter the R value instead of the C value, radius cutting occurs. For example

    • N8 G01 X… Y … C … ; N9 G01 X … Y … cuts chamfers by C at the intersection of N8 and N9. 
    • N8 G01 X… Y … R … ; N9 G01 X … Y … cuts as many radius as R at the intersection.

    Circular Interpolation in CNC Machines

    In this part of our article on linear and circular interpolation in CNC machines, we will briefly talk about circular interpolation. As a matter of fact, interpolation in CNC machining is not only linear. It is also possible to perform circular interpolation using the commands G02 and G03. These codes apply to both lathes and machining centers. However, the G90 and G91 commands are only used in CNC machining centers. Moreover, circular interpolation codes work smoothly on two-axis machines. In CNC machining centers with three or more axes, it is necessary to make axis selection for circular interpolation. This selection takes place with the codes G17, G18 and G19.

    G02 and G03 Codes in Circular Interpolation

    Both codes perform circular interpolation on CNC machines. The only difference between them is their direction. As a matter of fact, the G02 code works clockwise (CW). The G03 code provides reverse direction (CCW) movement. It is possible to use these codes for radius or arc cuts as well as circular cutting. These codes maintain circular interpolation until the G00 or G01 command arrives. To switch from circular interpolation to linear interpolation, you need to enter the command G01. A common feature for linear and circular interpolation in CNC machines is the F value. If you do not enter a new F-value before you start the process, the system will work with the current F-value

    G90 and G91 Codes in Circular Interpolation

    When the codes G02 and G03 are used in CNC mills together with the codes G90 or G91, the movement proceeds absolutely or incrementally. As with linear interpolation, the G90 code provides absolute progress and the G91 code provides incremental progress. However, since these codes cannot used in lathes, it is necessary to change the axis names inline.

    CNC Lathe G02 Format:

    • G02 X… Z … F … (Absolute System)• G02 U… W … F … (Incremental System)

    Format G02 and G03 in CNC Machining Center:

    • G90 G02 X… Y … Z … F … (Clockwise Absolute System)
    • G91 G02 X… Y … Z … F … (Clockwise Incremental System)
    • G90 G03 X… Y … Z … F … (Counterclockwise Absolute System)
    • G91 G03 X… Y … Z … F … (Counterclockwise Incremental System)

    Plane Selection and Auxiliary Parameters in Circular Interpolation

    The codes G02 and G03 basically perform circular interpolation on two axes. Therefore, you do not need to make plane selection during the use of a two-axis CNC machine. If your machine has a larger number of axes, then you need to select a plane. Three G-codes are available to make this selection. These codes and their tasks are as follows:

    • G17: Selects X-Y planes.
    • G18: X-Z makes plane selection. 
    • G19: Makes Y-Z plane selection.

    When you use circular interpolation with the R parameter, radius processing occurs. In this case, you directly determine the amount of R. However, the R parameter is insufficient to determine the center of the radius. Auxiliary parameters are also important in the context of linear and circular interpolation in CNC machines. Today, in many of the CNC machining centers, it is possible to use auxiliary parameters to determine the radius center. These parameters are represented by the expressions I, J, and K. Their meaning is as follows:

    • I: Shows the distance from the starting point of the broadcast to the center on the x-axis. 
    • J: Shows the distance from the starting point of the broadcast to the center on the Y axis.
    • K: Shows the distance from the starting point of the broadcast to the center on the Z axis.

    What Should I Pay Attention to During Interpolation in CNC Machines?

    • For linear and circular interpolation on CNC machines, first of all, it is necessary to enter the correct values. G01, G02 and G03 codes and G90 and G91 codes are the most important codes in this context. How you should use these codes depends on the type of machine you have and the nature of the operation you want to do.
    •  When using G-codes for linear and circular interpolation in CNC, it is important to remember the F parameter. As a matter of fact, unless you enter a new F value, the system will work with the current F value. 
    • You should not make even the slightest calculation error when converting F to Fc for interpolation. Otherwise, unfortunately, a deviation in the interpolation algorithm occurs. Optimizing the stability index reduces your risk of errors. 
    • Deviations in Fc cause F to fluctuate after a while. These upward or downward waves sometimes reach serious levels. This leads to a loss of quality and efficiency in CNC machining. It also shortens the life of the machine.
    •  If your machine makes too much noise while working, it may be due to linear and circular interpolation calculation error on CNC machines. In such cases, the life of the cutting machine tool is shortened. If the Fc value is correct, the CNC machine continues machining smoothly and quietly.