CNC Machinist Calculator Ultra

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

AddressWhat it does
PCoordinate system, 0 active, 1 to 9 for G54 to G59.3
X Y ZOrigin in machine coordinates
RRotation 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)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G10 L20 · G54

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

App Store Google Play