收藏 分享(赏)

机械手自动化程序20170915.doc

上传人:精品资料 文档编号:10364719 上传时间:2019-11-04 格式:DOC 页数:21 大小:30.54KB
下载 相关 举报
机械手自动化程序20170915.doc_第1页
第1页 / 共21页
机械手自动化程序20170915.doc_第2页
第2页 / 共21页
机械手自动化程序20170915.doc_第3页
第3页 / 共21页
机械手自动化程序20170915.doc_第4页
第4页 / 共21页
机械手自动化程序20170915.doc_第5页
第5页 / 共21页
点击查看更多>>
资源描述

1、库卡机械手程序实例 七轴运动与机台作业完成11、 主程序 mainFOLD INI;%PE;FOLD BASISTECH INIGLOBAL 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)GLOBAL INTERRUPT DECL 4 WHEN $IN10=FALSE DO Itrpt1 ()GLOBAL

2、 INTERRUPT DECL 5 WHEN $IN11=FALSE DO Itrpt1 ()INTERRUPT DECL 6 WHEN $IN9=TRUE DO Itrpt1 ();地轨异常进入中断INTERRUPT ON 6;开地轨监视中断 6IF NOT Gripper_ChkStatus(1,“C“) THENGripper_SetStatus(1,“O“)Part0InLeft = FALSEPart2InLeft = FALSEENDIFIF NOT Gripper_ChkStatus(2,“C“) THENGripper_SetStatus(2,“O“)Part1InRight

3、= FALSEENDIFFOR l = 1 TO 14$OUTl = FALSEENDFOR;此循环语句在初始化时把所有端口清零复位。IF $IN5 THENMachine1_OnlyDrop = TRUEMachine2_OnlyDrop = TRUE;机台 1 有首件信号时,机台 1 与机台 2 第一次响应只放标志位置 1ELSEMachine1_OnlyDrop = FALSEMachine2_OnlyDrop = FALSEENDIF$FLAG8=FALSE;FLAG8是干什么用的?;ENDFOLD (INI);初始化完成$OV_PRO=70;限定系统运行速度;FOLD PTP HOM

