Simulating Geometry Offsets For Turning Centers

Most current model Fanuc controls allow the use of geometry offsets to assign program zero. Each geometry offset contains the program zero assignment values for its corresponding cutting tool.

Columns From: 4/2/2004 Modern Machine Shop,

Most current model Fanuc controls allow the use of geometry offsets to assign program zero. Each geometry offset contains the program zero assignment values for its corresponding cutting tool. Geometry offset number one, for instance, contains the program zero assignment values for tool number one.

Unfortunately, not all Fanuc controls allow geometry offsets. Some (especially older) controls require that more cumbersome G50 commands be used to assign program zero in the program—one G50 command for each tool.

Because geometry offsets have overcome all of the limitations of using G50s to assign program zero, geometry offsets should be the obvious program zero assignment method of choice for machines that have geometry offsets. Let’s look at a way to simulate geometry offsets—even for machines that require G50 commands to assign program zero. This technique requires the control to have custom macro B, which is a field-installable option for most control models.

One dramatic advantage of geometry offsets is the program zero assignment values are placed in offsets, not in the CNC program. This keeps the setup person from having to edit the program to assign program zero. A series of system variables allows the program to access the value of any offset. The #2000 series access X offsets and the #2100 series access Z offsets. #2001, for example, contains the X value of offset register number one. #2101 contains the Z value of offset register number one.

Because most turret-type turning centers contain 12 tools and most controls have at least 32 offsets, we recommend using offsets 21 to 32 in which to store the program zero assignment values for tools 1 to 12. Offset 21, for instance, will contain the program zero assignment values for tool number one. Offsets 21 to 32 will be much like geometry offsets, but the polarity of each will be positive (with geometry offsets, values are negative).

For example, consider the following commands:

N005 G50 X#2021 Z#2121
N010 T0101

In line N005, we’re simply using the X and Z registers from offset number 21 as the program zero assignment values.

While this technique allows you to separate program zero assignment from the program, the machine must still be in the planned position prior to running the program. There are two more system variables that give custom macro access to the machine’s current position relative to the zero return position. #5021 provides access to the X position and #5022 provides access to the Z position. If the machine is at the zero return position, for example, the values of these system variables will be zero.

Consider these revised commands:

N005 G50 X[#2021 + #5021] Z[#2121 + #5022]
T0101

Because the values of #5021 and #5021 are the distances from the zero return position to the machine’s current position (note the polarity), adding each to the program zero assignment value will render an appropriate program zero assignment, regardless of the machine’s current position. As with geometry offsets, the machine cannot be out of position, and you need not start the program with the machine at a planned starting position. In addition, you need not send the machine back to a planned position at the end of the tool. As long as you use this technique for each tool, the next G50 command will take the machine’s current position into consideration.

Including G50 commands in your programs as shown so far can be somewhat cumbersome. Each G50 will have to reference the related system variables. Although this is already a great improvement, we can get even better. We can make the T code (turret index command) invoke custom macro O9000. To do this, you must reference the custom macro section of your Fanuc manual to find the related parameter, and set it appropriately.

Now, when a T code is read in the program, the control will execute program number O9000 (the T word must be in a command by itself, as the turret indexing word usually is). Common variable #149 will be automatically set to the value of the T word. If a T word of T0303 is read, the control will set the value of #149 to 303 (leading zero is suppressed) and execute program O9000.

Consider this program:

O9000 (T code macro)
#100 = FIX[#149/100] (Determine tool station number)
G50 X[#[2000 + 20 + #100] + #5021] Z[#[2100 + 20 + #100] + #5022]
T#149
M99

We first determined the tool station number in the first command and stored it in common variable #100. Then the G50 command is given, referencing the appropriate “geometry” offset (20 plus the tool station number) and the machine’s current position. This is done for each axis, X and Z. We then have the control execute the T word. This command will cause the turret index and invoke the wear offset. Finally, the program ends with M99.

Once this program is entered and verified, the machine will behave very much like a machine that has geometry offsets. About the only thing we haven’t addressed is the work-shift offset that allows geometry offsets to be entered relative to any Z surface (other than the program zero surface in Z). With a little thought, however, this wouldn’t be difficult to incorporate.

Comments are reviewed by moderators before they appear to ensure they meet Modern Machine Shop’s submission guidelines.
blog comments powered by Disqus
MMS ONLINE
Channel Partners
  • Techspex