CNC | G54-G59 Codes | Work Offsets

Work Offsets Introduction

Using the method of Work Offsets for tool positioning based on machine zero is much faster and more efficient than using the older methods of position compensation functions G45 and G46. Work offsets are also known as Work Coordinate System, or even as Fixture Offsets. Work offsets are much more efficient than using the position register commands G92 (milling systems) or G50 (turning systems). CNC programmers who do not know the meaning of position compensation functions or the meaning of position register commands, are most likely working with the most modern CNC machines only. However, there are many machines in industry that still require these rather obsolete functions. Knowing them well will increase the number of available programming tools.

This article describes the most modern methods to coordinate the relationship between machine zero reference position and the program zero reference point. Focus will be on the Work Coordinate System feature of a modern control, whether it is called the Work Coordinate System or the Work Offsets. The latter term seems to be more popular because it is a little shorter. Think of the work offsets as an alignment between two or more coordinate systems.

Work Areas Available

Before some more detailed descriptions can be covered, just what is a work coordinate system - or a work offset?

Work offset is a method that allows the CNC programmer to program a part away from CNC machine, without knowing its exact position on the machine table. This is a very similar approach as in the position compensation method, but much more advanced and flexible. In work offset system, up to six parts may be set up on the machine table, each having a different work offset number. Programmer can move the tool from one part to another with absolute ease. To achieve this goal, a special preparatory command for the active work offset is needed in the program and the control system will do the rest. Control system will automatically make any adjustment for the difference between the two part locations. Unlike position compensation function, two, three, or more axes may be moved simultaneously with work offsets, although the Z-axis for CNC machining centers is controlled independently, using G43 or G44 tool length offset commands.

The six work coordinate systems - or work offsets - that are available on Fanuc control systems are assigned the following preparatory commands:


When the control unit is turned on, the default coordinate system is normally G54, at least in most cases.

Basically, work offsets establish up to six independent work areas as a standard feature. Settings stored in the CNC unit are always distances measured from machine zero to program zero. As there are up to six work areas, up to six independent program zero positions can be defined. Figure 18-1 shows the basic relationships, using the default G54 setting.

Figure 18-1
Basic relationships of the work offset method

The same relationships illustrated for default work offset apply exactly the same way for the other five available work offsets G55 to G59. Settings stored in the control system are always physically measured from machine zero position to program zero of the part, as determined by CNC programmer. Operator uses edge finders, corner finders and other devices to find these distances.

The distance from machine zero to program zero of each work area is measured separately along the X and Y axes and input into the appropriate work offset register of the control unit. Note that the measurement direction is from machine zero to program zero, never the other way around. If the direction is negative, the minus sign must be entered in the offset screen.

For comparison with the position register command G92, Figure 18-2 shows the same part set with the older method of G92 and machine zero as a start point. Note the opposite arrows designation, indicating the direction of measurement - from program zero to machine zero.

By using G54 to G59 settings in the program, control system selects the stored measured distances and the cutting tool may be moved to any position within the selected work offset simultaneously in both X and Y axes, whenever desired.

Part position on the machine table is usually unknown during programming process. The main purpose of work offset is to synchronize the actual position of the part as it relates to the machine zero position.

Additional Work Offsets

The standard number of six work coordinate offsets is usually enough for most types of work. However, there are jobs that may require machining with more program reference points, for example, a multi-sided part on a horizontal machining table. What options do exist, if the job requires ten work coordinate systems, for example?

Fanuc offers - as an option - up to 48 additional work offsets, for the total of 54 (6+48). If this option is available on the CNC system, any one of the 48 work offsets can be accessed by programming a special G code:

G54.1 P… ( Selection of additional work offset, where P = 1 to 48 )
G54.1 : P… example :
G54.1 : P1 Selection of additional work offset 1
G54.1 : P2 Selection of additional work offset 2
G54.1 : P3 Selection of additional work offset 3
G54 1 : Px… Selection of additional work offset x…
G54.1 : P48 Selection of additional work offset 48

The utilization of additional work offsets in the program is exactly the same as that of standard commands:

N2 G90 G00 G54.1 P1 X5.5 Y3.1 S1000 M03

Most Fanuc controls will allow omission of the decimal portion of the G54.1 command. There should be no problem programming:

N2 G90 G00 G54 P1 X5.5 Y3.1 S1000 M03

The presence of P1 to P48 function within a block will select an additional work offset. If P1 to P48 parameter is missing, the default work offset command G54 will be selected by the control system.