G-Codes and M-Codes of CNC Milling Machine

Preparatory and Miscellaneous Codes Preparatory and miscellaneous function code of milling m/c is of most importance for programming pur... thumbnail 1 summary
Preparatory and Miscellaneous Codes
Preparatory and miscellaneous function code of milling m/c is of most importance for programming purpose. A CNC milling operator must know the various preparatory function codes of CNC milling with the advancement of electronic digital system. Computer software development made CNC milling on great demand in production engineering. Preparatory function includes address, code, block, line and miscellaneous function codes includes control panel, MDI, manuals command, floating zero, feed hold, cycle start and single block and emergency stop.

List of G Codes
All the general comments about the G codes of CNC lathes/turning centres are valid for the G codes of CNC millers/machining centres also. The following list is only a representative list which contains codes available on most of the common milling machines. Sophisticated machines use some extra codes also for which respective machine manuals should be consulted. Codes such as G04 and G28 are non-modal and are effective only in the blocks where they are called.

Code
Description
GOO
Rapid traverse
G01
Linear interpolation
G02
Circular interpolation CW
G03
Circular interpolation CCW
G04
Dwell
G17
XY plane selection
G18
ZX plane selection
G19
YZ plane selection
G20
Inch data input
G21
mm data input
G28
Reference point return
G40
Cutter radius compensation cancel
G41
Cutter radius compensation left
G42
Cutter radius compensation right
G43
Tool length compensation +ve direction
G44
Tool length compensation -ve direction
G49
Tool length compensation cancel
G73
High speed peck drilling cycle
G74
Left hand tapping cycle
G76
Fine boring cycle
G80
Canned cycle cancel
G82
Continuous drilling cycle with dwell
G83
Peck drilling cycle
G84
Right hand tapping cycle
G85
Boring cycle with feed retraction
G86
Boring cycle with rapid retraction
G87
Back boring cycle
G89
Boring cycle with dwell and feed retral
G90
Absolute movement
G91
Incremental movement
G92
Set datum
G94
Feed per minute
G95
Feed per revolution
G98
Return to initial point in a canned cycle
G99
Return to R point in a canned cycle

List of M Codes
Most of these codes are different from the codes for lathes/turning centres. So, care must be exercised while writing program for different machines.
Code
Description
MOO
Program stop
MO2
End of program
MO3
Spindle forward (CW, as viewed from the top)
MO4
Spindle reverse (CCW, as viewed from the top)
MO5
Spindle stop
MO6
Auto tool change MO8 Coolant on
MO9
Coolant off
M10
Vice open
M11
Vice close
M13
Spindle forward and coolant ON
M14
Spindle reverse and coolant ON
M19
Spindle orientate
M20
ATC IN
M21
ATC back
M22
ATC down .
M23
ATC up
M24
ATC drawbar unclamp
M25
ATC drawbar clamp
M27
Reset carousel
M30
Program reset and rewind
M32
Carousel CCW (as viewed from the top)
M33
Carousel CW (as viewed from the top)
M38
Door open.
M39
Door close
M62
Auxiliary output-1ON
M63
Auxiliary output-2 ON
M64
Auxiliary output-l OFF
M65
Auxiliary output-2 OFF
M66
Wait for input-l
M67
Wait for input-2
M70
X-mirror on M71 Y-mirror on
M76
Wait for input-l to go low
M77
Wait for input-2 to go low
M80
X-mirror OFF
M8l
Y -mirror OFF
M98
Subprogram call
M99
Subprogram exit

No comments

Post a Comment