EMC2 "G-代码" 参考

转自 http://cnczone.cn/forums/t/60.aspx 
看了一下,跟 Fanuc 的一样啊

EMC2 "G-Code" 快速参考

Code

Parameters

Description

Motion

(X- Y- Z- A- B- C- apply to all motions)

G0

快速定位

G1

直线插补

G2, G3

I- J- K- or R-

顺时针圆弧插补、逆时针圆弧插补

G38.2

Straight Probe

G80

Cancel motion mode

G81

R- L- P-

钻孔循环

G82…G89

R- L- P- Q-

Other canned cycles

G33

K-

Spindle-synchronized motion

平面选择 (affects G2, G3, G81…G89)

G17

XY平面选择

G18

ZX平面选择(缺省)

G19

YZ平面选择

坐标模式

G90

绝对坐标编程

G91

增量坐标编程

进给量模式

G93

每分进给量

G94

时间倒数进给速度

单位

G20

英寸

G21

毫米

切割半径补尝

G41, G42

刀具半径左,右补尝

G40

刀具半径补尝取消

刀具长度补尝

G43

H-

刀具长度补尝

G49

取消刀具长度补尝

Return Mode in Canned Cycles

G98

退回至R

G99

退回至起始点

Path Control Mode

G61

准确路径方式

G61.1

准确停止方式

G64

P-

连续路径加工

Stopping

M0

程序停止

M2

程序结束

M1, M30, M60

程序选择停止

Spindle Control

M3, M4

S-

主轴顺时针,逆时针旋转

M5

主轴停止

Coolant

M7

1号冷却液开

M8

2号冷却液开

M9

冷却液全部关闭

Other Input Codes

F-

进给率

S-

设定主轴速度

T-

选择刀具

M48, M49

Enable/disable override switches

G54…G59, G59.1…G59.3

选择坐标系统

Flow-control Codes

O-

sub/endsub, while/endwhile, if/else/endif, do/while, call, break/continue/return

Non-modal Codes

M6

T-

换刀

G4

P-

暂停

G10

L2 P- X- Y- Z- A- B- C-

坐标系统原点设置

G28

返回机床坐标原点

G30

返回次机床坐标原点

G53

机床坐标系设置

G92

X- Y- Z- A- B- C-

工件坐标原点设置

G92.1

Cancel offset coordinate systems and set parameters to zero

G92.2

Cancel offset coordinate systems but do not reset parameters

G92.3

Apply parameters to offset coordinate systems

M101…M199

P- Q-

用户自定义M代码

(MSG,…)

显示信息""