G代碼和M代碼表彙總
G代碼是最爲廣泛使用的數控編程語言,主要在計算機輔助制造中用于控制自動機床。使用G代碼可以實現快速定位、逆圓插補、順圓插補、中間點圓弧插補、半徑編程、跳轉加工。
M是輔助功能:用于指定主軸旋轉方向,啓動停止,冷卻液的開關,工件,或者刀具的夾緊和松開,刀具的更換等功能,是由地址M和後兩位數字組成,部分功能與系統配置有關。
M是輔助功能:用于指定主軸旋轉方向,啓動停止,冷卻液的開關,工件,或者刀具的夾緊和松開,刀具的更換等功能,是由地址M和後兩位數字組成,部分功能與系統配置有關。
List of G codes
| G code G代碼 |
Group 組号 |
Meaning 含義 |
|---|---|---|
| G00 | 01* | Rapid motion (快速運動) |
| G01 | 01 | Linear interpolation motion (直線插補運動) |
| G02 | 01 | CW interpolation motion (順圓插補運動) |
| G03 | 01 | CCW interpolation motion (逆圓插補運動) |
| G04 | 00 | Dwell (暫停) |
| G09 | 00 | Exact stop (準确停止) |
| G10 | 00 | Programmable data input (可編程數據輸入) |
| G11 | 00 | Programmable data input cancel (可編程數據輸入取消) |
| G15 | 17* | Polar coordinate cancel (極坐标編程取消) |
| G16 | 17 | Polar coordinate (極坐标編程) |
| G17 | 02* | XY plane selection (XY平面選擇) |
| G18 | 02 | ZX plane selection (ZX平面選擇) |
| G19 | 02 | YZ plane selection (YZ平面選擇) |
| G20 | 06* | Select inches (選擇英制) |
| G21 | 06 | Select metric (選擇公制) |
| G28 | 00 | Return to reference point (返回參考點) |
| G29 | 00 | Return from reference point (從參考點返回) |
| G30 | 00 | Return to 2nd ,3rd,4th reference point (返回第2、3、4參考點) |
| G31 | 00 | Feed until skip (跳轉) |
| G33 | 01 | Threading (螺紋切削) |
| G40 | 07* | Cutter compensation cancel (取消刀具補償) |
| G41 | 07 | Cutter compensation left (刀具左補償) |
| G42 | 07 | Cutter compensation right (刀具右補償) |
| G43 | 08 | Tool length compensation + (刀具長度補償+) |
| G44 | 08 | Tool length compensation - (刀具長度補償-) |
| G49 | 08* | G43/G44 cancel (取消G43/G44) |
| G50 | 11* | G51 cancel (取消G51) |
| G51 | 11 | Scaling (比例縮放) |
| G52 | 00 | Set local coordinate system (設定局部坐标系) |
| G53 | 00 | Non-modal machine coordinate selection (非模态機床坐标系選擇) |
| G54 | 14* | Select work coordinate system 1 (設定工件坐标系1) |
| G55 | 14 | Select work coordinate system 2 (設定工件坐标系2) |
| G56 | 14 | Select work coordinate system 3 (設定工件坐标系3) |
| G57 | 14 | Select work coordinate system 4 (設定工件坐标系4) |
| G58 | 14 | Select work coordinate system 5 (設定工件坐标系5) |
| G59 | 14 | Select work coordinate system 6 (設定工件坐标系6) |
| G60 | 00 | Unidirectional positioning (單一方向定位) |
| G61 | 15 | Exact stop modal (模态準确停止) |
| G64 | 15* | G61 cancel (取消G61) |
| G65 | 00 | Macro call (調用宏程序) |
| G68 | 16 | Rotation (旋轉) |
| G69 | 16* | G68 cancel (取消G68) |
| G73 | 09 | Highspeed peck drilling cycle (高速深孔鑽循環) |
| G74 | 09 | Left-handed tapping cycle (左旋攻絲循環) |
| G76 | 09 | Fine boring canned cycle (精镗循環) |
| G80 | 09* | Canned cycle cancel (取消固定循環) |
| G81 | 09 | Drilling cycle (鑽孔循環) |
| G82 | 09 | Spot drilling cycle (鑽孔循環,孔底暫停) |
| G83 | 09 | Normal peck drilling cycle (普通深孔鑽循環) |
| G84 | 09 | Tapping cycle (攻絲循環) |
| G85 | 09 | Boring cycle (镗孔循環) |
| G86 | 09 | Boring cycle with spindle stop (镗/鉸孔循環,孔底主軸停止) |
| G87 | 09 | Back boring cycle (背镗循環) |
| G88 | 09 | Boring cycle (镗孔循環,孔底暫停後,主軸停) |
| G89 | 09 | Boring and dwell cycle (镗孔循環,孔底暫停,主軸不停) |
| G90 | 03* | Absolute (絕對編程方式) |
| G91 | 03 | Incremental (增量編程方式) |
| G92 | 00 | Set work coordinates (設定工件坐标系) |
| G94 | 05* | Feed per minute (每分進給) |
| G95 | 05 | Feed per revolution (每轉進給) |
| G96 | 13 | Constant surface speed (恒線速度切削) |
| G97 | 13* | Constant surface speed cancel (恒線速度切削取消) |
| G98 | 10* | Initial point return (返回初始點平面) |
| G99 | 10 | R plane return (返回R點平面)5 |
List of G codes(車床專用)
| G code G代碼 |
Group 組号 |
Meaning 含義 |
|---|---|---|
| G12.1 | 21* | Polar coordinate interpolation cancel (極坐标取消) |
| G13.1 | 21 | Polar coordinate interpolation (極坐标) |
| G70 | 00 | Finishing cycle (精車循環) |
| G71 | 00 | Stock removal in turning (外圓粗車循環) |
| G72 | 00 | Stock removal in facing (端面粗車循環) |
| G73 | 00 | Pattern repeating cycle (封閉切削循環) |
| G74 | 00 | End face peck drilling cycle (端面啄式鑽孔循環) |
| G75 | 00 | Longitudinal cut off cycle (切槽複合循環) |
| G76 | 00 | Multiple-thread cutting cycle (複合螺紋切削循環) |
| G83 | 10 | Cycle for face drilling (端面鑽孔循環) |
| G84 | 10 | Cycle for face tapping (端面攻絲循環) |
| G85 | 10 | Cycle for face boring (端面镗孔循環) |
| G87 | 10 | Cycle for side drilling (側面鑽孔循環) |
| G88 | 10 | Cycle for side tapping (側面攻絲循環) |
| G89 | 10 | Cycle for side boring (側面镗孔循環) |
| G98 | 05* | Feed per minute (每分進給) |
| G99 | 05 | Feed per revolution (每轉進給) |
List of M codes
| M code M代碼 |
Meaning 含義 |
|---|---|
| M00 | Stop program (程序停止) |
| M01 | Optional program stop (程序選擇停止) |
| M02 | Program end (程序結束) |
| M03 | Spindle forward (主軸正轉) |
| M04 | Spindle reverse (主軸反轉) |
| M05 | Spindle stop (主軸停轉) |
| M06 | Tool change (自動換刀) |
| M07 | Coolant ON (Mist) (冷卻液開啓(霧狀)) |
| M08 | Coolant ON (Flood) (冷卻液開啓(水狀)) |
| M09 | Coolant OFF (冷卻液關閉) |
| M19 | Orient spindle (主軸定向) |
| M30 | Program end and rewind (程序結束并反繞) |
| M31 | Chip conveyor forward (排屑器正轉) |
| M32 | Chip conveyor reverse (排屑器反轉) |
| M33 | Chip conveyor stop (排屑器停轉) |
| M34 | Increment coolant spigot position (冷卻液噴嘴位置上升) |
| M35 | Decrement coolant spigot position (冷卻液噴嘴位置下降) |
| M36 | Pallet rotate (托盤回轉) |
| M39 | Rotate tool turret (刀具轉塔架回轉) |
| M41 | Low gear shift (切換低擋齒輪) |
| M42 | High gear shift (切換高擋齒輪) |
| M50 | Execute pallet change (執行托盤交換) |
| M82 | Tool unclamp (刀具松開) |
| M86 | Tool clamp (刀具夾緊) |
| M88 | Through the spindle coolant ON (主軸中心孔冷卻開啓) |
| M89 | Through the spindle coolant OFF (主軸中心孔冷卻關閉) |
| M95 | Sleep mode (睡眠模式) |
| M96 | Jump if no input (無輸入則跳轉) |
| M97 | Local subprogram call (局部子程序調用) |
| M98 | Subprogram call (子程序調用) |
| M99 | Subprogram return or loop (子程序返回或循環執行) |