CNC machining instructions

CNC machining instructions

CNC machining refers to the processing with CNC machining tools. CNC index controlled machine tool is programmed by NC machining language, usually G code. NC machining G code language tells CNC machine tool which Cartesian position coordinates, and controls the tool feed speed and spindle speed, as well as tool converter, coolant and other functions. Compared with manual machining, CNC machining has great advantages, such as the parts produced by CNC machining are very accurate and repeatable; CNC machining can produce parts with complex shapes that cannot be completed by manual processing. CNC machining technology has been widely promoted, most of the machining workshops have the ability of NC machining. The most common NC machining methods in typical machining workshops are CNC milling, CNC lathe and CNC EDM wire cutting (WEDM). The tool for NC milling is called CNC milling machine or CNC machining center. CNC turning lathe is called CNC lathe center. NC machining G code can be manually programmed, but usually the machining workshop uses CAM software to automatically read CAD file and generate G code program to control NC machine tool. Leading CNC machine tool brands include Hass, DMG (Deckel MAHO GILDEMEISTER), Mazak, Mori Seiki, fadal and wasino.

Several groups of common instructions for CNC machining

1、 Pause instruction g04x (U)_ /P_ It refers to the tool pause time (feed stop, spindle does not stop), the value after address P or X is the pause time. The value after X should have a decimal point. Otherwise, it should be calculated by one thousandth of this value in seconds (s). The value after P cannot have a decimal point (i.e., an integer), and the unit is Ms. For example, G04 x2.0; or G04 X2000; pause for 2 seconds G04 P2000; but in some hole series processing instructions (such as g82, G88 and g89), in order to ensure the roughness of the hole bottom, when the tool is machined to the hole bottom, there must be a pause time, which can only be expressed by the address P. if the address x is used, the control system thinks that x is the x-axis coordinate value for execution. For example, g82x100.0y100.0z-20.0r5.0f200p2000; drilling (100.0100.0) to the bottom of the hole for 2 seconds; g82x100.0y100.0z-20.0r5.0f200x2.0; drilling (2.0100.0) to the bottom of the hole will not be suspended.

2、 The difference and connection of M00, M01, M02 and M30 are program unconditional pause instructions. When the program is executed, the feed stops and the spindle stops. To restart the program, you must first return to the og state, press CW (spindle forward rotation) to start the spindle, and then return to the auto state and press the start key to start the program. M01 is the program selective pause instruction. The op stop key on the control panel must be opened before the program is executed. The effect after execution is the same as that of M00. Restart the program as above. M00 and M01 are often used in the inspection or chip removal of workpiece size in the process of machining. M02 is the end instruction of main program. Execute this command, feed stop, spindle stop, coolant off. But the program cursor stops at the end of the program. M30 is the main program end instruction. The function is the same as that of M02, except that the cursor returns to the program head position, regardless of whether there are other program segments after M30.

3、 The meaning of the address D and H is the same. The tool compensation parameters D and H have the same function and can be interchanged arbitrarily. They all represent the address name of the compensation register in the CNC system, but the specific compensation value is determined by the compensation number address behind them. However, in order to prevent errors in the machining center, generally, h is the tool length compensation address, the compensation number is from No. 1 to No. 20, D is the tool radius compensation address, and the compensation number starts from No. 21 (tool magazine of 20 tools). For example, g00g43h1z100.0; g01g41d21x20.0y35.0f200;

4、 Mirror instruction mirror processing instruction M21, M22, M23. When only the x-axis or y-axis is mirrored, the cutting sequence (forward milling and reverse milling), cutter compensation direction and circular interpolation steering will be opposite to the actual program. When the x-axis and y-axis are mirrored at the same time, the tool feed sequence, tool compensation direction and circular interpolation direction remain unchanged. Note: after using the mirror instruction, M23 must be used to cancel, so as not to affect the following program. In G90 mode, if mirror or cancel command is used, it can be used only after returning to the origin of workpiece coordinate system. Otherwise, the NC system can not calculate the motion track behind, which will lead to the phenomenon of random tool walking. At this time, it is necessary to implement manual origin reset operation to solve the problem. The spindle rotation does not change with the mirror command.

5、 Circular interpolation instruction G02 is clockwise interpolation, G03 is counter clockwise interpolation, in XY plane, the format is as follows: G02 / g03x_ Y_ I_ K_ F_ Or G02 / g 03 x_ Y_ R_ F_ Where x and y are the coordinates of the end point of the arc, I and j are the increment values from the starting point of the arc to the center of the circle on the X and Y axes, R is the radius of the arc, and F is the feed rate. In circular arc cutting, it should be noted that Q ≤ 180 ° R is positive; Q > 180 ° R is negative; I and K can also be specified by R. when both are specified, R command has priority, I and K are invalid; R cannot be used for whole circle cutting, and can only be programmed with I, J and K, because there are countless circles with the same radius passing through the same point. When I and K are zero, they can be omitted; regardless of G90 or G91 mode, I, J, K are programmed according to relative coordinates; when circular interpolation, tool compensation instruction G41 / G42 cannot be used.

6、 The advantages and disadvantages between G92 and G54-G59 are the coordinate system set before machining, while G92 is the coordinate system set in the program. If G54-G59 is used, there is no need to use G92, otherwise G54-G59 will be damaged

About the author

chengcg administrator

    Leave a Reply