Interpolation
Interpolation
Turn Points
They are the points that defines the edges of the contour of the part. At each point
the slope, direction and hence the equation of next feature changes.
In the figure, the turn points are: points a, b, c, d, e & f
70
40 20
e d
80
f
c
80 30
b
a 80 50
Choosing the Part ZERO to be “a”, then the coordinates of the turn points are:
Point X Y
a 0 0
b 80 0
c 130 30
d 110 130
e 40 130
f 0 80
Corresponding Points
They are the points where the center of the cutter should be when the turn point
will be machined. The contour joining the corresponding points is the cutter path
which should be programmed in the part program.
the coordinates of the corresponding points depends on the cutter radius. Assume
the radius is 10 mm, then:
Point X Y
a1 - 10 - 10
b1 80 + 10 * tan(74.531) - 10
c1
c1
d1
e1
e2
f1
f2
b g
a g
c
h c1
h
b1
Angle
a abc = 149.062 deg Angle bcd = 106.9 deg cc1 = 10/sin(53.45)
x1
c
y1
c1
Interpolation
1. Digital interpolation
a) Linear Interpolator (G01)
CNC machine is constrained to move along axial directions (i.e. x, y, z, ..) only
in increments no smaller than the distance corresponding to a single pulse,
then any line that will be programmed will be approximated by the
machine to a series of small steps.
B (90,115)
Fy
Fx
A (10,15)
X
Then, the controller will command the X-drive to move with a rate of (Fx) and the
Y-drive to move with a rate of (Fy), where:
Fx = F * cos(Ө) and Fy = F * sin(Ө) and Ө = tan-1[(YB – YA) / (XB – XA)]
V*x
V*max V*c
Pulse generator VPRC VPC
V*y
Fy
F
B
P
Fx
R JP A
O IP
2. Software Interpolation
In this method the intermediate points are calculated from the equation of the
function (Linear or circular). In linear case suppose that x 1,y1 and x2,y2 are the start
and end points of the travel and the interpolation will be carried out for n
intermediate points, then:
i
( x 2 − x1)
xi = x1 +
n =1 n
i
( y 2 − y1)
yi = y1 +
n =1 n
Y
X2,y2
X1,y1
In case of arc interpolation, three methods are in use by the different controller, i.e.
equations based on:
Y Y B Y
B B
A A
A
X X
X
Assuming the arc is going from point A (x 1,y1) to point B (x 2,y2) and the center of the
arc is O (xc,yc) , and the interpolation is based on the chord method, then:-
I = X s- Xc
J = Y s- Yc
Өs (start point angle) = tan -1(Ys / Xs)
Өe (end point angle) = tan -1(Ye / Xe)
Өarc (arc angle) = Өe – Өs
R ( arc radius) = sqrt(X s2 + Ys2)
S is the resolution
Өstep = (incremental angle) = 2 * cos-1((R-S) / R)
N (number of steps) = Өarc / Өstep
LOOP from i = 0 to N
Xi = R * cos(Ө s + i * Өstep)
Yi = R * sin(Ө s + i * Өstep)
END LOOP
I = X s- Xc
J = Y s- Yc
Өs (start point angle) = tan -1(Ys / Xs)
Өe (end point angle) = tan -1(Ye / Xe)
Өarc (arc angle) = Өe – Өs
R ( arc radius) = sqrt(X s2 + Ys2)
S is the resolution
Өstep = (incremental angle) = 2 * cos -1(R / (R + S))
N (number of steps) = Өarc / Өstep
LOOP from i = 0 to N
Xi = (R+S) * cos(Ө s + i * Өstep)
Yi = (R+S) * sin(Ө s + i * Өstep)
END LOOP
Assuming the arc is going from point A (x 1,y1) to point B (x 2,y2) and the center of the
arc is O (xc,yc) , and the interpolation is based on the secant method, then:-
I = X s- Xc
J = Y s- Yc
Өs (start point angle) = tan -1(Ys / Xs)
Өe (end point angle) = tan -1(Ye / Xe)
Өarc (arc angle) = Өe – Өs
R ( arc radius) = sqrt(X s2 + Ys2)
S is the resolution
Өstep = (incremental angle) = 2 * cos -1((R-S/2) / (R+S/2))
N (number of steps) = Өarc / Өstep
LOOP from i = 0 to N
Xi = (R+S/2) * cos(Ө s + i * Өstep)
Yi = (R+S/2) * sin(Ө s + i * Өstep)
END LOOP