川崎机器人程序,已经测试在客户运行的
.SIG_COMMENT
CLEAR_COMMENT
X0001 "Automatic"
X0000 "Circle Start ON"
X0005 "RPS-ST"
X0002 "Teach Mode"
X0003 "Error"
X0004 "Home"
X0007 "Fixed Air Valve L"
X0008 "Fixed Water Valve L"
X0009 "Fixed Air Valve R"
X000A "Fixed Water Valve R"
X000B "Fixed Air Flow Valve"
X000C "Mobile Air Valve L"
X000D "Mobile Water Valve L"
X000E "Mobile Air Valve R"
X0010 "Mobile Air Flow Valve"
X000F "Mobile Water Valve R"
X0209 "PLC Start"
X0013 "Progress Complete"
X0015 "Progress Running"
X020A "PLC Progress Allow"
X001F "Robot Power ON"
Y0000 "EXT Motor ON"
Y0001 "EXT Circle Start"
Y0002 "RPS- ON"
Y0212 "Robot Standby State"
Y0202 "Progress Running Light"
Y0216 "RPS-ST Output"
Y0010 "Progress Break"
Y0214 "Robot Home Output"
Y0213 "Progress Complete Output"
Y0207 "Fixed Air Valve L Output"
Y0208 "Fixed Water Valve L Output"
Y0209 "Fixed Air Valve R Output"
Y020A "Fixed Water Valve R Output"
Y020B "Fixed Air Flow Valve Output"
Y020C "Mobile Air Valve L Output"
Y020D "Mobile Water Valve L Output"
Y020E "Mobile Air Valve R Output"
Y020F "Mobile Water Valve R Output"
Y0210 "Mobile Air Flow Valve Output"
Y0011 "Robot Progress Allow"
Y0003 "EXT Pg Reset"
Y0211 "Error Output"
Y0215 "Progress Running Output"
M0000 "Start Sign"
M0100 "First Start Sign"
M0101 "Circle Start Condition"
M0102 "Progress Running Sign"
M0103 "Mode Change Sign"
K0000 "First Start Memory"
T0000 "Pg Reset Pulse "
T0001 "Motor ON Pulse"
T0002 "Circle Start Pulse"
T0003 "RPS-ON Pulse"
T0004 "Mode Change Pulse"
T0005 "Progress Complete Pulse"
T0050 "EXT Motor ON Delay"
T0051 "Circle Start Delay"
V0000 "Always ON"
.END
.PROGRAM autostart.pc() #0;AUTOSTART.PC
loop:
SOUT 2001 = 4;输出信号4转化为内部信号2001(异常)
SOUT 2002 = 7;输出信号7转化为内部信号2002(急停)
TWAIT 0.02
IF SIG(2001) OR SIG(2002) THEN
BITS 8,10 = 0;关闭所有阀门
END
IF SIG(1017) THEN
SIGNAL -22;作业信号切断
END
GOTO loop
.END
.PROGRAM lsqpg() #0
LSQ FST
LSQ START
LSQ STR,&V0000
LSQ MOVE,&X0020L,&Y0000H
LSQ STR,&V0000
LSQ AND,&X020A
LSQ OUT,&Y0011
LSQ STR,&V0000
LSQ AND,&X0209
LSQ OUT,&M0000
LSQ STR,&V0000
LSQ AND,&M0000
LSQ PTS
LSQ STR,&Y0003
LSQ ANDN,&T0000
LSQ ORS
LSQ ANDN,&K0000
LSQ OUT,&Y0003
LSQ TMR,&T0000,0.5
LSQ STR,&V0000
LSQ AND,&X0000
LSQ PTS
LSQ SET,&K0000
LSQ STR,&V0000
LSQ AND,&X001F
LSQ PTS
LSQ STR,&V0000
LSQ AND,&X0000
LSQ NTS
LSQ ORS
LSQ RST,&K0000
LSQ STR,&V0000
LSQ AND,&Y0003
LSQ TMR,&T0050,0.3
LSQ STR,&V0000
LSQ AND,&T0050
LSQ PTS
LSQ STR,&Y0000
LSQ ANDN,&T0001
LSQ ORS
LSQ OUT,&Y0000
LSQ TMR,&T0001,0.5
LSQ STR,&V0000
LSQ AND,&X0001
LSQ ANDN,&X0002
LSQ ANDN,&X0003
LSQ AND,&X0004
LSQ OUT,&M0101
LSQ STR,&V0000
LSQ AND,&Y0000
LSQ TMR,&T0051,0.3
LSQ STR,&V0000
LSQ AND,&T0051
LSQ PTS
LSQ STR,&Y0001
LSQ ANDN,&T0002
LSQ ORS
LSQ AND,&M0101
LSQ OUT,&Y0001
LSQ TMR,&T0002,0.5
LSQ STR,&V0000
LSQ AND,&M0000
LSQ PTS
LSQ STR,&Y0002
LSQ ANDN,&T0003
LSQ ORS
LSQ AND,&K0000
LSQ AND,&X0000
LSQ AND,&X0005
LSQ OUT,&Y0002
LSQ TMR,&T0003,0.5
LSQ STR,&V0000
LSQ AND,&X0003
LSQ OUT,&Y0211
LSQ STR,&V0000
LSQ AND,&X0015
LSQ AND,&X0000
LSQ AND,&X0003
LSQ OUT,&M0102
LSQ STR,&V0000
LSQ AND,&M0102
LSQ OUT,&Y0202
LSQ OUT,&Y0215
LSQ STR,&V0000
LSQ AND,&X0002
LSQ PTS
LSQ STR,&M0103
LSQ ANDN,&T0004
LSQ ORS
LSQ OUT,&M0103
LSQ TMR,&T0004,1
LSQ STR,&V0000
LSQ AND,&M0103
LSQ OUT,&Y0010
LSQ STR,&V0000
LSQ AND,&X0013
LSQ PTS
LSQ STR,&Y0213
LSQ ANDN,&T0005
LSQ ORS
LSQ AND,&M0101
LSQ OUT,&Y0213
LSQ TMR,&T0005,1
LSQ STR,&V0000
LSQ ANDN,&M0102
LSQ AND,&M0101
LSQ AND,&X0000
LSQ OUT,&Y0212
LSQ STR,&V0000
LSQ AND,&X0004
LSQ OUT,&Y0214
LSQ STR,&V0000
LSQ AND,&X0005
LSQ STR,&V0000
LSQ AND,&X001F
LSQ ANDN,&K0000
LSQ ANDN,&X0000
LSQ AND,&M0101
LSQ ORS
LSQ OUT,&Y0216
LSQ STR,&V0000
LSQ AND,&X0007
LSQ OUT,&Y0207
LSQ STR,&V0000
LSQ AND,&X0008
LSQ OUT,&Y0208
LSQ STR,&V0000
LSQ AND,&X0009
LSQ OUT,&Y0209
LSQ STR,&V0000
LSQ AND,&X000A
LSQ OUT,&Y020A
LSQ STR,&V0000
LSQ AND,&X000B
LSQ OUT,&Y020B
LSQ STR,&V0000
LSQ AND,&X000C
LSQ OUT,&Y020C
LSQ STR,&V0000
LSQ AND,&X000D
LSQ OUT,&Y020D
LSQ STR,&V0000
LSQ AND,&X000E
LSQ OUT,&Y020E
LSQ STR,&V0000
LSQ AND,&X000F
LSQ OUT,&Y020F
LSQ STR,&V0000
LSQ AND,&X0010
LSQ OUT,&Y0210
.END
.PROGRAM pg0() #56;原点返回程序
POINT homepos = #HOME(1)
IF DZ(homepos)>DZ(HERE) THEN
HERE tmp
POINT/Z tmp = homepos
LMOVE tmp
END
HOME
.END
.PROGRAM pg1() #3
SPEED 100 ALWAYS
ACCURACY 10 ALWAYS
;
SWAIT 1018
SIGNAL 22;输出机器人运行中信号
SOUT 2003 = 5;原点信号5转化为内部信号2003
IF SIG(-2002) THEN;判断机器人若不在原点,自动回原点
CALL pg0
END
JMOVE #a1; 从原点到达模具大杠上方中点位置
LMOVE #a2; 从大杠上方中点位置到达起喷位置
SIGNAL 8,9,10,11; 开始后喷雾动作
SIGNAL 13,14,15,16; 开始前喷雾动作
SPEED 65 ALWAYS
LMOVE #a3; 喷雾到料柄位置
LMOVE #a4;
LMOVE #a5;
LMOVE #a6;
LMOVE #a7;
LMOVE #a8;
LMOVE #a9;
TWAIT 0.2
BREAK
SIGNAL -9,-11; 关闭后喷雾动作
SIGNAL -14,-16; 关闭前喷雾动作
SIGNAL 12,17; 开始前后吹气动作
SPEED 80 ALWAYS
LMOVE #a10
LMOVE #a11
LMOVE #a12
LMOVE #a13
LMOVE #a14
LMOVE #a15
SIGNAL -8,-10,-12; 关闭后吹气动作
SIGNAL -13,-15,-17; 关闭前吹气动作
LMOVE #a16; 回到模具大杠上方中点位置
SPEED 100 ALWAYS
HOME
SIGNAL -22;关闭机器人运行中信号
BREAK
PULSE 20,1;机器人自动合模信号
;最后一步为简易示教带END的HOME点
JOINT SPEED9 ACCU1 TIMER0 TOOL1 WORK0 END CLAMP OX= WX= #[61.955,-9.8526,-122.35,0.66367,-70.248,58.703] ;
.END
.PROGRAM pg11() #1
SPEED 100 ALWAYS
ACCURACY 10 ALWAYS
10
HOME
JMOVE #a1;
LMOVE #a2;
SPEED 65
ACCURACY 1
LMOVE #a3;
BREAK
SIGNAL 9,-10
LMOVE #a4
LMOVE #a5
JMOVE #a6
HOME
GOTO 10
RETURN
.END
.PROGRAM pg2() #5
SPEED 100 ALWAYS
ACCURACY 10 ALWAYS
;
SWAIT 1018
SIGNAL 22;输出机器人运行中信号
SOUT 2003 = 5;原点信号5转化为内部信号2003
IF SIG(-2002) THEN;判断机器人若不在原点,自动回原点
CALL pg0
END
JMOVE #b1; 从原点到达模具大杠上方中点位置
LMOVE #b2; 从大杠上方中点位置到达起喷位置
SIGNAL 8,9,10,11; 开始后喷雾动作
SIGNAL 13,14,15,16; 开始前喷雾动作
SPEED 65 ALWAYS
LMOVE #b3; 喷雾到料柄位置
LMOVE #b4;
LMOVE #b5;
LMOVE #b6;
LMOVE #b7;
LMOVE #b8;
LMOVE #b9;
TWAIT 0.2
BREAK
SIGNAL -9,-11; 关闭后喷雾动作
SIGNAL -14,-16; 关闭前喷雾动作
SIGNAL 12,17; 开始前后吹气动作
SPEED 80 ALWAYS
LMOVE #b10
LMOVE #b11
LMOVE #b12
LMOVE #b13
LMOVE #b14
LMOVE #b15
SIGNAL -8,-10,-12; 关闭后吹气动作
SIGNAL -13,-15,-17; 关闭前吹气动作
JMOVE #b16; 回到模具大杠上方中点位置
SPEED 100 ALWAYS
HOME
SIGNAL -22;关闭机器人运行中信号
BREAK
PULSE 20,1;机器人自动合模信号
;最后一步为简易示教带END的HOME点
JOINT SPEED9 ACCU1 TIMER0 TOOL1 WORK0 END CLAMP OX= WX= #[61.956,-9.8517,-122.35,0.66367,-70.248,58.701] ;
.END
.TRANS
dd 0.000000 0.000000 -90.000000 -180.000000 90.000008 -180.000000
homepos 668.008789 357.009338 355.705414 -164.773636 177.183273 136.124451
tmp -124.955910 1088.450562 355.705414 -99.967484 177.321884 125.323441
.END
.JOINTS
#a1 -0.668998 20.048298 -104.298950 0.487176 -58.443745 44.684185
#a10 6.693307 75.225403 -91.019234 0.194968 -16.572216 37.398117
#a11 -8.554529 75.233307 -90.995026 2.794698 -16.497509 50.139214
#a12 -0.669552 87.379578 -81.200493 1.690043 -14.215868 43.298588
#a13 6.691644 75.225403 -91.019234 0.195940 -16.571775 37.396629
#a14 -8.553144 75.234825 -90.994507 2.793239 -16.498386 50.142185
#a15 -0.669829 87.381714 -81.199966 1.690530 -14.215428 43.296360
#a16 -0.669552 20.047386 -104.299469 0.486203 -58.444187 44.684193
#a2 -0.668998 70.191376 -95.117027 1.380818 -17.484522 43.619110
#a3 -0.668998 87.377457 -81.200752 1.689557 -14.215868 43.300068
#a4 6.694970 75.225403 -91.019234 0.193509 -16.572655 37.399601
#a5 6.694970 75.225403 -91.019234 0.193509 -16.572655 37.399601
#a6 -8.555361 75.231789 -90.995285 2.796643 -16.497068 50.135509
#a7 6.693307 75.226013 -91.019493 0.194481 -16.572216 37.400333
#a8 -8.554807 75.232697 -90.995544 2.794212 -16.496630 50.136978
#a9 -0.669275 87.378975 -81.200752 1.690043 -14.216308 43.300072
#b1 -2.528004 17.697504 -106.255463 0.673392 -58.804977 47.445927
#b10 -1.837944 65.058891 -98.667534 1.744012 -18.993603 45.452942
#b11 8.451159 82.469833 -85.220215 0.286374 -15.082470 36.545521
#b12 -9.717378 82.532135 -84.862900 3.560955 -15.227929 51.571232
#b13 -0.460872 82.289337 -86.210701 2.055182 -14.219823 43.756588
#b14 8.335318 82.467407 -85.199921 0.320894 -15.076756 36.632557
#b15 -3.678936 18.906328 -103.799278 0.749726 -59.904053 48.560635
#b16 -3.678658 18.906328 -103.799278 0.749726 -59.904053 48.560635
#b2 -2.527449 64.458733 -100.508499 1.904945 -17.659424 45.975887
#b3 -2.527727 84.484543 -85.709999 2.681899 -12.437841 45.169716
#b4 -8.516840 85.679688 -79.233307 2.793725 -17.652391 51.112541
#b5 7.992781 85.650520 -79.369934 0.298043 -17.662060 36.993374
#b6 -11.526500 74.398254 -87.760193 2.869573 -20.340965 54.107822
#b7 8.478318 79.050003 -84.968819 0.285401 -18.646873 36.536945
#b8 -10.394690 79.182495 -84.392120 2.924514 -18.943504 52.907822
#b9 -1.837667 78.092789 -89.618332 2.205905 -14.919872 44.964836
#dd 0.000000 0.000000 -90.000000 0.000000 -90.000000 0.000000
.END