Hello, SPRUTCAM wrote me a code that is excellent only at the beginning of the code when the robot starts in its first PTP line and until it reaches the first LIN line it goes very fast even though I reduced its program reading speed to 60% the other code speeds are good only the one at the beginning is very fast. Can someone help me how to solve this problem so that the robot creates the first PTP line more slowly. It is a KUKA krc2 ed.5 robot. Greetings
Problem with high speed at the beginning of the program

Uros Marinkovic 
August 17, 2024 at 1:13 AM 
Thread is Unresolved


Can you share the program?
Fubini

&ACCESS RVP
DEF ledjawoodside()
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0)
$BASE=BASE_DATA[2]
$TOOL=TOOL_DATA[12]
$VEL.CP=0.1
PTP {A1 0.000, A2 141.200, A3 104.850, A4 0.000, A5 35.980, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 43.772, A2 49.546, A3 124.491, A4 125.918, A5 76.001, A6 87.035, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 44.862, A2 48.075, A3 129.605, A4 135.600, A5 82.227, A6 93.447, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 43.862, A2 48.075, A3 129.605, A4 135.600, A5 82.227, A6 93.447, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
LIN {X 31.364, Y 303.187, Z 206.469, A 179.951, B 1.691, C 92.47} C_DIS
LIN {X 31.28, Y 263.824, Z 208.167, A 179.951, B 1.691, C 92.47}
$VEL.CP=0.083
LIN {X 31.248, Y 248.814, Z 208.814, A 179.951, B 1.691, C 92.47}
$VEL.CP=0.25
LIN {X 31.364, Y 303.187, Z 206.469, A 179.951, B 1.691, C 92.47}
LIN {X 66.25, Y 278.234, Z 12.931, A 174.893, B 5.091, C 135.21} C_DIS
LIN {X 66.251, Y 223.18, Z 42.091, A 174.893, B 5.091, C 135.21} C_DIS
LIN {X 66.251, Y 195.312, Z 69.943, A 174.893, B 5.091, C 135.21}
$VEL.CP=0.083
LIN {X 66.252, Y 185.639, Z 79.61, A 174.893, B 5.091, C 135.21}.
.
.
.
.
CIRC {X 1184.841, Y 0.003, Z 1.005, A 123.867, B 0.096, C 179.729},{X 1184.929, Y 0.578, Z 1.008, A 123.546, B 0.493, C 179.377} C_DIS
LIN {X 1185.053, Y 0.811, Z 1.011, A 123.484, B 0.668, C 179.402} C_DIS
LIN {X 1185.219, Y 1.015, Z 1.014, A 123.423, B 0.843, C 179.428} C_DIS
LIN {X 1185.447, Y 1.218, Z 1.017, A 123.488, B 0.999, C 179.927} C_DIS
LIN {X 1185.675, Y 1.421, Z 1.02, A 123.295, B 1.166, C 179.42} C_DIS
LIN {X 1185.696, Y 1.602, Z 6.978, A 123.295, B 1.166, C 179.42} C_DIS
$VEL.CP=0.167
LIN {X 1185.842, Y 2.821, Z 60.995, A 123.295, B 1.166, C 179.42} C_DIS
LIN {X 1186.113, Y 5.079, Z 160.995, A 123.295, B 1.166, C 179.42} C_DIS
PTP {A1 0.000, A2 141.200, A3 104.850, A4 0.000, A5 35.980, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
END 
Here I sent you the beginning and the end of the code, I thought you didn't need the whole code, if so, tell me. the problem occurs to me on the first three PTP lines where the robot goes very fast, and then when the first LIN lines start, the speed is good

BAS (#INITMOV,0)
initialises the ptp velocity to 100 percent meaning as fast as physically possible. On the other hand lin velocity is set to 0.1 m/s by setting $vel.cp. You can set ptp velocity as well by using
$vel_axis[<axis_index>] = <desired percentage value>
So for axis 1 and 10 percent of maximal axis velocity for example
$vel_axis[1]=10
Fubini

Should I insert $VEL_AXIS[1]=10 and so on for each axis before the first PTP line for example
ACCESS RVP
DEF ledjawoodside()
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0)
$BASE=BASE_DATA[2]
$TOOL=TOOL_DATA[12]
$VEL_AXIS[1]=10$VEL_AXIS[2]=10
$VEL_AXIS[3]=10
$VEL_AXIS[4]=10
$VEL_AXIS[5]=10
$VEL_AXIS[6]=10
PTP {A1 0.000, A2 141.200, A3 104.850, A4 0.000, A5 35.980, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 43.772, A2 49.546, A3 124.491, A4 125.918, A5 76.001, A6 87.035, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 44.862, A2 48.075, A3 129.605, A4 135.600, A5 82.227, A6 93.447, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
PTP {A1 43.862, A2 48.075, A3 129.605, A4 135.600, A5 82.227, A6 93.447, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0} 
Yes or whatever percentage value between 1 and 100 you like.
Fubini

Just use one line like
BAS(#vel_ptp,5)
To set ptp velocity to 5% for eample

Thanks a lot for the helpful tips, I was able to solve the problem. thank you very much