Home › G-codes › Siemens 840D 828D › G40
G40 Cancel tool radius compensation
Siemens 840D 828D G-code · Mill and lathe
Turns off G41 and G42. The tool center or tool tip runs on the programmed path again. Cancel on a G0 or G1 move away from the contour.
Format
G40 G1 X Y
Addresses
| Address | What it does |
|---|---|
X Y | Point off the contour where compensation ends |
How it works
Modal, G group 7 (radius compensation).
Example program
G41 G1 X0 Y5 F400 ; COMP ON
G1 Y40 ; CUT
G40 G1 X-10 Y50 ; COMP OFF, MOVE AWAY
G0 Z50 ; RETRACT
G1 Y40 ; CUT
G40 G1 X-10 Y50 ; COMP OFF, MOVE AWAY
G0 Z50 ; RETRACT
Example is in inch. Check offsets and clearances first.
Watch out for
- Cancel on a linear move. Cancelling on an arc gives an alarm.
- G40 does not turn off tool length. D0 turns off all tool offsets.
Related codes
G40 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Cutter compensation cancel |
| Haas NGC | Cutter compensation cancel |
| Mazak (EIA) | Cutter radius compensation cancel |
| Okuma OSP | Cutter radius compensation cancel |
| Mitsubishi M70 M80 | Cutter radius comp cancel |
| Brother Speedio | Cutter compensation cancel |
| Heidenhain TNC (ISO) | Cancel radius compensation |
| Fagor 8055 8065 | Cancel tool radius compensation |
| LinuxCNC Tormach | Cutter compensation off |
| Mach3 Mach4 | Cutter comp cancel |
| Centroid CNC12 Acorn | Cutter compensation cancel |
| Hurco WinMax (NC) | Cutter compensation cancel |
| Fadal | Cutter radius compensation cancel |
| Swiss (Citizen Star) | Nose radius compensation cancel |
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 G40 in the app All Siemens 840D 828D G-codes