NEWS
Still have a headache for the code in CNC programming? Today we are going to analyze some common G code and M code in detail, so that you can easily master the secrets of CNC programming!
G code is a code that indicates geometric movement. It tells the machine how to move, including linear motion, circular motion, hole machining, etc.G code is mainly used to define the movement trajectory of the tool and control the machine tool to cut along the specified path. Different G codes indicate different movements
G Code Classification and Functions
G00 - Rapid Positioning, the tool moves to the specified position at maximum speed.
G01 - Straight line cutting, the tool moves along a straight line at a set feed rate.
G02 - Clockwise circular cutting.
G03 - Counterclockwise circular cutting.
G90 - Absolute coordinate programming, the tool moves from the origin of the workpiece.
G91 - Relative Coordinate Programming, the starting point of tool movement is the current position.
G92 - Set current position to move the tool to the specified coordinates.
M code is a code that indicates miscellaneous functions. It is used to control some auxiliary functions of the machine tool, such as the start and stop of the coolant, the start and stop of the spindle, and tool change.
It is mainly used to control the auxiliary functions of the cnc machine rather than directly controlling the cutting motion.
M Code Classification and Function
M00 - Program pause, waiting for operator intervention.
M01 - Conditional program pause, program pauses when specific conditions are met.
M03 - Spindle forward.
M04 - Spindle reversal.
M05 - Spindle stop.
M06 - Change tool.
M08 - Coolant on.
M09 - Coolant off.
M30 - End of program, return to program start position.
M98 - Call subroutine.
M99 - End of subroutine and return to main program.
To summarize, G code and M code in CNC machine programming has its own unique role. G code is mainly responsible for controlling the trajectory of the machine tool to achieve accurate machining of the workpiece; while the M code is responsible for controlling the auxiliary actions of the machine tool to ensure the smooth progress of the machining process. By mastering and utilizing these modal instruction types, the machining efficiency and accuracy of CNC machine tools can be greatly improved.
Leave A Message
If you are interested in our products and want to know more details, please leave a message here, we will reply you as soon as we can.