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.CPS1.Y2=0.0
$TECH[3].FCT.ORDER=1
$TECH[3].FCT.CPNUM=5
$TECH[3].FC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H[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].FCT.CPS1.Y5=-1.0
$TECH[3].FCT.CPS1.X6=0.55
$TECH[3].FCT.CPS1.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PS1.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文章
3134浏览量
59753 -
KUKA机器人
+关注
关注
4文章
143浏览量
9079
原文标题:帮朋友看了一下KUKA机器人的摆动(WEAVING编织运动)
文章出处:【微信号:gh_a8b121171b08,微信公众号:机器人及PLC自动化应用】欢迎添加关注!文章转载请注明出处。
发布评论请先 登录
相关推荐
评论