Last Updated: 2024-01-17 By 3 Min Read

What is G-code for CNC Programming and Machining?

G-code is a type of easy-to-use preparatory computer numerical control programming language used in CAM software to control a CNC machine to work automatically.

G-code

What is G code?

G-code is the most common CNC programming language used in CAM (Computer Aided Manufacturing) software to control automatic machine tools, which is also known as RS-274.

G code is the instruction in the CNC program, which is referred to as the G command. Using G code can realize rapid positioning, reverse circular interpolation, parallel circular interpolation, intermediate point circular interpolation, radius programming, and jump processing for CNC machining.

What is G-code interpreter?

The G code interpreter is an important module of the CNC controller software. CNC machines usually use G codes to describe the machining information of the machine tool, such as the tool path, the selection of coordinates, and the opening of the coolant. It is the main function of the G-code interpreter to interpret G-codes into data blocks that can be recognized by the CNC system. The openness of the G-code interpreter is also a problem that must be considered in the design and implementation.

In the G-code interpreter, keyword decomposition of G-code is the skeleton, and grouping of code is the basis for syntax checking.

The G code interpreter reads the G code, interprets it into G intermediate code, and then undergoes interpolation and position control processing, and finally the output module calls the driver to output it to the PCI or ISA card of a CNC machine.

What does G code stand for?

G00 stands for quick positioning.

G01 stands for linear interpolation.

G02 stands for clockwise circular interpolation.

G03 stands for counterclockwise circular interpolation.

G04 stands for timed pause.

G05 stands for arc interpolation through intermediate points.

G06 stands for parabolic interpolation.

G07 stands for Z-spline interpolation.

G08 stands for feed acceleration.

G09 stands for feed deceleration.

G10 stands for data setup.

G16 stands for polar programming.

G17 stands for machining XY plane.

G18 stands for machined XZ plane.

G19 stands for machined YZ plane.

G20 stands for imperial sizes (Frank system).

G21 stands for metric sizes (Frank system).

G22 stands for radius size programmatically.

G220 stands for use on system operating interface.

G23 stands for Diameter Size Programmable.

G230 stands for use on the system operating interface.

G24 stands for end of subroutine.

G25 stands for Jump Machining.

G26 stands for loop machining.

G30 stands for magnification write-off.

G31 stands for magnification definition.

G32 stands for Equal Pitch Thread Cutting, Imperial.

G33 stands for Equal Pitch Thread Cutting, Metric.

G34 stands for increased pitch thread cutting.

G35 stands for reduced pitch thread cutting.

G40 stands for tool offset/tool offset logout.

G41 stands for cutter compensation - left.

G42 stands for cutter compensation - right.

G43 stands for tool offset - positive.

G44 stands for tool offset - negative.

G45 stands for tool offset +/-.

G46 stands for tool offset +/-.

G47 stands for tool offset-/-.

G48 stands for tool offset -/+.

G49 stands for tool offset 0/+.

G50 stands for tool offset 0/-.

G51 stands for tool offset +/0.

G52 stands for tool offset-/0.

G53 stands for straight offset, log off.

G54 stands for straight offset X.

G55 stands for straight offset Y.

G56 stands for straight offset Z.

G57 stands for linear offset XY.

G58 stands for straight offset XZ.

G59 stands for straight offset YZ.

G60 stands for accurate path mode (fine).

G61 stands for accurate path mode (middle).

G62 stands for accurate path mode (coarse).

G63 stands for tapping.

G68 stands for tool offset, inside corner.

G69 stands for tool offset, outside corners.

G70 stands for imperial sizes.

G71 stands for metric sizes.

G74 stands for reference point return (machine zero).

G75 stands for returning to the programmed coordinate zero.

G76 stands for threaded compound loops.

G80 stands for canned cycle logout.

G81 stands for external canned cycles.

G331 stands for threaded canned cycles.

G90 stands for absolute size.

G91 stands for relative size.

G92 stands for prefab coordinates.

G93 stands for countdown time, feedrate.

G94 stands for feed rate, feeds per minute.

G95 stands for feed rate, feed per revolution.

G96 stands for constant linear speed control.

G97 stands for cancel constant linear speed control.

How to Use a CNC Plasma Cutter for Beginners?

2022-09-07Prev Post

Can You Use Regular Router Bits in a CNC Machine?

2022-12-16Next Post

Further Reading

2025 Best CAD/CAM Software for CNC Machines (Free & Paid)
2025-02-062 Min Read

2025 Best CAD/CAM Software for CNC Machines (Free & Paid)

Looking for a free or paid CAD and CAM software for CNC machining based on Windows, macOS, Linux? Review this guide to find out the 21 best CAD/CAM software of 2025 for popular CNC machines, including AutoCAD, MasterCAM, PowerMill, ArtCAM, AlphaCAM, Fusion 360, SolidWorks, hyperMill, UG & NX, SolidCAM, Solid Edge, BobCAD, ScultpGL, K-3D, Antimony, Smoothie 3D, DraftSight, CATIA, CAMWorks, HSM, SprutCAM.

How to Install and Use NcStudio for CNC Router Machine?
2024-01-1713 Min Read

How to Install and Use NcStudio for CNC Router Machine?

Weihong Ncstudio software is a movement control system for CNC routers, this manual will help you to learn how to install and use NcStudio controller & software for CNC router machine.

How To Maintain CNC Router for Longer Service Time?
2021-08-312 Min Read

How To Maintain CNC Router for Longer Service Time?

During operating the CNC router, the daily maintenance is a very important thing to make the CNC machine has a longer service time.

A Beginner's Guide To Pros and Cons of CNC Machining
2025-11-268 Min Read

A Beginner's Guide To Pros and Cons of CNC Machining

CNC machining is a computer-guided manufacturing process, which is used to make precision parts out of various materials ranging from metal to plastic and even wood. This beginner's guide reveals exactly what is CNC machining, how CNC machining works, and its types and processes, as well as the benefits it offers over manual machining and other manufacturing methods. You'll also learn why so many industries from aerospace to healthcare depend on it. While understanding its advantages, we also list its common disadvantages so that you can pay attention to them when purchasing or operating a CNC machine.

How to Buy a Wood CNC Machine for Home Doors?
2021-04-214 Min Read

How to Buy a Wood CNC Machine for Home Doors?

All types of wood CNC machines are appearing on the market for furniture making, and we'll make a guide to buy the best CNC machine for home door making.

NcStudio Controller Chinese-English User Manual
2021-04-154 Min Read

NcStudio Controller Chinese-English User Manual

In order to solve the language problem in the use of NcStudio controller, STYLECNC will offer the Chinese-English manual for NcStudio software troubleshooting.

Post Your Review

1 to 5-star rating

Share Your Thoughts And Feelings With Others

Click To Change Captcha