G-Code & M-Code Programming Flashcards
7 cards from real CNC practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 G-Code & M-Code Programming flashcards as text
What G-code activates the peck drilling canned cycle?
Answer: G83
G83 is the deep hole peck drilling cycle that retracts the drill fully to the R-plane between each peck to clear chips.
Which address letter is used to call a tool offset register when programming tool length compensation?
Answer: H
The H-word specifies which tool length offset register number is applied when G43 or G44 is active.
What is the function of M30 in a CNC program?
Answer: End program and return to start
M30 ends the program, rewinds to the beginning, and resets all modal states, readying the machine for the next run.
In a right-hand coordinate system on a vertical machining center, which direction is positive Z?
Answer: Away from the table (spindle retracting upward)
Positive Z moves the spindle away from the workpiece (upward on a VMC), following the right-hand rule.
What does the 'R' value represent in a G81 drilling canned cycle?
Answer: The retract plane height above the work surface
In canned cycles, R specifies the retract (reference) plane — the Z-height where the drill stops before the next hole.
Which G-code establishes a fixed cycle for tapping?
Answer: G84
G84 is the right-hand tapping canned cycle, which reverses the spindle at the bottom of the hole to retract the tap.
What is the effect of programming 'G00 Z0.1' before a drilling canned cycle?
Answer: Positions the tool at the Z rapid approach height above the part
A G00 Z move before a canned cycle rapid-positions the tool to the approach height (clearance plane) above the workpiece.