Download PDF of G Code List
What is G Code?
G-code (also RS-274) is the most widely used computer numerical control programming language. It is used mainly in computer-aided manufacturing to control automated machine tools, and has many variants. G code instructions are first sent to a machine tool which tells the motors where to move, how fast to move and which position to go.
The two most common situations are that, within a machine tool such as a lathe or mill, a cutting tool is moved according to these instructions through a tool path cutting away material to leave only the finished workpiece and, an unfinished workpiece is precisely positioned in any of up to nine axes around the three dimensions relative to a tool path and, either or both can move relative to each other.
- Mill G Codes
- G00 Rapid Positioning Motion (X , Y , Z , A , B )
- G01 Linear Interpolation Motion (X , Y , Z , A , B , F )
- G02 Circular Interpolation Motion CW (X , Y , Z , A , I , J , K , R , F )
- G03 Circular Interpolation Motion CCW (X , Y , Z , A , I , J , K , R , F )
- G04 Dwell (P) (P=Seconds″.” Milliseconds)
- G09 Exact Stop, Non-Modal
- G17* Circular Motion XY Plane Selection (G02 or G03)
- G18 Circular Motion ZX Plane Selection (G02 or G03)
- G19 Circular Motion YZ Plane Selection (G02 or G03)
- G20 Inch Coordinate Positioning
- G21 Metric Coordinate Positioning
- G28 Machine Zero Return Thru Ref. Point (X , Y , Z , A , B )
- G29 Move to Location Through G28 Ref. Point (X , Y , Z , A , B )
- G40* Cutter Comp Cancel G41/G42/G141 (X , Y )
- G41 2D Cutter Compensation, Left (X , Y , D )
- G42 2D Cutter Compensation, Right (X , Y , D )
- G43 Tool Length Compensation + (H , Z )
- G49* Tool Length Compensation Cancel G43/G44/G43
- G52 Work Offset Positioning Coordinate
- G53 Machine Positioning Coordinate, Non-Modal (X , Y , Z , A , B )
- G54* Work Offset Positioning Coordinate #1 (Setting 56)
- G55 Work Offset Positioning Coordinate #2
- G56 Work Offset Positioning Coordinate #3
- G57 Work Offset Positioning Coordinate #4
- G58 Work Offset Positioning Coordinate #5
- G59 Work Offset Positioning Coordinate #6
The same concept also extends to non cutting tools such as forming or burnishing tools, photo plotting, additive methods such as 3D printing, and measuring instruments. G code is used in programming language, whether it is commercial or non-commercial, what is its use in both.
G code was initially used as a limited language with loops, conditional operators, and programmer-declared variables with natural-word-including names
The latest implementations of -code include macro language capabilities that are somewhat closer to a high-level programming language. Additionally, all primary manufacturers (eg, Fanuc, Siemens, Heidenhain) provide access to PLC data.