KR C V5.5.8
KS V5.5.6.
Hey guys, Im turning to you for help since the manuals arent of much help and our integrator has no one available to help for a few weeks
The robot is an old KR 5 ARC HW arm with a rotary table under it with 18 parts on it. The machine welds a part and then turns the table 20 degrees and repeat.
We have gotten these machines with the programs allready created and have no real training with them. The problem is when I try to create new points and they dont get rotated around the E1 axis (atleast I think thats whats happening). The original program works fine... It welds the part, rotates the table and thats it, but if try making a new point, or even copy-pasting the old ones, it will weld one part and turn the table and the original points are all still in the same point in real space, but the new ones get translated around the E1 axis for 20deg and the machine will just start to move away from the part and try to weld it one station prior, the 3rd part will go through the original points like usual, but the newly created ones are now 40deg back (2 parts back) and it throws a Work envelope exceeded error since it tries to move too far away.
My question why is this happening? The points are copypasted and it doesnt work, same parameters and everything. It is really messing with me
Heres the code for the program and the function (cc() defined at the end) for rotating the turntable:
DEF kratke_6( )
;FOLD INI
int zaehler
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD TOUCHSENS INI
IF H70_OPTION THEN
IF (TOUCH_I[TOUCH_ACTIVE].IN_NR<>0) THEN
IF (TOUCH_I[TOUCH_ACTIVE].IN_NR>0) THEN
INTERRUPT DECL 15 WHEN $MEAS_PULSE[TOUCH_I[TOUCH_ACTIVE].IN_NR] DO H70 (6,CD0 )
ELSE
INTERRUPT DECL 15 WHEN $MEAS_PULSE[-TOUCH_I[TOUCH_ACTIVE].IN_NR]==FALSE DO H70 (6,CD0 )
ENDIF
INTERRUPT DECL 16 WHEN $ZERO_MOVE DO H70 (7,CD0 )
INTERRUPT DECL 17 WHEN $TECHPAR_C[FG_TOUCH,8]>0.5 DO H70 (8,CD0)
ENDIF
H70 (1,CD0 )
ENDIF
;ENDFOLD (TOUCHSENS INI)
;FOLD ARCTECHDIGITAL INI
IF ARC20==TRUE THEN
A20 (ARC_INI)
INTERRUPT DECL 6 WHEN $CYCFLAG[3]==FALSE DO A20(TECH_STOP2)
ENDIF
;ENDFOLD (ARCTECHDIGITAL INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
base_data[17]=base_data_org
;ENDFOLD (INI)
;FOLD ; ;%{PE}%R 5.5.31,%MKUKATPBASIS,%CCOMMENT,%VNORMAL,%P 2:
;ENDFOLD
zaehler=0
loop
;FOLD PTP P1 CONT Vel=100 % PDAT1 Tool[2]:brenner-2 Base[17]:E1;%{PE}%R 5.5.31,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_PTP, 5:100, 7:PDAT1
$BWDSTART=FALSE
PDAT_ACT=PPDAT1
FDAT_ACT=FP1
BAS(#PTP_PARAMS,100)
PTP XP1 C_PTP
;ENDFOLD
zaehler = zaehler + 1
if zaehler>20 then
;FOLD ARCTECHDIGITAL INI
IF ARC20==TRUE THEN
A20 (ARC_INI)
INTERRUPT DECL 6 WHEN $CYCFLAG[3]==FALSE DO A20(TECH_STOP2)
ENDIF
;ENDFOLD (ARCTECHDIGITAL INI)
zaehler=0
endif
;Original points
;Ive left in just 1 point to make it more readable
;FOLD PTP P1 CONT Vel=100 % PDAT1 Tool[2]:brenner-2 Base[17]:E1;%{PE}%R 5.5.31,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_PTP, 5:100, 7:PDAT1
$BWDSTART=FALSE
PDAT_ACT=PPDAT1
FDAT_ACT=FP1
BAS(#PTP_PARAMS,100)
PTP XP1 C_PTP
;ENDFOLD
;Same point, copypasted
;FOLD PTP P35 CONT Vel=100 % PDAT2 Tool[2]:brenner-2 Base[17]:E1;%{PE}%R 5.5.31,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P35, 3:C_PTP, 5:100, 7:PDAT2
$BWDSTART=FALSE
PDAT_ACT=PPDAT2
FDAT_ACT=FP35
BAS(#PTP_PARAMS,100)
PTP XP35 C_PTP
;ENDFOLD
counter=counter+1
MsgNotify("------------- %1", ,counter)
cc()
continue
;FOLD PULSE 19 'Ausgang' State=TRUE CONT Time=1 sec;%{PE}%R 5.5.31,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:19, 3:Ausgang, 5:TRUE, 6:CONTINUE, 8:1
CONTINUE
PULSE($OUT[19], TRUE,1)
;ENDFOLD
endloop
end
;fold cc()
def cc()
FRAME vb
wait sec 0
vb=$nullframe
vb.a=-20
base_data[17]=base_data[17]:vb
base_data_org=base_data[17]
calc_e1(xp1,vb)
calc_e1(xp2,vb)
calc_e1(xp3,vb)
calc_e1(xp4,vb)
calc_e1(xp5,vb)
calc_e1(xp6,vb)
;calc_e1(xp7,vb)
calc_e1(xp8,vb)
calc_e1(xp9,vb)
calc_e1(xp10,vb)
;calc_e1(xp11,vb)
calc_e1(xp12,vb)
;calc_e1(xp13,vb)
calc_e1(xp14,vb)
calc_e1(xp15,vb)
;calc_e1(xp16,vb)
calc_e1(xp17,vb)
calc_e1(xp18,vb)
calc_e1(xp19,vb)
calc_e1(xp20,vb)
calc_e1(xp21,vb)
;calc_e1(xp22,vb)
;calc_e1(xp23,vb)
;calc_e1(xp24,vb)
;calc_e1(xp25,vb)
;calc_e1(xp26,vb)
;calc_e1(xp27,vb)
;calc_e1(xp28,vb)
;calc_e1(xp29,vb)
;calc_e1(xp30,vb)
end
;endfold
Display More
And heres the code for the calc_e1 program:
DEF calc_e1(p :OUT,vb :IN)
E6POS p
frame vb
INT i,idiv
real r
i=360
r=p.e1-vb.a
idiv=(r/i)
p.e1=r-idiv*i
END
Display More
Any help or pointers where to look would be greatly appreciated!