mayank. Interesting thanks. That will be useful for me to reset the E1 axis in some other circumstances but not in this case. The loop is a continuous motion and the axis reset would cause unwanted pauses.
Posts by AndrewZ
-
-
Thanks for your comments guys.
Something along the lines of SYKFIRE's post is what I will tryout. It is rather a shame that it seems not possible to make a mathematical assignment to an element (axis) within a line of motion such as a LIN. We thus need three lines of code for each position (define, modify, move) which makes the program far less readable. Hayho, that's life -
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}
HALTFOR 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
ENDFORanother 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}
HALTMYREALVAR=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
ENDFORAny help would be most appreciated
Andrew