1. 首页
  2. 技术文章
  3. FANUC

FANUC 测头9811程序

 

O9811(HAMOO XYZ MEASURE)

G65P9724

IF[#19EQ#0]GOTO1

IF[#20EQ#0]GOTO1

#3000=91(ST INPUT MIXED)

N1

IF[#19EQ#0]GOTO2

IF[#11EQ#0]GOTO2

#3000=91(SH INPUT MIXED)

N2

IF[#20EQ#0]GOTO3

IF[#13EQ#0]GOTO3

#3000=91(TM INPUT MIXED)

N3

#1=135

WHILE[#1LE149]DO1

#[#1]=#0

#1=#1+1

END1

#10=#5041(X START)

#12=#5042(Y START)

G31X[#10-#502]Y[#12-#503]F#119

G53

IF[ABS[#5061-[#10-#502]]GE#123]GOTO22

IF[ABS[#5062-[#12-#503]]GE#123]GOTO22

#30=-1(DIR FLAG)

IF[#24NE#0]GOTO5

IF[#25NE#0]GOTO7

(Z MOVE)

IF[#26EQ#0]GOTO225

#7=5203

IF[[#5043-#116]LT#26]GOTO4

#30=1

N4

G65P9726Z#26Q#17

IF[#149NE0]GOTO21

#135=#10

#136=#12

#137=#126-#116(Z POS)

#138=#137

IF[#8EQ#0]GOTO45

#138=#138+#[2000+#8](SIZE)

N45

#142=#137-#26(Z ERROR)

#143=#138-#26(SIZE ERROR)

#145=ABS[#142](T P ERR)

#146=#143*#30(METAL CON)

GOTO9

N5(X MOVE)

IF[#25NE#0]GOTO225

IF[#26NE#0]GOTO225

#6=#500

#7=5201

IF[#5041LT#24]GOTO6

#6=-#500

#30=1

N6

G65P9726X#24Q#17S#500

IF[#149NE0]GOTO21

#135=#124+#6+#502(COR SKIP POS)

#136=#12

#138=#135

IF[#8EQ#0]GOTO65

#138=#138+#[2000+#8](ACT SIZE)

N65

#140=#135-#24(X ERROR)

#143=#138-#24(SIZE ERROR)

#145=ABS[#140](T P ERROR)

#146=#143*#30(METAL CON)

GOTO9

N7(Y MOVE)

IF[#26NE#0]GOTO225

#6=#501

#7=5202

IF[#5042LT#25]GOTO8

#6=-#501

#30=1

N8

G65P9726Y#25Q#17S#501

IF[#149NE0]GOTO21

#135=#10

#136=#125+#6+#503(Y SKIP POS)

#138=#136

IF[#8EQ#0]GOTO85

#138=#138+#[2000+#8](ACT SIZE)

N85

#141=#136-#25(ERROR)

#143=#138-#25(SIZE ERROR)

#145=ABS[#141](TP ERROR)

#146=#143*#30(METAL CON)

N9

#147=#30

IF[#23EQ#0]GOTO10

G65P9730H#11M#13S#19T#20W#23X#24Y#25Z#26

N10

IF[#21EQ#0]GOTO11(U UPPER TOL)

IF[ABS[#143]GE#21]GOTO23

IF[#145GE#21]GOTO23

N11

IF[#11EQ#0]GOTO13

IF[ABS[#143]LT#11]GOTO12

#148=1

N12

IF[#120AND4EQ4]GOTO13

IF[ABS[#143]LT#11]GOTO13

G0X#10Y#12

#[3006-[[#120AND8]/8*6]]=1(OUT OF TOL)

N13

IF[#13EQ#0]GOTO15

IF[ABS[#145]LT[#13/2]]GOTO14

#148=2

N14

IF[#120AND4EQ4]GOTO15

IF[ABS[#145]LT[#13/2]]GOTO15

G0X#10Y#12

#[3006-[[#120AND8]/8*6]]=1(OUT OF POSITION)

N15

IF[#20EQ#0]GOTO19

IF[ABS[#146]LT#22]GOTO19(NULL BAND)

IF[#9NE#0]GOTO16

#9=1

N16

G65P9732T#20C[#146*#9]Z#26

N19

IF[#19EQ#0]GOTO24

G65P9732S#19Z#26W1.0

GOTO24

N21

IF[#149NE2]GOTO22

G0X#10Y#12

#3000=93(PROBE FAIL)

N22

G0X#10Y#12

#3000=92(PROBE OPEN)

N225

G0X#10Y#12

#3000=91(XYZ INPUT MIXED)

N23

#148=3

IF[#120AND4EQ4]GOTO24

G0X#10Y#12

#[3006-[[#120AND8]/8*6]]=1(UPPER TOL EXCEEDED)

N24

G0X#10Y#12

M99

%

 
问答社区  发起问答  报警查询  技术文章  维修服务  资料下载  网址导航  申请 VIP   交流群

本文转载来自【公众号:数控e家】,仅供大家学习交流,如侵权请联系站长删文。

发表评论

登录后才能评论

联系我们

【数控驿站】

在线咨询:点击这里给我发消息

联系微信:QQ594673193

联系邮箱:594673193@qq.com

工作时间:07:00~23:00

QR code