Editor's CommentaryFrom the monthly column: CNC Tech Talk
Most FANUC-controlled machines, especially machining centers, use the machine’s zero return position (also called the reference return position and home position) as a point of reference for certain machine functions. For example, the zero return position is the origin point for fixture offset (machining centers) and geometry offset (turning centers) entries.
Most machine tool builders place the zero return position close to the plus over-travel limit in each axis. Some machines require that one or more axes be sent to this position prior to activating a function. The Z-axis zero return position is often the tool change position for vertical machining centers, while the Y- and Z-axis zero return positions often serve that function for horizontal machining centers. And almost any machining center equipped with a pallet changer will require one or more axes to be at its zero return position prior to activating a pallet change.
Since certain machine accessories require axes to be located at the zero return position prior to activation, CNC programmers must often command axes to go to this position. FANUC has two G code commands that can be used for this purpose, G28 and G53.
G28 is a bit difficult to explain and understand. It is a two-step command, meaning two things will happen when a G28 command is executed. First, the axes included in the G28 command will go to an intermediate position, then those axes will go to their respective zero return positions. Both motions will be done at rapid. By the way, if you have the single block switch on, you must press the cycle start button twice to complete a G28 command—once to make the axes to move to the intermediate position and once to make them move to the zero return position.
Since we normally want the machine to go straight to the zero return position (not needing the intermediate position), I like to use the following technique. If sending only the Z axis to the zero return position, I recommend:
G91 G28 Z0
Note first that only a Z word is included in this command, so only the Z axis will be involved. The G91 (with Z0) specifies that the intermediate position is incrementally nothing in Z from the current position, so in the first step of G28, the machine will not move. In the second step, the Z axis will rapid to the zero return position.
Here are a few more examples:
G91 G28 X0 Y0 (Move nothing in X and Y, then rapid to zero return position in X and Y.)
G91 G28 X0 Y0 Z3.0 (Move nothing in X and Y, and up 3 inches in Z, then rapid all three axes to the zero return position.)
One concern about G28 is that it enables you to work in incremental and absolute mode. If you leave out the G91 by mistake, it is likely that the machine is currently in the absolute mode. Consider this command that would probably cause a crash (or near crash):
If the current positioning mode is absolute, this command tells the machine to rapid to program zero in Z, possibly causing a crash, then to rapid to the zero return position.
G53 is much easier to understand and use. It is a simple motion command, like G00 or G01, but with G53, the origin for the motion is the machine’s zero return position and the motion will occur at rapid. Here is the command to rapid the Z axis to the zero return position:
As you might expect, most programmers that understand both methods prefer G53 over G28. However, G53 hasn’t been around as long as G28. Additionally, some machine tool builders never made G53 part of their standard package of G codes when they bought controls from FANUC. This means you may have machines that do not allow G53 (without purchasing G53 from FANUC). Even though G53 may be better, G28 is more universal. If you want to use one method that will work on all machines, you may be stuck with G28.
One more advantage of G53 is that the zero return position does not have to be the destination point. Consider, for example, how you position a turning center’s turret to a safe index position prior to a turret index. You may determine, for example, that the safe index position is at the zero return position in X but 8 inches from the zero return position in Z (closer to the chuck/workpiece). This command will send the X and Z axes directly to the safe index position:
G53 X0 Z-8.0
Remember that the origin for G53 is the zero return position, and since the zero return position is usually at the extreme plus end of each axis, commanded positions will almost always be negative.
This technique can also be helpful with machining centers that have pallet changers and when the pallet change position is a precise distance from the zero return position in one or more axes. For a machine with which the pallet change position is at the zero return position in X but 4 inches away from the zero return position in Y, this command sends the machine to its pallet change position:
G53 X0 Y-4.0
The G53 command has its advantages over G28, but both can be used to get machine axes on FANUC-controlled machines back to the zero return position when required.blog comments powered by Disqus