
5. Position Commands
5.2 Inch/Metric Command Change; G20, G21
26
5.2 Inch/Metric Command Change; G20, G21
Function and purpose
These G commands are used to change between the inch and millimeter (metric) systems.
Command format
G20/G21;
G20
: Inch command
G21
: Metric command
Detailed description
The G20 and G21 commands merely select the command units. They do not select the Input units.
G20 and G21 selection is meaningful only for linear axes and it is meaningless for rotation axes.
Output unit, command unit and setting unit
The counter or parameter setting and display unit is determined by parameter "#1041 I_inch".
For the movement/speed command, the followings will be resulted:
The movement/speed command will be displayed as metric units when "#1041 I_inch" is ON during
the G21 command mode.
The internal unit metric data of the movement/speed command will be converted into an inch unit
and displayed when "#1041 I_inch" is OFF during the G20 command mode.
The command unit for when the power is turned ON and reset is decided by combining the
parameters "#1041 I_inch", "#1151 rstint" and "#1210 RstGmd/bit5".
NC axis
Initial inch OFF
(metric internal unit)
#1041 I_inch=0
Initial inch ON
(inch internal unit)
#1041 I_inch=1
Item
G21 G20 G21 G20
Movement/
speed command
Metric Inch Metric Inch
Counter display
Metric
Metric
Inch
Inch
Speed display
Metric
Metric
Inch
Inch
User parameter
setting/display
Metric Metric Inch Inch
Workpiece/
tool offset
setting/display
Metric Metric Inch Inch
Handle feed
command
Metric Metric Inch Inch
PLC axis
Item
#1042 pcinch=0
(metric)
#1042 pcinch=1
(inch)
Movement/
speed command
Metric Inch
Counter display
Metric
Inch
User parameter
setting/display
Metric Inch