CNC Machinist Calculator Ultra

Home › G-codes › LinuxCNC Tormach › G10 L20

G10 L20 Set work offset from current position

LinuxCNC Tormach G-code · Mill and lathe

Sets a work coordinate system so the current position reads as the given values. This is the code behind most touch off buttons.

Format

G10 L20 P [X] [Y] [Z] [A] [B] [C]

Addresses

AddressWhat it does
PCoordinate system, 0 active, 1 to 9 for G54 to G59.3
X Y ZValue the current position should read

How it works

Non modal.

Example program

G20 G90 (INCH, ABSOLUTE)
T1 M6 G43 (EDGE FINDER OR PROBE)
(TOOL CENTER IS OVER THE PART CORNER)
G10 L20 P1 X0 Y0 (CORNER IS X0 Y0 IN G54)
…

The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G10 L2 · G54 · G38.2

Every G-code for LinuxCNC Tormach in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open G10 L20 in the app All LinuxCNC Tormach G-codes

App Store Google Play