Fastenal
Published

2 Secondary Coordinate Systems You Should Know

Coordinate systems tell a CNC machine where to position the cutting tool during the program’s execution for any purpose that requires the cutting tool to move.

Share

Coordinates specified within a CNC program tell a CNC machine where to position the cutting tool during the program’s execution. This could be for the purpose of making the cutting tool approach the workpiece, to make the cutting tool machine surfaces, to retract the axes to the tool changing position or for any other purpose that requires the cutting tool to move.

Coordinate systems, in part, specify the point of origin for each coordinate. The most common coordinate system is the workpiece coordinate system. Its origin is usually along an important workpiece surface in each axis, often called a datum surface. This means coordinates specified in the workpiece coordinate system can be specified from a common and logical point often called the program zero point.

Machining center applications sometimes require the use of more than one workpiece coordinate system. Consider running two or more workpieces on a vertical machining center. Each workpiece will likely have its own workpiece coordinate system. FANUC uses workpiece coordinate system offsets, using G54-G59 to specify which workpiece coordinate system is being used.

There are two other coordinate systems that programmers should know. More importantly, programmers should recognize applications for their use.

Machine coordinate system (specified with G53 on a FANUC CNC)

The origin for the machine coordinate system is the reference position in each axis. The reference position is often very close to where each axis will overtravel in the positive direction. This means that the polarity for coordinates specified in the machine coordinate system will be negative. Consider, for example, this command (for a FANUC CNC):

  • G53 X0 Y0 Z0 (Move all axes to their reference positions)

This sends the X-, Y- and Z-axes to their reference position. Rapid mode is automatically selected and used for G53 commands.

Understanding the machine coordinate system is important with certain accessory devices, like pallet changers used on machining centers and programmable tailstocks on turning centers. It is often necessary to move one or more axes to a precise location before the device can be activated, especially when the position is not at the axis’s reference position, but a known distance from it.

Determining this position relative to the workpiece coordinate system origin would require calculations, and would be different with each new job. Say you have a pallet changer being used on a horizontal machining center that requires the X-axis to be at its reference position and the Z-axis to be positioned 5.0 inches from its reference position. This simple (FANUC CNC) command will work every time a pallet change is required:

  • G53 X0 X-7.0 (Move axes to pallet change position)

Local coordinate system (specified with G52 on a FANUC CNC)

This coordinate system lets you temporarily shift the origin in the workpiece coordinate system. This (FANUC CNC) command, for instance, shifts the origin by 2.0 inches in the X-axis and 3.0 inches in the Y-axis in the positive direction:

  • G52 X2.0 Y3.0

This command by itself does not cause axis motion, but subsequent motion commands will be affected until you reset/cancel the local coordinate system with this command:

  • G52 X0 Y0

The local coordinate system is especially helpful when multiple identical features, like pockets on machining centers or grooves on turning centers, must be machined. Combined with a simple subprogram that machines one of the features, this technique simplifies programming, shortens programs and streamlines the program verification process (if one feature is machined properly, they all will be).

Figure 1 shows an example. While the drawing is not dimensioned, you should be able to follow along. In line N040 of the main program, the local coordinate system command temporarily shifts the origin from the lower-left corner of the workpiece in the X- and Y-axes to the lower-left corner of the left-most pocket. Line N050 commands the subprogram to be executed, which machines one pocket. Line N060 then shifts the coordinate system to the lower-left corner of the second pocket. Line N070 commands the subprogram again, and the second pocket is machined. This is repeated two more times. Note that Line N120 resets/cancels the local coordinate system.

Figure 1: Local coordinate system subprogram example. Source: Mike Lynch

Fastenal
Horn USA
Schunk
Mastercam 2025 Now Available
Methods
Digi-Pas
One-Touch Clamps. No Tools Needed.
Hyundai WIA SE2600SY
hyperMILL
DANOBAT
CERATIZIT

Related Content

Sponsored

How this Job Shop Grew Capacity Without Expanding Footprint

This shop relies on digital solutions to grow their manufacturing business. With this approach, W.A. Pfeiffer has achieved seamless end-to-end connectivity, shorter lead times and increased throughput.

Read More
Basics

7 CNC Parameters You Should Know

Parameters tell the CNC every little detail about the specific machine tool being used, and how all CNC features and functions are to be utilized.

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

Can AI Replace Programmers? Writers Face a Similar Question

The answer is the same in both cases. Artificial intelligence performs sophisticated tasks, but falls short of delivering on the fullness of what the work entails.

Read More

Read Next

Software

IMTS 2024: Trends & Takeaways From the Modern Machine Shop Editorial Team

The Modern Machine Shop editorial team highlights their takeaways from IMTS 2024 in a video recap.

Read More
View From My Shop

Custom Motorcycle Parts Made Here: Video Tour of a Family-Owned CNC Machine Shop

Lee Wimmer invited us to tour his second-generation family-owned machine shop in Perkasie, PA. This video explores the production processes behind precision-machined parts for both Wimmer Custom Cycle and LS Wimmer Machine Co., and shows how ingenuity and determination are still at the heart of American manufacturing. Today, both companies are now managed by Wimmer’s three sons.

Read More
Sponsored

Increasing Productivity with Digitalization and AI

Job shops are implementing automation and digitalization into workflows to eliminate set up time and increase repeatability in production.

Read More
Fastenal