Watch out for that G28 command!

As you know, the G28 command is used to send the machine to its zero return position. At the completion of a G28, the machine will be at its zero return position in any axis included in the G28 command.


However, how the machine gets to its zero return position can be a bit confusing. You may know that G28 is actually a two-step command. First the machine will move to something called an intermediate position in any axes included in the G28 command. Second the machine will go to the zero return position in these axes.


Most programmers are taught to make the intermediate position the machine’s current position. The simplest way to do so is to include a G91 incremental mode G code in the G28 command (machining centers). So the command

  • G91 G28 Z0

tells the machine to first, move incrementally nothing in Z (staying where it is) and second, to move to the Z axis zero return position.

The safety-related warning has to do with forgetting the G91. This command

  • G28 Z0

will first, send the Z axis to the program zero surface in Z (crash) and second, send the machine to its Z axis zero return position. This assumes, of course that the machine is in the absolute mode when the G28 command is executed.


For turning centers, most programmers use the command

  • G28 U0 W0

to accomplish the same thing. The machine will move incrementally nothing in X and Z, then it will go to the zero return position in each axis. But if you give the command

  • G28 X0 Z0

you are telling the machine to go to program zero in X and Z (again, crash), and then go to the zero return position in each axis.



0 views
cnc reverse logo.jpg
0

44 Little Cahill Road

Cary, IL  60013

Ph: 847-639-8847

  • Facebook Social Icon