Сколько G-кодов в машине с ЧПУ

Содержание

There are over a hundred G-code commands for CNC programming.

Most of the G-codes are common for every CNC programming operation. However, certain G-codes are specific to the type of operation like milling, turning, drilling, etc.

There can be variation in the G-code list between the different CNC manufacturers.

Every machine does not support every G-code. Additionally, machines with unique features or multi-axis machining capabilities might have additional G-codes. The manufacturer may provide instructions on the G-codes for CNC programming in the reference annual provided with the machine.

What are the Common G-code Commands Used in CNC Machines?

?There are over a hundred G-codes used in the CNC programming process. Therefore, it can be difficult to memorize all the individual codes and their meanings.

Below is a G-code list for the commonly used commands in the CNC programming process.

You can use this list as a reference point when writing any CNC programming file. It is useful to memorize important commands such as the G00-G03 as they are used throughout every CNC programming project.

CNC Movement and Travel
The codes below are used for controlling the movement and tool path in the CNC programming:

G00: Rapid Move of the Machine Tool
Rapid move command moves the tool from one point to another without cutting the material. The movements are done at highest speed possible. Therefore, no feed rate is required for the rapid move commands. It requires location coordinates in the X axis, Y axis, and Z axis.

G01: Linear Interpolation of the Machine Tool
Linear interpolation moves the tool from one point to another in a straight line. The speed is according to a feed rate specified by ‘F’ in the G01 command block.

G02: Clockwise Arc Circular Interpolation
Instead of a straight line, G02 commands the cutting tool to cut in an arc in the clockwise direction. It requires a feed rate specified by the value ‘F’. It requires the specification of the center point (I, J, K) or the radius (R) of the arc.

G03: Counter Clockwise Arc Circular Interpolation
Same as G02. instead of clockwise direction, it cuts an arc in the counterclockwise direction.

G04: Dwell
Dwell indicates a pause in the program. It ceases the machine movements but the auxiliary functions stay on. For instance, the spindle keeps on moving while the program is in Dwell mode. The duration of the dwell is indicated by pause time ‘P’. The machine reads the P value in seconds.

G09: Exact Stop
The exact stop G-code is used when a sharp corner is required. Conventional machining creates rounded corners due to the inertia of the cutting tool. G09 elimiantes this problem by stopping the cutting tool temporarily at the corner and then moving it again, leading to perfectly sharp corners.

Plane Selection
Plane selection G-код programs specify the two-dimensional plane in the X, Y, Z axis cartesian coordinate system. These commands are:

G17 – XY Plane Selection
G18 – XZ Plane Selection
G19 – YZ Plane Selection
Dimensions
G-code programs for dimensions indicate which measurement units are chosen. These commands are:

G20: Change unit measurement to inches
G21: Change unit measurement to millimeters
Compensation Codes
Cutter compensation codes consider parameters such as the tool length and tool radius. Using these commands can increase the precision of the overall CNC operation.

They are also known as tool offsets. These commands are:

G40 – Turn off tool compensation
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.

cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.

cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.

cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.

cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.
cURL Too many subrequests.

G98 – Return to Initial Plane
G99 – Return to Rapid Plane
Lesser Used G Codes
Some of the G-codes are not as common as the ones listed above. However, you may need them now and then for specific program requirements. Here is a list of some of the lesser used G-code:

G10 – Programmed Offset Input
G22 – Stored Stroke Limit
G23 – Stored Stroke Limit Cancel
G27 – Zero Return Check
G28 – Zero Return
G29 – Return From Reference Position
G30 – Second Position Zero Return
G31 – Skip Function
G44 – Negative Tool Length Compensation
G45 – Single Offset Increase
G46 – Single Offset Decrease
G47 – Double Offset Increase
G48 – Double Offset Decrease
G51 – Scaling
G52 – Temporarily Shift Program Zero
G53 – Return to Machine Zero Position
G60 – Single Direction Move
G61 – Exact Stop Check (Modal)
G64 – Normal Cutting Mode
G65 – Custom Macro Call
G66 – Custom Macro Modal Call
G67 – Cancel Custom Macro Modal Call
G68 – Coordinate Rotation Mode
G69 – Cancel Coordinate Rotation Mode
G92 – Program a Work Offset

Are There Any Safety Considerations When Programming G-code For CNC Machines

Yes, some safety considerations exist when programming G-code for a CNC machine. A CNC machine is capable of cutting material of extreme hardness.

Therefore, incorrect G-code can be a safety hazard for the machine, the operator, and the work area. The G-code should consider factors such as the work offsets and tool length offsets to ensure there is no tool breakage.

Tool breakage is a frequent accident that occurs due to tool collisions. Running prior simulations in CAD and CAM software can eliminate any chances of errors and bugs in the G-code.

 

XTJ — ведущий OEM-производитель, который занимается предоставлением комплексных решений от прототипа до производства. Мы гордимся тем, что являемся сертифицированной системой управления качеством ISO 9001, и стремимся создавать ценность в каждом клиентском взаимодействии. Мы достигаем этого через сотрудничество, инновации, улучшение процессов и исключительное мастерство.

пробовать

 

Добро пожаловать! Поделитесь этой страницей:
Изображение Hafiz Pan

Hafiz Pan

Hafiz Pan is a leading figure in precision manufacturing content marketing and serves as Director of Content Marketing at XTJ Precision MFG, with over eight years of end-to-end expertise in CNC machining, 3D printing, sheet metal fabrication, vacuum infusion, and advanced surface treatments.
He excels at translating complex manufacturing processes into engineer-focused professional content, leading SEO and data-driven strategies that dominate key industry search terms.
A regular contributor to Modern Machine Shop and Production Machining, Hafiz has published 20+ technical articles with individual pieces surpassing 80,000 reads. He is a sought-after speaker at IMTS, Formnext, and other global events, sharing real-world insights on content-powered manufacturing branding — widely recognized as “the marketer who truly speaks the engineer’s language.”

Brand Marketing Director at XTJ Precision Manufacturing Portrait of an Expert in the Precision Manufacturing Field
логотип-новости

Получите цены напрямую с завода!

Дешево

Обработка ЧПУ и прототипирование, изготовление листового металла и форм

Связанные продукты

[blog_related_products]

Связанные новости

Прокрутить вверх

Получите бесплатное предложение сейчас!

Форма обратной связи

Пожалуйста, приложите ваши 2D-чертежи CAD и 3D-модели CAD в любом формате, включая STEP, IGES, DWG, PDF, STL и др. Если у вас несколько файлов, сожмите их в ZIP или RAR. Также вы можете отправить запрос на коммерческое предложение по электронной почте [email protected]