There are 25 Diffrent WorkPieces, By Pick Programm, Type Number is received from PLC, I copy it to INT variable
DEF PICK_AGV ()
; HandShake program start and clearence
Type_Num = Type_Num_From_SPS
; Copy the values from teached point and AGV_Pickpoint, AGV_Beforepoint, AGV_Afterpoint are globals declared as E6pos in config
AGV_Pickpoint = XAGV_Teachedpoint [Type_Num]
AGV_Beforepoint = XAGV_Teachedpoint [Type_Num]
AGV_Afterpoint = XAGV_Teachedpoint [Type_Num]
AGV_Beforepoint.Z = XAGV_Teachedpoint [Type_Num].Z - 100
AGV_Afterpoint.X = XAGV_Teachedpoint [Type_Num].X + 100
; Interpolation Points
Slin AGV_Beforepoint
Slin AGV_Pickpoint
Slin AGV_Afterpoint
; Handshake End of the program
; Nullifying the Position Variables
AGV_Pickpoint = {X 0.0, Y 0.0, Z 0.0, A 0.0, B 0.0, C 0.0}
AGV_Beforepoint = {X 0.0, Y 0.0, Z 0.0, A 0.0, B 0.0, C 0.0}
AGV_Afterpoint = {X 0.0, Y 0.0, Z 0.0, A 0.0, B 0.0, C 0.0}
EXIT ; End of the program and
; Here are the pick points for 25 Type Work Pieces Tought, from these points above calculation are done
SLIN AGV_Teachedpoint [1] VEL CPDAT1 TOOL Base Etc.; Type 1 Workpiece Pick point
SLIN AGV_Teachedpoint [2] VEL CPDAT1 TOOL Base Etc.; Type 2 Workpiece Pick point
SLIN AGV_Teachedpoint [3] VEL CPDAT1 TOOL Base Etc.; Type 3 Workpiece Pick point
up to 25 with same name only the index changes
END
My Questions:
I am super new to KUKA Environment and working with Workvisual,
My Idea is to teach all the pick points of different types of Workpieces and w.r.t these tought points I calculate the before and after positions, so when I define Slin AGV_Teachedpoint [1] in Workvisual, I get No declaration found. My idea is to define here and in real time I touchup these pickpoints. Any New Ideas to implement similar process would be also helpful.