{"id":"gcode-g81","model_id":"G81","name":"LinuxCNC G81 Drilling Cycle","summary":"G81 is a canned drilling cycle in LinuxCNC G-code. It moves to the programmed position in the selected plane, feeds the tool along the perpendicular axis to the programmed depth, then rapids to the clear Z position. The L word repeats the cycle.","study_notes":["G81 is intended for drilling.","Preliminary motion: if the current Z position is below R, Z rapids to R; then a rapid move parallel to the XY plane goes to the programmed XY position, and Z rapids to R if not already there.","The cycle feeds Z to the Z position, then the Z axis rapids to clear Z.","The R number is always sticky; in the XY plane the Z number is sticky and is an error if missing when the same canned cycle was not already active.","L repeats the cycle; L=0 is not allowed and L is not sticky. Omitting L is equivalent to L=1.","In incremental distance mode, L>1 repeats at successive XY increments; R and Z do not change during the repeats.","In absolute distance mode, L>1 performs the same cycle in the same place several times.","Clear Z follows G98/G99: G98 returns to the prior Z if it is higher than R, otherwise to R; G99 returns to R.","G80 cancels canned cycle modal motion; programming another modal group 1 G-code also cancels the canned cycle."],"safety_notes":["Canned cycles error if rotary axis motion is used, inverse time feed is active, cutter compensation is active, or XYZ and UVW axis groups are mixed.","If the XY plane is active, it is an error if the R number is less than the Z number."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g81","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":20,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G81","group":"canned cycles","syntax":"G81 (X- Y- Z-) or (U- V- W-) R- L-","parameters":[{"name":"X","description":"X position in the selected plane."},{"name":"Y","description":"Y position in the selected plane."},{"name":"Z","description":"Z position for drilling depth in the XY plane."},{"name":"U","description":"U position when a UVW-family plane is selected."},{"name":"V","description":"V position when a UVW-family plane is selected."},{"name":"W","description":"W position when a UVW-family plane is selected."},{"name":"R","description":"Retract position along the axis perpendicular to the selected plane."},{"name":"L","data_type":"positive integer","description":"Number of repeats; L=0 is not allowed."}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g81","license":"https://creativecommons.org/licenses/by/4.0/"}