1. G Function Description
1.2.13 G28: RETURN TO REFERENCE POSITION
Command form:
G28 X Y Z
X, Y, Z: mid-point position (absolute value in G90 mode, increment
value in G91 mode)
Description:
it can return to reference position or return to origin point, in order not
to let the tool crush, it will use G00 mode to move from present position, it
will move to the specified safety mid-point first and then return to origin
point or reference point.
<Note> this command usually use in auto tool exchange. For safety,
before doing G28, must cancel tool compensation
Example 1:
G90 G28 X50.0 Y30.0; //ABC, mid-point(50,30)
Y
C Reference point
Start point A
B
mid-point(50,30)
X
Example 2:
G28 X0; //only X axis return to reference point
G28 Y0; //only Y axis return to reference point
G28 Z0; //only Z axis return to reference point
30
    "