发那科加工中心半自动分中宏程序


Faunc加工中心半自动分中宏程序


 

%

O9006(1/4NEW ALL-COORDINATE SYSTEM AUTO SET)

N1(PLEASE INPUT #1 AND #2) 

#1 =#999(CHOOSE COORDINATE SYSTEM G54-G59)

 #2 =0.1(THICKNESS OF FILLER GAUGE)

 IF [#2 LE 0 ]GOTO2

IF [#2 GT 1 ]GOTO2

 IF [#1 EQ 54 ]GOTO10

IF [#1 EQ 55 ]GOTO10

 IF [#1 EQ 56 ]GOTO10

IF [#1 EQ 57 ]GOTO10

 IF [#1 EQ 58 ]GOTO10

IF [#1 EQ 59 ]GOTO10

#3000 =1(YOU INPUT ERR,INPUT 54-59)

N2

#3000 =2(YOU INPUT ERR,INPUT 0.01-1.0)

 N10

(X POS AUTO SET)

#991 =#5021(READ CURRENT X POS X1)

 M99

%

 

%

O9007(2/4NEW ALL-COORDINATE SYSTEM AUTO SET)

N1(PLEASE INPUT #1 AND #2) 

#1 =#999(CHOOSE COORDINATE SYSTEM G54-G59)

 #2 =0.1(THICKNESS OF FILLER GAUGE)

 IF [#2 LE 0 ]GOTO2

IF [#2 GT 1 ]GOTO2

 IF [#1 EQ 54 ]GOTO10

IF [#1 EQ 55 ]GOTO10

 IF [#1 EQ 56 ]GOTO10

IF [#1 EQ 57 ]GOTO10

 IF [#1 EQ 58 ]GOTO10

IF [#1 EQ 59 ]GOTO10

#3000 =1(YOU INPUT ERR,INPUT 54-59)

N2

#3000 =2(YOU INPUT ERR,INPUT 0.01-1.0)

 N10

#992 =#5021(READ CURRENT X POS X2)

 #993 =[#991+#992]/2(CALCULATION X COORDINATE)

#[801+10*[#1-54]]=#[5221+20*[#1-54]](CURRENT COORDINATE PROTECTION)

#[5221+20*[#1-54]] =#993(SET X POS)

M99

%
%

O9008(3/4NEW ALL-COORDINATE SYSTEM AUTO SET)

N1(PLEASE INPUT #1 AND #2) 

#1 =#999(CHOOSE COORDINATE SYSTEM G54-G59)

 #2 =0.1(THICKNESS OF FILLER GAUGE)

 IF [#2 LE 0 ]GOTO2

IF [#2 GT 1 ]GOTO2

 IF [#1 EQ 54 ]GOTO10

IF [#1 EQ 55 ]GOTO10

 IF [#1 EQ 56 ]GOTO10

IF [#1 EQ 57 ]GOTO10

 IF [#1 EQ 58 ]GOTO10

IF [#1 EQ 59 ]GOTO10

#3000 =1(YOU INPUT ERR,INPUT 54-59)

N2

#3000 =2(YOU INPUT ERR,INPUT 0.01-1.0)

 N10

 (Y POS AUTO SET)

#994 =#5022(READ CURRENT Y POS Y1)

M99

%

 

%

O9009(NEW ALL-COORDINATE SYSTEM AUTO SET)

N1(PLEASE INPUT #1 AND #2) 

#1 =#999(CHOOSE COORDINATE SYSTEM G54-G59)

 #2 =0.1(THICKNESS OF FILLER GAUGE)

 IF [#2 LE 0 ]GOTO2

IF [#2 GT 1 ]GOTO2

 IF [#1 EQ 54 ]GOTO10

IF [#1 EQ 55 ]GOTO10

 IF [#1 EQ 56 ]GOTO10

IF [#1 EQ 57 ]GOTO10

 IF [#1 EQ 58 ]GOTO10

IF [#1 EQ 59 ]GOTO10

#3000 =1(YOU INPUT ERR,INPUT 54-59)

N2

#3000 =2(YOU INPUT ERR,INPUT 0.01-1.0)

 N10

#995 =#5022(READ CURRENT Y POS Y2)

#996 =[#994+#995]/2(CALCULATION Y COORDINATE))

#[802+10*[#1-54]] =#[5222+20*[#1-54]](CURRENT COORDINATE PROTECTION)

#[5222+20*[#1-54]] =#996(SET Y POS)

M99

%


使用方法

 

1、把宏程序传进系统

2、定义6076607760786079参数,分别输入66778896(之所以输入96是因为M99被系统占用,所以我们用M96

3、分中时先移动到X轴一侧执行M66,再移到另一侧执行M77(先执行M66,再排行M77,顺序不能搞错)

4、分中Y是也一样,先执行M88,再执行M96


分类: 加工中心  
上一篇TC-BROTHER{加工中心}机床操作面板
下一篇加工中心的保养

产品中心

——