Quick reference
Moves the tool at max speed to the coordinate. Positioning only — never use it to cut.
G00 X__ Z__
G00 X50. Z2. (approach the part)
Straight-line move at feed rate F. The most common straight-cut mode.
G01 X__ Z__ F__
G01 Z-30. F0.2 (turn 30 mm in Z)
Arc clockwise. Use I/K (offset from start to arc center) or R (radius).
G02 X__ Z__ I__ K__ F__ or G02 X__ Z__ R__ F__
G02 X40. Z-10. R5. F0.15
Same as G02 but counter-clockwise.
G03 X__ Z__ R__ F__
G03 X30. Z-15. R8. F0.15
Pauses for the time given in X (seconds) or P (milliseconds). Useful at groove bottoms.
G04 X__ or G04 P__
G04 X0.5 (half a second)
Selects the XY plane for circular interpolation. Default on milling machines.
G17
Selects the ZX plane. Default on lathes.
G18
Selects the YZ plane. Used on 4/5-axis mills.
G19
Sets units to inches.
G20
Sets units to millimeters.
G21
Checks that the current coordinates match the reference point. Lights the zero lamp.
G27 X__ Z__
Returns the commanded axes to the reference point through an intermediate point.
G28 X__ Z__
G28 U0 W0 (incremental direct return)
Moves from the reference point to the intermediate point and then to the destination.
G29 X__ Z__
Moves to a secondary reference point set by parameter.
G30 P__ X__ Z__
Single-pass threading (straight or tapered). F sets the thread pitch.
G32 X__ Z__ F__
G32 Z-25. F1.5 (1.5 mm pitch thread)
Turns G41/G42 off. Program it before leaving the profile.
G40
Offsets the toolpath one tool radius to the left, viewed along the feed direction.
G41 D__ or G41 (lathe uses insert nose radius)
Same as G41 but to the right of the feed direction. Most common on external turning.
G42
Sets the maximum RPM while G96 (constant surface speed) is active.
G50 S__
G50 S3000
The machine adjusts RPM automatically with diameter to keep Vc (m/min) constant.
G96 S__
G50 S3000 G96 S200
S directly sets spindle speed in RPM. Required for threading.
G97 S__
G97 S1200
Activates work coordinate system 1. Goes up to G59.
G54
Re-runs the profile defined between P (start line) and Q (end line) in a single fine pass.
G70 P__ Q__
G70 P100 Q200
Removes material parallel to Z in automatic passes. U depth per pass, R retract, U/W finishing stock.
G71 U__ R__ ; G71 P__ Q__ U__ W__ F__
G71 U2. R1. G71 P100 Q200 U0.4 W0.1 F0.25
Same as G71 but passes parallel to X (stepped facing).
G72 W__ R__ ; G72 P__ Q__ U__ W__ F__
Ideal for forged/cast parts: repeats the P–Q profile shifting it in X and Z until the final size.
G73 U__ W__ R__ ; G73 P__ Q__ U__ W__ F__
Axial peck drilling on the lathe: drills, retracts to break the chip, and continues.
G74 R__ ; G74 Z__ Q__ F__
Cuts radial grooves in X with automatic retract to break chips.
G75 R__ ; G75 X__ Z__ P__ Q__ F__
Threads in several passes computing decreasing depth and insert angle.
G76 P(mmrra) Q__ R__ ; G76 X__ Z__ P__ Q__ F__
G76 P020060 Q100 R0.02 G76 X28.16 Z-24. P920 Q200 F1.5
Turns off any active G81–G89 cycle.
G80
Feeds down to Z, retracts in rapid. No chip breaking.
G81 X__ Y__ Z__ R__ F__
Deep drilling with programmed retracts to break the chip.
G83 X__ Y__ Z__ Q__ R__ F__
Tapping cycle (rigid or floating).
G84 X__ Y__ Z__ R__ F__
In canned cycles, returns the tool to the initial Z plane.
G98
In canned cycles, returns only to the R plane.
G99
Coordinates measured from the work zero.
G90
Coordinates relative to the current position.
G91
F in mm/min. Default on mills.
G94
F in mm/rev. Default on lathes.
G95