G20 longitudinal turning cycle for Fanuc 21 TB cnc control is a modal G-code.
G20 turning cycle can be used for straight turning and taper turning as well.
G20 turning cycle is Easy to program and learn.
G20 turning cycle is used for simple turning however multiple passes are possible by specifying the X-axis location of additional passes.
The cnc program code below also shows a very powerful functionality of G20 turning cycle which is that a cnc machinist can control depth-of-cut of every pass of G20 turning cycle which is impossible to achieve with other Turning Canned Cycle like G71 Rough Turning Cycle.
Contents
G20 Turning Cycle Format for Straight Turning
G20 X… Z… F…
or
G20 U… W… F…
X – Diameter to be cut (absolute).
Z – End point in z-axis (absolute).
F – Feed-rate.
U – Diameter to be cut (incremental).
W – End point in z-axis (incremental).
G20 Turning Cycle Format for Taper Turning
G20 X… Z… R… F…
or
G20 U… W… R… F…
X – Diameter to be cut (absolute).
Z – End point in z-axis (absolute).
R – Incremental taper dimension in X with direction (+/-)
F – Feed-rate.
U – Diameter to be cut (incremental).
W – End point in z-axis (incremental).
As cnc machinists can use X or U value for the contour value, same way Z or W can be used or you can even mix both absolute (X, Z) and incremental (U, W) values.
G20 Turning Cycle Example CNC Program Code
G96 S200 M03 G00 X56.0 Z2.0 G20 X51.0 W-20.0 F0.25 X46.0 X41.0 X36.0 X31.0 X30.0 G00 X100 Z100 M30
CNC Program Code Explanation
As you can see in the above cnc program code,
Tool is at X56 Z2 point,
First cut is made at X51 and tool travels W-20 in Z-axis.
Second cut is made at X46
Third cut is made at X41
…
Last cut is made at X30
G20 Turning Cycle Function
As if you study the above cnc program code you will notice that,
1 – with G20 both absolute (X51.0) and incremental (W-20.0) values are used to make cuts.
2 – If above code also shows a very powerful functionality of G20 turning cycle which is that a cnc machinist can control depth-of-cut of every pass of G20 turning cycle which is impossible to achieve with other Turning Canned Cycle like G71 Rough Turning Cycle.
So you will notice first five-cuts are of 5mm deep but the last one is just 1mm deep.
Cancellation of G20 Turning Cycle
G20 turning cycle is a modal G-code.
“Modal” G-code meaning that they stay in effect until they are cancelled or replaced by a contradictory G code.
It means G20 turning cycle remains active until another motion command is given like G00, G01 etc. As in above cnc program example G20 G code is cancelled with G00 G code.