I have created a very simple Program in roboDK to test it on our Kuka robot mounted on a custom Linear track but the robot throws an error when reading instruction BAS(#ex_BASE,1)
Error KSS01444: Array index inadmissible
I have already checked and both MACHINE_DEF and BASE_DATA are properly defined
Do i need to change anything in EX_BASE (REAL_PAR, 0 )? I see that the second argument (0) is is hardcoded
Looking at the generated code, i don't find anything wrong with it and the Cell seems to be properly configured as i am able to jog the external axis with the teaching pendant.
The zip file contains bas.src, machine.dat, config.dat and the generated .src
Also, when going the direct method
I get Error KSS 1582: Kinematic instruction inadmissible
Linear track motor: MG_260_180_30_S0
Robot : KR210 R3100-2
Controller: KR C4
OS: KSS 8.6.13 HFI
Error KSS01444: Array index inadmissible
I have already checked and both MACHINE_DEF and BASE_DATA are properly defined
Code:
INT MAX_BASE=32
DECL FRAME BASE_DATA[32]
BASE_DATA[1]={X 703.357605,Y -2062.17334,Z -305.790497,A 0.0919634551,B -0.398787886,C -0.0776457191}
BASE_DATA[2]={X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
BASE_DATA[3]={X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
...
INT MAX_MACHINES=16
DECL MACHINE_DEF_T MACHINE_DEF[16]
MACHINE_DEF[1]={NAME[] "KR 210 R3100-2",COOP_KRC_INDEX 1,PARENT[] "WORLD",ROOT {X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0},MECH_TYPE #ROBOT,GEOMETRY[] "ObjectId = 686633033"}
MACHINE_DEF[2]={NAME[] "MG_ME_260_KSP40",COOP_KRC_INDEX 1,PARENT[] "WORLD",ROOT {X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0},MECH_TYPE #ERSYS,GEOMETRY[] "ObjectId = 531816951"}
MACHINE_DEF[3]={NAME[] " ",COOP_KRC_INDEX 0,PARENT[] " ",ROOT {X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0},MECH_TYPE #NONE,GEOMETRY[] " "}
...
DEF BAS (COMMAND :IN,REAL_PAR :IN )
;FOLD BAS ()
DECL BAS_COMMAND COMMAND
REAL REAL_PAR
SWITCH COMMAND
...
CASE #EX_BASE
EX_BASE (REAL_PAR, 0 )
ENDSWITCH
ENDDo i need to change anything in EX_BASE (REAL_PAR, 0 )? I see that the second argument (0) is is hardcoded
Looking at the generated code, i don't find anything wrong with it and the Cell seems to be properly configured as i am able to jog the external axis with the teaching pendant.
The zip file contains bas.src, machine.dat, config.dat and the generated .src
Code:
&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF _2_1_2_Axis_Prof ( )
; GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
; INTERRUPT ON 3
;FOLD Initialise and set default speed
BAS (#INITMOV,0)
BAS (#VEL_PTP,100)
BAS (#ACC_PTP,20)
$VEL.CP=0.2
BAS (#TOOL,0)
BAS (#BASE,0)
;ENDFOLD
;;FOLD STARTPOS
;$BWDSTART = FALSE
;PDAT_ACT = PDEFAULT
;BAS(#PTP_DAT)
;FDAT_ACT = {TOOL_NO 0,BASE_NO 0,IPO_FRAME #BASE}
;BAS(#FRAMES)
;;ENDFOLD
$ADVANCE = 5
;FOLD ---- Quickly skip BCO ----
; PTP $AXIS_ACT
;ENDFOLD
;FOLD ---- GO HOME ----
; PTP {A1 0.000, A2 -90.000, A3 90.000, A4 0.000, A5 0.000, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
;ENDFOLD
; Program generated by RoboDK v5.9.3 for KUKA KR 210-2 3100 on 24/10/2025 08:36:41
; Using nominal kinematics.
$APO.CPTP = 1
$APO.CDIS = 1.000
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "Operation name: 2 1/2 Axis Profiling"
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "Operation name: 2 1/2 Axis Profiling"
SetRPM(8000.0)
$VEL.CP = 1.00000
; ---- Setting reference (Base) ----
; BASE_DATA[1] = {FRAME: X 722.860,Y 2431.830,Z 246.206,A -0.081,B -0.400,C 0.091}
BAS(#ex_BASE,1)
; --------------------------
; ---- Setting tool (TCP) ----
; TOOL_DATA[1] = {FRAME: X 83.420,Y -2.020,Z 467.440,A 0.000,B 45.000,C 0.000}
$TOOL = {FRAME: X 83.420,Y -2.020,Z 467.440,A 0.000,B 45.000,C 0.000}
; $TOOL = TOOL_DATA[1]
; --------------------------
; Hide cutters
; Show Tool 1
PTP {A1 -16.86340,A2 -32.89350,A3 109.20600,A4 -109.03200,A5 39.15480,A6 162.13200,E1 2810.55000} C_PTP
LIN {X 1047.300,Y 166.530,Z 56.000,A -105.420,B 0.000,C -180.000,E1 2810.60000} C_DIS
$VEL.CP = 0.07000
LIN {X 1047.300,Y 166.530,Z 50.000,A -105.420,B 0.000,C 180.000,E1 2810.60000} C_DIS
LIN {X 1053.650,Y 166.530,Z 50.000,A -105.420,B 0.000,C -180.000,E1 2812.54000} C_DIS
CIRC {X 1058.140,Y 168.390,Z 50.000,A -105.420,B 0.000,C 180.000,E1 2812.05000},{X 1060.000,Y 172.880,Z 50.000,A -105.420,B 0.000,C 180.000,E1 2808.13000} C_DIS
$VEL.CP = 0.13333
LIN {X 1060.000,Y 1239.750,Z 50.000,A -105.420,B 0.000,C -180.000,E1 1741.71000} C_DIS
$VEL.CP = 0.07000
CIRC {X 1058.690,Y 1243.610,Z 50.000,A -105.420,B 0.000,C 180.000,E1 1737.50000},{X 1053.650,Y 1246.100,Z 50.000,A -105.420,B 0.000,C 180.000,E1 1733.43000} C_DIS
LIN {X 1047.300,Y 1246.100,Z 50.000,A -105.420,B 0.000,C 180.000,E1 1731.49000} C_DIS
$VEL.CP = 1.00000
LIN {X 1047.300,Y 1246.100,Z 56.000,A -105.420,B 0.000,C 180.000,E1 1731.49000} C_DIS
LIN {X 1047.300,Y 1246.100,Z 156.000,A -105.420,B 0.000,C -180.000,E1 1731.44000} C_DIS
$VEL.CP = 0.07000
ENDAlso, when going the direct method
Code:
$BASE = EK(MACHINE_DEF[2].ROOT, MACHINE_DEF[2].MECH_TYPE, BASE_DATA[1])Linear track motor: MG_260_180_30_S0
Robot : KR210 R3100-2
Controller: KR C4
OS: KSS 8.6.13 HFI

