I have changed the code to do it this way, but i didn't have time to test it yet.
Thanks for your replies, helped me understanding my troubles.
I will say you something when i test it.
I have changed the code to do it this way, but i didn't have time to test it yet.
Thanks for your replies, helped me understanding my troubles.
I will say you something when i test it.
Maybe i can try changing the reading of the actual position statement. The other wait for that you said, its imposible to remove.
I have the $advance=5 value, it doesen't work in the case of $POS.ACT? I can understand that maybe to read the actual position of the robot, it must be stopped first so for this reason doesnt exist an aproxximation.
Hi everyone,
I'm new with kuka robots, and i'm having asome dificults to do some movements i want. I have been reading in the forum triying to solve it but finally i decided to write a post with the code.
First of all, its a kr16 robot and KSS 8.2. I want to make some continuous movements that are LIN. Maybe wich i want to do its imposible or i'm misunderstandig something. The problem is that the robot stops after every LIN movement so it takes a lot of time to complete the path and causes yerking motion. Thats the code that i have now:
BAS (#VEL_CP,5 )
BAS(#ACC_cp, 100)
$OV_PRO= 50
$APO.CDIS=200
$APO.CPTP=100
$ADVANCE=5
;ENDFOLD (INIT)
;FOLD HOMING
IF $IN_HOME THEN
PTP P_START
ELSE
BAS (#VEL_PTP,5)
XHOME1.A1=$AXIS_ACT.A1
XHOME1.A2=P_START.A2
XHOME1.A3=P_START.A3
XHOME1.A4=P_START.A4
XHOME1.A5=P_START.A5
XHOME1.A6=P_START.A6
PTP XHOME1
XHOME1.A1=P_START.A1
PTP XHOME1
ENDIF
BAS (#VEL_PTP,50)
;ENDFOLD HOMING
;FOLD LOOP
LOOP
PTP P_START
POS_ROBOT =1
;FOLD COGER TABLERO
WAIT FOR PROGRAMA==1
IF ANCHO_TABLERO<=1000 THEN
X_CINTA=(ANCHO_TABLERO/2)*INVERTIR_SIGNO
ELSE
X_CINTA=-500
ENDIF
Y_CINTA=(LARGO_TABLERO/2)*INVERTIR_SIGNO
Z_PILA_ENTRADA=(ALTURA_PILA_ENTRADA-340)*INVERTIR_SIGNO
Z_PILA_SALIDA=(ALTURA_PILA_SALIDA-350)*INVERTIR_SIGNO
IF ANCHO_TABLERO<=LARGO_TABLERO THEN
LIN Offs(P1_CINTA,X_CINTA,Y_CINTA,-30)
POS_ROBOT =2
WAIT FOR PROGRAMA==2
LIN Offs(P1_CINTA,X_CINTA,Y_CINTA,0)
POS_ROBOT =3
WAIT FOR PROGRAMA==4
LIN Offs(P1_CINTA,X_CINTA,Y_CINTA,0)
POS_ROBOT =5
ELSE
LIN Offs(P2_CINTA,X_CINTA,Y_CINTA,-30)
POS_ROBOT =2
WAIT FOR PROGRAMA==2
LIN Offs(P2_CINTA,X_CINTA,Y_CINTA,0)
POS_ROBOT =3
WAIT FOR PROGRAMA==4
LIN Offs(P2_CINTA,X_CINTA,Y_CINTA,0)
POS_ROBOT =5
ENDIF
;ENDFOLD COGER TABLERO
WAIT FOR (PROGRAMA==5) OR (PROGRAMA==6)
;FOLD DEJAR TABLERO ENTRADA
IF PROGRAMA==5 THEN
P_PILA_ENTRADA_APROX0.X=$POS_ACT.X-50
P_PILA_ENTRADA_APROX0.Y=$POS_ACT.Y
P_PILA_ENTRADA_APROX0.Z=$POS_ACT.Z
P_PILA_ENTRADA_APROX0.A=$POS_ACT.A
LIN P_PILA_ENTRADA_APROX0 C_DIS
P_PILA_ENTRADA_APROX0.X=$POS_ACT.x
P_PILA_ENTRADA_APROX0.Y=$POS_ACT.Y
P_PILA_ENTRADA_APROX0.Z=$POS_ACT.Z-40
P_PILA_ENTRADA_APROX0.A=$POS_ACT.A
LIN P_PILA_ENTRADA_APROX0 C_DIS
P_PILA_ENTRADA_APROX0.X=$POS_ACT.x
P_PILA_ENTRADA_APROX0.Y=$POS_ACT.Y-900-Y_CINTA
P_PILA_ENTRADA_APROX0.Z=$POS_ACT.Z
P_PILA_ENTRADA_APROX0.A=$POS_ACT.A
LIN P_PILA_ENTRADA_APROX0 C_DIS
P_PILA_ENTRADA_APROX0.X=$POS_ACT.x-200
P_PILA_ENTRADA_APROX0.Y=$POS_ACT.Y
P_PILA_ENTRADA_APROX0.Z=$POS_ACT.Z
P_PILA_ENTRADA_APROX0.A=$POS_ACT.A
LIN P_PILA_ENTRADA_APROX0 C_DIS
P_PILA_ENTRADA_APROX0.X=P_PILA_ENTRADA.x
P_PILA_ENTRADA_APROX0.Y=P_PILA_ENTRADA.Y
P_PILA_ENTRADA_APROX0.Z=$POS_ACT.Z
P_PILA_ENTRADA_APROX0.A=P_PILA_ENTRADA.A
LIN P_PILA_ENTRADA_APROX0 C_DIS
POS_ROBOT =6
;LIN Offs(P_PILA_ENTRADA, 0, 0, Z_PILA_ENTRADA-20) C_DIS
POS_ROBOT =7
LIN Offs(P_PILA_ENTRADA, 0, 0, Z_PILA_ENTRADA)
POS_ROBOT =8
WAIT FOR PROGRAMA==7
;LIN Offs(P_PILA_ENTRADA, 0, 0, Z_PILA_ENTRADA-20) C_DIS
POS_ROBOT =9
LIN P_PILA_ENTRADA_APROX0 C_DIS
PTP P_START
ENDIF
If somebody can clear out my doubts I would be very grateful.