Environment:
KUKA KR6 r900
KRC4 Compact controller
KRL 8.3
Hi all,
I'm looking at different ways of controlling the robot speed using a variable as shown in the simplified test code below. This works well, and I can now adjust the speed in on place, and have it update automatically in the code that follows. This allows me to run a program at slower speeds while testing, and gradually ramp up the speed to optimise the process.
The current workflow is:
- define the points on the pendant, setting PTP or LIN, at any speed
- switch to Workvisual, and download the program
- manually adjust each point (and the fold comment/description) to the desired variable
My question is:
- is it possible to program these variables directly from the pendant if use a script with the variables defined at the top?
- Is there a smarter way to do this..?
Thanks!
Rob.
Code
&ACCESS RVP
&REL 7
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
DEF SPEED_TEST( )
REAL SPEED1
REAL SPEED2
;FOLD INI;%{PE}
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
SPEED1 = 80
SPEED2 = 0.5
;FOLD PTP HOME Vel=SPEED1 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS (#PTP_PARAMS,SPEED1)
$H_POS=XHOME
PTP XHOME
;ENDFOLD
;FOLD PTP P1 Vel=SPEED1 % PDAT1 Tool[1] Base[0];%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:, 5:100, 7:PDAT1
$BWDSTART=FALSE
PDAT_ACT=PPDAT1
FDAT_ACT=FP1
BAS(#PTP_PARAMS,SPEED1)
PTP XP1
;ENDFOLD
;FOLD PTP P2 Vel=SPEED1 % PDAT2 Tool[1] Base[0];%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P2, 3:, 5:100, 7:PDAT2
$BWDSTART=FALSE
PDAT_ACT=PPDAT2
FDAT_ACT=FP2
BAS(#PTP_PARAMS,SPEED1)
PTP XP2
;ENDFOLD
;FOLD LIN P3 Vel=SPEED2 CPDAT1 Tool[1] Base[0];%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:, 5:2, 7:CPDAT1
$BWDSTART=FALSE
LDAT_ACT=LCPDAT1
FDAT_ACT=FP3
BAS(#CP_PARAMS,SPEED2)
LIN XP3
;ENDFOLD
;FOLD LIN P4 Vel=SPEED2 CPDAT2 Tool[1] Base[0];%{PE}%R 8.3.44,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P4, 3:, 5:2, 7:CPDAT2
$BWDSTART=FALSE
LDAT_ACT=LCPDAT2
FDAT_ACT=FP4
BAS(#CP_PARAMS,SPEED2)
LIN XP4
;ENDFOLD
;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS (#PTP_PARAMS,100 )
$H_POS=XHOME
PTP XHOME
;ENDFOLD
END
Display More