Plane Selection
G17 - XY Plane Selection
The vast majority of movement in CNC programs will be relative to the XY plane. Plane selection affects how G02, G03, cutter compensation and some canned cycles are handled.
G18 - XZ Plane Selection
Plane selection affects how G02, G03, cutter compensation and some canned cycles are handled. G18 tells the machine you are machining radii around the Y axis.
G19 - YZ Plane Selection
Plane selection affects how G02, G03, cutter compensation and some canned cycles are handled. G19 tells the machine you are machining radii around the Z axis.
Unit Modes
G20 - Inch Mode
All size and location commands will be in inches until changed.
Learn more about the G20 code
G21 - Metric Mode
All size and location commands will be in millimeters until changed.
Learn more about the G21 code
Compensation Codes
G40 - Cancel Cutter Compensation
Turns off any cutter compensation modes (G41 or G42).
Learn more about the G40 code
G41- Cutter Compensation Left
Shifts the machine tool path to the left based on the radius of the cutting tool.
Learn more about the G41 code
G42 - Cutter Compensation Right
Shifts the machine tool path to the right based on the radius of the cutting tool.
Learn more about the G42 code
G43 - Tool Length Compensation
Adjusts a tool’s location based on a specified tool height (H) offset.
Learn more about the G43 code
G49 - Tool Length Compensation Cancel
Turns off the tool length compensation set by a G43 or G44 command.
Learn more about the G49 code
Work Offsets
G54 - Work Offset 1
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G54 code
G55 - Work Offset 2
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G55 code
G56 - Work Offset 3
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G56 code
G57 - Work Offset 4
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G57 code
G58 - Work Offset 5
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G58 code
G59 - Work Offset 6
Sets a specific location in the CNC as the zero location for the program.
Learn more about the G59 code
Canned Cycles
G73 - High-Speed Peck Drilling Canned Cycle
Peck drill a hole by repeatedly drilling, then retracting a small amount, then drilling deeper. Often used to break up chips when drilling.
Learn more about the G73 code
G74 - Left-Hand Tapping Canned Cycle
A tapping cycle for left-hand or reverse threads. The spindle must be running in reverse during this cycle. The machine will feed to the bottom of the hole and then reverse the spindle direction and back out of the hole.
Learn more about the G74 code
G76 - Fine Boring Canned Cycle
Bores a hole then stops the spindle, retracts the tool from the surface and rapid retracts the tool out of the hole.
G81 - Standard Drilling Cycle
Drills a hole then rapid retracts out of the hole.
Learn more about the G81 code
G82 - Standard Drill with Dwell
Drills a hole, dwells at the bottom of the hole for a set amount of time and then rapid retracts out of the hole.
Learn more about the G82 code
G83 - Deep Hole Peck Drilling Cycle
The machine will drill in pecks while rapid retracting out of the hole between each peck to help clear chips from the drill.
Learn more about the G83 code
G84 - Right-Hand Tapping Cycle
The standard tapping cycle with the spindle running clockwise. The CNC will feed to the bottom of the hole and then reverse the spindle direction and back out of the hole.
Learn more about the G84 code
G85 - Reaming Cycle
The machine will feed to the bottom of the hole and then rapid retract out.
Learn more about the G85 code
G86 - Boring Cycle
The machine will feed to the bottom of the hole and then rapid retract out. The tool is not pulled away from the surface which can leave a tool mark on the hole.
Learn more about the G86 code
G87 - Back Boring Cycle
Bores a hole from bottom to top. This is the reverse direction of the G86 code.
G88 - Boring Cycle with Dwell
Bores a hole and then dwells at the bottom for a set amount of time.
G89 - Back Boring Cycle with Dwell
The machine will feed to the bottom of the hole, pause for a set amount of time and then rapid retract out. The tool is not pulled away from the surface which can leave a tool mark on the hole.
Cancel Codes
G50 - Cancel Scaling
Turns off scaling mode.
G80 - Canned Cycle Cancel
Cancels any active canned cycles for drilling, boring, tapping, etc.
Learn more about the G80 code
Positioning Modes
G90 - Absolute Mode
All movement locations are relative to a fixed zero such as the work offset (G54, G55, etc.) or machine home location.
Learn more about the G90 code
G91 - Incremental Mode
All movement locations are relative to the machine’s current position.
Learn more about the G91 code
Speeds and Feeds
G94 - Feed per Minute Mode
Sets the feed rate to units (inches/mm) per minute. The tool will move at a set rate.
G95 - Feed per Revolution Mode
Sets the feed rate to units (mm/inches) per revolution. The tool will move a set rate for every spindle rotation.
G96 - Constant Surface Speed
The spindle speed will vary to maintain the same surface speed of the material.
G97 - Constant Spindle Speed
The spindle will operate at a consistent RPM.
Plane Return
G98 - Return to Initial Plane
After a canned cycle the tool will retract to the start of the canned cycle.
Learn more about the G98 code
G99 - Return to Rapid Plane
After a canned cycle the tool will retract to a specified location. Can be useful for avoiding workholding fixtures.
Learn more about the G99 code