KEMBAR78
CNC Program | PDF | Metalworking | Tools
0% found this document useful (0 votes)
87 views4 pages

CNC Program

The document provides a CNC milling machine program example, detailing the specific G and M codes used for machining a contour. It includes a list of G-codes for directing tool motion and M-codes for controlling machine functions. The program demonstrates various operations such as linear and circular interpolations, spindle control, and rapid motions.

Uploaded by

Kishan Choudhuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views4 pages

CNC Program

The document provides a CNC milling machine program example, detailing the specific G and M codes used for machining a contour. It includes a list of G-codes for directing tool motion and M-codes for controlling machine functions. The program demonstrates various operations such as linear and circular interpolations, spindle control, and rapid motions.

Uploaded by

Kishan Choudhuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Illustrative Example Program

A contour illustrated in figure 29.3 is to be machined using a CNC milling machine. The
details of the codes and programs used are given below.

Example:

Figure 29.3 An illustrative example

O5678 Program number


N02 G21 Metric programming
N03 M03 S1000 Spindle start clockwise with 1000rpm
N04 G00 X0 Y0 Rapid motion towards (0,0)
N05 G00 Z-10.0 Rapid motion towards Z=-10 plane
N06 G01 X50.0 Linear interpolation
N07 G01 Y20.0 Linear interpolation
N08 G02 X25.0
Circular interpolation clockwise(cw)
Y45.0 R25.0
N09 G03 X-25.0
Circular interpolation counter clockwise(ccw)
Y45.0 R25.0
N10 G02 X-50.0
Circular interpolation clockwise(cw)
Y20.0 R25.0
N11 G01 Y0.0 Linear interpolation
N12 G01 X0.0 Linear interpolation
N13 G00 Z10.0 Rapid motion towards Z=10 plane
N14 M05 M09 Spindle stop and program end
Appendix-1

In this appendix we provide a list of G and M-codes for the reader to have an idea of the kind of
functionality that can be realized using these codes. These codes were originally designed to be
read from paper tapes and are designed to direct tool motion with simple commands.

A basic list of ‘G’ operation codes is given below. These direct motion of the tool.

G00 - Rapid move (not cutting)


G01 - Linear move
G02 - Clockwise circular motion
G03 - Counterclockwise circular motion
G04 - Dwell
G05 - Pause (for operator intervention)
G08 - Acceleration
G09 - Deceleration
G17 - x-y plane for circular interpolation
G18 - z-x plane for circular interpolation
G19 - y-z plane for circular interpolation
G20 - turning cycle or inch data specification
G21 - thread cutting cycle or metric data specification
G24 - face turning cycle
G25 - wait for input to go low
G26 - wait for input to go high
G28 - return to reference point
G29 - return from reference point
G31 - Stop on input
G33-35 - thread cutting functions
G35 - wait for input to go low
G36 - wait for input to go high
G40 - cutter compensation cancel
G41 - cutter compensation to the left
G42 - cutter compensation to the right
G43 - tool length compensation, positive
G44 - tool length compensation, negative
G50 - Preset position
G70 - set inch based units or finishing cycle
G71 - set metric units or stock removal
G72 - indicate finishing cycle
G72 - 3D circular interpolation clockwise
G73 - turning cycle contour
G73 - 3D circular interpolation counter clockwise
G74 - facing cycle contour
G74.1 - disable 360 deg arcs
G75 - pattern repeating
G75.1 - enable 360 degree arcs
G76 - deep hole drilling, cut cycle in z-axis
G77 - cut-in cycle in x-axis
G78 - multiple threading cycle
G80 - fixed cycle cancel
G81-89 - fixed cycles specified by machine tool manufacturers
G81 - drilling cycle
G82 - straight drilling cycle with dwell
G83 - drilling cycle
G83 - peck drilling cycle
G84 - taping cycle
G85 - reaming cycle
G85 - boring cycle
G86 - boring with spindle off and dwell cycle
G89 - boring cycle with dwell
G90 - absolute dimension program
G91 - incremental dimensions
G92 - Spindle speed limit
G93 - Coordinate system setting
G94 - Feed rate in ipm
G95 - Feed rate in ipr
G96 - Surface cutting speed
G97 - Rotational speed rpm
G98 - withdraw the tool to the starting point or feed per minute
G99 - withdraw the tool to a safe plane or feed per revolution
G101 - Spline interpolation

M-Codes control machine functions.

M00 - program stop


M01 - optional stop using stop button
M02 - end of program
M03 - spindle on CW
M04 - spindle on CCW
M05 - spindle off
M06 - tool change
M07 - flood with coolant
M08 - mist with coolant
M08 - turn on accessory (e.g. AC power outlet)
M09 - coolant off
M09 - turn off accessory
M10 - turn on accessory
M11 - turn off accessory or tool change
M17 - subroutine end
M20 - tailstock back
M20 - Chain to next program
M21 - tailstock forward
M22 - Write current position to data file
M25 - open chuck
M25 - set output #1 off
M26 - close chuck
M26 - set output #1 on
M30 - end of tape (rewind)
M35 - set output #2 off
M36 - set output #2 on
M38 - put stepper motors on low power standby
M47 - restart a program continuously, or a fixed number of times
M71 - puff blowing on
M72 - puff blowing off
M96 - compensate for rounded external curves
M97 - compensate for sharp external curves
M98 - subprogram call
M99 - return from subprogram, jump instruction
M101 - move x-axis home
M102 - move y-axis home
M103 - move z-axis home

You might also like