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]
通勤啟動擺動 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 )
機器人的自動擺動功能常用于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 ;編織開/關
INT W_TYP,AMPLITUDE,PERIOD,W_ANGLE
IF $TECH_OPT==TRUE THEN$TECH函數發生器的選項位,函數發生器開
IF W_STATE==TRUE THENB1=true
; 編織將打開
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 在參考坐標系的旋轉
IF $TECH[1].MODE==#OFF THEN
$TECH[1].MODE=#CYCLE
$TECH[2].MODE=#CYCLE
$TECH[3].MODE=#CYCLE 循環開始編織
ENDIF;
ELSE函數發生器關
;擺動將被關閉
$TECH[1].MODE=#OFF
$TECH[2].MODE=#OFF
$TECH[3].MODE=#OFF
ENDIF;
ENDIF;
END
------------------------------
$TECH提前運行中函數發生器的功能參數
該變量最多可用于編程6個函數發生器。函數發生器僅對CP運動有效。僅評估主運行變量。
可以在機器人程序中相對于提前運行修改功能參數。
Tech參數結構:
STRUC Tech TECHMODE mode, TECHCLASS class,TECHFCTCTRL fctctrl, TECHFCT fct
Mode 技術模式–功能評估的類型
?#OFF:無功能評估
?#SINGLE:函數被評估一次。
?#CYCLE:循環評估該功能。
Class
技術類–函數發生器的輸入大小
?#PATH:輸入大小是CP運動的弧長$DISTANCE(單位:mm)
?#SYSTIME:輸入大小為系統時間(單位:ms)
?#VEL:輸入大小為當前路徑速度$VEL_ACT(單位:m / s)
?#SENSOR:輸入大小為變量$TECHIN。機器人根據輸入值執行位置校正。
?#DATALINK:輸入大小是傳感器任務寫入的校正幀。 機器人根據輸入值進行校正。
Fctctrl
函數發生器參數的控制結構
STRUCFctctrl REAL scale_in, scale_out, offset_in, offset_out, TECHGEOREF georef
REAL scale_in:縮放函數的定義范圍
?REAL scale_out:縮放函數值的范圍
?REAL offset_in:移動函數定義范圍的零點
?REAL offset_out:將函數值范圍的零點移位
?TECHGEOREF georef:ENUM用于技術功能的幾何參考.
Fct
用于定義函數發生器的函數參數的結構
函數fct的定義范圍和值范圍定義如下:
?定義范圍:0…1
值的范圍:-1…+1
GeoRef
#NONE
評估已編程的功能,但不執行。函數值將寫入變量$ TECHVAL。
例外:如果使用工藝等級#SENSOR,則該參數的作用是不執行功能評估。
#X,#Y, #Z
通過$ TECHSYS和$ TECHANGLE編程的參考坐標系的軸,用于編織或傳感器校正
在編織或傳感器校正過程中,TCP在參考坐標系的X,Y或Z軸方向上偏移功能值。
#A,#B, #C
僅在使用技術等級#SENSOR時才相關!
通過$ TECHSYS和$ TECHANGLE編程的參考坐標系的軸角,用于傳感器校正.
TCP的方向發生變化:功能值繞參考坐標系的Z,Y或X軸旋轉(始終沿數學正方向)
TechFct
STRUC TechFct INT order, cpnum, TECHCPScps1, cps2, cps3, cps4, cps5.
Order
函數求值時的插補度
?1:功能由多邊形定義
Cpnum
參考以下5個控制點結構的有效控制點總數2…50
注意:有效控制點之間不允許有間隙。
cps1
控制點為1…10的列表(類型:REAL)
?X1,Y1,... X10,Y10
cps2
帶有控制點的列表11…20(類型:REAL)
?X1,Y1,... X10,Y10
cps3
列出控制點21…30(類型:REAL)
?X1,Y1,... X10,Y10
cps4
帶有控制點的列表31…40(類型:REAL)
?X1,Y1,... X10,Y10
cps5
帶有控制點的列表41…50(類型:REAL)
?X1,Y1,... X10,Y10
使用距離傳感器,最大可校正在TTS的Z方向上應形成±20 mm。模擬傳感器輸入提供-10 V至+10 V的電壓;應將其調整為0 V(因數= 0.1;失調= 1.0)。
----------------------------
$TECHANGLE
提前運行中函數發生器的參考坐標系的旋轉
該變量可用于定義由$ TECHSYS定義的參考坐標系的方向,并可在機器人程序中相對于提前運行對其進行修改。
參考坐標系的Z,Y或X軸旋轉所繞的角度(僅允許正方向)
-------------------------
DEF WEAV_DEF (FIGUR :IN) 編制程序參數程序
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.CP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Y5=1.0
$TECH[3].FCT.CPS1.X6=0.9
$TECH[3].FCT.CPS1.Y6=1.0
$TECH[3].FCT.CPS1.X7=1.0
$TECH[3].FCT.CPS1.Y7=-1.0
CASE 4 ;螺旋
$TECH[1].FCT.ORDER=1
$TECH[1].FCT.CPNUM=6
$TECH[1].FCT.CPS1.X1=0.0
$TECH[1].FCT.CPS1.Y1=0.0
$TECH[1].FCT.CPS1.X2=0.166666
$TECH[1].FCT.CPS1.Y2=1.0
$TECH[1].FCT.CPS1.X3=0.333333
$TECH[1].FCT.CPS1.Y3=1.0
$TECH[1].FCT.CPS1.X4=0.666666
$TECH[1].FCT.CPS1.Y4=-1.0
$TECH[1].FCT.CPS1.X5=0.833333
$TECH[1].FCT.CPS1.Y5=-1.0
$TECH[1].FCT.CPS1.X6=1.0
$TECH[1].FCT.CPS1.Y6=0.0
$TECH[2].FCT.ORDER=1
$TECH[2].FCT.CPNUM=6
$TECH[2].FCT.CPS1.X1=0.0
$TECH[2].FCT.CPS1.Y1=-1.0
$TECH[2].FCT.CPS1.X2=0.083333
$TECH[2].FCT.CPS1.Y2=-1.0
$TECH[2].FCT.CPS1.X3=0.416666
$TECH[2].FCT.CPS1.Y3=1.0
$TECH[2].FCT.CPS1.X4=0.58
$TECH[2].FCT.CPS1.Y4=1.0
$TECH[2].FCT.CPS1.X5=0.916666
$TECH[2].FCT.CPS1.Y5=-1.0
$TECH[2].FCT.CPS1.X6=1.0
$TECH[2].FCT.CPS1.Y6=-1.0
$TECH[3].FCT.ORDER=1
$TECH[3].FCT.CPNUM=10
$TECH[3].FCT.CPS1.X1=0.0
$TECH[3].FCT.CPS1.Y1=-1.0
$TECH[3].FCT.CPS1.X2=0.05
$TECH[3].FCT.CPS1.Y2=-1.0
$TECH[3].FCT.CPS1.X3=0.2
$TECH[3].FCT.CPS1.Y3=1.0
$TECH[3].FCT.CPS1.X4=0.3
$TECH[3].FCT.CPS1.Y4=1.0
$TECH[3].FCT.CPS1.X5=0.45
$TECH[3].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TECH[2].FCT.CPS1.Y6=0.5
$TECH[2].FCT.CPS1.X7=0.75
$TECH[2].FCT.CPS1.Y7=0.0
$TECH[2].FCT.CPS1.X8=0.875
$TECH[2].FCT.CPS1.Y8=-0.5
$TECH[2].FCT.CPS1.X9=1.0
$TECH[2].FCT.CPS1.Y9=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 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
-
焊接
+關注
關注
38文章
3132瀏覽量
59746 -
KUKA機器人
+關注
關注
4文章
143瀏覽量
9079
原文標題:幫朋友看了一下KUKA機器人的擺動(WEAVING編織運動)
文章出處:【微信號:gh_a8b121171b08,微信公眾號:機器人及PLC自動化應用】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論