Home › G-codes › Siemens 808D ISO › G21
G21 Metric input
Siemens 808D ISO G-code · Mill, Lathe
On mills: Metric input
Switches input to millimeters. Program values, offsets and some parameters and readouts are in mm after it.
Format
How it works
Modal, group 6. Power on default set in MD20154 EXTERN_GCODE_RESET_VALUES[5].
Example program
G17 G40 G49 G80 G90 (SAFE START)
G54 G00 X25. Y25. (POSITION IN MM)
Example is in inch. Check offsets and clearances first.
Watch out for
- Program it at the start of a block with nothing else in it.
- Before switching mid program, cancel G41 to G44 and the work offset. After switching, set the coordinate system with G92 before moving.
- It does not change handwheel or jog increments. The PLC sets those.
On lathes: Metric input
Positions, arc data, thread lead and the programmable offset are read in mm. Feeds, tool offsets and settable work offsets stay in the machine base unit.
Format
How it works
Modal, G group 06.
Example program
G00 X52.0 Z2.0 (APPROACH IN MM)
G01 Z-30.0 F0.2 (NEW FEED AFTER THE SWITCH)
Example is in inch. Check offsets and clearances first.
Watch out for
- G21 must be at the start of the block with no other command in it.
- Program a new F after switching units. Tool offsets stay in the MD10240 base system.
- In G code system C this code is G71.
Related codes
G21 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Metric input |
| Haas NGC | Metric programming check |
| Mazak (EIA) | Metric input |
| Okuma OSP | Metric input confirmation |
| Mitsubishi M70 M80 | Metric input |
| Brother Speedio | Metric input |
| LinuxCNC Tormach | Millimeter units |
| Mach3 Mach4 | Metric units |
| Centroid CNC12 Acorn | Metric units |
| Hurco WinMax (NC) | Metric input (ISNC) |
| Fadal | Check for metric setting |
| Swiss (Citizen Star) | Metric input |
Every G-code for Siemens 808D ISO 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 G21 in the app All Siemens 808D ISO G-codes