{"id":"gcode-g10-l2","model_id":"G10 L2","name":"LinuxCNC G10 L2","summary":"G10 L2 sets the origin of a numbered coordinate system in LinuxCNC by writing axis offsets measured from the machine origin established during homing. The P word selects the coordinate system (0 to 9) and the axis words give the new offset values, which replace existing offsets for the axes named; optional R sets rotation of the XY axes about Z. It only writes the offsets and does not switch the active coordinate system.","study_notes":["G10 L2 makes the origin of the selected coordinate system equal to the axis values given, referenced to the machine origin established during homing.","G10 L2 Pn does not change the active coordinate system; G54-G59.3 must be used to select the coordinate system specified by P.","Being in incremental distance mode (G91) has no effect on G10 L2.","A G52 local offset or G92 origin offset in effect before G10 L2 continues in effect afterwards; when R is programmed, any G52 or G92 is applied after the rotation.","The coordinate system set by G10 L2 may be active or inactive when the command runs; if it is active, the new coordinates take effect immediately.","When a rotation is in effect, jogging an axis moves only that axis in a positive or negative direction, not along the rotated axis.","Example: G10 L2 P1 X3.5 Y17.2 sets the origin of coordinate system 1 (selected by G54) to X=3.5 and Y=17.2, leaving the other coordinates unchanged.","Example: G10 L2 P1 X0 Y0 Z0 clears the X, Y and Z offsets of coordinate system 1, putting it at the machine origin."],"safety_notes":["It is an error if the P number does not evaluate to an integer in the range 0 to 9.","It is an error if an axis is programmed that is not defined in the configuration."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g10-l2","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":10,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G10 L2","group":"coordinate system","syntax":"G10 L2 P- <axes R->","parameters":[{"name":"P","data_type":"integer","description":"Coordinate system (0-9). P0 is the active system; P1-P9 correspond to G54-G59.3."},{"name":"axes","description":"Axis words (X Y Z A B C U V W) giving the offset of the origin from the machine origin. Axis words not used are not changed."},{"name":"R","description":"Optional rotation of the XY axis around the Z axis; direction is CCW as viewed from the positive end of the Z axis."}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g10-l2","license":"https://creativecommons.org/licenses/by/4.0/"}