Chapter 5 Program
Chapter 5 Program
Program Machine
Instructions Control Unit
Transformation
Process
Power
MANUAL PART PROGRAMMING
• Two types of programming modes, the incremental
system and the absolute system, are used for CNC.
P0 N… …
P0 P1 N… G01 X40. Z-25. F…
P1 P2 N… G01 X60. Z-40. F…
P2 N… …
Point to point positioning
• Point to point positioning is used when it is necessary to
accurately locate the spindle, or the work piece mounted
on the machine table, at one or more specific locations to
perform such operations as drilling, reaming, boring,
tapping and punching.
Continuous path (contouring):
• Contouring or continuous path machining, involves work
such as that produced on a lathe or milling machine
where the cutting tool is in contact with the work piece as
It travels from one programmed point to the next.
• Continuous path positioning is the ability to control
motion on two or more machine axis simultaneously to
keep a constant cutter work piece relationship.
Interpolation
• The method by which contouring machine tools move
from one programmed point to the next is called
interpolation.
• There are five methods of interpolation: linear, circular,
helical, parabolic, and cubic.
• All contouring controls provide linear interpolation, and
most controls are capable of both linear and circular
interpolation.
• Helical, parabolic, and cubic interpolation are used by
industries that manufacture parts which have complex
shapes, such as aerospace parts and dies for car
bodies.
Linear interpolation
• Consists of any programmed points linked together by
straight lines, whether the points are close together or far
apart.
• Curves can be produced with linear interpolation by
breaking them in to short, straight line segment.
Circular interpolation
• The development of MCU capable of circular
interpolation has greatly simplified the process of
programming arcs and circles.
• To program an arc the MCU require the coordinate
position of the circle center, the radius of the circle, the
start point and end point of the arc being cut and the
direction in which the arc is to be cut
G01, Linear Interpolation
G90:
N030 G00 X39 Z2
N040 G01 X39 Z0
N050 G90
N060 G01 X48 Z-37
G91:
N030 G00 X39 Z2
N040 G01 X39 Z0
N050 G91
N060 G01 X4.5 Z-37
Reference Points
5”
2.5”
p4
p2 p3 p5
1”
(4, 4)
p1
Motion of tool:
p0 p1 p2 p3 p4 p5 p1 p0
p0 (2, 2)
1. Set up the programming parameters
5”
2.5”
p4
p2 p3 p5
1”
Programming in inches
5”
Use absolute coordinates
Feed in ipm
45°
N010 G70 G90 G94 G97 M04
(4, 4)
p1
Spindle speed in rpm
p0 (2, 2)
Spindle CCW
2. Set up the machining conditions
5”
2.5”
p4
p2 p3 p5
1”
Spindle speed
45°
5”
2.5”
p4
p2 p3 p5
Linear interpolation
1”
target coordinates
45°
(4, 4)
p1
p0 (2, 2)
4. Cut profile from p1 to p2
5”
2.5”
p4
p2 p3 p5
1”
Linear interpolation
5” target coordinates
p0 (2, 2)
5”
2.5”
p2 p3
p4
p5 Linear interpolation
target coordinates
1”
5”
y = 9 + 0.125 = 9.125
(6.5 - x)2 + 0.1252 = (1 - 0.125)2
x = 5.634
45° p3
(x, y)
(4, 4)
p1 (6.5, 9)
.125
p0 (2, 2)
1”
6. Cut along circle from p3 to p4
5”
2.5”
p4
p2 p3 p5
1”
5”
target coordinates
p0 (2, 2)
7. Cut from p4 to p5
5”
2.5”
p4
p2 p3 p5
1”
5”
Linear interpolation
p0 (2, 2)
8. Cut from p5 to p1
5”
2.5”
p4
p2 p3 p5
1”
5”
Linear interpolation
p0 (2, 2)
9. Return to home position, stop program
5”
2.5”
p4
p2 p3 p5
1”
Linear interpolation
45°
end of data
(4, 4)
N100 M00
p1