4、E Vel=100 % DEFAULT;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT$BWDSTART=FALSE库卡机械手程序实例 七轴运动与机台作业完成2PDAT_ACT=PDEFAULTFDAT_ACT=FHOMEBAS(#PTP_PARAMS,100)$H_POS=XHOMEPTP XHOME ;ENDFOLDIF $IN_HOME THEN$OUT5=FALSE$OUT8=FALSE$OUT11=FALSEENDIFLOOPWAIT SEC 0.05IF $IN1 AND

5、NOT Part0InLeft AND Gripper_ChkStatus(3,“O“) THEN ToPick_Search()ENDIFIF Part0InLeft AND ($IN3 OR Machine1_OnlyDrop) AND Gripper_ChkStatus(1,“C“) AND Gripper_ChkStatus(2,“O“) THENMachine1()ENDIFIF Part1InRight AND ($IN6 OR Machine2_OnlyDrop) AND Gripper_ChkStatus(2,“C“) AND Gripper_ChkStatus(1,“O“)

6、THENMachine2()ENDIFIF Part2InLeft AND ($IN8 OR Machine3_OnlyDrop) AND Gripper_ChkStatus(1,“C“) THENMachine3()ENDIFENDLOOPENDDEF Itrpt1 ()HALTBRAKEEND2、 取料程序(采用中断的方法自动探料,完成取料作业)FOLD INI;%PE;FOLD BASISTECH INIGLOBAL INTERRUPT DECL 3 WHEN $STOPMESS=TRUE DO IR_STOPM ( );单独用了一个系统中断?INTERRUPT ON 3 BAS (#I

7、NITMOV,0 );ENDFOLD (BASISTECH INI)库卡机械手程序实例 七轴运动与机台作业完成3;FOLD USER INI;Make your modifications here;ENDFOLD (USER INI);ENDFOLD (INI)INTERRUPT DECL 1 WHEN $IN10=TRUE DO FOUND()SevenAxis_Run(1)GOTO MARK;FOLD PTP P1 CONT Vel=100 % PDAT2 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1

8、, 3:C_DIS, 5:100, 7:PDAT2$BWDSTART=FALSEPDAT_ACT=PPDAT2FDAT_ACT=FP1BAS(#PTP_PARAMS,100)PTP XP1 C_DIS;ENDFOLD;FOLD PTP P3 CONT Vel=100 % PDAT8 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P3, 3:C_DIS, 5:100, 7:PDAT8$BWDSTART=FALSEPDAT_ACT=PPDAT8FDAT_ACT=FP3BAS(#PTP_PARAMS,100)PTP X

9、P3 C_DIS;ENDFOLD;FOLD LIN P2 CONT Vel=2 m/s CPDAT2 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS C_DIS, 5:2, 7:CPDAT2$BWDSTART=FALSELDAT_ACT=LCPDAT2FDAT_ACT=FP2BAS(#CP_PARAMS,2)LIN XP2 C_DIS C_DIS;ENDFOLD;FOLD LIN P1 Vel=0.05 m/s CPDAT1 Tool1 Base0;%PE%R 8.3.40,%MKUKATP

10、BASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:, 5:0.05, 7:CPDAT1$BWDSTART=FALSELDAT_ACT=LCPDAT1FDAT_ACT=FP1BAS(#CP_PARAMS,0.05)LIN XP1 ;ENDFOLD;FOLD PTP HOME Vel=100 % DEFAULT;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT$BWDSTART=FALSEPDAT_ACT=PDEFAULTFDAT_ACT=FHOMEBAS(#PTP_

11、PARAMS,100)$H_POS=XHOMEPTP XHOME ;ENDFOLDmark:库卡机械手程序实例 七轴运动与机台作业完成4Search()INTERRUPT OFF 1WAIT SEC 0XP4=$POS_ACT;FOLD LIN P4 CONT Vel=2 m/s CPDAT10 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P4, 3:C_DIS C_DIS, 5:2, 7:CPDAT10$BWDSTART=FALSELDAT_ACT=LCPDAT10FDAT_ACT=FP4BAS(#CP_PA

12、RAMS,2)LIN XP4 C_DIS C_DIS;ENDFOLDGripper_SetStatus(1,“O“)LIN_RELZ 15LIN_RELZ -17Gripper_SetStatus(1,“C“)Part0InLeft = TRUEWAIT SEC 0XP0=$POS_ACTXP0.Z=XP0.Z+25 ;看一下寻料程序到底是怎么运转的!;FOLD LIN P0 CONT Vel=0.025 m/s CPDAT8 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P0, 3:C_DIS C_DIS, 5

13、:0.025, 7:CPDAT8$BWDSTART=FALSELDAT_ACT=LCPDAT8FDAT_ACT=FP0BAS(#CP_PARAMS,0.025)LIN XP0 C_DIS C_DIS;ENDFOLDWAIT SEC 0IF NOT $IN10 THENGOTO markENDIF;FOLD LIN P1 CONT Vel=2 m/s CPDAT7 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:C_DIS C_DIS, 5:2, 7:CPDAT7$BWDSTART=FALSELDAT_A

14、CT=LCPDAT7FDAT_ACT=FP1BAS(#CP_PARAMS,2)LIN XP1 C_DIS C_DIS;ENDFOLDENDDEF Search( );FOLD INI;%PE;FOLD BASISTECH INIGLOBAL INTERRUPT DECL 3 WHEN $STOPMESS=TRUE DO IR_STOPM ( )INTERRUPT ON 3 BAS (#INITMOV,0 );ENDFOLD (BASISTECH INI)库卡机械手程序实例 七轴运动与机台作业完成5;FOLD USER INI;Make your modifications here;ENDFO

15、LD (USER INI);ENDFOLD (INI)INTERRUPT ON 1;FOLD PTP P1 CONT Vel=100 % PDAT6 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_DIS, 5:100, 7:PDAT6$BWDSTART=FALSEPDAT_ACT=PPDAT6FDAT_ACT=FP1BAS(#PTP_PARAMS,100)PTP XP1 C_DIS;ENDFOLD$OUT16=TRUE;FOLD LIN P3 CONT Vel=2 m/s CPDAT11 Tool

16、1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:C_DIS C_DIS, 5:2, 7:CPDAT11$BWDSTART=FALSELDAT_ACT=LCPDAT11FDAT_ACT=FP3BAS(#CP_PARAMS,2)LIN XP3 C_DIS C_DIS;ENDFOLD;FOLD LIN P2 CONT Vel=0.05 m/s CPDAT5 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS C_DIS

17、, 5:0.05, 7:CPDAT5$BWDSTART=FALSELDAT_ACT=LCPDAT5FDAT_ACT=FP2BAS(#CP_PARAMS,0.05)LIN XP2 C_DIS C_DIS;ENDFOLD;FOLD LIN P1 Vel=0.02 m/s CPDAT6 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P1, 3:, 5:0.02, 7:CPDAT6$BWDSTART=FALSELDAT_ACT=LCPDAT6FDAT_ACT=FP1BAS(#CP_PARAMS,0.02)LIN XP1

18、;ENDFOLDWAIT SEC 0ENDDEF FOUND()BRAKELIN $POS_INT ;rise a littleRESUMEEND3、 机台 1 取放料程序(完成机台 1 取放料动作与信号交互)FOLD INI;%PE;FOLD BASISTECH INIGLOBAL 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;ENDFO

19、LD (USER INI);ENDFOLD (INI)SevenAxis_Run(1);FOLD OUT 5 State=TRUE ;%PE%R 8.3.40,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:5, 3:, 5:TRUE, 6:$OUT5=TRUE;ENDFOLDIF NOT Machine1_OnlyDrop THEN;FOLD PTP P1 CONT Vel=100 % PDAT4 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_DIS, 5:100, 7:PDAT

20、4$BWDSTART=FALSEPDAT_ACT=PPDAT4FDAT_ACT=FP1BAS(#PTP_PARAMS,100)PTP XP1 C_DIS;ENDFOLDmark:;FOLD LIN P2 CONT Vel=2 m/s CPDAT4 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS C_DIS, 5:2, 7:CPDAT4$BWDSTART=FALSELDAT_ACT=LCPDAT4FDAT_ACT=FP2BAS(#CP_PARAMS,2)LIN XP2 C_DIS C_DIS;

21、ENDFOLD;FOLD LIN P3 CONT Vel=2 m/s CPDAT5 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:C_DIS C_DIS, 5:2, 7:CPDAT5$BWDSTART=FALSELDAT_ACT=LCPDAT5FDAT_ACT=FP3BAS(#CP_PARAMS,2)LIN XP3 C_DIS C_DIS;ENDFOLDGripper_SetStatus(2,“C“)LIN_RELZ 7.5Gripper_SetStatus(2,“O“);FOLD LIN P3 Ve

22、l=2 m/s CPDAT1 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:, 5:2, 7:CPDAT1$BWDSTART=FALSE库卡机械手程序实例 七轴运动与机台作业完成7LDAT_ACT=LCPDAT1FDAT_ACT=FP3BAS(#CP_PARAMS,2)LIN XP3 ;ENDFOLDGripper_SetStatus(2,“C“)Part1InRight = TRUE;FOLD LIN P2 Vel=0.05 m/s CPDAT6 Tool1 Base0;%PE%R 8.3.40,%

23、MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:, 5:0.05, 7:CPDAT6$BWDSTART=FALSELDAT_ACT=LCPDAT6FDAT_ACT=FP2BAS(#CP_PARAMS,0.05)LIN XP2 ;ENDFOLDIF NOT $IN11 THENGOTO markENDIF;FOLD PTP P4 CONT Vel=100 % PDAT6 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P4, 3:C_DIS, 5:100, 7:PDAT6$BW

24、DSTART=FALSEPDAT_ACT=PPDAT6FDAT_ACT=FP4BAS(#PTP_PARAMS,100)PTP XP4 C_DIS;ENDFOLD;FOLD PTP P5 CONT Vel=100 % PDAT10 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P5, 3:C_DIS, 5:100, 7:PDAT10$BWDSTART=FALSEPDAT_ACT=PPDAT10FDAT_ACT=FP5BAS(#PTP_PARAMS,100)PTP XP5 C_DIS;ENDFOLD;FOLD PTP

25、 P6 CONT Vel=100 % PDAT8 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDAT8$BWDSTART=FALSEPDAT_ACT=PPDAT8FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD LIN P7 Vel=0.25 m/s CPDAT7 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P7,

26、3:, 5:0.25, 7:CPDAT7$BWDSTART=FALSELDAT_ACT=LCPDAT7FDAT_ACT=FP7BAS(#CP_PARAMS,0.25)库卡机械手程序实例 七轴运动与机台作业完成8LIN XP7 ;ENDFOLDGripper_SetStatus(1,“O“);FOLD PTP P6 CONT Vel=100 % PDAT14 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDAT14$BWDSTART=FALSEPDAT_ACT=PPDA

27、T14FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD PTP P8 CONT Vel=100 % PDAT9 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P8, 3:C_DIS, 5:100, 7:PDAT9$BWDSTART=FALSEPDAT_ACT=PPDAT9FDAT_ACT=FP8BAS(#PTP_PARAMS,100)PTP XP8 C_DIS;ENDFOLDELSE;FOLD PTP P5 CONT Vel=100 % PDAT

28、2 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P5, 3:C_DIS, 5:100, 7:PDAT2$BWDSTART=FALSEPDAT_ACT=PPDAT2FDAT_ACT=FP5BAS(#PTP_PARAMS,100)PTP XP5 C_DIS;ENDFOLD;FOLD PTP P6 CONT Vel=100 % PDAT13 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDA

29、T13$BWDSTART=FALSEPDAT_ACT=PPDAT13FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD LIN P7 Vel=0.25 m/s CPDAT9 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P7, 3:, 5:0.25, 7:CPDAT9$BWDSTART=FALSELDAT_ACT=LCPDAT9FDAT_ACT=FP7BAS(#CP_PARAMS,0.25)LIN XP7 ;ENDFOLDGripper_SetSt

30、atus(1,“O“);FOLD PTP P6 Vel=100 % PDAT12 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:, 5:100, 7:PDAT12$BWDSTART=FALSEPDAT_ACT=PPDAT12库卡机械手程序实例 七轴运动与机台作业完成9FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 ;ENDFOLD;FOLD PTP P8 CONT Vel=100 % PDAT7 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASI

31、S,%CMOVE,%VPTP,%P 1:PTP, 2:P8, 3:C_DIS, 5:100, 7:PDAT7$BWDSTART=FALSEPDAT_ACT=PPDAT7FDAT_ACT=FP8BAS(#PTP_PARAMS,100)PTP XP8 C_DIS;ENDFOLDMachine_Start(1);FOLD PTP HOME Vel=100 % DEFAULT;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT$BWDSTART=FALSEPDAT_ACT=PDEFAULTFDAT

32、_ACT=FHOMEBAS(#PTP_PARAMS,100)$H_POS=XHOMEPTP XHOME ;ENDFOLDENDIFIF Machine1_OnlyDrop THENMachine1_OnlyDrop = FALSEENDIFMachine_Start(1)END4、 机台 2 取放料程序(完成机台 2 取放料动作与信号交互)FOLD INI;%PE;FOLD BASISTECH INIGLOBAL INTERRUPT DECL 3 WHEN $STOPMESS=TRUE DO IR_STOPM ( )INTERRUPT ON 3 BAS (#INITMOV,0 );ENDFOL

33、D (BASISTECH INI);FOLD USER INI;Make your modifications here;ENDFOLD (USER INI);ENDFOLD (INI)PTP $POS_ACTSevenAxis_Run(2);FOLD OUT 8 State=TRUE ;%PE%R 8.3.40,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:8, 3:, 5:TRUE, 6:$OUT8=TRUE;ENDFOLD库卡机械手程序实例 七轴运动与机台作业完成10IF NOT Machine2_OnlyDrop THEN;FOLD PTP P1 CONT Vel=1

34、00 % PDAT3 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_DIS, 5:100, 7:PDAT3$BWDSTART=FALSEPDAT_ACT=PPDAT3FDAT_ACT=FP1BAS(#PTP_PARAMS,100)PTP XP1 C_DIS;ENDFOLDmark:;FOLD PTP P2 CONT Vel=100 % PDAT4 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P2, 3:C_DIS,

35、 5:100, 7:PDAT4$BWDSTART=FALSEPDAT_ACT=PPDAT4FDAT_ACT=FP2BAS(#PTP_PARAMS,100)PTP XP2 C_DIS;ENDFOLD;FOLD LIN P3 Vel=2 m/s CPDAT4 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:, 5:2, 7:CPDAT4$BWDSTART=FALSELDAT_ACT=LCPDAT4FDAT_ACT=FP3BAS(#CP_PARAMS,2)LIN XP3 ;ENDFOLDGripper_Set

36、Status(1,“C“)LIN_RELZ 7.5Gripper_SetStatus(1,“O“);FOLD LIN P3 Vel=2 m/s CPDAT0 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P3, 3:, 5:2, 7:CPDAT0$BWDSTART=FALSELDAT_ACT=LCPDAT0FDAT_ACT=FP3BAS(#CP_PARAMS,2)LIN XP3 ;ENDFOLDGripper_SetStatus(1,“C“)Part2InLeft = TRUE;FOLD LIN P2 CONT

37、Vel=0.05 m/s CPDAT3 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P2, 3:C_DIS C_DIS, 5:0.05, 7:CPDAT3$BWDSTART=FALSELDAT_ACT=LCPDAT3FDAT_ACT=FP2BAS(#CP_PARAMS,0.05)LIN XP2 C_DIS C_DIS;ENDFOLDIF NOT $IN10 THENGOTO mark库卡机械手程序实例 七轴运动与机台作业完成11ENDIF;FOLD PTP P4 CONT Vel=100 % PDAT7 Too

38、l1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P4, 3:C_DIS, 5:100, 7:PDAT7$BWDSTART=FALSEPDAT_ACT=PPDAT7FDAT_ACT=FP4BAS(#PTP_PARAMS,100)PTP XP4 C_DIS;ENDFOLD;FOLD PTP P5 CONT Vel=100 % PDAT14 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P5, 3:C_DIS, 5:100, 7:PDAT14$B

39、WDSTART=FALSEPDAT_ACT=PPDAT14FDAT_ACT=FP5BAS(#PTP_PARAMS,100)PTP XP5 C_DIS;ENDFOLD;FOLD PTP P6 CONT Vel=100 % PDAT9 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDAT9$BWDSTART=FALSEPDAT_ACT=PPDAT9FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD LIN

40、P7 Vel=0.25 m/s CPDAT7 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P7, 3:, 5:0.25, 7:CPDAT7$BWDSTART=FALSELDAT_ACT=LCPDAT7FDAT_ACT=FP7BAS(#CP_PARAMS,0.25)LIN XP7 ;ENDFOLDGripper_SetStatus(2,“O“);FOLD PTP P6 CONT Vel=100 % PDAT11 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP

41、,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDAT11$BWDSTART=FALSEPDAT_ACT=PPDAT11FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD PTP P8 CONT Vel=100 % PDAT12 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P8, 3:C_DIS, 5:100, 7:PDAT12$BWDSTART=FALSEPDAT_ACT=PPDAT12FDAT_ACT=FP8库卡机械手

42、程序实例 七轴运动与机台作业完成12BAS(#PTP_PARAMS,100)PTP XP8 C_DIS;ENDFOLDELSE;FOLD PTP P5 CONT Vel=100 % PDAT13 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P5, 3:C_DIS, 5:100, 7:PDAT13$BWDSTART=FALSEPDAT_ACT=PPDAT13FDAT_ACT=FP5BAS(#PTP_PARAMS,100)PTP XP5 C_DIS;ENDFOLD;FOLD PTP P6 CONT Vel=100

43、% PDAT1 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P6, 3:C_DIS, 5:100, 7:PDAT1$BWDSTART=FALSEPDAT_ACT=PPDAT1FDAT_ACT=FP6BAS(#PTP_PARAMS,100)PTP XP6 C_DIS;ENDFOLD;FOLD LIN P7 Vel=0.25 m/s CPDAT1 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P7, 3:, 5:0.25, 7:CPD

44、AT1$BWDSTART=FALSELDAT_ACT=LCPDAT1FDAT_ACT=FP7BAS(#CP_PARAMS,0.25)LIN XP7 ;ENDFOLDGripper_SetStatus(2,“O“);FOLD LIN P6 CONT Vel=2 m/s CPDAT2 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P6, 3:C_DIS C_DIS, 5:2, 7:CPDAT2$BWDSTART=FALSELDAT_ACT=LCPDAT2FDAT_ACT=FP6BAS(#CP_PARAMS,2)LIN

45、 XP6 C_DIS C_DIS;ENDFOLD;FOLD PTP P8 CONT Vel=100 % PDAT6 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P8, 3:C_DIS, 5:100, 7:PDAT6$BWDSTART=FALSEPDAT_ACT=PPDAT6FDAT_ACT=FP8BAS(#PTP_PARAMS,100)PTP XP8 C_DIS;ENDFOLDMachine_Start(2);FOLD PTP HOME Vel=100 % DEFAULT;%PE%R 8.3.40,%MKUKA

46、TPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 库卡机械手程序实例 七轴运动与机台作业完成133:, 5:100, 7:DEFAULT$BWDSTART=FALSEPDAT_ACT=PDEFAULTFDAT_ACT=FHOMEBAS(#PTP_PARAMS,100)$H_POS=XHOMEPTP XHOME ;ENDFOLDENDIFIF Machine2_OnlyDrop THENMachine2_OnlyDrop = FALSEENDIFMachine_Start(2)END5、 机台 3 取放料程序(完成机台 3 取放料动作与信号交互)FOLD INI;%P

47、E;FOLD BASISTECH INIGLOBAL 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)WAIT FOR $FLAG1$FLAG8=TRUE;ENDFOLD (INI)PTP $POS_ACTSevenAxis_Run(3);FOLD OUT 11 State=TRUE ;%PE%R 8.3.

48、40,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:11, 3:, 5:TRUE, 6:$OUT11=TRUE;ENDFOLD;FOLD PTP P1 CONT Vel=100 % PDAT6 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P1, 3:C_DIS, 5:100, 7:PDAT6$BWDSTART=FALSEPDAT_ACT=PPDAT6FDAT_ACT=FP1BAS(#PTP_PARAMS,100)PTP XP1 C_DIS;ENDFOLD;FOLD PTP P2 CONT Vel=100 % PDAT2 Tool1 Base0;%PE%R 8.3.40,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:P2, 3:C_DIS, 5:100, 7:PDAT2$BWDSTART=FALSE库卡机械手程序实例 七轴运动与机台作业完成14PDAT_ACT=PPDAT2FDAT_ACT=FP2BAS(#PTP_PARAMS,100)PTP XP2 C_DIS;ENDFOLD;FOLD LIN P3 Ve

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报