You are on page 1of 21

AMRITSAR COLLEGE OF ENGINEERING & TECHNOLOGY

DEPARTMENT OF MECHANICAL ENGINEERING

UNIT – 8

CNC PROGRAMMING

Amandeep Singh Gabbi


Assistant Professor
CNC PROGRAMMING
STEPS IN PART PROGRAM PREPERATION
1. Prepare the process plan
2. Identify the machine tool.
3. Select the drive axis.
4. Choose tools.
5. Determine machine parameters like Feed rate, Depth of cut,
Spindle speed, etc.
6. Make job & tool set-up plans.
7. Decide the tool path.
8. Write the part program.
9. Test the program.
10. Document the program.
CNC PROGRAMMING
CNC PROGRAMMING
TYPICAL CNC PROGRAM
CNC PROGRAMMING
CNC CONTROLLER
CNC PROGRAMMING
CNC PART PROGRAM
 The coded instructions or commands listed in a logical sequence to
have a machine tool perform a specific tasks or a series of tasks in
order to produce a finished product in the minimum amount of time.
CNC PROGRAMMING
CNC PART PROGRAM
 A typical line for a program is given below.

N100 G91 X±5.0 Y±7.0 Z±10 U..V..W..I..J..K.. F100 S200 T01 M03 (EOB)
CNC PROGRAMMING

G–
Codes
CNC PROGRAMMING

M – Codes
CNC PROGRAMMING
G00 Rapid Traverse:
 When the tool being positioned at a point preparatory to a cutting motion, to save
time it is moved along a straight line at Rapid traverse, at a fixed traverse rate
which is pre-programmed into the machine's control system.
 Typical rapid traverse rates are 10 to 25 m /min., but can be as high as 80 m/min.
 Format: N_ G00 X__ Y__Z__
CNC PROGRAMMING
G01 Linear Interpolation (feed traverse)
 The tool moves along a straight line in one or two axis simultaneously at a
programmed linear speed, the feed rate.
 Format: N__ G01 X__ Y__Z__ F__
CNC PROGRAMMING
G02/03 Circular Interpolation
N__ G02/03 X__ Y__Z__ I__ J__K__ F__ using the arc center
OR
N__ G02/03 X__ Y__Z__ R__ F__ using the arc radius

G02 moves along a CW arc G03 moves along a CCW arc.


CNC PROGRAMMING
Arc Center
The arc center is specified by addresses I, J and K. I, J and K are the X, Y and Z
co-ordinates of the arc center with reference to the arc start point.

I = X coordinate of center ; - X coordinate of start point


J = Y coordinate of center ; - Y coordinate of start point
K = Z coordinate of center ; - Z coordinate of start point
I, J and K must be written with their signs.
CNC PROGRAMMING
Arc Radius
The radius is specified with address R.
CNC PROGRAMMING

G04 Dwell
 The execution of the next block is delayed by the specified time, specify dwell
for each rotation in feed per rotation mode.
 Dwell is use to stop feed for specified period of time.
 Format:G04X_; or G04F_;
X: Specified time(decimal point is permitted)
F: Specified time(decimal point is permitted)

Example: G04 X15, G04 F15


Here M/C will Dwell for 15 second. It can be used in Boring, making CAM profile,
at these point dwell is required.
CNC PROGRAMMING
G15/G16 Commands of polar coordinate
 The value can be inputted in the form of the polar coordinates (radius and angle )
 The angle is position when the first axis of the selected plane is anticlockwise,
and negative when it is clockwise.
G16;Start the command of polar coordinates (polar coordinates mode)
G15 ;Cancel the order of polar coordinate.

G90 ABSOLUTE POSITION COMMAND


 When using a G90 absolute position command, each dimension or move is
referenced from a fixed point, known as ABSOLUTE ZERO (part zero).
 Absolute zero is usually set at the corner edge of a part, or at the center of a
square or round part, or an existing bore.

G91 INCREMENTAL POSITION COMMAND


 This code is modal and changes the way axis motion commands are interpreted.
 G91 makes all subsequent commands incremental.
CNC PROGRAMMING
Cutter radius compensation (CRC)
G40 Tool nose radius compensation Cancel
G41 Tool nose radius compensation Left
G42 Tool nose radius compensation Right

Format: -
G41 X_ Y_D_;
G42 X_ Y_D_;
CNC PROGRAMMING
G98/G99 plane of return point
 When the tool gets to the bottom of the hole, it can return back to the plane of R
point and the initialized plane initialized by G98/G99.
 Generally speaking, G99 is used in the first drilling plane while G98 is used in the
last drilling, even though we use G99 to drill, the plane of the initialized position
would keep the same.
CNC PROGRAMMING
CANNED CYCLES
 Canned or fixed cycles are programming aids that simplify programming.
 Canned cycles combine many programming operations and are designed to
shorten the program length, minimize mathematical calculations, and use minimal
tool motions.
 Examples : drilling, peck drilling, tapping, boring, back spot facing.
G81 Drilling cycle
G82 Drilling cycle with dwell (Counter bore cycle)
G83 Peck drilling cycle / deep drill
G84 Right hand tapping cycle
G85 Boring / Reaming cycle
G86 Boring cycle
G87 Back boring cycle
G74 Left hand tapping cycle
G76 Fine boring cycle
CNC PROGRAMMING
G81 Drilling Cycle
G81 X_Y_Z_R_F_K_;
X_ Y_: Data of hole site
Z_: Depth of the bottom of hole(absolute coordinate)
R_: Starting point or raising point per time(absolute coordinate)
F_: Feeding rate of cutting
K_: Number of replication (if necessary)
CNC PROGRAMMING

Simple CNC programming


example

You might also like