Version 1.0, August 31, 2001, Copyright, Hugh Jack 1993-2001

5.5 G-CODES

 

· A basic list of `G' operation codes is given below. These direct motion of the tool.

  1. G00 - Rapid move (not cutting)
  2. G01 - Linear move
  3. G02 - Clockwise circular motion
  4. G03 - Counterclockwise circular motion
  5. G04 - Dwell
  6. G05 - Pause (for operator intervention)
  7. G08 - Acceleration
  8. G09 - Deceleration
  9. G17 - x-y plane for circular interpolation
  10. G18 - z-x plane for circular interpolation
  11. G19 - y-z plane for circular interpolation
  12. G20 - turning cycle or inch data specification
  13. G21 - thread cutting cycle or metric data specification
  14. G24 - face turning cycle
  15. G25 - wait for input #1 to go low (Prolight Mill)
  16. G26 - wait for input #1 to go high (Prolight Mill)
  17. G28 - return to reference point
  18. G29 - return from reference point
  19. G31 - Stop on input (INROB1 is high) (Prolight Mill)
  20. G33-35 - thread cutting functions (Emco Lathe)
  21. G35 - wait for input #2 to go low (Prolight Mill)
  22. G36 - wait for input #2 to go high (Prolight Mill)
  23. G40 - cutter compensation cancel
  24. G41 - cutter compensation to the left
  25. G42 - cutter compensation to the right
  26. G43 - tool length compensation, positive
  27. G44 - tool length compensation, negative
  28. G50 - Preset position
  29. G70 - set inch based units or finishing cycle
  30. G71 - set metric units or stock removal
  31. G72 - indicate finishing cycle (EMCO Lathe)
  32. G72 - 3D circular interpolation clockwise (Prolight Mill)
  33. G73 - turning cycle contour (EMCO Lathe)
  34. G73 - 3D circular interpolation counter clockwise (Prolight Mill)
  35. G74 - facing cycle contour (Emco Lathe)
  36. G74.1 - disable 360 deg arcs (Prolight Mill)
  37. G75 - pattern repeating (Emco Lathe)
  38. G75.1 - enable 360 degree arcs (Prolight Mill)
  39. G76 - deep hole drilling, cut cycle in z-axis
  40. G77 - cut-in cycle in x-axis
  41. G78 - multiple threading cycle
  42. G80 - fixed cycle cancel
  43. G81-89 - fixed cycles specified by machine tool manufacturers
  44. G81 - drilling cycle (Prolight Mill)
  45. G82 - straight drilling cycle with dwell (Prolight Mill)
  46. G83 - drilling cycle (EMCO Lathe)
  47. G83 - peck drilling cycle (Prolight Mill)
  48. G84 - taping cycle (EMCO Lathe)
  49. G85 - reaming cycle (EMCO Lathe)
  50. G85 - boring cycle (Prolight mill)
  51. G86 - boring with spindle off and dwell cycle (Prolight Mill)
  52. G89 - boring cycle with dwell (Prolight Mill)
  53. G90 - absolute dimension program
  54. G91 - incremental dimensions
  55. G92 - Spindle speed limit
  56. G93 - Coordinate system setting
  57. G94 - Feed rate in ipm (EMCO Lathe)
  58. G95 - Feed rate in ipr (EMCO Lathe)
  59. G96 - Surface cutting speed (EMCO Lathe)
  60. G97 - Rotational speed rpm (EMCO Lathe)
  61. G98 - withdraw the tool to the starting point or feed per minute
  62. G99 - withdraw the tool to a safe plane or feed per revolution
  63. G101 - Spline interpolation (Prolight Mill)

 

· M-Codes control machine functions and these include,

  1. M00 - program stop
  2. M01 - optional stop using stop button
  3. M02 - end of program
  4. M03 - spindle on CW
  5. M04 - spindle on CCW
  6. M05 - spindle off
  7. M06 - tool change
  8. M07 - flood with coolant
  9. M08 - mist with coolant
  10. M08 - turn on accessory #1 (120VAC outlet) (Prolight Mill)
  11. M09 - coolant off
  12. M09 - turn off accessory #1 (120VAC outlet) (Prolight Mill)
  13. M10 - turn on accessory #2 (120VAC outlet) (Prolight Mill)
  14. M11 - turn off accessory #2 (120VAC outlet) (Prolight Mill) or tool change
  15. M17 - subroutine end
  16. M20 - tailstock back (EMCO Lathe)
  17. M20 - Chain to next program (Prolight Mill)
  18. M21 - tailstock forward (EMCO Lathe)
  19. M22 - Write current position to data file (Prolight Mill)
  20. M25 - open chuck (EMCO Lathe)
  21. M25 - set output #1 off (Prolight Mill)
  22. M26 - close chuck (EMCO Lathe)
  23. M26 - set output #1 on (Prolight Mill)
  24. M30 - end of tape (rewind)
  25. M35 - set output #2 off (Prolight Mill)
  26. M36 - set output #2 on (Prolight Mill)
  27. M38 - put stepper motors on low power standby (Prolight Mill)
  28. M47 - restart a program continuously, or a fixed number of times (Prolight Mill)
  29. M71 - puff blowing on (EMCO Lathe)
  30. M72 - puff blowing off (EMCO Lathe)
  31. M96 - compensate for rounded external curves
  32. M97 - compensate for sharp external curves
  33. M98 - subprogram call
  34. M99 - return from subprogram, jump instruction
  35. M101 - move x-axis home (Prolight Mill)
  36. M102 - move y-axis home (Prolight Mill)
  37. M103 - move z-axis home (Prolight Mill)

 

· Other codes and keywords include,

  1. Annn - an orientation, or second x-axis spline control point
  2. Bnnn - an orientation, or second y-axis spline control point
  3. Cnnn - an orientation, or second z-axis spline control point, or chamfer
  4. Fnnn - a feed value (in ipm or m/s, not ipr), or thread pitch
  5. Innn - x-axis center for circular interpolation, or first x-axis spline control point
  6. Jnnn - y-axis center for circular interpolation, or first y-axis spline control point
  7. Knnn - z-axis center for circular interpolation, or first z-axis spline control point
  8. Lnnn - arc angle, loop counter and program cycle counter
  9. Nnnn - a sequence/line number
  10. Onnn - subprogram block number
  11. Pnnn - subprogram reference number
  12. Rnnn - a clearance plane for tool movement, or arc radius, or taper value
  13. Qnnn - peck depth for pecking cycle
  14. Snnn - cutting speed (rpm), spindle speed
  15. Tnnn - a tool number
  16. Unnn - relative motion in x
  17. Vnnn - relative motion in y
  18. Wnnn - relative motion in z
  19. Xnnn - an x-axis value
  20. Ynnn - a y-axis value
  21. Znnn - a z-axis value
  22. ; - starts a comment (proLight Mill), or end of block (EMCO Lathe)