Concept 1: Instruction grouping: Group instructions with similar functions into one group. G codes of the same group cannot appear in the same line of program segment at the same time.
Concept 2: Program segment The program segment is the basic component of the program. The program segment is composed of different instructions. The following are the instructions that must be taught in our school during the course. After understanding the basic methods of programming, you can program by mastering these instructions.
Concept 3: Common instruction types The format of the instruction is composed of English letters + numbers. For example, G54 G_ X_Y_Z_ F_ S_ T_ M_G_ G code X_Y_Z_ Linear axis of the machine tool F_ Feed speed S_ Main rotation speed T_ Tool instruction M_ Auxiliary function
The most commonly used M code M3 Main rotation forward M4 Main rotation reverse M5 Main rotation stop For example: M3 S600 Spindle forward, speed 600 r/min M06 Tool change instruction such as T1 M06 is to change the first tool
The following focuses on G code 01 Group G code is used to control the movement of the tool. G00 Rapid point positioning G00 X_Y_Z_; The tool moves at a rapid speed to the position in the workpiece coordinate system specified by the absolute value command (G90) or incremental value command (G91). The moving speed is specified by the machine tool parameters. G01 linear interpolation G01 X_Y_Z_ F_ G02 clockwise circular interpolation Command format: G02 X_ Y_ Z_ R_ F_ / G03 X_ Y_ Z_ I_ J_ K_ F G03 counterclockwise circular interpolation Command format: G03 X_ Y_ Z_ R_ F_ / G03 X_ Y_ Z_ I_ J_ K_ F_ X_ Y_ Z_ End point coordinates of the arc R_ Radius of the arc I_ Position of the end point of the arc relative to the X direction of the tool J_ Position of the end point of the arc relative to the Y direction of the tool K_ Position of the end point of the arc relative to the Z direction of the tool F_ There are two ways to define the speed F: G94 feed per minute (tool moving speed per minute mm/min) / G95 feed per revolution (the distance the tool moves for each spindle rotation mm/r)
G code tool length compensation G43 Length compensation command such as G43H01 At the tool change point, the distance from the tool tip to the workpiece Z zero point is “H01″. What is “H01″? H01 is the offset value, that is, I write the distance from the tool tip to the workpiece Z zero plane at H01 in the offset table. G54 workpiece coordinate system, we write the position of the workpiece zero point into the coordinate system list. G54 is just the most commonly used position in the list. Others include G55 G56 G57 G58 G59, etc., and their meanings are the same as G54. G code used for drilling, boring, and reaming. G81 format is G81 X_ Y_ Z_ R_ F_; X_Y_ hole position coordinates (that is, the position of the hole) Z_ hole depth R_ safety height bottom, that is, at what position does the high tool move to start feeding movement? F_ feed speed. There are many G80 fixed cycle end codes, such as G81 G83 G84 G85 G86 G87 G73 G74 G76, etc. The actions of each command are different, but once you master one, you can understand the others by reading the instructions. G84 and G76 are a little complicated.
That’s all for the entry-level commands. The following is an example. Through this example, I think you should be able to master the usage of the above commands!
Post time: Apr-24-2025