11.5 Units and Position Commands
G17/G18/G19: Plane Selection
Format:
G17: select XY plane
G18: select ZX plane
G19: select YZ plane
The G17, G18 and G19 commands are used for plane selection. The power-on state is preset to the G17 XY plane. Some G codes (such as round and chamfer of G01, G02/G03, G41/G42, etc.) only act on the specified plane. Therefore, the G code of the selection plane must be input before those G codes. In addition, the fourth axis has no effect on these G codes at all.
G17/G18/G19: Plane Selection
G20/G21: Programming in Imperial/Metric
The unit of coordinate or displacement in the program can be millimeter or inch. The unit that is retained when the power is turned off is the default unit. In the program, G20 or G21 needs to specify the unit to be selected in the first line of the program. Once it is set, it cannot be changed in the program; this state can also be changed by the first line of the program or the single line input command from MDI. The range of valid units is as follows:
Inch |
0.0001 ~ 999.9999 inch |
Metric |
0.001 ~ 9999.999 mm |
Note: |
After G20/G21 is specified in the first line of the program, if you want to execute the program repeatedly with the M99 command at the end of the program, an error message will pop up. |
G90/G91: Absolute Programming/Incremental Programming
Format:
G90: Programming in absolute positions
G91: Programming in incremental values
In the axial movement G command give, each axis value its destination and may be an absolute coordinate value or a relative increment value, which are respectively set by G90 and G91. If the tool is moved from A (150, 300, 120) to B (100, 240, 90), use the absolute coordinate planning program (G90) as G90 X100 Y240 Z90; as shown in the figure below.
G90: Programming in Absolute Positions
Use the relative incremental coordinate planning program (G91) as G90 X-50 Y-60 Z-30; as shown below.
G91: Programming in Incremental Values
G54~G59: Select Work Coordinate System
Format:
G54
G55
G56
G57
G58
G59
The G54~G59 commands can be used to select six different working coordinate systems. The default working coordinate at power on is G54. The six work coordinates can be set in the "Parameters → Coordinate Offset" item.
G54~G59: Work Coordinate Systems