Home › G-codes › LinuxCNC Tormach › G42
G42 Cutter compensation right
LinuxCNC Tormach G-code · Mill and lathe
Offsets the tool to the right of the path by the tool table radius, looking in the direction of travel. Common for turning on a lathe.
Format
G42 [D]
Addresses
| Address | What it does |
|---|---|
D | Tool number for the radius, default is the loaded tool |
How it works
Modal, cutter comp group. Cancel with G40.
Example program
G20 G18 G7 G40 G80 G90 G94 (INCH, XZ PLANE, DIAMETER MODE)
T1 M6 G43 (TURNING TOOL, .031 NOSE RADIUS)
G96 D2500 S500 M3
G0 X1.2 Z0.2
…
T1 M6 G43 (TURNING TOOL, .031 NOSE RADIUS)
G96 D2500 S500 M3
G0 X1.2 Z0.2
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- On a lathe the tool orientation in the tool table must be right for nose radius comp.
- The lead-in move must be longer than the tool radius.
Related codes
G42 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Cutter compensation right |
| Haas NGC | Cutter compensation right |
| Mazak (EIA) | Cutter radius compensation right |
| Okuma OSP | Cutter radius compensation right |
| Mitsubishi M70 M80 | Cutter radius comp right |
| Brother Speedio | Cutter compensation right |
| Siemens 840D 828D | Tool radius compensation right |
| Heidenhain TNC (ISO) | Radius compensation right |
| Fagor 8055 8065 | Tool radius compensation right |
| Mach3 Mach4 | Cutter comp right |
| Centroid CNC12 Acorn | Cutter compensation right |
| Hurco WinMax (NC) | Cutter compensation right |
| Fadal | Cutter radius compensation right, conventional |
| Swiss (Citizen Star) | Nose radius compensation right |
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 G42 in the app All LinuxCNC Tormach G-codes