Hi, I am new to this forum and having failed to find the answer via KRC manuals or internet searches I am hopeful someone can help me with a programming problem.
I have am generating programming instruction in software for a 6 axis Kuka robot (KRC 2) that has an external axis E1. The external axis is a rotating station but is configured as a linear axis.
I very simplified example is shown below, with an initial position and a repeated loop of positions. A real example might have many hundreds of lines. Note that at the last position
in the loop all axes are back to the original position EXCEPT for E1 which continuously increases. What I need do is reset/zero/datum) E1 AT ITs CURRENT position at this last point.
example1:
LIN {X +350.000, Y +0.000, Z +400.000, A 0.000, B 0.000, E1 0.000}
HALT
FOR N_CYC=1 to 37
LIN {X +370.000, Y +5.000, Z +400.000, A +1.905, B +0.000, E1 +100.00} C_DIS
LIN {X +400.000, Y +10.000, Z +410.00, A +1.489, B +0.000, E1 +200.00} C_DIS
LIN {X +475.000, Y +20.000, Z +410.000, A +1.092, B +0.000, E1 +300.00} C_DIS
LIN {X +500.000, Y +20.000, Z +450.000, A +2.378, B +0.000, E1 +400.00} C_DIS
LIN {X +200.000, Y +10.000, Z +410.000, A +3.379, B +0.000, E1 +500.00} C_DIS
LIN {X +350.000, Y +0.000, Z +400.000, A 0.000, B 0.000, E1 +600.000} C_DIS
; I now need a way to reset E1 to the initial position e1=0.000
; before doing the next loop
ENDFOR
another way might be something like below. Yes I know the syntax shown is not valid but some suggestion along these lines that works would be good.
example2:
LIN {X +350.000, Y +0.000, Z +400.000, A 0.000, B 0.000, E1 0.000}
HALT
MYREALVAR=600.0
FOR N_CYC=1 to 37
LIN {X +370.000, Y +5.000, Z +400.000, A +1.905, B +0.000, E1=MYREALVAR*(N_CYC-1)+100.00} C_DIS
LIN {X +400.000, Y +10.000, Z +410.00, A +1.489, B +0.000, E1=MYREALVAR*(N_CYC-1)+200.00} C_DIS
LIN {X +475.000, Y +20.000, Z +410.000, A +1.092, B +0.000, E1=MYREALVAR*(N_CYC-1)+300.00} C_DIS
LIN {X +500.000, Y +20.000, Z +450.000, A +2.378, B +0.000, E1=MYREALVAR*(N_CYC-1)+400.00} C_DIS
LIN {X +200.000, Y +10.000, Z +410.000, A +3.379, B +0.000, E1=MYREALVAR*(N_CYC-1)+500.00} C_DIS
LIN {X +350.000, Y +0.000, Z +400.000, A 0.000, B 0.000, E1=MYREALVAR*(N_CYC-1)+600.000} C_DIS
ENDFOR
Any help would be most appreciated
Andrew