G-Code Sprint Back to site
G-code basics archive

All posts.

503 posts · page 31 of 42.

Code reference

G20 vs G21: Inch vs Metric in G-Code, Explained

G20 tells the control to read the program in inches and G21 in millimeters. Here is the difference, why the wrong one is dangerous, and how to keep them straight.

Lawrence Arya··4 min
Code reference

G28 Return to Home Position in G-Code, Explained

G28 sends the machine back to its reference (home) position, through an intermediate point you specify. Here is how it works and how to use it safely.

Lawrence Arya··4 min
Code reference

G41 vs G42: Cutter Compensation Left vs Right

G41 offsets the cutter to the left of the path and G42 to the right. Here is how cutter compensation works, the D register, and how to engage it without a crash.

Lawrence Arya··4 min
Code reference

G43 Tool Length Offset in G-Code, Explained

G43 applies a tool's stored length so its tip reaches the programmed Z, no matter how long the tool is. Here is how G43, the H register, and G49 work.

Lawrence Arya··5 min
Guides

G50 Max Spindle Speed on a Lathe (and the Crash)

On a lathe, G50 S sets the maximum spindle RPM. Leave it out with constant surface speed and the spindle can run away near the center. Here is why and the fix.

Lawrence Arya··4 min
Code reference

G54 Work Offsets Explained for CNC Beginners

G54 tells the machine where your part zero is. Here is what a work offset stores, how G54 to G59 differ, and how to set one without cutting in the wrong place.

Lawrence Arya··4 min
Code reference

G81 vs G83: Drilling Canned Cycles Explained

G81 is a simple drill cycle and G83 is a peck drill cycle for deep holes. Here is how canned cycles work, their R, Z, and Q words, and when to use each.

Lawrence Arya··5 min
Guides

How to Calculate Feed Rate for G01 (Beginner Guide)

The F value on a G01 line is feed rate, and you calculate it from spindle speed, feed per tooth, and the number of flutes. Here is the formula with a worked example.

Lawrence Arya··5 min