hi dear
I have kuka 360 _Krc2 v5.8.8 window xp
I want drilling Like the photo posted.
How can I do write program ?
I need help for write program .
please help me.
By kuka drilling
-
km427 -
October 23, 2016 at 9:31 PM -
Thread is marked as Resolved.
-
-
I do not know if I understood well.You can write one point and later to do it in a loop of the shift base as long as you want
-
Read system integrator manual, make sure to teach correct tool and base, then try something like this (use at own risk)
Code
Display MoreDEF STRAINER() DECL INT nX, nY, nXmax, nYmax DECL FRAME Limits DECL REAL Offset DECL E6POS DrillPos ;FOLD INI ;FOLD BASISTECH INI GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( ) INTERRUPT ON 3 BAS (#INITMOV,0 ) ;ENDFOLD (BASISTECH INI) ;FOLD USER INI ;Make your modifications here ;ENDFOLD (USER INI) ;ENDFOLD (INI) ;Define work parameters Offset = 20 ;mm Limits = {X 1000, Y 800} ; calculate the rest nXmax=Limits.X/Offset nYmax=Limits.Y/Offset ;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT $BWDSTART = FALSE PDAT_ACT=PDEFAULT FDAT_ACT=FHOME BAS (#PTP_PARAMS,100 ) $H_POS=XHOME PTP XHOME ;ENDFOLD ;FOLD LIN REF Vel=1 m/s CPDAT Tool[1]:Drill Base[1]:Strainer_Panel;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:REF, 3:, 5:1, 7:CPDAT $BWDSTART=FALSE LDAT_ACT=LCPDAT FDAT_ACT=FREF BAS(#CP_PARAMS,1) LIN XREF ;ENDFOLD $VEL.CP=0.05; m/s ; reduce speed for drilling for nX = 1 to nXmax for nY = 1 to nYmax DrillPos=xREF DrillPox.X=xREF.X + (nX-1)*Offset DrillPos.Y=xREF.Y + (nY-1)*Offset if IsEven(nX) then DrillPos.Y=xREF.Y + (nY-0.5)*Offset if ((DrillPos.Y-xRef.Y)>(Limits.Y+1)) then EXIT endif endif LIN DrillPos ;drill LIN_REL {X 30} #TOOL LIN_REL {X -30} #TOOL endfor ; nY endfor ;nX $VEL.CP = 1 ; m/s LIN_REL {X -200} #TOOL; retract ;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT $BWDSTART = FALSE PDAT_ACT=PDEFAULT FDAT_ACT=FHOME BAS (#PTP_PARAMS,100 ) $H_POS=XHOME PTP XHOME ;ENDFOLD END DEFFCT BOOL IsEven(N:in) DECL INT N RETURN (N b_and 1)==0 ENDFCT
-
I use something like this
Code
Display More&ACCESS RVP &REL 38 &PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe &PARAM EDITMASK = * DEF protwo( ) INT I INT S ;FOLD INI;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P ;FOLD BAS INI;%{E}%V3.2.0,%MKUKATPBASIS,%CINIT,%VINIT,%P GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( ) INTERRUPT ON 3 BAS (#INITMOV,0 ) ;ENDFOLD (BAS INI) ;FOLD A20 INI;%{E}%V3.2.0,%MKUKATPA20,%CINIT,%VINIT,%P IF ARC20==TRUE THEN A20 (ARC_INI) INTERRUPT DECL 6 WHEN $CYCFLAG[3]==FALSE DO A20(TECH_STOP2) ENDIF ;ENDFOLD (A20 INI) ;FOLD A10 INI;%{E}%V3.2.0,%MKUKATPARC,%CINIT,%VINIT,%P IF A10_OPTION==#ACTIVE THEN INTERRUPT DECL 4 WHEN $CYCFLAG[2]==FALSE DO A10 (#APPL_ERROR) INTERRUPT DECL 7 WHEN A_ARC_SWI==#ACTIVE DO A10 (#ARC_SEAM) INTERRUPT DECL 5 WHEN A_FLY_ARC==TRUE DO A10 (#HPU_ARC) INTERRUPT ON 5 A10_INI ( ) ENDIF ;ENDFOLD (A10 INI) ;FOLD GRIPPER INI;%{E}%V3.2.0,%MKUKATPGRIPPER,%CINIT,%VINIT,%P USER_GRP(0,DUMMY,DUMMY,GDEFAULT) ;ENDFOLD (GRIPPER INI) ;FOLD SPOT INI;%{E}%V3.2.0,%MKUKATPSPOT,%CINIT,%VINIT,%P USERSPOT(#INIT) ;ENDFOLD (SPOT INI) ;FOLD TOUCHSENSE INI;%{E}%V3.2.0,%MKUKATPTS,%CINIT,%VINIT,%P IF H70_OPTION THEN INTERRUPT DECL 15 WHEN $MEAS_PULSE[TOUCH_I[TOUCH_ACTIVE].IN_NR] DO H70 (6,CD0 ) INTERRUPT DECL 16 WHEN $ZERO_MOVE DO H70 (7,CD0 ) INTERRUPT DECL 17 WHEN $TECHPAR_C[FG_TOUCH,8]>0.5 DO H70 (8,CD0) H70 (1,CD0 ) ENDIF ;ENDFOLD (TOUCHSENSE INI) ;FOLD USER INI;%{E}%V3.2.0,%MKUKATPUSER,%CINIT,%VINIT,%P ;Make your modifications here ;ENDFOLD (USER INI) ;ENDFOLD (INI) FOR S=1 to 18 $OUT[S]=TRUE ;FOLD SET GRP 2 State= ZU GDAT3;%{PE}%R 4.1.5,%MKUKATPGRP,%CGRP,%VGRP,%P 2:2, 4:2, 5:#NO, 6:GDAT3, 8:0, 10:0 H50(GRP,2,2,GGDAT3) ;ENDFOLD ;FOLD SET GRP 1 State= ZU GDAT1;%{PE}%R 4.1.5,%MKUKATPGRP,%CGRP,%VGRP,%P 2:1, 4:2, 5:#NO, 6:GDAT1, 8:0, 10:0 H50(GRP,1,2,GGDAT1) ;ENDFOLD FOR I=1 to 21 $OUT[I]=TRUE ;FOLD PTP P4 Vel= 100 % PDAT3 Tool[1]:Wrzeciono 1 Base[6];%{PE}%R 4.1.12,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P4, 3:, 5:100, 7:PDAT3 $BWDSTART = FALSE PDAT_ACT=PPDAT3 BAS(#PTP_DAT) FDAT_ACT=FP4 BAS(#FRAMES) BAS(#VEL_PTP,100) PTP XP4 ;ENDFOLD ;FOLD LIN P1 Vel= 2 m/s CPDAT1 Tool[1]:Wrzeciono 1 Base[6];%{PE}%R 4.1.12,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:, 5:2, 7:CPDAT1 $BWDSTART = FALSE LDAT_ACT=LCPDAT1 BAS(#CP_DAT) FDAT_ACT=FP1 BAS(#FRAMES) BAS(#VEL_CP,2) LIN XP1 ;ENDFOLD ;FOLD LIN P2 Vel= 2 m/s CPDAT2 Tool[1]:Wrzeciono 1 Base[6];%{PE}%R 4.1.12,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:, 5:2, 7:CPDAT2 $BWDSTART = FALSE LDAT_ACT=LCPDAT2 BAS(#CP_DAT) FDAT_ACT=FP2 BAS(#FRAMES) BAS(#VEL_CP,2) LIN XP2 ;ENDFOLD ;FOLD LIN P1 Vel= 2 m/s CPDAT3 Tool[1]:Wrzeciono 1 Base[6];%{PE}%R 4.1.12,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:, 5:2, 7:CPDAT3 $BWDSTART = FALSE LDAT_ACT=LCPDAT3 BAS(#CP_DAT) FDAT_ACT=FP1 BAS(#FRAMES) BAS(#VEL_CP,2) LIN XP1 ;ENDFOLD BASE_DATA[6].Y = BASE_DATA[6].Y - 10 ;FOLD PTP P4 Vel= 100 % PDAT4 Tool[1]:Wrzeciono 1 Base[6];%{PE}%R 4.1.12,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P4, 3:, 5:100, 7:PDAT4 $BWDSTART = FALSE PDAT_ACT=PPDAT4 BAS(#PTP_DAT) FDAT_ACT=FP4 BAS(#FRAMES) BAS(#VEL_PTP,100) PTP XP4 ;ENDFOLD ENDFOR BASE_DATA[6].X = BASE_DATA[6].X + 10 BASE_DATA[6].Y = BASE_DATA[6].Y + 210 ENDFOR ;FOLD SET GRP 1 State= AUF GDAT2;%{PE}%R 4.1.5,%MKUKATPGRP,%CGRP,%VGRP,%P 2:1, 4:1, 5:#NO, 6:GDAT2, 8:0, 10:0 H50(GRP,1,1,GGDAT2) ;ENDFOLD END
-
but... this always destroys base 6.
how do you restore it if you need to run program more than once or if current program had to be aborted? -
-
Assuming you set Base 1 at the lower left corner of the plate, with X+ pointing right and Y+ pointing "forward", and Z+ pointing "up" orthogonal to the surface of the plate:
Code
Display MoreDECL REAL XShift, YShift, RowShift DECL INT XIndex, YIndex DECL FRAME FrameShift XShift = 10 ; 10mm column spacing YShift = 10 ; 10mm row spacing RowShift = 0 ; init shift value for every other row FOR XIndex = 0 TO 99 ; 100 columns FOR Y = 0 TO 99 ; 100 rows IF ((YIndex/2) <> (YIndex/2.0)) THEN ; odd or even row RowShift = 5 ; 5mm shift every other row ELSE RowShift = 0 ; no shift on Even-numbered rows (including Row 0) ENDIF FrameShift = $NULLFRAME ; init to all 0s FrameShift.X = (XIndex * Xshift) + RowShift ; row number times shift-per-row equals total shift. Add RowShift to shift every other row back and forth $BASE = BASE_DATA[1] : FrameShift PTP AboveDrillPosition ; move to position above drill point. This point needs to be taught at the first drill point at the lower left corner of the plate, while $BASE = BASE_DATA[1] (no shifts) ; insert drill subroutine here LIN AboveDrillPosition ; pull straight up to clear position ENDFOR ENDFOR
-
tsk...tsk... no ENDIF after RowShift = 0?
-
tsk...tsk... no ENDIF after RowShift = 0?...okay, fixed.
Of course, my indenting was bad too -- you missed that.