You should be able to use the driver and the post processor with KUKA robot controllers even if you have external axes such as a turntable. We recommend you use a numbered coordinate system or a coordinate system with the correct machine definition that is already defined on your robot controller.
The following files from your KUKA robot controller will help you understand how the KUKA system is built:
● KRC\R1\System\$config.dat
● KRC\R1\System\bas.src
● KRC\R1\Mada\$machine.dat
If you have a turntable, the position of the origin of the turntable should be defined in a MACHINE_DEF variable of the config.dat file. Whoever installed the system should have provided an example to generate a program using a synchronized turntable based on the BAS function.
For example, when you call the BAS function in your SRC file using the ex_BASE flag and a certain index, such as index 9:
BASE_DATA[9] = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0}
BAS(#ex_BASE,9)
You are telling you want to use index 9 of your MACHINE_FRAME_DAT. You should also look at the BAS and EX_BASE definitions to see what machine index (MACH_IDX) your controller is referring to by default. The BASE_DATA array defined just before calling the BAS function in your SRC file could be just the offset of your fixture mounted on your turntable.
You may need to manually change the $BASE variable with your post processor or driver to be the origin of your turntable if you have a turntable synchronized with your robot arm.
For example, if you have the BASE_DATA index 9 available, you should use the following code with your driver.
;--------
; 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)
For the post processor 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 Tools➔Options➔Drivers tab.
2.Check the option Provide Cartesian coordinates with respect to the reference.
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.