External axes

You should be able to use the driver with KUKA robots even when you use external axes such as a turntable. On the other hand, it is recommended to use a numbered coordinate system or a coordinate system with the correct machine definition that is already defined on your robot controller.

You may need to manually change the $BASE variable with your driver to be the origin of your turntable if you have a turntable synchronized with your setup. For example, if you have the BASE_DATA index 9 available, you should use the following code.

  ;--------

  ; Replace this the $BASE definition by the following 2 lines

  ;    to make the KUKA RoboDKSynch driver work with external axes:

  ; $BASE = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0} ; Comment this line

  BASE_DATA[9] = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0}

  BAS(#ex_BASE,9)

  ; the BAS ex_BASE function links to a fixed MACHINE_DEF index

  ;   visible in the BAS function

 

  ; The previous two lines are equivalent to the following,

  ;   if the BAS function uses index 2 for the Machine definition

  ; BASE_DATA[9] = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0}

  ; $BASE=EK(MACHINE_DEF[2].ROOT,MACHINE_DEF[2].MECH_TYPE,BASE_DATA[9])

  ;--------

$BASE=EK(EX_AX_DATA[1].ROOT,EX_AX_DATA[1].EX_KIN,EX_AX_DATA[1].OFFSET)

You could replace the previous line in the setFrame function of your post processor to use this $BASE definition if you want to account for the offset between the turntable and your fixture:

$BASE=EK(MACHINE_DEF[2].ROOT, MACHINE_DEF[2].MECH_TYPE, {%s})' % self.pose_2_str(pose)

Alternatively, when you use the driver you can isolate the coordinate system by following the procedure described below (so you don’t need to perfectly match the kinematics of your external axes in RoboDK).

For example, to be able to use the RoboDK driver by default, the kinematics of your external axes defined in the robot controller should match the kinematics created in RoboDK. Also, if you have a turntable, the root point of the turntable should match the position of the turntable defined in RoboDK.

Follow these steps to use the driver using a known coordinate system:

1.Select ToolsOptionsDrivers tab.

2.Check the option Provide Cartesian coordinates with respect to the reference.

Robots KUKA - Image 35

3.Replace the $BASE variable of your RoboDKsync.src program file by the coordinate system you want to use.

For example, if you want to use the base reference frame number 5, the RoboDKsync.src file should look like this (the first line is commented, you should find it around line 25):

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

$BASE = BASE_DATA[5]

This coordinate system must have been defined in the KUKA robot controller and RoboDK will not override this value.