A G-Code Test to Prove You Can Set Up a CNC Machine
Setup competence is provable with a short test: explain the safety block, set offsets correctly, and prove out a program. Here is the checklist shops trust.
518 posts · page 32 of 44.
Setup competence is provable with a short test: explain the safety block, set offsets correctly, and prove out a program. Here is the checklist shops trust.
Macro variables differ by lifespan: #100-series commons clear at power-off, #500-series survive it, and locals #1-#33 live only inside a call. Here is the map.
G-codes control how the machine moves and M-codes control machine actions like the spindle and coolant. Here is the real difference and how they work together.
G17 selects the XY plane, G18 the XZ plane, and G19 the YZ plane. Here is what plane selection controls, why arcs depend on it, and when to switch.
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.
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.
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.
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.
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.
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.
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.
GRBL has two different number-1 messages: error:1 is a malformed G-code word, ALARM:1 is a tripped hard limit with position lost. Here is how to fix each.