Coding G Part

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Manual Part Programming and Programming of Lathes 169

6.19 DETAILED DESCRIPTION OF G-FUNCTIONS OF LATHES


Codes like G01, G02, etc. used in programming are called preparatory functions and denote
various control functions like the type of interpolation conducted in the control unit, plane
selection, stored stroke limit, reference point specification, thread cutting, tool nose radius
compensation, fixed cycles, feed specification, inch/metric selection, etc.
Typically G-functions will have the address G followed by two digits (00 to 99). Some
G-functions will have three digit numbers. Example is cylindrical interpolation (G107). Table
6.6 gives a list of G-functions commonly used in CNC lathes. It is to be noted that there may
be some differences in G-functions from one control system to another.
A number following address G determines the meaning of the command for the concerned
block.
The G-codes given in Table 6.6 are Fanuc 0 codes. There are three G-code systems: A,B
and C, G-code system A is standard. The users can specify the system depending on their
requirements. The following points are to be noted in using G-codes.
(1) G-codes of group 00 except G10 and G11 are single-shot G-codes.
(2) Alarm 010 is displayed when a G-code not listed in the G-code list is specified or a G-code
without a corresponding option is specified.
(3) G-codes of different groups can be specified in the same block. If G-codes of the same
group are specified in the same block, the G-code specified last is valid.
(4) G-codes are displayed for each group number.
Table. 6.6 G-Functions of CNC Lathes

G-code Group Function


A B C
G00 G00 G00 Positioning [Rapid traverse]
G01 G01 G01 Linear interpolation [Cutting feed]
01
G02 G02 G02 Circular interpolation/Helical interpolation CW
G03 G03 G03 Circular interpolation/Helical interpolation CCW
G04 G04 G04 Dwell
G10 G10 G10 00 Data setting
G11 G11 G11 Data setting mode cancel
G17 G17 G17 XpYp plane selection
G18 G18 G18 16 ZpXp plane selection
G19 G19 G19 YpZp plane selection
G20 G20 G70 Input in inch
06
G21 G21 G71 Input in mm
G27 G27 G27 Reference position return check
G28 G28 G28 Return to reference position
00
G30 G30 G30 2nd reference position return
G31 G31 G31 Skip function
G32 G33 G33 01 Thread cutting
G40 G40 G40 Tool nose radius compensation cancel
G41 G41 G41 07 Tool nose radius compensation left
G42 G42 G42 Tool nose radius compensation right
170 Computer Numerical Control Machines and Computer Aided Manufacture

G50 G92 G92 00 Coordinate system setting, max. spindle speed setting
G52 G52 G52 Local coordinate system setting
00
G53 G53 G53 Machine coordinate system setting
G54 G54 G54 Workpiece coordinate system 1 selection
G55 G55 G55 Workpiece coordinate system 2 selection
G56 G56 G56 Workpiece coordinate system 3 selection
14
G57 G57 G57 Workpiece coordinate system 4 selection
G58 G58 G58 Workpiece coordinate system 5 selection
G59 G59 G59 Workpiece coordinate system 6 selection
G65 G65 G65 00 Macro command
G70 G70 G72 Finishing cycle [Other than 0-GCD]
G71 G71 G73 Stock removal in turning [Other than 0-GCD]
G72 G72 G74 Stock removal in facing [Other than 0-GCD]
G73 G73 G75 Pattern repeating [Other than 0-GCD]
00
G74 G74 G76 End face peck drilling [Other than 0-GCD]
Outer diameter/internal diameter drilling
G75 G75 G77
[Other than 0-GCD]
G76 G76 G78 Multiple threading cycle [Other than 0-GCD]
G71 G71 G72 Traverse grinding [For 0-GCD]
Traverse direct constant dimension grinding cycle [For
G72 G72 G73
0-GCD]
01
G73 G73 G74 Oscillation grinding cycle [For 0-GCD]
Oscillation direct constant dimension grinding cycle [For
G74 G74 G75
0-GCD]
G90 G77 G20 Outer diameter/internal diameter cutting cycle
G92 G78 G21 01 Thread cutting cycle
G94 G79 G24 End face turning cycle
G96 G96 G96 Constant surface speed control
02
G97 G97 G97 Constant surface speed control cancel
G98 G94 G94 Per minute feed
05
G99 G95 G95 Per revolution feed
- G90 G90 Absolute programming
03
- G91 G91 Incremental programming
- G98 G98 Return to initial level
11
- G99 G99 Return to R point level
G-codes are divided into the following two types.

Type Meaning
One-shot G-
The G-code is effective only in the block in which it is specified
code
Modal G- The G-code is effective until another G-code of the same group is
code specified

You might also like