This command is used to move the axis back to the home position of the axis after the machine was homed. Further axis commands can also be combined with G28 to achieve intermediate position.
G28 - Only G28 can be used, this will move all axis at rapid back to the home position.
X, Y, Z, A, B Value - specifies the intermediate position you wish to move following the distance to move. The distance value will be the current machine units in use.
Combining the G28 with a rotary axis in incremental mode G91 will allow the axis to unwind in 1 revolution or less. See example below.
The above gcode will move all axis of the machine at rapid back to the home position.
N10 G91 G28 X0 Y0 Z0
The above gcode will move all axis to machine 0.00 as there is no intermediate position to go to first.
N10 G91 G28 X0 Y0 Z8
The above gcode will first move the Z axis to 8.00 position and then move all axis to machine 0.00
G00 A900 #Rapids the A axis to A900 (2.5 turns)G91 #Change to Incremental modeG28 A0 #Moves Axis by 0 degrees then moves to A0 within one rotationG90 #Return to Absolute mode
In the above example if you specify another coordinate eg: G28 A360 it will move an additional 360 degrees taking the axis to A1260 (3.5 turns) then move to A0 in less than 1 rotation.
In this case it would be an additional 1/2 rotation to be back to home.