April 25, 2019, 04:42:39 PM
Robotforum | Industrial Robots Community

 Aproximation problems

Author Topic:  Aproximation problems  (Read 283 times)

0 Members and 1 Guest are viewing this topic.

February 11, 2019, 09:55:59 AM
Read 283 times
Offline

robotero22


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.


Today at 04:42:39 PM
Reply #1

Advertisement

Guest

February 11, 2019, 12:05:02 PM
Reply #1
Offline

Leon


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
Reply #2
Offline

robotero22


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
Reply #3
Offline

Leon


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
Reply #4
Online

SkyeFire

Global Moderator
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
Reply #5
Offline

robotero22


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.


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
I/O PROBLEMS

Started by CtulhuAdept on Yaskawa Motoman Robot Forum

5 Replies
560 Views
Last post November 20, 2018, 04:55:45 PM
by CtulhuAdept
clip
PN problems

Started by Jrk on KUKA Robot Forum

2 Replies
1215 Views
Last post July 28, 2017, 10:59:22 AM
by Jrk
xx
Problems with RSI

Started by Alex1337 on KUKA Robot Forum

1 Replies
1176 Views
Last post February 25, 2016, 12:23:55 AM
by SkyeFire
clip
Help WeldGuide 3 Problems

Started by travish on ABB Robot Forum

3 Replies
2425 Views
Last post March 09, 2016, 01:10:24 AM
by jarm