Home › G-codes › LinuxCNC Tormach › G10 L2
G10 L2 Set work offset by value
LinuxCNC Tormach G-code · Mill and lathe
Sets the origin of a work coordinate system to given machine values. P1 is G54 up to P9 for G59.3. P0 is the active system.
Format
G10 L2 P [X] [Y] [Z] [A] [B] [C] [R]
Addresses
| Address | What it does |
|---|---|
P | Coordinate system, 0 active, 1 to 9 for G54 to G59.3 |
X Y Z | Origin in machine coordinates |
R | Rotation about Z in degrees |
How it works
Non modal.
Example program
G20 G90 (INCH, ABSOLUTE)
G10 L2 P1 X-12.5 Y-8.25 Z-4 R0 (SET G54 ORIGIN, NO ROTATION)
G54 (USE IT)
G0 X0 Y0 (RAPID TO PART ZERO)
G10 L2 P1 X-12.5 Y-8.25 Z-4 R0 (SET G54 ORIGIN, NO ROTATION)
G54 (USE IT)
G0 X0 Y0 (RAPID TO PART ZERO)
Example is in inch. Check offsets and clearances first.
Watch out for
- Axes not named keep their old values.
- R rotates the whole system about Z. Leftover R from an old job can turn every cut.
- Values are saved in the var file and survive a restart.
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 L2 in the app All LinuxCNC Tormach G-codes