KUKA機(jī)器人培訓(xùn)專家偷偷告訴你用賦值偏移指令一點(diǎn)畫圓和方的秘密!
很多讀者經(jīng)常問KUKA機(jī)器人有沒有和ABB機(jī)器人功能指令類似的offs偏移指令?答案是肯定可以實(shí)現(xiàn)的。接下來東莞KUKA機(jī)器人培訓(xùn)辛老師給大家分享如何用賦值偏移指令一點(diǎn)畫圓和方的秘密。
DEF main( )
DECL INT reg1
INI
count=1
LOOP
PTP HOME Vel= 100 % DEFAULT
GLOBAL INTERRUPT DECL 1 WHEN $IN[1]==TRUE DO trap()
INTERRUPT ON 1
WAIT TIME =5 SEC
INTERRUPT OFF 1
rYuan ()
reg1=reg1+1
IF reg1=5 THEN
EXIT
ENDIF
ENDLOOP
rFang()
PTP HOME Vel= 100 % DEFAULT
END
_______________________________________________________________
DEF TRAP()
count=count+1
END
DEF rYuan( )
DECL POS p11,p12,p13
INI
PTP HOME Vel= 100 % DEFAULT
LIN P10 Vel=0.2 m/s CPDAT2 Tool[0] Base[0]
XP11=XP10
XP11.X=XP10.X+100
XP11.Y=XP10.Y-100
XP12=XP10
XP12.X=XP10.X+200
XP13=XP10
XP13.X=XP10.X+100
XP13.Y=XP10.Y+100
CIRC P11 P12 Vel=0.2 m/s CPDAT2 Tool[0] Base[0]
CIRC P13 P10 Vel=0.2 m/s CPDAT2 Tool[0] Base[0]
PTP HOME Vel= 100 % DEFAULT
END
DEF rFang( )
DECL INT i
PTP HOME Vel= 100 % DEFAULT
FOR i=1 TO 6 STEP 1
LIN P10 Vel=2 m/s CPDAT1 Tool[0] Base[0]
XP11=XP10
XP11.X=XP10.X+100
XP11.Y=XP10.Y-100
XP12=XP10
XP12.X=XP10.X+200
XP13=XP10
XP13.X=XP10.X+100
XP13.Y=XP10.Y+100
LIN P11 Vel=0.2 m/s CPDAT4 Tool[0] Base[0]
LIN P12 Vel=0.2 m/s CPDAT5 Tool[0] Base[0]
LIN P13 Vel=0.2 m/s CPDAT5 Tool[0] Base[0]
ENDFOR
PTP HOME Vel= 100 % DEFAULT
END
大家在首次編寫的過程中難免會(huì)遇到各種問題,詳情聯(lián)系:0769-8707-8535.