3: USER_S9_Teil_1_MIG Nr1Einschalten Mit N_WIED MIG_WK=1 P-Nr=10 Naht-Nr=10 EIN
4: WARTE BIS !E848 & E852
5: A852 = EIN
6: SPSMAKRO181 = EIN
7: FB PSPS = E417 & E433 &(F308 + A843) & E879 & E880
Pendeln EIN Figur: 1 Amplitude: 1[mm] Periode: 1 [mm] Ebene: 0[o]
通勤啟動(dòng)擺動(dòng) EIN, 擺圖1 , 振幅1 ,周期 1,電平0
VW_USR_R (#USR_ADV,104,8,1,1,1,10,10,TRUE)
VW (#VW_WEAV, TRUE, 1, 1, 1, 0, TRUE )
機(jī)器人的自動(dòng)擺動(dòng)功能常用于CMT焊接
VW_USR_R (#USR_MAIN,104,8,1,1,1,10,10,TRUE)
VW (COMMAND :IN,COND :IN,P1 :IN,P2 :IN,P3 :IN,P4 :IN,B1 :IN, POINT :IN )
WEAVING (B1,P1,P2,P3,P4 )
DEF WEAVING (W_STATE :IN,W_TYP :IN,AMPLITUDE :IN,PERIOD :IN,W_ANGLE :IN )
W_STATE :B1, W_TYP : P1, AMPLITUDE :P2, PERIOD :P3, W_ANGLE :P4
W_STATE :true
W_TYP=1
AMPLITUDE=1振幅=1
PERIOD=1周期
W_ANGLE=0 角度
BOOL W_STATE ;編織開(kāi)/關(guān)
INT W_TYP,AMPLITUDE,PERIOD,W_ANGLE
IF $TECH_OPT==TRUE THEN$TECH函數(shù)發(fā)生器的選項(xiàng)位,函數(shù)發(fā)生器開(kāi)
IF W_STATE==TRUE THENB1=true
; 編織將打開(kāi)
WEAV_DEF (W_TYP )
$TECH[1].FCTCTRL.SCALE_IN=PERIOD PERIOD周期=1
$TECH[1].FCTCTRL.SCALE_OUT=AMPLITUDE 振幅=1
$TECH[2].FCTCTRL.SCALE_IN=PERIOD PERIOD周期=1
$TECH[2].FCTCTRL.SCALE_OUT=AMPLITUDE 振幅=1
$TECH[3].FCTCTRL.SCALE_IN=PERIOD
$TECH[3].FCTCTRL.SCALE_OUT=1
$TECHANGLE.C=W_ANGLE 在參考坐標(biāo)系的旋轉(zhuǎn)
IF $TECH[1].MODE==#OFF THEN
$TECH[1].MODE=#CYCLE
$TECH[2].MODE=#CYCLE
$TECH[3].MODE=#CYCLE 循環(huán)開(kāi)始編織
ENDIF;
ELSE函數(shù)發(fā)生器關(guān)
;擺動(dòng)將被關(guān)閉
$TECH[1].MODE=#OFF
$TECH[2].MODE=#OFF
$TECH[3].MODE=#OFF
ENDIF;
ENDIF;
END
------------------------------
$TECH提前運(yùn)行中函數(shù)發(fā)生器的功能參數(shù)
該變量最多可用于編程6個(gè)函數(shù)發(fā)生器。函數(shù)發(fā)生器僅對(duì)CP運(yùn)動(dòng)有效。僅評(píng)估主運(yùn)行變量。
可以在機(jī)器人程序中相對(duì)于提前運(yùn)行修改功能參數(shù)。
Tech參數(shù)結(jié)構(gòu):
STRUC Tech TECHMODE mode, TECHCLASS class,TECHFCTCTRL fctctrl, TECHFCT fct
Mode 技術(shù)模式–功能評(píng)估的類型
?#OFF:無(wú)功能評(píng)估
?#SINGLE:函數(shù)被評(píng)估一次。
?#CYCLE:循環(huán)評(píng)估該功能。
Class
技術(shù)類–函數(shù)發(fā)生器的輸入大小
?#PATH:輸入大小是CP運(yùn)動(dòng)的弧長(zhǎng)$DISTANCE(單位:mm)
?#SYSTIME:輸入大小為系統(tǒng)時(shí)間(單位:ms)
?#VEL:輸入大小為當(dāng)前路徑速度$VEL_ACT(單位:m / s)
?#SENSOR:輸入大小為變量$TECHIN。機(jī)器人根據(jù)輸入值執(zhí)行位置校正。
?#DATALINK:輸入大小是傳感器任務(wù)寫入的校正幀。 機(jī)器人根據(jù)輸入值進(jìn)行校正。
Fctctrl
函數(shù)發(fā)生器參數(shù)的控制結(jié)構(gòu)
STRUCFctctrl REAL scale_in, scale_out, offset_in, offset_out, TECHGEOREF georef
REAL scale_in:縮放函數(shù)的定義范圍
?REAL scale_out:縮放函數(shù)值的范圍
?REAL offset_in:移動(dòng)函數(shù)定義范圍的零點(diǎn)
?REAL offset_out:將函數(shù)值范圍的零點(diǎn)移位
?TECHGEOREF georef:ENUM用于技術(shù)功能的幾何參考.
Fct
用于定義函數(shù)發(fā)生器的函數(shù)參數(shù)的結(jié)構(gòu)
函數(shù)fct的定義范圍和值范圍定義如下:
?定義范圍:0…1
值的范圍:-1…+1
GeoRef
#NONE
評(píng)估已編程的功能,但不執(zhí)行。函數(shù)值將寫入變量$ TECHVAL。
例外:如果使用工藝等級(jí)#SENSOR,則該參數(shù)的作用是不執(zhí)行功能評(píng)估。
#X,#Y, #Z
通過(guò)$ TECHSYS和$ TECHANGLE編程的參考坐標(biāo)系的軸,用于編織或傳感器校正
在編織或傳感器校正過(guò)程中,TCP在參考坐標(biāo)系的X,Y或Z軸方向上偏移功能值。
#A,#B, #C
僅在使用技術(shù)等級(jí)#SENSOR時(shí)才相關(guān)!
通過(guò)$ TECHSYS和$ TECHANGLE編程的參考坐標(biāo)系的軸角,用于傳感器校正.
TCP的方向發(fā)生變化:功能值繞參考坐標(biāo)系的Z,Y或X軸旋轉(zhuǎn)(始終沿?cái)?shù)學(xué)正方向)
TechFct
STRUC TechFct INT order, cpnum, TECHCPScps1, cps2, cps3, cps4, cps5.
Order
函數(shù)求值時(shí)的插補(bǔ)度
?1:功能由多邊形定義
Cpnum
參考以下5個(gè)控制點(diǎn)結(jié)構(gòu)的有效控制點(diǎn)總數(shù)2…50
注意:有效控制點(diǎn)之間不允許有間隙。
cps1
控制點(diǎn)為1…10的列表(類型:REAL)
?X1,Y1,... X10,Y10
cps2
帶有控制點(diǎn)的列表11…20(類型:REAL)
?X1,Y1,... X10,Y10
cps3
列出控制點(diǎn)21…30(類型:REAL)
?X1,Y1,... X10,Y10
cps4
帶有控制點(diǎn)的列表31…40(類型:REAL)
?X1,Y1,... X10,Y10
cps5
帶有控制點(diǎn)的列表41…50(類型:REAL)
?X1,Y1,... X10,Y10
使用距離傳感器,最大可校正在TTS的Z方向上應(yīng)形成±20 mm。模擬傳感器輸入提供-10 V至+10 V的電壓;應(yīng)將其調(diào)整為0 V(因數(shù)= 0.1;失調(diào)= 1.0)。
----------------------------
$TECHANGLE
提前運(yùn)行中函數(shù)發(fā)生器的參考坐標(biāo)系的旋轉(zhuǎn)
該變量可用于定義由$ TECHSYS定義的參考坐標(biāo)系的方向,并可在機(jī)器人程序中相對(duì)于提前運(yùn)行對(duì)其進(jìn)行修改。
參考坐標(biāo)系的Z,Y或X軸旋轉(zhuǎn)所繞的角度(僅允許正方向)
-------------------------
DEF WEAV_DEF (FIGUR :IN) 編制程序參數(shù)程序
DECLINT FIGUR
SWITCH FIGUR類型
CASE 1 ;三角形
$TECH[1].FCT.ORDER=1
$TECH[1].FCT.CPNUM=4
$TECH[1].FCT.CPS1.X1=0.0
$TECH[1].FCT.CPS1.Y1=0.0
$TECH[1].FCT.CPS1.X2=0.25
$TECH[1].FCT.CPS1.Y2=1.0
$TECH[1].FCT.CPS1.X3=0.75
$TECH[1].FCT.CPS1.Y3=-1.0
$TECH[1].FCT.CPS1.X4=1.0
$TECH[1].FCT.CPS1.Y4=0.0
$TECH[2].FCT.ORDER=1
$TECH[2].FCT.CPNUM=2
$TECH[2].FCT.CPS1.X1=0.0
$TECH[2].FCT.CPS1.Y1=0.0
$TECH[2].FCT.CPS1.X2=1.0
$TECH[2].FCT.CPS1.Y2=0.0
$TECH[3].FCT.ORDER=1
$TECH[3].FCT.CPNUM=5
$TECH[3].FCT.CPS1.X1=0.0
$TECH[3].FCT.CPS1.Y1=-1.0
$TECH[3].FCT.CPS1.X2=0.25
$TECH[3].FCT.CPS1.Y2=1.0
$TECH[3].FCT.CPS1.X3=0.5
$TECH[3].FCT.CPS1.Y3=-1.0
$TECH[3].FCT.CPS1.X4=0.75
$TECH[3].FCT.CPS1.Y4=1.0
$TECH[3].FCT.CPS1.X5=1.0
$TECH[3].FCT.CPS1.Y5=-1.0
CASE 2 ;梯形
$TECH[1].FCT.ORDER=1
$TECH[1].FCT.CPNUM=7
$TECH[1].FCT.CPS1.X1=0.0
$TECH[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1.X4=0.75
$TECH[3].FCT.CPS1.Y4=1.0
$TECH[3].FCT.CPS1.X5=1.0
$TECH[3].FCT.CPS1.Y5=-1.0
CASE 6 ; 用戶定義的weav
$TECH[1].FCT.ORDER=1
$TECH[1].FCT.CPNUM=2
$TECH[1].FCT.CPS1.X1=0.0
$TECH[1].FCT.CPS1.Y1=0.0
$TECH[1].FCT.CPS1.X2=1.0
$TECH[1].FCT.CPS1.Y2=0.0
$TECH[2].FCT.ORDER=1
$TECH[2].FCT.CPNUM=2
$TECH[2].FCT.CPS1.X1=0.0
$TECH[2].FCT.CPS1.Y1=0.0
$TECH[2].FCT.CPS1.X2=1.0
$TECH[2].FCT.CPS1.Y2=0.0
$TECH[3].FCT.ORDER=1
$TECH[3].FCT.CPNUM=2
$TECH[3].FCT.CPS1.X1=0.0
$TECH[3].FCT.CPS1.Y1=0.0
$TECH[3].FCT.CPS1.X2=1.0
$TECH[3].FCT.CPS1.Y2=0.0
CASE 7 用戶定義的weav
$TECH[1].FCT.ORDER=1
$TECH[1].FCT.CPNUM=2
$TECH[1].FCT.CPS1.X1=0.0
$TECH[1].FCT.CPS1.Y1=0.0
$TECH[1].FCT.CPS1.X2=1.0
$TECH[1].FCT.CPS1.Y2=0.0
$TECH[2].FCT.ORDER=1
$TECH[2].FCT.CPNUM=2
$TECH[2].FCT.CPS1.X1=0.0
$TECH[2].FCT.CPS1.Y1=0.0
$TECH[2].FCT.CPS1.X2=1.0
$TECH[2].FCT.CPS1.Y2=0.0
$TECH[3].FCT.ORDER=1
$TECH[3].FCT.CPNUM=2
$TECH[3].FCT.CPS1.X1=0.0
$TECH[3].FCT.CPS1.Y1=0.0
$TECH[3].FCT.CPS1.X2=1.0
$TECH[3].FCT.CPS1.Y2=0.0
ENDSWITCH
-
焊接
+關(guān)注
關(guān)注
38文章
3032瀏覽量
59540 -
KUKA機(jī)器人
+關(guān)注
關(guān)注
4文章
143瀏覽量
9036
原文標(biāo)題:幫朋友看了一下KUKA機(jī)器人的擺動(dòng)(WEAVING編織運(yùn)動(dòng))
文章出處:【微信號(hào):gh_a8b121171b08,微信公眾號(hào):機(jī)器人及PLC自動(dòng)化應(yīng)用】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論