{"id":"gcode-g33","model_id":"G33","name":"LinuxCNC G33","summary":"G33 is a LinuxCNC G-code that commands spindle-synchronized motion along one direction, where the K word gives the distance moved in XYZ per revolution of the spindle. Motion waits for the spindle index and spindle-at-speed signals so that repeated passes line up, and it ends at the programmed endpoint. It is used for threading, tapered threads and similar operations where the tool must track spindle rotation.","study_notes":["K is the distance moved in XYZ for each revolution of the spindle; for example G33 Z-1 K.0625 produces a 1 inch motion in Z over 16 spindle revolutions (a 16 TPI thread).","Metric example: G33 Z-15 K1.5 produces 15 mm of movement while the spindle rotates 10 times, for a thread of 1.5 mm.","The optional $ argument selects which spindle the motion is synchronized to; the default is zero (G33 Z10 K1 $1 synchronizes to spindle.1.revs).","K follows the drive line described by the X Y Z endpoints, so K is not parallel to the Z axis when X or Y endpoints are used, such as when cutting tapered threads.","At the start of each pass LinuxCNC uses spindle speed and machine acceleration limits to compute the spindle rotation during Z acceleration and corrects the Z position accordingly, so Z reaches the correct position as it finishes accelerating.","HAL requirements: spindle.N.at-speed must be set or driven true for motion to start, spindle.N.revs must increase by 1 per spindle revolution, and spindle.N.index-enable must be connected to an encoder or resolver counter that resets it once per revolution.","All axis words are optional except that at least one must be used.","The section references G90, G0 and M2 in its example program."],"safety_notes":["It is an error if all axis words are omitted.","It is an error if the spindle is not turning when this command is executed.","It is an error if the requested linear motion exceeds machine velocity limits due to the spindle speed."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g33","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":13,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G33","syntax":"G33 X- Y- Z- K- $-","parameters":[{"name":"K","description":"Distance per revolution of the spindle"},{"name":"X","description":"Axis word endpoint (optional, at least one axis word required)"},{"name":"Y","description":"Axis word endpoint (optional, at least one axis word required)"},{"name":"Z","description":"Axis word endpoint (optional, at least one axis word required)"},{"name":"$","description":"Optional spindle selector; default is zero"}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g33","license":"https://creativecommons.org/licenses/by/4.0/"}