Disclaimer: CNC Concepts, Inc. accepts no responsibility for the use
or misuse of techniques shown in this web page. We simply publish information
we feel will be of interest to CNC users. In all cases, the reader is totally
responsible for considering the implications, good and bad, of implementing one
or more of the techniques we show.
How is G50 used to assign program zero on turning centers?
I am a CNC operator who recently took a job teaching entry level CNC. Some
of the machines here at the training center are pretty old - and use G50 to
assign program zero (not geometry offsets). I am used to a G50 designating a
max. spindle speed. When it comes to assigning program zero, I understand the
setting of a reference point but am having trouble understanding the hows and
whys of accumulating offsets. If you assign program zero with G50, should the
geometric offsets be set at zero? Is that where the machine is getting these
offsets that it accumulates? I'd be grateful if you can either explain this or
point me in the right direction so I can do some research. Thank you. M. Piecek
Response:
Mr. Piecek,
Frankly speaking, geometry offsets were designed to replace G50 for
assigning program zero on turning centers (though they have nothing to do with
spindle limiting). The only reason people use the G50 command today is that
they have older machines that don't have geometry offsets (like you) or they
don't understand geometry offsets.
With G50, you include the distances from program zero to the tool tip at the
time the G50 is executed. If, for example, you plan on starting the program
from the zero return position, the G50 values will be equal to the geometry
offset values (but positive).
One major problem with G50 is that the machine must absolutely-positively be
at the planned position when the program is executed. If it is not, the control
will "believe" the G50 values and move accordingly - this is a major
source of machine crashes - the operator activates the cycle with the turret
out of position. Note that this can't happen with geometry offsets. The control
will automatically take the machine's current position (relative to the zero
return position) into consideration when making axis movements.
When using G50, each tool requires its own G50 command, meaning at the end
of each tool, you must keep track of G50 values. The easiest way to do this is
to send each tool back to the zero return position for tool changing - which
wastes time.
Another little problem. G50 is not compatible with geometry offsets. If you
give a G50 command, subsequent geometry offsets will not be correct. (If you
give the command G50 X0 Z0 while the machine is at its zero return position,
you return geometry offsets to normal.) When using G50 to assign program zero,
all geometry offsets must be set to zero.
One more point about offset accumulation. When you use G50 to assign program
zero, the wear offset is instated with the second two digits of the T word.
When you're done with each tool, you must remember to cancel the wear offset to
keep it from corrupting the subsequent G50 command. Some people refer to this
as accumulating offsets. (You don't have to cancel wear offsets when using
geometry offsets.) To cancel when using G50, you can include two trailing zeros
after the tool station number (T0300 cancels wear offset number three) or
simply commanding T0 (cancels any tool's wear offset).
Here is an example program that uses G50 to assign program zero.
O0002 (Program number)
(Rough facing tool)
N005 G20 G23 G40 (Ensure that initialize modes are still in effect)
N010 G28 U0 W0 (Send machine to zero return position)
N015 G50 X______ Z______ S5000 (Assign program zero, limit spindle speed to
machines maximum)
N230 G01 X1.05 F0.006 (20) (Start finish facing and turning at 0.006 ipr)
N235 G00 Z0.1 (21)
N240 X1.75 (22)
N245 G01 Z0 (23)
N250 G03 X1.875 Z-0.0625 R0.0625 (24)
N255 G01 Z-1.0 (25)
N260 X2.2 (26)
N265 G28 U0 W0 T0 (Rapid to zero return position, cancel offset)
N270 M30 (End of program)
Let me reiterate the points made earlier for this example program. Since
we're not using geometry offsets, they must all be set to zero. In line N010,
we're ensuring that the machine is at the zero return position (minimizes
potential for operator error). In line N015, we give the G50 command for the
first tool. These values are exactly the same as their geometry offset
counterparts, but they're positive instead of negative. Note that you cannot
use the work shift feature when G50 is used to assign program zero.
To ensure that the turret won't jump by the amount of wear offset, in line
N020 we index the turret without invoking an offset. The wear offset is
instated in line N030 during the tool's first movement command.
When the tool is finished (line N045) we send the turret back to the zero
return position with G28. Though it's not mandatory in this case (at the
completion of G28 the turret will be at the zero return position), we're also
canceling the wear offset in line N045.
In line N055, the whole process begins again and is repeated for each tool.