G10 L2: Set the Origin Offset

Last modified by writer on 2023/02/09 17:31

G10 L2 P- <axes R->  

  • P – coordinate system (0-9);
  • R – angle of rotation around the Z axis).

The G10 L2 command changes the offset of the specified coordinate system to a value specified by the axis parameters. The offset is counted from the machine zero set in the base search process. An offset replaces the current offset valid for the specified coordinate system. The offset on axes that are not specified will not be changed.

Use parameters P0 to P9 to indicate which coordinate system to change.

Parameter PCoordinate systemG-code
0Current-
11G54
22G55
33G56
44G57
55G58
66G59
77G59.1
88G59.2
99G59.3

Optionally, you can use the R parameter to specify the rotation of the XY axes around the Z axis. The direction of rotation is counterclockwise relative to the positive direction of the Z axis.

The incremental positioning mode G91 does not affect the G10 L2 command.

Important notes:
  • the G10 L2 Pn command does not change the current coordinate system, to select a coordinate system, use the commands G54-G59.3;
  • if offset G92 has been set, it will continue to operate after command G10 L2;
  • the coordinate system for which the offset is set by the G10 L2 command can be active or inactive at the time the command is executed. If the coordinate system is active, the new offset will take effect immediately.
It is an error if:
  • parameter P is not an integer in the range from 0 to 9.
G10 L2 example line:
G10 L2 P1 X3.5 Y17.2

In this example, the origin for the first coordinate system is set to X = 3.5 and Y = 17.2. Since only the X and Y axes are indicated, the origin is shifted along these axes, other coordinates are not changed.

G10 L2 example line:
G10 L2 P1 X0 Y0 Z0 (zero offsets in X, Y & Z in coordinate system 1)

In the above example, the XYZ coordinates of the origin of system 1 are set to zero.