Home › G-codes › Mach3 Mach4 › G10
G10 Set offsets from the program
Mach3 Mach4 G-code · Mill
Writes tool or work offsets from the program. L1 sets a tool offset, L2 sets a fixture offset G54 to G59 and up, and L20 sets the Mach4 G54.1 offsets.
Format
G10 L1 P [Z] [W] [D] [R] or G10 L2 P [X] [Y] [Z] [A] or G10 L20 P [X] [Y] [Z]
Addresses
| Address | What it does |
|---|---|
L1 | Tool offset, P is the tool offset number |
L2 | Fixture offset, P1 is G54 to P6 is G59 |
L20 | Mach4 G54.1 offset, P1 to P248 |
Z W D R | Mach4 tool height, height wear, diameter, diameter wear |
X Y Z A B C | Offset values in machine coordinates |
How it works
Non modal.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
G10 L2 P1 X-12.5 Y-8.25 Z-3.1 (SET G54 IN MACHINE COORDS)
G10 L1 P5 Z1.5 (MACH4 TOOL 5 HEIGHT 1.5)
G91 (INCREMENTAL, ADD TO OFFSET)
…
G10 L2 P1 X-12.5 Y-8.25 Z-3.1 (SET G54 IN MACHINE COORDS)
G10 L1 P5 Z1.5 (MACH4 TOOL 5 HEIGHT 1.5)
G91 (INCREMENTAL, ADD TO OFFSET)
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Mach4 in G91 adds the values to the offset. In G90 it overwrites. A G91 left on turns a set into an add.
- Mach3 G10 L1 takes P X Z and A for tip radius. It cannot set the tool diameter.
- Mach3 values are not saved for the next session unless the tables are saved on the Tables screen.
Related codes
G10 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Programmable data input, offsets |
| Haas NGC | Programmable offset setting |
| Mazak (EIA) | Program data setting, offsets |
| Okuma OSP | Cancel coordinate shift and rotation |
| Mitsubishi M70 M80 | Program data input for offsets |
| Brother Speedio | Programmable data input |
| Heidenhain TNC (ISO) | Rapid straight line, polar |
| Fagor 8055 8065 | Mirror image cancel |
| Centroid CNC12 Acorn | Set parameter or offset from program |
| Hurco WinMax (NC) | Data setting, offsets by program |
| Fadal | Programmable data input |
Every G-code for Mach3 Mach4 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 in the app All Mach3 Mach4 G-codes