Hello again KUKA experts.
Can there be problems in doing a program with only calculated positions? Does anyone have any advice for things to watch out for.
Best regards
Christian
Hello again KUKA experts.
Can there be problems in doing a program with only calculated positions? Does anyone have any advice for things to watch out for.
Best regards
Christian
Depends on what you are doing!
I don't use calculated positions, rather shift bases when doing moves which are repeated or modified.
Sent using Tapatalk 4.
Im depalletizing a stack, sending coordinates from plc. The Robot vill work in a 270 degree A1 area.
Christian
Then I would be shifting the base rather than the point.
Is there a reason why the values have to come from the PLC? If they are constant then it would be better to create a frame array in the robot.
Sent using Tapatalk 4.
Doing a Base shift is certainly more convenient than shifting points, especially if the Bases are set up properly at the beginning to simplify the shifts.
If, for some reason, you must use calculated points, I generally try to create a set of "zero shift" points, and then run them something like this:
DECL E6POS _NextPos
_NextPos = $NULLFRAME
_NextPos.X = X_Shift_From_PLC
_NextPos.Y = Y_Shift_From_PLC
_NextPos.Z = Z_Shift_From_PLC
_NextPos.A = A_Rotation_From_PLC
_NextPos.B = B_Rotation_From_PLC
_NextPos.C = C_Rotation_From_PLC
PTP P1:_NextPos ; move to original point shifted by values from PLC
_NextPos = $NULLFRAME
_NextPos.X = X_Shift_From_PLC
_NextPos.Y = Y_Shift_From_PLC
_NextPos.Z = Z_Shift_From_PLC
_NextPos.A = A_Rotation_From_PLC
_NextPos.B = B_Rotation_From_PLC
_NextPos.C = C_Rotation_From_PLC
PTP P2:_NextPos
Display More
And so on. Of course, if there's a lot of points, moving all the _NextPos value-setting code to a subroutine would be a good idea.
Thank you for your help.
The stacks have 20 variations in width & length. I think it will be easier to do calculations and recipe saves in the PLC.
I have heard a rumor that a robot kan get lost when only doing calculated points and no "Teached positions", i dont know if it had something to do with S&T or if you have to have at least one axis ptp?
It is possible, but it can happen to any brand of robot. Still, it should only happen if your shifts are so large as to take an axis out of the quadrant that it was programmed in. This can usually be addressed by making the "calculated" motions XYZABC only, without including possibly incompatible S&T variables. Also, LIN moves are immune to S&T issues anyway, so if one programs carefully, one can keep all the un-shifted motions PTP, and use a small number of LIN commands with the shifts.
Shifting Bases still works better than shifting points, however. There's no real effective difference, but Base shifting is far less work and requires less code. It also has fewer potential pitfalls.
If the positions don't need constant changing then:-
Declare a frame with you stack positions
DECL FRAME OFFSET[20]
OFFSET[1]={X 0.0,Y 0.0,Z 0.0,A 0.0,B 0.0,C 0.0}
OFFSET[2]={X 0.0,Y 0.0,Z -100.0,A 0.0,B 0.0,C 0.0}
OFFSET[3]={X 0.0,Y 0.0,Z -200.0,A 0.0,B 0.0,C 0.0}
......
In the program before the moves
Create all of your moves in Base 1, then change the base of the ones you wish of offset to use Base 2.
Make sure the PLC send the values (handshaking is a good idea!) before the code is run, if for instance the PLC sends 2 then the move will be offset by the valves in OFFSET[2].
It's a very useful way of doing multiple things in different positions reusing the robot moves. Below is an example of this, but this involves both placing and stacking pallets. Most of the calculated code is in the Calculations () subroutine.
&ACCESS RVP1
&REL 1244
&COMMENT Pallet Load/Unload
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF pallet(COMMAND :IN )
;*****************************
;* Company : PCL Ceramics *
;* Location : Kings Lynn *
;* Cell : PCB4 *
;* Prog : Pallet Program *
;* *
;* * * * * * * * * * * * * * *
;* Update Section *
;* By : *
;* Fri 31 Oct 2008 *
;*****************************
;FOLD Declarations
DECL PALLET_CTRL COMMAND
INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
INTERRUPT DECL 20 WHEN I_TRAYS_SAFE==FALSE DO ERROR ()
IF COMMAND==#NEW THEN
NEW_PALLET=TRUE
ELSE
NEW_PALLET=FALSE
ENDIF
;ENDFOLD
;FOLD SYN OUT 17 'O_READY_TO_DEMOULD' State= FALSE at START Delay= 0 ms;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VSYNOUT,%P 2:17, 3:O_READY_TO_DEMOULD, 5:FALSE, 7:0, 9:0, 12:0
TRIGGER WHEN DISTANCE=0 DELAY=0 DO $OUT[17]=FALSE
;ENDFOLD
;FOLD SYN OUT 40 'O_PALLET_DRAW_LOCK' State= TRUE at START Delay= 0 ms;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VSYNOUT,%P 2:40, 3:O_PALLET_DRAW_LOCK, 5:TRUE, 7:0, 9:0, 12:0
TRIGGER WHEN DISTANCE=0 DELAY=0 DO $OUT[40]=TRUE
;ENDFOLD
TOOL_CHG (5)
IF ACTIVE_TOOL==5 THEN
CALCULATIONS ()
SWITCH COMMAND
;place new pallets
CASE #NEW
;FOLD PTP POUNCE CONT Vel= 50 % PDAT46 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:50, 7:PDAT46
$BWDSTART=FALSE
PDAT_ACT=PPDAT46
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,50)
PTP XPOUNCE C_PTP
;ENDFOLD
;FOLD PTP P1 CONT Vel= 35 % PDAT5 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_PTP, 5:35, 7:PDAT5
$BWDSTART=FALSE
PDAT_ACT=PPDAT5
FDAT_ACT=FP1
BAS(#PTP_PARAMS,35)
PTP XP1 C_PTP
;ENDFOLD
INTERRUPT ON 20
IF I_PICKUP_PALLET_BOTTOM THEN
IF DO_STATION_NUMBER<6 THEN
;FOLD LIN BOTTOM_RH CONT Vel= 0.35 m/s CPDAT56 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:BOTTOM_RH, 3:C_DIS, 5:0.35, 7:CPDAT56
$BWDSTART=FALSE
LDAT_ACT=LCPDAT56
FDAT_ACT=FBOTTOM_RH
BAS(#CP_PARAMS,0.35)
LIN XBOTTOM_RH C_DIS
;ENDFOLD
ELSE
;FOLD PTP BOTTOM_LH CONT Vel= 35 % PDAT66 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:BOTTOM_LH, 3:C_PTP, 5:35, 7:PDAT66
$BWDSTART=FALSE
PDAT_ACT=PPDAT66
FDAT_ACT=FBOTTOM_LH
BAS(#PTP_PARAMS,35)
PTP XBOTTOM_LH C_PTP
;ENDFOLD
ENDIF ;do_station_number
ENDIF ;i_pickup_pallet_bottom
;FOLD LIN P2 CONT Vel= 1.5 m/s CPDAT11 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS, 5:1.5, 7:CPDAT11
$BWDSTART=FALSE
LDAT_ACT=LCPDAT11
FDAT_ACT=FP2
BAS(#CP_PARAMS,1.5)
LIN XP2 C_DIS
;ENDFOLD
;FOLD LIN TRAY Vel= 0.35 m/s CPDAT47 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:TRAY, 3:, 5:0.35, 7:CPDAT47
$BWDSTART=FALSE
LDAT_ACT=LCPDAT47
FDAT_ACT=FTRAY
BAS(#CP_PARAMS,0.35)
LIN XTRAY
;ENDFOLD
;FOLD VACUUM ON
;FOLD OUT 871 'O_GRIPPER_CLOSE' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:871, 3:O_GRIPPER_CLOSE, 5:TRUE, 6:
$OUT[871]=TRUE
;ENDFOLD
;FOLD OUT 872 'O_GRIPPER_OPEN' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:872, 3:O_GRIPPER_OPEN, 5:TRUE, 6:
$OUT[872]=TRUE
;ENDFOLD
;FOLD OUT 873 'Ausgang' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:873, 3:Ausgang, 5:TRUE, 6:
$OUT[873]=TRUE
;ENDFOLD
;FOLD OUT 874 'Ausgang' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:874, 3:Ausgang, 5:TRUE, 6:
$OUT[874]=TRUE
;ENDFOLD
;FOLD WAIT Time= 0.5 sec;%{PE}%R 5.4.35,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.5
WAIT SEC 0.5
;ENDFOLD
;ENDFOLD
;FOLD LIN P2 CONT Vel= 0.05 m/s CPDAT48 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS, 5:0.05, 7:CPDAT48
$BWDSTART=FALSE
LDAT_ACT=LCPDAT48
FDAT_ACT=FP2
BAS(#CP_PARAMS,0.05)
LIN XP2 C_DIS
;ENDFOLD
IF I_PICKUP_PALLET_BOTTOM THEN
IF DO_STATION_NUMBER<6 THEN
;FOLD LIN BOTTOM_RH CONT Vel= 0.2 m/s CPDAT57 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:BOTTOM_RH, 3:C_DIS, 5:0.2, 7:CPDAT57
$BWDSTART=FALSE
LDAT_ACT=LCPDAT57
FDAT_ACT=FBOTTOM_RH
BAS(#CP_PARAMS,0.2)
LIN XBOTTOM_RH C_DIS
;ENDFOLD
ELSE
;FOLD PTP BOTTOM_LH CONT Vel= 7 % PDAT67 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:BOTTOM_LH, 3:C_PTP, 5:7, 7:PDAT67
$BWDSTART=FALSE
PDAT_ACT=PPDAT67
FDAT_ACT=FBOTTOM_LH
BAS(#PTP_PARAMS,7)
PTP XBOTTOM_LH C_PTP
;ENDFOLD
ENDIF ;do_station_number
ENDIF ;i_pickup_pallet_bottom
;FOLD LIN P1 CONT Vel= 0.2 m/s CPDAT54 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:C_DIS, 5:0.2, 7:CPDAT54
$BWDSTART=FALSE
LDAT_ACT=LCPDAT54
FDAT_ACT=FP1
BAS(#CP_PARAMS,0.2)
LIN XP1 C_DIS
;ENDFOLD
INTERRUPT OFF 20
;FOLD PTP POUNCE CONT Vel= 20 % PDAT47 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:20, 7:PDAT47
$BWDSTART=FALSE
PDAT_ACT=PPDAT47
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,20)
PTP XPOUNCE C_PTP
;ENDFOLD
;FOLD PTP P12 CONT Vel= 20 % PDAT49 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P12, 3:C_PTP, 5:20, 7:PDAT49
$BWDSTART=FALSE
PDAT_ACT=PPDAT49
FDAT_ACT=FP12
BAS(#PTP_PARAMS,20)
PTP XP12 C_PTP
;ENDFOLD
;FOLD PTP P13 CONT Vel= 20 % PDAT78 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P13, 3:C_PTP, 5:20, 7:PDAT78
$BWDSTART=FALSE
PDAT_ACT=PPDAT78
FDAT_ACT=FP13
BAS(#PTP_PARAMS,20)
PTP XP13 C_PTP
;ENDFOLD
;FOLD LIN P14 Vel= 0.1 m/s CPDAT2 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P14, 3:, 5:0.1, 7:CPDAT2
$BWDSTART=FALSE
LDAT_ACT=LCPDAT2
FDAT_ACT=FP14
BAS(#CP_PARAMS,0.1)
LIN XP14
;ENDFOLD
;FOLD VACUUM OFF
;FOLD OUT 871 'O_GRIPPER_CLOSE' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:871, 3:O_GRIPPER_CLOSE, 5:FALSE, 6:
$OUT[871]=FALSE
;ENDFOLD
;FOLD OUT 872 'O_GRIPPER_OPEN' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:872, 3:O_GRIPPER_OPEN, 5:FALSE, 6:
$OUT[872]=FALSE
;ENDFOLD
;FOLD OUT 873 'Ausgang' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:873, 3:Ausgang, 5:FALSE, 6:
$OUT[873]=FALSE
;ENDFOLD
;FOLD OUT 874 'Ausgang' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:874, 3:Ausgang, 5:FALSE, 6:
$OUT[874]=FALSE
;ENDFOLD
;FOLD WAIT Time= 0.5 sec;%{PE}%R 5.4.35,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.5
WAIT SEC 0.5
;ENDFOLD
;ENDFOLD
;FOLD LIN P13 CONT Vel= 0.4 m/s CPDAT65 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P13, 3:C_DIS, 5:0.4, 7:CPDAT65
$BWDSTART=FALSE
LDAT_ACT=LCPDAT65
FDAT_ACT=FP13
BAS(#CP_PARAMS,0.4)
LIN XP13 C_DIS
;ENDFOLD
;FOLD LIN P4 CONT Vel= 0.4 m/s CPDAT62 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P4, 3:C_DIS, 5:0.4, 7:CPDAT62
$BWDSTART=FALSE
LDAT_ACT=LCPDAT62
FDAT_ACT=FP4
BAS(#CP_PARAMS,0.4)
LIN XP4 C_DIS
;ENDFOLD
;FOLD LIN P11 CONT Vel= 0.6 m/s CPDAT64 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P11, 3:C_DIS, 5:0.6, 7:CPDAT64
$BWDSTART=FALSE
LDAT_ACT=LCPDAT64
FDAT_ACT=FP11
BAS(#CP_PARAMS,0.6)
LIN XP11 C_DIS
;ENDFOLD
;FOLD SYN PULSE 36 'O_PALLET_ON_STATION $OUT[36]' State= TRUE Time= 1 sec at END Delay= 0 ms;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VSYNPULSE,%P 2:36, 3:O_PALLET_ON_STATION $OUT[36], 5:TRUE, 7:1, 10:1, 12:0, 15:0
TRIGGER WHEN DISTANCE=1 DELAY=0 DO PULSE($OUT[36],TRUE,1)
;ENDFOLD
;FOLD PTP POUNCE CONT Vel= 50 % PDAT53 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:50, 7:PDAT53
$BWDSTART=FALSE
PDAT_ACT=PPDAT53
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,50)
PTP XPOUNCE C_PTP
;ENDFOLD
;replace empty pallets
CASE #REPLACE
;FOLD PTP POUNCE CONT Vel= 50 % PDAT54 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:50, 7:PDAT54
$BWDSTART=FALSE
PDAT_ACT=PPDAT54
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,50)
PTP XPOUNCE C_PTP
;ENDFOLD
;FOLD PTP P11 CONT Vel= 50 % PDAT77 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P11, 3:C_PTP, 5:50, 7:PDAT77
$BWDSTART=FALSE
PDAT_ACT=PPDAT77
FDAT_ACT=FP11
BAS(#PTP_PARAMS,50)
PTP XP11 C_PTP
;ENDFOLD
;FOLD PTP P4 CONT Vel= 35 % PDAT6 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P4, 3:C_PTP, 5:35, 7:PDAT6
$BWDSTART=FALSE
PDAT_ACT=PPDAT6
FDAT_ACT=FP4
BAS(#PTP_PARAMS,35)
PTP XP4 C_PTP
;ENDFOLD
;FOLD LIN P5 CONT Vel= 0.35 m/s CPDAT63 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P5, 3:C_DIS, 5:0.35, 7:CPDAT63
$BWDSTART=FALSE
LDAT_ACT=LCPDAT63
FDAT_ACT=FP5
BAS(#CP_PARAMS,0.35)
LIN XP5 C_DIS
;ENDFOLD
;FOLD LIN P6 Vel= 0.35 m/s CPDAT50 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P6, 3:, 5:0.35, 7:CPDAT50
$BWDSTART=FALSE
LDAT_ACT=LCPDAT50
FDAT_ACT=FP6
BAS(#CP_PARAMS,0.35)
LIN XP6
;ENDFOLD
;FOLD VACUUM ON
;FOLD OUT 871 'O_GRIPPER_CLOSE' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:871, 3:O_GRIPPER_CLOSE, 5:TRUE, 6:
$OUT[871]=TRUE
;ENDFOLD
;FOLD OUT 872 'O_GRIPPER_OPEN' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:872, 3:O_GRIPPER_OPEN, 5:TRUE, 6:
$OUT[872]=TRUE
;ENDFOLD
;FOLD OUT 873 'Ausgang' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:873, 3:Ausgang, 5:TRUE, 6:
$OUT[873]=TRUE
;ENDFOLD
;FOLD OUT 874 'Ausgang' State= TRUE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:874, 3:Ausgang, 5:TRUE, 6:
$OUT[874]=TRUE
;ENDFOLD
;FOLD WAIT Time= 0.5 sec;%{PE}%R 5.4.35,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.5
WAIT SEC 0.5
;ENDFOLD
;ENDFOLD
;FOLD LIN P5 CONT Vel= 0.2 m/s CPDAT51 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P5, 3:C_DIS, 5:0.2, 7:CPDAT51
$BWDSTART=FALSE
LDAT_ACT=LCPDAT51
FDAT_ACT=FP5
BAS(#CP_PARAMS,0.2)
LIN XP5 C_DIS
;ENDFOLD
;FOLD PTP P10 CONT Vel= 20 % PDAT64 Tool[5]:PALLET Base[5]:LOOSE_RACK;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P10, 3:C_PTP, 5:20, 7:PDAT64
$BWDSTART=FALSE
PDAT_ACT=PPDAT64
FDAT_ACT=FP10
BAS(#PTP_PARAMS,20)
PTP XP10 C_PTP
;ENDFOLD
;FOLD PTP POUNCE CONT Vel= 20 % PDAT55 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:20, 7:PDAT55
$BWDSTART=FALSE
PDAT_ACT=PPDAT55
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,20)
PTP XPOUNCE C_PTP
;ENDFOLD
;FOLD PTP P1 CONT Vel= 20 % PDAT57 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_PTP, 5:20, 7:PDAT57
$BWDSTART=FALSE
PDAT_ACT=PPDAT57
FDAT_ACT=FP1
BAS(#PTP_PARAMS,20)
PTP XP1 C_PTP
;ENDFOLD
INTERRUPT ON 20
IF I_PU_EMPTY_PALLET_BOTTOM THEN
IF DO_STATION_NUMBER<6 THEN
;FOLD LIN BOTTOM_RH CONT Vel= 0.35 m/s CPDAT58 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:BOTTOM_RH, 3:C_DIS, 5:0.35, 7:CPDAT58
$BWDSTART=FALSE
LDAT_ACT=LCPDAT58
FDAT_ACT=FBOTTOM_RH
BAS(#CP_PARAMS,0.35)
LIN XBOTTOM_RH C_DIS
;ENDFOLD
ELSE
;FOLD PTP BOTTOM_LH CONT Vel= 35 % PDAT68 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:BOTTOM_LH, 3:C_PTP, 5:35, 7:PDAT68
$BWDSTART=FALSE
PDAT_ACT=PPDAT68
FDAT_ACT=FBOTTOM_LH
BAS(#PTP_PARAMS,35)
PTP XBOTTOM_LH C_PTP
;ENDFOLD
ENDIF ;do_station_number
ENDIF ;i_pu_empty_pallet_bottom
;FOLD SYN PULSE 39 'O_WAREBOARD_SENSOR_MASK $OUT[39]' State= TRUE Time= 0.5 sec at END Delay= 0 ms;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VSYNPULSE,%P 2:39, 3:O_WAREBOARD_SENSOR_MASK $OUT[39], 5:TRUE, 7:0.5, 10:1, 12:0, 15:0
TRIGGER WHEN DISTANCE=1 DELAY=0 DO PULSE($OUT[39],TRUE,0.5)
;ENDFOLD
IF (DO_STATION_NUMBER==2) OR (DO_STATION_NUMBER==4) OR (DO_STATION_NUMBER==6) OR (DO_STATION_NUMBER==8) THEN
;FOLD LIN EVEN_PRE_POUNCE CONT Vel= 0.35 m/s CPDAT90 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:EVEN_PRE_POUNCE, 3:C_DIS, 5:0.35, 7:CPDAT90
$BWDSTART=FALSE
LDAT_ACT=LCPDAT90
FDAT_ACT=FEVEN_PRE_POUNCE
BAS(#CP_PARAMS,0.35)
LIN XEVEN_PRE_POUNCE C_DIS
;ENDFOLD
;FOLD LIN EVEN_POUNCE CONT Vel= 0.35 m/s CPDAT92 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:EVEN_POUNCE, 3:C_DIS, 5:0.35, 7:CPDAT92
$BWDSTART=FALSE
LDAT_ACT=LCPDAT92
FDAT_ACT=FEVEN_POUNCE
BAS(#CP_PARAMS,0.35)
LIN XEVEN_POUNCE C_DIS
;ENDFOLD
ELSE
;FOLD LIN ODD_PRE_POUNCE CONT Vel= 0.35 m/s CPDAT89 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:ODD_PRE_POUNCE, 3:C_DIS, 5:0.35, 7:CPDAT89
$BWDSTART=FALSE
LDAT_ACT=LCPDAT89
FDAT_ACT=FODD_PRE_POUNCE
BAS(#CP_PARAMS,0.35)
LIN XODD_PRE_POUNCE C_DIS
;ENDFOLD
;FOLD LIN ODD_POUNCE CONT Vel= 0.35 m/s CPDAT93 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:ODD_POUNCE, 3:C_DIS, 5:0.35, 7:CPDAT93
$BWDSTART=FALSE
LDAT_ACT=LCPDAT93
FDAT_ACT=FODD_POUNCE
BAS(#CP_PARAMS,0.35)
LIN XODD_POUNCE C_DIS
;ENDFOLD
ENDIF ;do_station_number
;FOLD LIN PRE_TRAY CONT Vel= 0.35 m/s CPDAT91 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:PRE_TRAY, 3:C_DIS, 5:0.35, 7:CPDAT91
$BWDSTART=FALSE
LDAT_ACT=LCPDAT91
FDAT_ACT=FPRE_TRAY
BAS(#CP_PARAMS,0.35)
LIN XPRE_TRAY C_DIS
;ENDFOLD
;FOLD LIN TRAY Vel= 0.35 m/s CPDAT4 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:TRAY, 3:, 5:0.35, 7:CPDAT4
$BWDSTART=FALSE
LDAT_ACT=LCPDAT4
FDAT_ACT=FTRAY
BAS(#CP_PARAMS,0.35)
LIN XTRAY
;ENDFOLD
;FOLD VACUUM OFF
;FOLD OUT 871 'O_GRIPPER_CLOSE' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:871, 3:O_GRIPPER_CLOSE, 5:FALSE, 6:
$OUT[871]=FALSE
;ENDFOLD
;FOLD OUT 872 'O_GRIPPER_OPEN' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:872, 3:O_GRIPPER_OPEN, 5:FALSE, 6:
$OUT[872]=FALSE
;ENDFOLD
;FOLD OUT 873 'Ausgang' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:873, 3:Ausgang, 5:FALSE, 6:
$OUT[873]=FALSE
;ENDFOLD
;FOLD OUT 874 'Ausgang' State= FALSE ;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:874, 3:Ausgang, 5:FALSE, 6:
$OUT[874]=FALSE
;ENDFOLD
;FOLD WAIT Time= 0.5 sec;%{PE}%R 5.4.35,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.5
WAIT SEC 0.5
;ENDFOLD
;ENDFOLD
;FOLD LIN P2 CONT Vel= 0.35 m/s CPDAT53 Tool[5]:PALLET Base[4]:LOOSE_DRAWS;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS, 5:0.35, 7:CPDAT53
$BWDSTART=FALSE
LDAT_ACT=LCPDAT53
FDAT_ACT=FP2
BAS(#CP_PARAMS,0.35)
LIN XP2 C_DIS
;ENDFOLD
IF I_PU_EMPTY_PALLET_BOTTOM THEN
IF DO_STATION_NUMBER<6 THEN
;FOLD LIN BOTTOM_RH CONT Vel= 0.35 m/s CPDAT59 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:BOTTOM_RH, 3:C_DIS, 5:0.35, 7:CPDAT59
$BWDSTART=FALSE
LDAT_ACT=LCPDAT59
FDAT_ACT=FBOTTOM_RH
BAS(#CP_PARAMS,0.35)
LIN XBOTTOM_RH C_DIS
;ENDFOLD
ELSE
;FOLD PTP BOTTOM_LH CONT Vel= 35 % PDAT69 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:BOTTOM_LH, 3:C_PTP, 5:35, 7:PDAT69
$BWDSTART=FALSE
PDAT_ACT=PPDAT69
FDAT_ACT=FBOTTOM_LH
BAS(#PTP_PARAMS,35)
PTP XBOTTOM_LH C_PTP
;ENDFOLD
ENDIF ;do_station_number
ENDIF ;i_pu_empty_pallet_bottom
;FOLD LIN P1 CONT Vel= 0.35 m/s CPDAT55 Tool[5]:PALLET Base[3]:DRAW_ORIGIN;%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:C_DIS, 5:0.35, 7:CPDAT55
$BWDSTART=FALSE
LDAT_ACT=LCPDAT55
FDAT_ACT=FP1
BAS(#CP_PARAMS,0.35)
LIN XP1 C_DIS
;ENDFOLD
INTERRUPT OFF 20
;FOLD SYN PULSE 37 'O_PALLET_ON_DRAW $OUT[37]' State= TRUE Time= 0.5 sec at END Delay= 0 ms;%{PE}%R 5.4.35,%MKUKATPBASIS,%COUT,%VSYNPULSE,%P 2:37, 3:O_PALLET_ON_DRAW $OUT[37], 5:TRUE, 7:0.5, 10:1, 12:0, 15:0
TRIGGER WHEN DISTANCE=1 DELAY=0 DO PULSE($OUT[37],TRUE,0.5)
;ENDFOLD
;FOLD PTP POUNCE CONT Vel= 35 % PDAT60 Tool[5]:PALLET Base[0];%{PE}%R 5.4.35,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:POUNCE, 3:C_PTP, 5:35, 7:PDAT60
$BWDSTART=FALSE
PDAT_ACT=PPDAT60
FDAT_ACT=FPOUNCE
BAS(#PTP_PARAMS,35)
PTP XPOUNCE C_PTP
;ENDFOLD
DEFAULT
ENDSWITCH
ENDIF
;fold RESET
O_READY_TO_DEMOULD=FALSE
O_DEMOULDING=FALSE
O_CLEAR_OF_MOULD=FALSE
O_TOOL_OK=FALSE
O_PALLET_DRAW_LOCK=FALSE
DO_DEMOULD_PROGRAM=0
DO_STATION_NUMBER=0
DO_TRIM_PALLET_DRAW_X=0
DO_TRIM_PALLET_DRAW_Y=0
DO_TRIM_PALLET_DRAW_Z=0
DO_TRIM_PALLET_DRAW_A=0
DO_TRIM_PALLET_DRAW_B=0
DO_TRIM_PALLET_DRAW_C=0
DO_TRIM_PALLET_STN_X=0
DO_TRIM_PALLET_STN_Y=0
DO_TRIM_PALLET_STN_Z=0
DO_TRIM_PALLET_STN_A=0
DO_TRIM_PALLET_STN_B=0
DO_TRIM_PALLET_STN_C=0
;endfold
END
DEF ERROR ()
;***********************
;* Tray Draw Error *
;***********************
;FOLD
INTERRUPT OFF 20
BRAKE F
;ENDFOLD
;***********************
;* Reset Draws *
;* (Pull Draw Out/In *
;***********************
END
DEF CALCULATIONS ()
;FOLD DECLARATIONS
DECL INT POSN
DECL INT TRAY
DECL INT LEVEL
;ENDFOLD
;*********************************
;* Waiting for Signal *
;* from the PLC *
;*********************************
;FOLD
REPEAT
;FOLD WAIT Time= 0.1 sec;%{PE}%R 4.1.7,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.1
WAIT SEC 0.1
;ENDFOLD
DO_STATION_NUMBER=DI_STATION_NUMBER
DO_TRIM_PALLET_DRAW_X=DI_TRIM_PALLET_DRAW_X
DO_TRIM_PALLET_DRAW_Y=DI_TRIM_PALLET_DRAW_Y
DO_TRIM_PALLET_DRAW_Z=DI_TRIM_PALLET_DRAW_Z
DO_TRIM_PALLET_DRAW_A=DI_TRIM_PALLET_DRAW_A
DO_TRIM_PALLET_DRAW_B=DI_TRIM_PALLET_DRAW_B
DO_TRIM_PALLET_DRAW_C=DI_TRIM_PALLET_DRAW_C
DO_TRIM_PALLET_STN_X=DI_TRIM_PALLET_STN_X
DO_TRIM_PALLET_STN_Y=DI_TRIM_PALLET_STN_Y
DO_TRIM_PALLET_STN_Z=DI_TRIM_PALLET_STN_Z
DO_TRIM_PALLET_STN_A=DI_TRIM_PALLET_STN_A
DO_TRIM_PALLET_STN_B=DI_TRIM_PALLET_STN_B
DO_TRIM_PALLET_STN_C=DI_TRIM_PALLET_STN_C
;FOLD WAIT Time= 0.1 sec;%{PE}%R 4.1.7,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:0.1
WAIT SEC 0.1
;ENDFOLD
UNTIL (I_PICKUP_PALLET_BOTTOM OR I_PICKUP_PALLET_TOP OR I_PU_EMPTY_PALLET_BOTTOM OR I_PU_EMPTY_PALLET_TOP)
;Set draw trim positions
CORR_BASE[8]=$NULLFRAME
CORR_BASE[3]=$NULLFRAME
IF NEW_PALLET==FALSE THEN
CORR_BASE[8].X=((DO_TRIM_PALLET_DRAW_X)-20)
CORR_BASE[8].Y=((DO_TRIM_PALLET_DRAW_Y)-20)
CORR_BASE[8].Z=((DO_TRIM_PALLET_DRAW_Z)-20)
CORR_BASE[8].A=(((DO_TRIM_PALLET_DRAW_A)-20)/10)
CORR_BASE[8].B=(((DO_TRIM_PALLET_DRAW_B)-20)/10)
CORR_BASE[8].C=(((DO_TRIM_PALLET_DRAW_C)-20)/10)
CORR_BASE[8]=CORR_BASE[8]:TRAY_BOTTOM_OFFSET[DO_STATION_NUMBER]
ENDIF
;Set pickup offset
CORR_BASE[6]=$NULLFRAME
CORR_BASE[7]=$NULLFRAME
BASE_DATA[4]=$NULLFRAME
IF (I_PICKUP_PALLET_BOTTOM OR I_PU_EMPTY_PALLET_BOTTOM) THEN
LEVEL=2
ELSE
LEVEL=1
ENDIF
SWITCH DO_STATION_NUMBER
CASE 1
CASE 2
CORR_BASE[7]=TRAY_PICK[LEVEL,1,1]
CASE 3
CORR_BASE[7]=TRAY_PICK[LEVEL,2,1]
CASE 4
CORR_BASE[7]=TRAY_PICK[LEVEL,1,2]
CASE 5
CORR_BASE[7]=TRAY_PICK[LEVEL,2,2]
CASE 6
CORR_BASE[7]=TRAY_PICK[LEVEL,3,1]
CASE 7
CORR_BASE[7]=TRAY_PICK[LEVEL,4,1]
CASE 8
CORR_BASE[7]=TRAY_PICK[LEVEL,3,2]
CASE 9
CORR_BASE[7]=TRAY_PICK[LEVEL,4,2]
LOOP
HALT
;******************************
;* Invalid Station Number *
;* Detected *
;*(check & then reset system) *
;******************************
ENDLOOP
ENDSWITCH
;set pickup base
CORR_BASE[6]=$NULLFRAME
CORR_BASE[6]=BASE_DATA[3]:CORR_BASE[7]
;set pickup base with trims
BASE_DATA[4]=$NULLFRAME
BASE_DATA[4]=CORR_BASE[6]:CORR_BASE[8]
;Set putdown station trim positions
CORR_BASE[5]=$NULLFRAME
IF NEW_PALLET==TRUE THEN
CORR_BASE[5].X=((DO_TRIM_PALLET_STN_X)-20)
CORR_BASE[5].Y=((DO_TRIM_PALLET_STN_Y)-20)
CORR_BASE[5].Z=((DO_TRIM_PALLET_STN_Z)-20)
CORR_BASE[5].A=(((DO_TRIM_PALLET_STN_A)-20)/10)
CORR_BASE[5].B=(((DO_TRIM_PALLET_STN_B)-20)/10)
CORR_BASE[5].C=(((DO_TRIM_PALLET_STN_C)-20)/10)
ENDIF
;Set putdown base
CORR_BASE[4]=$NULLFRAME
BASE_DATA[5]=$NULLFRAME
CORR_BASE[4]=BASE_DATA[15]:LOOSE_RACK[DO_STATION_NUMBER]
BASE_DATA[5]=CORR_BASE[4]:CORR_BASE[5]
;set E1 values
;XP1.E1=E1_DRAW_OFFSET[DO_STATION_NUMBER]
XP2.E1=E1_DRAW_OFFSET[DO_STATION_NUMBER]
XTRAY.E1=E1_DRAW_OFFSET[DO_STATION_NUMBER]
XP4.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP5.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP6.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP10.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP11.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP12.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP13.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
XP14.E1=E1_RACK_OFFSET[DO_STATION_NUMBER]
;ENDFOLD
;*********************************
;* Check Pallet *
;* Draw Status *
;*********************************
END
Display More
So in your opinion is always better to create fixed points and change the entire path with a calculated base?
Another question, do you normaly use krc teached point, or you create position variables and set your parameter manually?
Inviato dal mio catorcio con Tapatalk 4.03/√3
IMO when it's only a palletizing job - it's much easier "just" to declare those positions - guess you'll always start at the same point on pallet? and calculate from there?
I'd still have a "main" program - and the "pick" programs - and naturally: the "place" programs
depending on your different type of products, it's just controlled by either a variable or by external plc.
to each type you have some coordinates (length x width x height)
every "place" program are much alike - and easy to change in case of product-change...
decl point
pos point { }
switch number_of_palletized_products
case 1.....
pos point.x = + variable
you know my point...
but - it's just my opinion - and, it'll take 5 minutes to make that...
with the "operator eyes" - when switching bases over and over, you'll easy get stucked in old base "in new program" - and have to create yet another point in "new base"...
Basically - I just think, since it's only palletizing - I like the same coordinate system all over...
i'll send you a few programs if you like - just for playing around with...
Lasse i would be thankful if you shared some of your programs with me.
mail me - i'll send you some different stuff... (palletizing)
we're here to help each other
The rumors you've heard are true: robots are repetitive, but not precise.
In any Brand you can get more precise robots by paying a little bit more (high accuracy, absolute accuracy...) those “ultra-precise” robots can get typically precisions of 0.3mm (this is the best you can get and the bigger the robot is the worst precision you’ll get).
Due to the specific construction shape of the robot which all the axis are rotary, the robot can't be more precise than that.
There are external companies that calibrate robots. They are expensive and keep in mind that you won’t get better results than 0.3mm.
When you teach the points, you are "solving" the precision issue automatically as the robot don't mind if the real position versus the software position are correct/equal.
Anyway, I must tell you that with KUKA I've got very good results with normal robots. i.e. it's quite normal to program a robot in our factory and send it to our customer and need to retouch a lot of points to adjust the part program. With KUKA this has been minimized a lot.
Don't think on a constant formula to solve the error issue, the amount of error is not constant in the space as it depends completely on the robot gearboxes and arm torsions, which change depending on their position.
If you need a lot of precision teach is the best, in the other hand, you can always use a correction array in which you can allow the user to apply a correction in a specific array position and before making any movement add the user correction to the calculated point:
If userarray is 0 then no addition will be performed and so…
Anyway, test it and take measurements, probably you won't need this amount of precision.
Good luck!