Use Offset Data to Determine Turret Index Position

Determine the optimal index position based on cutting tools’ current geometry offset settings.


Facebook Share Icon LinkedIn Share Icon Twitter Share Icon Share by EMail icon Print Icon

Modern turning centers boast remarkably fast rapid rates, but it still takes time for axes to move to and from the turret-index position. You may be using the machine’s home position for indexing purposes. While safe, the turret probably travels a long distance during every tool change.

A better solution involves a common index position that is closer to the workpiece. It is cumbersome, however, to consistently achieve an optimum index position because it must repeated for every job based on the cutting tools in the turret.

Perhaps the best solution is an idea from Frank Stanek. The optimal index position is automatically determined whenever cutting tools are changed based on their current geometry offset settings. If you elect to use this technique, you must ensure that every tool in the turret has accurate offset information and that offsets are zeroed only when tools are removed from the turret. Our method assumes you are using offsets as FANUC intends:

  • Geometry offsets specify the distance from the home position to the program-zero point.
  • Wear offsets specify small values to deal with tool pressure and tool wear.

FANUC simply adds the geometry and wear offsets together for a total offset for each cutting tool. Our method assumes that wear offset values are never greater than about 0.1 inch, that a workshift value is not being used, and that the Z-axis program origin is always the extreme (right) end of the finished workpiece. These assumptions help identify a Z-axis index position at which the turret can fully rotate without interference.

How it works

By comparing the values of geometry offsets, we determine which cutting tool protrudes furthest from the turret in the Z axis. The tool with the largest (least negative) Z-axis geometry offset value sticks out the furthest.

Say a turning tool in station 1 has a value of -12.3763 in the Z register. A boring bar in station 5 has a value of -5.3733 in the Z register. In this case, the boring bar sticks out further from the turret. If these are the only two tools in the turret, we would base the Z-axis safe-index position on the boring bar. Most turrets extend by 0.5 inch or more during index, and there is facing stock to consider. We will add 2.0 inches of additional clearance.

A position of Z-3.3733 (-5.3733 + 2.0) from the home position will provide 2.0 inches of clearance from the face of the workpiece, and can be commanded by:

G53 Z-3.3733

Needed system variables

For a 30-B FANUC CNC, system variables in the #2800 series provide access to Z-axis geometry offset register values. #2801, for instance, contains the value of Z-axis geometry offset number one.

We must be able to determine the geometry offset register value having the smallest magnitude in the Z axis. Consider the custom macro loop below for a machine that has a 12-station turret. The loop skips offset registers containing zero and ends with the largest (least negative) value in permanent common variable #501:

  • #101=1
  • #501=-[99.0] (Value larger than largest geometry offset)
  • N4 IF[#101GT12]GOTO 99
  • IF [[#[2800+#101] NE 0] AND [#[2800+#101] GT #501]] THEN #501=#[2800+#101]
  • #101=#101+1
  • GOTO4

We must then add the amount of clearance (2.0 inches, in our case) to the value stored in permanent common variable #501.

  • #507 = #501+2.0

This command will cause the machine to move to the Z-axis safe-index position:

  • G53 Z#507

When to determine a new index position

Once you determine an index position, it will remain appropriate until cutting tools are changed (replaced dull tools or new setup). When cutting tools change, so must geometry offset register values, and a new index position must be determined.

We can first total Z-axis offset register values. Then, before movement to the safe index position, we can compare the current total to the previous total. If the two values are different, something has changed, and a new safe-index position must be determined.

Streamlining the system

Ideally, implementing an index-position-determining system will require minimal changes to your existing programs. A user defined T-code program could be used to eliminate the need for any program changes, but our method uses a simple sub-program call.

Sample main program:

  • O0050
  • N005 M98 P9100 (Move to turret index position)
  • N010 T0101
  • N015 G96 S500 M03
  • N020 G00 X2.1 Z0.005 M08
  • N025 G01 X-0.06 F0.010
  • N030 G00 Z0.1
  • N035 X2.1
  • N040 M98 P9100 (Needed at end of program)
  • N045 M30

Turret index position program:

  • O9100
  • (Total geometry offset registers)
  • #505=0
  • #101 = 1
  • N1 IF[#101GT12] GOTO 2
  • #505=#505+#[2800+#101]
  • #101=#101+1
  • GOTO 1
  • (Confirm that an offset is set)
  • N2 IF[#505 NE 0] GOTO 3
  • #3000=100(ALL OFFSETS ARE ZERO)
  • (Test if new safe-index position is required)
  • N3 IF[#505 EQ #506] GOTO 99 (If true: no new position)
  • (False: determine new position)
  • #506=#505 (Retain current total)
  • #101=1
  • #501=-[99.0]
  • N4 IF[#101GT12]GOTO 99
  • IF [[#[2800+#101] NE 0] AND [#[2800+#101] GT #501]] THEN #501=#[2800+#101]
  • #101=#101+1
  • GOTO4
  • (Move to safe-index position)
  • N99 G53 Z[#501+2.0]
  • M99