February 17, 2019, 08:03:55 AM

# Aproximation problems

### Author Topic:  Aproximation problems  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

February 11, 2019, 09:55:59 AM

#### robotero22

##### Aproximation problems
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
;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_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)
IF PROGRAMA==5 THEN

POS_ROBOT =6

POS_ROBOT =7

POS_ROBOT =8

WAIT FOR PROGRAMA==7
POS_ROBOT =9

PTP P_START
ENDIF

If somebody can clear out my doubts I would be very grateful.

Today at 08:03:55 AM

Guest
##### Re:  Aproximation problems

February 11, 2019, 12:05:02 PM

#### Leon

##### Re: Aproximation problems
When you run this code do get any messages? like "approximation not possible". If so there are multiple reason why this can happen. First off is a stop off the advance run pointer which calculates the next motion(s) when the current one is being executed. Commands like "wait for" or reading variable \$pos.act stops the advance run pointer.
The second reason could be your setting of \$APO.CDIS=200. This means that the robot will want to round the corner with a radius of 200mm. If points are to close together this can not be achieved.

In your case it is probably reading \$pos.act that is the problem because you do that a lot. There are several options to get around this but without knowing what your code does it is hard to make a suggestion.
Every problem has a solution, that isn't the problem. The problem is the solution.

February 11, 2019, 12:56:10 PM

#### robotero22

##### Re: Aproximation problems
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.

February 11, 2019, 01:22:50 PM

#### Leon

##### Re: Aproximation problems
i would suggest downloading the expert programming manual en reading up op the advance pointer and the continue command, Maybe with that you can get around the  "wait for".
Basically the continue command will let the advance run pointer run past the wait for command if its requirements are already met. That is also the risk of using that command. with an advance run pointer of 5 the pointer will be 5 motion commands ahead of the normal program pointer and executes everything in between.
For example if you use continue before reading Pos.act you will not get the coordinates you expect. so you have to be very careful when to use continue

February 11, 2019, 02:55:12 PM

#### SkyeFire

Global Moderator
##### Re: Aproximation problems
As a side note, \$POS_ACT should probably be replaced with \$POS_ACT_MES, as that's more reliable.

Part of the problem here, is that you're trying to create position P2 based off of \$POS_ACT of P1, but \$POS_ACT won't be the value of P1 until the robot is physically at P1.  Then you're trying to create P3 based of of P2's position, and so on. So you've created a catch-22.

If you can pre-calculate these positions before you begin the first move, that would allow you to approximate through all of them.  For the first two moves, that should be simple, as their relationship to the start position is fixed.  Whether you can do it for the 4th move depends on when Y_CINTA changes.  The 5th move should be easily pre-calculable because it's only "live" element is Z, which is set back during the 2nd move.

February 12, 2019, 08:32:11 AM

#### robotero22

##### Re: Aproximation problems
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.

### Similar Topics

###### I/O PROBLEMS

5 Replies
495 Views
November 20, 2018, 04:55:45 PM
###### PN problems

Started by Jrk on KUKA Robot Forum

2 Replies
1155 Views
July 28, 2017, 10:59:22 AM
by Jrk
###### Problems with RSI

Started by Alex1337 on KUKA Robot Forum

1 Replies
1134 Views
February 25, 2016, 12:23:55 AM
by SkyeFire
###### Connection problems or something else?

Started by Terzi on ABB Robot Forum

6 Replies
4471 Views
August 22, 2013, 10:34:37 AM
by Terzi