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
| Address | What it does |
|---|---|
P | Coordinate system, 0 active, 1 to 9 for G54 to G59.3 |
X Y Z | Value 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)
…
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
- The value includes the active tool length offset. Load the right tool with G43 before touching off Z.
- Axes not named keep their old values.
Related codes
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