Home › G-codes › Siemens 840D 828D › G42
G42 Tool radius compensation right
Siemens 840D 828D G-code · Mill and lathe
Offsets the tool path to the right of the contour, seen in the cutting direction, by the radius in the active D number. With a right hand cutter in M3 this is conventional milling.
Format
G42 G1 X Y F
Addresses
| Address | What it does |
|---|---|
X Y | Approach move in the working plane |
D | Offset number holding the radius, normally set together with T |
How it works
Modal, G group 7 (radius compensation). Cancel with G40.
Example program
T1 D1 ; FINISH TURNING TOOL
G96 S220 LIMS=3000 M3
G0 X20 Z2
G42 G1 X20 Z0 F0.1 ; COMP ON
…
G96 S220 LIMS=3000 M3
G0 X20 Z2
G42 G1 X20 Z0 F0.1 ; COMP ON
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Start compensation on a G0 or G1 move in the working plane.
- On a lathe, outside turning toward the chuck with a front tool post normally uses G42.
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 |
| Heidenhain TNC (ISO) | Radius compensation right |
| Fagor 8055 8065 | Tool radius compensation right |
| LinuxCNC Tormach | Cutter 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 Siemens 840D 828D 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 Siemens 840D 828D G-codes