Hi Everyone,
I have a KUKA KR150 3700 KRC4.
I would like to do a lowering movement and during this motion I want to change the speed by an $anin . More the analog signal increases, the slower of motion will be the descent.
The big problem, one the same motion Lin I must to slower the motion and the motion can be stop the motion everywhere
I trie some different test but I don't find exactly what I want :
For the moment I use a brake in the interrupt.
MAIN PROGRAM
DEF test( )
INI
SPTP HOME Vel=100 % DEFAULT
LOOP
$BASE = BASE_DATA[2]
$TOOL = TOOL_DATA[1]
FOR X = 1 TO 6
$ACC_AXIS[X] = 20
$VEL_AXIS[X] = 35
ENDFOR
PTP {X 1219 ,Y -1244 , Z 2195 , A 78, B 0.0, C 179.36}
$VEL.CP = 0.7
$VEL.ORI1 = 150
$VEL.ORI2 = 100
$ACC.CP = 0.5
$ACC.ORI1 = 80
$ACC.ORI2 = 80
SCALING_SENSOR = $ANIN[2] * 10
$BASE = BASE_DATA[2]
$TOOL = TOOL_DATA[1]
$CYCFLAG[4] = ($ANIN[2] >0.40) ; Reduce speed on value fixed analog
WAIT FOR NOT $CYCFLAG[4]
INTERRUPT DECL 4 WHEN $CYCFLAG[4] DO SPEED_VEL ()
LINNN (); Lin motion with variable speed
$ADVANCE = 3
LIN {X 1219 ,Y 591 , Z 2175 , A 78, B 0.0, C 179.36}
ENDLOOP
Display More
SUB PROGRAM LIN MOTION WITH SPEED VARIABLE
DEF LINNN( )
INI
INTERRUPT ON 4
$ADVANCE = 0
$BASE = BASE_DATA[2]
$TOOL = TOOL_DATA[1]
$VEL.CP = 0.55
$VEL.ORI1 = 150
$VEL.ORI2 = 100
$ACC.CP = 0.45
$ACC.ORI1 = 80
$ACC.ORI2 = 80
LIN {X 1219 ,Y 591 , Z 575 , A 78, B 0.0, C 179.36}
INTERRUPT OFF 4
Display More
INTERRUPT PROG WITH BRAKE
DEF speed_vel( )
BRAKE
$VEL.CP = 0.05
$VEL.ORI1 = 5
$VEL.ORI2 = 5
$ACC.CP = 0.05
$ACC.ORI1 = 200
$ACC.ORI2 = 200
LIN {X 1219 ,Y 591 , Z 575 , A 78, B 0.0, C 179.36}
RESUME
END
Display More
As you can see , my code is running well. However It's only solution I found. Meanwhile , I must to use a brake in my interrupt.
I don't like my solution because :
1- I use a fixed value for reduce the speed ($ANIN[2] > 0.40)
2- I must to use a brake
I trie the same solution without brake but the result it's not good.
I trie too use the submit for change the variable $VEL.CP but i have an error ...
I see some people working on the main override parameters but I don't do this ....
Do you have any sugestion for change the speed during a motion ?
Thank your everyone