Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Kuka KR16 KRC2 external axis not work in RoboDK

#1
Hi,
We have KUKA KR16 with KRC2 and external axis KUKA KL 250 / 2C (this external axis is not in library). This external axis is designed for ceiling operation. But we use it on floor. When we use moveJ robot work fine. But when we use moveL robot move to unknown position. What should we do to make the system work properly. For details, I attached a video and file robodkproxy which we use.
video: https://drive.google.com/file/d/1vUEVseh...p=drivesdk
[url=https://drive.google.com/file/d/1vUEVsehaXRjdvGE2ArZ5Yq7Q8nj3I4Sg/view?usp=drivesdk][/url]robodkproxy:

Code:
DEF RoboDKsync33test()

INT io_id
INT j_id
INT program_id

BAS(#INITMOV,0)

PTP $AXIS_ACT

$ORI_TYPE  = #VAR
$CIRC_TYPE = #BASE
$VEL.ORI1 = 200
$VEL.ORI2 = 200
$ACC.ORI1 = 100
$ACC.ORI2 = 100

$VEL.CP=3
$ACC.CP=10

$BASE = {FRAME: X 0,Y 0,Z 0,A 0,B 0,C 0}
$TOOL = {FRAME: X 0,Y 0,Z 0,A 0,B 0,C 0}

$ADVANCE = 0
COM_ROUNDM = -1
COM_ACTION = 0
COM_ACTCNT = 0
$APO.CPTP = 0
$APO.CDIS = 0

WHILE COM_ACTION >= 0

SWITCH COM_ACTION
CASE 1
; do nothing
COM_ACTCNT = COM_ACTCNT + 1
COM_ACTION = 0

CASE 2
IF COM_ROUNDM >= 0 THEN
   PTP COM_E6AXIS C_PTP
ELSE
   PTP COM_E6AXIS
ENDIF
COM_ACTION = 0

CASE 3
IF COM_ROUNDM >= 0 THEN
   LIN COM_FRAME C_DIS
ELSE
   LIN COM_FRAME
ENDIF
COM_ACTION = 0

CASE 4
IF COM_ROUNDM >= 0 THEN
   CIRC COM_POS,COM_FRAME C_DIS
ELSE
   CIRC COM_POS,COM_FRAME
ENDIF
COM_ACTION = 0


CASE 5
COM_ACTCNT = COM_ACTCNT + 1
$TOOL = COM_FRAME
COM_ACTION = 0

CASE 6
COM_ACTCNT = COM_ACTCNT + 1
$VEL.CP = COM_VALUE1
COM_ACTION = 0

CASE 7
COM_ACTCNT = COM_ACTCNT + 1
IF COM_VALUE1 > 0 THEN
   $VEL.CP = COM_VALUE1
ENDIF
IF COM_VALUE2 > 0 THEN
   ;$VEL.ORI1 = COM_VALUE2
   ;$VEL.ORI2 = COM_VALUE2
   FOR j_id=1 TO 6
       IF COM_VALUE2 > 100 THEN
           $VEL_AXIS[j_id] = 100
       ELSE
           $VEL_AXIS[j_id] = COM_VALUE2
       ENDIF
   ENDFOR
ENDIF
IF COM_VALUE3 > 0 THEN
   $ACC.CP = COM_VALUE3
ENDIF
IF COM_VALUE4 > 0 THEN
   ;$ACC.ORI1 = COM_VALUE4
   ;$ACC.ORI2 = COM_VALUE4
   FOR j_id=1 TO 6    
       IF COM_VALUE4 > 100 THEN
           $ACC_AXIS[j_id] = 100
       ELSE
           $ACC_AXIS[j_id] = COM_VALUE4
       ENDIF
   ENDFOR
ENDIF
COM_ACTION = 0

CASE 8
COM_ACTCNT = COM_ACTCNT + 1
IF COM_ROUNDM >= 0 THEN
   IF COM_ROUNDM > 100 THEN
       $APO.CPTP = 100
   ELSE
       $APO.CPTP = COM_ROUNDM
   ENDIF
   $APO.CDIS = COM_ROUNDM
   $ADVANCE = 1
ELSE
   $APO.CPTP = 0
   $APO.CDIS = 0
   $ADVANCE = 0
ENDIF
COM_ACTION = 0

CASE 9
COM_ACTCNT = COM_ACTCNT + 1
WAIT SEC COM_VALUE1
COM_ACTION = 0

CASE 10
COM_ACTCNT = COM_ACTCNT + 1
io_id = COM_VALUE1
IF COM_VALUE2 > 0.5 THEN
   $OUT[io_id] = TRUE
ELSE
   $OUT[io_id] = FALSE
ENDIF
COM_ACTION = 0

CASE 11
PTP COM_E6AXIS
LIN COM_FRAME
WAIT SEC 0
COM_ACTION = 0


CASE 12
COM_ACTCNT = COM_ACTCNT + 1
io_id = COM_VALUE1
IF COM_VALUE2 > 0.5 THEN
   WAIT FOR $IN[io_id]==TRUE
ELSE
   WAIT FOR $IN[io_id]==FALSE
ENDIF
COM_ACTION = 0


CASE 13
;----- Run program COM_VALUE1 ---------
; (to trigger from RoboDK: use robot.RunCodeCustom("program id", INSTRUCTION_CALL_PROGRAM)
program_id = COM_VALUE1
SWITCH program_id
CASE 1
; -- run program 1 --
; Drill()
; -------------------
CASE 2
; -- run program 2 --
; Cut()
; -------------------
ENDSWITCH

;--------------------------------------------
COM_VALUE1 = 0
COM_ACTION = 0



; DEFAULT
; COM_ACTION = 0

ENDSWITCH


ENDWHILE

END
#2
When you trigger a linear move RoboDK will provide the position of the tool with respect to the base of the rail.

Make sure to properly define your system on the KUKA controller and RoboDK. This section shows how to create your external axes:
https://robodk.com/doc/en/General.html#ModelRobot

You should also properly initialize your system in the driver using a BAS function or properly define the $BASE variable in the driver.
#3
(06-04-2020, 03:03 PM)Albert Wrote: When you trigger a linear move RoboDK will provide the position of the tool with respect to the base of the rail.

Make sure to properly define your system on the KUKA controller and RoboDK. This section shows how to create your external axes:
https://robodk.com/doc/en/General.html#ModelRobot

You should also properly initialize your system in the driver using a BAS function or properly define the $BASE variable in the driver.

Hi Albert, in this link https://robodk.com/doc/en/General.html#ModelRobot it's not clear for us (cose we are newbies in robots yet) how to create 1 axis mechanism, maybe you got some tutotials for 1 axis mechanism?
#4
Hi Max,

I hope you are well.
I recommend you to take a look at this webinar:
https://youtu.be/HN9bHHGyVOk

Have a great day.
Jeremy
  




Users browsing this thread:
1 Guest(s)