Digital Readout Kit for Mills, Lathes, & Grinding
Published

G28 Versus G53

Which command is better to get your machine axes to the reference position?

Share

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):

G28 Z0 

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:

G53 Z0

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.

Mitsubishi Electric
OASIS Inspection Systems
VERISURF
IMTS 2024
Formnext Chicago on April 8-10, 2025.
Hurco
Universal Homepage Package W4900 Indicator
Gardner Business Intelligence
SolidCAM
BIMU 2024
paperlessPARTS
Techspex

Related Content

5 Reasons Why You Should Know How to Write Custom Macros

Custom macros enhance what can be done in G-code programs, giving users the ability to code operations that were previously not possible.

Read More

6 Machine Shop Essentials to Stay Competitive

If you want to streamline production and be competitive in the industry, you will need far more than a standard three-axis CNC mill or two-axis CNC lathe and a few measuring tools.

Read More
Sponsored

Swiss-Type Control Uses CNC Data to Improve Efficiency

Advanced controls for Swiss-type CNC lathes uses machine data to prevent tool collisions, saving setup time and scrap costs.

Read More

When Handing Down the Family Machine Shop is as Complex as a Swiss-Turned Part

The transition into Swiss-type machining at Deking Screw Products required more than just a shift in production operations. It required a new mindset and a new way of running the family-owned business. Hardest of all, it required that one generation let go, and allow a new one to step in.

Read More

Read Next

Micromachining

A History of Precision: The Invention and Evolution of Swiss-Style Machining

In the late 1800s, a new technology — Swiss-type machines — emerged to serve Switzerland’s growing watchmaking industry. Today, Swiss-machined parts are ubiquitous, and there’s a good reason for that: No other machining technology can produce tiny, complex components more efficiently or at higher quality.

Read More
Basics

Obscure CNC Features That Can Help (or Hurt) You

You cannot begin to take advantage of an available feature if you do not know it exists. Conversely, you will not know how to avoid CNC features that may be detrimental to your process.

Read More

Encountering Surface Finishes in the Everyday World

Surface measurement is becoming increasingly important to ensure proper performance of a manufactured product. Advanced surface measurement tools are not only beneficial in the manufacturing industry but also have unconventional applications.

Read More
CNC Turnkey Package for Knee Mills and Lathes