&ACCESS RVP
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF holz_vz( )
;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)
;FOLD PTP HOME  Vel= 50 % DEFAULT;%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:50, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
BAS(#PTP_DAT)
FDAT_ACT=FHOME
BAS(#FRAMES)
BAS(#VEL_PTP,50)
$H_POS=XHOME
PTP XHOME 
;ENDFOLD
;FOLD PTP P1  Vel= 100 % PDAT4 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:, 5:100, 7:PDAT4
$BWDSTART = FALSE
PDAT_ACT=PPDAT4
BAS(#PTP_DAT)
FDAT_ACT=FP1
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP XP1 
;ENDFOLD
;FOLD LIN P2  Vel= 1 m/s CPDAT3 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:, 5:1, 7:CPDAT3
$BWDSTART = FALSE
LDAT_ACT=LCPDAT3
BAS(#CP_DAT)
FDAT_ACT=FP2
BAS(#FRAMES)
BAS(#VEL_CP,1)
LIN XP2 
;ENDFOLD
;FOLD PULSE 15 'Greifer auf'  State= TRUE   Time= 0.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:15, 3:'Greifer auf', 5:TRUE, 6:, 8:0.5
PULSE($OUT[15], TRUE,0.5)
;ENDFOLD
;FOLD PTP p3  Vel= 100 % PDAT18 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p3, 3:, 5:100, 7:PDAT18
$BWDSTART = FALSE
PDAT_ACT=PPDAT18
BAS(#PTP_DAT)
FDAT_ACT=Fp3
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp3 
;ENDFOLD
;FOLD LIN p4  Vel= 0.1 m/s CPDAT6 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p4, 3:, 5:0.1, 7:CPDAT6
$BWDSTART = FALSE
LDAT_ACT=LCPDAT6
BAS(#CP_DAT)
FDAT_ACT=Fp4
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp4 
;ENDFOLD
;FOLD PULSE 16 'Greifer zu'  State= TRUE   Time= 0.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:16, 3:'Greifer zu', 5:TRUE, 6:, 8:0.5
PULSE($OUT[16], TRUE,0.5)
;ENDFOLD
;FOLD WAIT Time= 1.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:1.5
WAIT SEC 1.5
;ENDFOLD
;FOLD LIN p3  Vel= 0.1 m/s CPDAT7 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p3, 3:, 5:0.1, 7:CPDAT7
$BWDSTART = FALSE
LDAT_ACT=LCPDAT7
BAS(#CP_DAT)
FDAT_ACT=Fp3
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp3 
;ENDFOLD
;FOLD PTP p5  Vel= 100 % PDAT12 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p5, 3:, 5:100, 7:PDAT12
$BWDSTART = FALSE
PDAT_ACT=PPDAT12
BAS(#PTP_DAT)
FDAT_ACT=Fp5
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp5 
;ENDFOLD
;FOLD LIN p6  Vel= 0.2 m/s CPDAT10 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p6, 3:, 5:0.2, 7:CPDAT10
$BWDSTART = FALSE
LDAT_ACT=LCPDAT10
BAS(#CP_DAT)
FDAT_ACT=Fp6
BAS(#FRAMES)
BAS(#VEL_CP,0.2)
LIN Xp6 
;ENDFOLD
;FOLD LIN p7  Vel= 0.1 m/s CPDAT12 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p7, 3:, 5:0.1, 7:CPDAT12
$BWDSTART = FALSE
LDAT_ACT=LCPDAT12
BAS(#CP_DAT)
FDAT_ACT=Fp7
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp7 
;ENDFOLD
;FOLD PULSE 15 'Greifer auf'  State= TRUE   Time= 0.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:15, 3:'Greifer auf', 5:TRUE, 6:, 8:0.5
PULSE($OUT[15], TRUE,0.5)
;ENDFOLD
;FOLD WAIT Time= 1 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:1
WAIT SEC 1
;ENDFOLD
;FOLD LIN p6  Vel= 0.1 m/s CPDAT13 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p6, 3:, 5:0.1, 7:CPDAT13
$BWDSTART = FALSE
LDAT_ACT=LCPDAT13
BAS(#CP_DAT)
FDAT_ACT=Fp6
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp6 
;ENDFOLD
;FOLD LIN p5 CONT Vel= 0.2 m/s CPDAT16 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p5, 3:C_DIS, 5:0.2, 7:CPDAT16
$BWDSTART = FALSE
LDAT_ACT=LCPDAT16
BAS(#CP_DAT)
FDAT_ACT=Fp5
BAS(#FRAMES)
BAS(#VEL_CP,0.2)
LIN Xp5 C_DIS
;ENDFOLD
;FOLD PTP p2  Vel= 100 % PDAT6 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p2, 3:, 5:100, 7:PDAT6
$BWDSTART = FALSE
PDAT_ACT=PPDAT6
BAS(#PTP_DAT)
FDAT_ACT=Fp2
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp2 
;ENDFOLD
;FOLD LIN p1  Vel= 0.9 m/s CPDAT4 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p1, 3:, 5:0.9, 7:CPDAT4
$BWDSTART = FALSE
LDAT_ACT=LCPDAT4
BAS(#CP_DAT)
FDAT_ACT=Fp1
BAS(#FRAMES)
BAS(#VEL_CP,0.9)
LIN Xp1 
;ENDFOLD
;FOLD PTP HOME  Vel= 100 % DEFAULT;%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
BAS(#PTP_DAT)
FDAT_ACT=FHOME
BAS(#FRAMES)
BAS(#VEL_PTP,100)
$H_POS=XHOME
PTP XHOME 
;ENDFOLD
;FOLD WAIT FOR IN 16 ''  State= TRUE ;%{PE}%R 4.1.16,%MKUKATPBASIS,%CWAIT_FOR,%VWAIT_FOR,%P 1:0, 2:16, 3:'', 5:TRUE, 6:
WAIT FOR $IN[16]==TRUE
;ENDFOLD
;FOLD PTP p1  Vel= 100 % PDAT13 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p1, 3:, 5:100, 7:PDAT13
$BWDSTART = FALSE
PDAT_ACT=PPDAT13
BAS(#PTP_DAT)
FDAT_ACT=Fp1
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp1 
;ENDFOLD
;FOLD LIN p2  Vel= 1 m/s CPDAT17 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p2, 3:, 5:1, 7:CPDAT17
$BWDSTART = FALSE
LDAT_ACT=LCPDAT17
BAS(#CP_DAT)
FDAT_ACT=Fp2
BAS(#FRAMES)
BAS(#VEL_CP,1)
LIN Xp2 
;ENDFOLD
;FOLD PTP p5  Vel= 100 % PDAT14 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p5, 3:, 5:100, 7:PDAT14
$BWDSTART = FALSE
PDAT_ACT=PPDAT14
BAS(#PTP_DAT)
FDAT_ACT=Fp5
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp5 
;ENDFOLD
;FOLD LIN p6  Vel= 0.2 m/s CPDAT18 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p6, 3:, 5:0.2, 7:CPDAT18
$BWDSTART = FALSE
LDAT_ACT=LCPDAT18
BAS(#CP_DAT)
FDAT_ACT=Fp6
BAS(#FRAMES)
BAS(#VEL_CP,0.2)
LIN Xp6 
;ENDFOLD
;FOLD LIN p7  Vel= 0.1 m/s CPDAT19 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p7, 3:, 5:0.1, 7:CPDAT19
$BWDSTART = FALSE
LDAT_ACT=LCPDAT19
BAS(#CP_DAT)
FDAT_ACT=Fp7
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp7 
;ENDFOLD
;FOLD PULSE 16 'Greifer zu'  State= TRUE   Time= 0.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:16, 3:'Greifer zu', 5:TRUE, 6:, 8:0.5
PULSE($OUT[16], TRUE,0.5)
;ENDFOLD
;FOLD WAIT Time= 1.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:1.5
WAIT SEC 1.5
;ENDFOLD
;FOLD LIN p6  Vel= 0.1 m/s CPDAT20 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p6, 3:, 5:0.1, 7:CPDAT20
$BWDSTART = FALSE
LDAT_ACT=LCPDAT20
BAS(#CP_DAT)
FDAT_ACT=Fp6
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp6 
;ENDFOLD
;FOLD LIN p5  Vel= 0.2 m/s CPDAT21 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p5, 3:, 5:0.2, 7:CPDAT21
$BWDSTART = FALSE
LDAT_ACT=LCPDAT21
BAS(#CP_DAT)
FDAT_ACT=Fp5
BAS(#FRAMES)
BAS(#VEL_CP,0.2)
LIN Xp5 
;ENDFOLD
;FOLD PTP p3  Vel= 100 % PDAT15 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p3, 3:, 5:100, 7:PDAT15
$BWDSTART = FALSE
PDAT_ACT=PPDAT15
BAS(#PTP_DAT)
FDAT_ACT=Fp3
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp3 
;ENDFOLD
;FOLD LIN p4  Vel= 0.1 m/s CPDAT22 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p4, 3:, 5:0.1, 7:CPDAT22
$BWDSTART = FALSE
LDAT_ACT=LCPDAT22
BAS(#CP_DAT)
FDAT_ACT=Fp4
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp4 
;ENDFOLD
;FOLD PULSE 15 'Greifer auf'  State= TRUE   Time= 0.5 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%COUT,%VPULSE,%P 2:15, 3:'Greifer auf', 5:TRUE, 6:, 8:0.5
PULSE($OUT[15], TRUE,0.5)
;ENDFOLD
;FOLD WAIT Time= 1 sec;%{PE}%R 4.1.16,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 2:1
WAIT SEC 1
;ENDFOLD
;FOLD LIN p3  Vel= 0.1 m/s CPDAT23 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p3, 3:, 5:0.1, 7:CPDAT23
$BWDSTART = FALSE
LDAT_ACT=LCPDAT23
BAS(#CP_DAT)
FDAT_ACT=Fp3
BAS(#FRAMES)
BAS(#VEL_CP,0.1)
LIN Xp3 
;ENDFOLD
;FOLD PTP p2  Vel= 100 % PDAT16 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:p2, 3:, 5:100, 7:PDAT16
$BWDSTART = FALSE
PDAT_ACT=PPDAT16
BAS(#PTP_DAT)
FDAT_ACT=Fp2
BAS(#FRAMES)
BAS(#VEL_PTP,100)
PTP Xp2 
;ENDFOLD
;FOLD LIN p1  Vel= 1 m/s CPDAT24 Tool[1] Base[0];%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:p1, 3:, 5:1, 7:CPDAT24
$BWDSTART = FALSE
LDAT_ACT=LCPDAT24
BAS(#CP_DAT)
FDAT_ACT=Fp1
BAS(#FRAMES)
BAS(#VEL_CP,1)
LIN Xp1 
;ENDFOLD
;FOLD PTP home  Vel= 100 % PDAT17;%{PE}%R 4.1.16,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:home, 3:, 5:100, 7:PDAT17
$BWDSTART = FALSE
PDAT_ACT=PPDAT17
BAS(#PTP_DAT)
FDAT_ACT=Fhome
BAS(#FRAMES)
BAS(#VEL_PTP,100)
$H_POS=XHOME
PTP Xhome 
;ENDFOLD
END