Jul 28, 2021 Leave a message

Hobby cnc mill commonly used G code and M code collection, collected it!


In the process of using hobby cnc mill, there are two most common CNC codes, one is G code and the other is M code. This article sorts out the meanings of common G codes and M codes. Different manufacturers and different CNC systems may differ slightly. In practice, the instructions shall prevail.


G code: preparation function, control machine tool action (such as G00 rapid traverse)


M code: auxiliary function, auxiliary machine tool movement. (For example, M03 spindle rotates forward)


01 G code command

G00 - rapid positioning G01 - linear interpolation G02 - circular interpolation (clockwise) G03 - circular interpolation (counterclockwise) G04 - pause G05 - high-speed and high-precision control 1 (partial machine tools) G05 .1 - High speed and high precision control 2 (part of machine tool) G07.1/107 - Cylinder interpolation (part of machine tool) G09 - Correct stop check (part of machine tool) G10 - Program parameter input/correction input (part of machine tool) ) G11 - Program parameter input cancellation (partial machine tool) G12 - Full circle cutting CW (partial machine tool) G13 - Full circle cutting CCW (partial machine tool) G12.1/112 - Polar coordinate interpolation valid (partial machine tool) G13.1/113 - Polar coordinate interpolation cancel (part of machine tool) G15 - Polar coordinate command cancel (part of machine tool) G16 - Polar coordinate command valid (part of machine tool) G17 - XY plane selection G18 - ZX plane selection G19 - YZ plane selection G20 - Choose inch system G21 - Choose metric system G28 - Return to reference point G29 - Return from reference point G30 - Return to the 2nd~4th reference point (part of machine tool) G30.1 - Reset tool Position 1 (part of the machine tool) G30.2 - reset tool position 2 (part of the machine tool) G30.3 - reset tool position 3 (part of the machine tool) G30.4 - reset tool position 4 (part of the machine tool) G30.5 - Reset tool position 5 (part of the machine tool) G30.6 - Reset tool position 6 (part of the machine tool) G31 - Jump function (part of the machine tool) G31.1 - Jump function 1 (part of the machine tool) G31.2 - Jump function 2 (Part of machine tool) G31.3 - Jump function 3 (Part of machine tool) G32 - Modal G command G33 - Thread cutting G34 - Special fixed cycle (circumferential hole cycle) G35 - Special fixed cycle (angle linear hole cycle) ) G36 - Special canned cycle (arc) G37 - Automatic tool length measurement G37.1 - Special canned cycle (checkerboard hole cycle) G38 - Tool diameter compensation vector designation G39 - Tool diameter compensation corner arc compensation G40 - Tool diameter compensation cancel G41 - Tool diameter compensation left G42 - Tool diameter compensation right G40.1 - Normal line control cancel G41.1 - Normal line control left effective G42.1 - Normal line control right effective G43 - Tool length setting (positive) G44 - Tool length setting (negative) G43.1 - 1st spindle control effective G 44.1 - 2nd spindle control effective G45 - Tool position setting (expansion) G46 - Tool position setting (reduced) G47 - Tool position setting (double) G48 - Tool position setting (halved) G47.1 2 - Spindle simultaneous control valid G49 - Tool length setting cancel G50 - Scaling cancel G51 - Scaling valid G50.1 - G command mirror image cancel G51.1 - G command mirror image valid G52 - Local coordinate system setting G53 - Machine coordinate system selection G54 - Workpiece coordinate system (first) default G55 - Workpiece coordinate system (second) G56 - Workpiece coordinate system (third) G57 - Workpiece Coordinate system (fourth) G58 - Workpiece coordinate system (fifth) G59 - Workpiece coordinate system (sixth) G60 - Single direction positioning G61 - Exact stop mode G62 - Mirror command G63 - Tapping mode G64 - Cancel G61 G65 - Macro call subroutine G68 - Rotate G17, G18, G19, XY, Z, R G69 - Cancel G68 G70 - Circumferential drilling G71 - Arc drilling G72 - Angle drilling G73 - High speed deep drilling cycle G74 - Back tapping cycle G76 - Fine boring cycle G77 - Back boring cycle G80 - Cancel fixed cycle G81 - Drilling cycle G82 - Point drilling cycle G83 - Deep hole drilling cycle G84 - Tapping cycle G85 - Boring cycle G86 - Boring/stop cycle G87 - Boring/retract cycle G88 - Boring/pause/retract G89 - Boring Hole/pause cycle G90 - Absolute value programming G91 - Incremental programming G92 - Set workpiece coordinates G93 - Number of feeds per minute G94 - Feed rate per minute G98 - Starting point return G99 - R plane Select G98-canned cycle return to the starting point (part of the machine tool) G99-return to the fixed cycle R point (part of the machine tool) G114.1-spindle synchronization control G100~225-user macro (G code call) up to 10


02 M code command

M00 - Program stop (pause) M01 - Program selective stop/selective application M02 - Program end M03 - Spindle forward M04 - Spindle reverse M05 - Spindle stop M06 - Automatic tool exchange M07 - Blow start M08 - Cutting fluid start M09 - Cutting fluid close M10 - Work table (B axis) lock M11 - Work table (B axis) loose M13 - Spindle clockwise rotation and cutting fluid M14- -Spindle counterclockwise rotation and add cutting fluid M15 - Positive direction movement M16 - Negative direction movement M19 - Spindle positioning M21 - X axis mirror image start M22 - Y axis mirror image start M23 - Mirror image cancel M24- -The fourth axis mirror image start M25 - The fourth axis clamp M26 - The fourth axis release M27 - Index function M29 - Rigid tapping M30 - Program end/automatic power off M48 - Deep drilling Hole start M52 - Tool magazine move to the right M53 - Tool magazine move to the left M70 - Automatic tool creation M71 - Tool pocket down M72 - Tool change arm 60° M73 - Spindle tool release M74 - Tool change arm 180 ° M75 - Spindle clamping tool M76 - Tool change arm 0° M77 - Tool arm upward M81 - Workbench exchange confirmation M82 - Workbench M83 - Workbench down M84 - Workbench extension M85 - Workbench retracts M86 - Workbench door opens M87 - Workbench door closes M98 - Call subroutine M99 - End of subroutine



Send Inquiry

whatsapp

skype

E-mail

Inquiry