ABB机器人程序实例ROBOT studio 6.01(附带与工业相机网络通讯实例)(完整资料).doc.pdf
《ABB机器人程序实例ROBOT studio 6.01(附带与工业相机网络通讯实例)(完整资料).doc.pdf》由会员分享,可在线阅读,更多相关《ABB机器人程序实例ROBOT studio 6.01(附带与工业相机网络通讯实例)(完整资料).doc.pdf(22页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、【最新整理,下载后即可编辑】ABB机器人(ROBOT studio6.01)程序实例MODULE MainModulePERS tooldatatGripper:=TRUE,0.533078,1.51617,583.739,1,0,0,0,30,0,0,50,1,0,0,0,0,0,0;TASK PERS wobjdataVisionWobj:=FALSE,TRUE,0,0,0,1,0,0,0,-934.534,1807.34,-76.7707,0.400996,0.0128267,-0.0292473,-0.915523;TASK PERS wobjdataWobjCompressor1:=
2、FALSE,TRUE,518.656,-1088.9,164.25,0,0,0,1,686.651,296.298,-588.529,0.917114,1.69419E-06,-7.35001E-05,-0.398626;TASK PERS wobjdataWobjCompressor2:=FALSE,TRUE,518.656,-1088.9,164.25,0,0,0,1,-944.871,-657.402,-323.406,0.918098,-1.98999E-05,-6.49686E-06,0.396353;PERS wobjdata WobjCompressor;VAR robtarge
3、t pActualPos;VAR socketdev server_socket;VAR socketdev client_socket;VAR string client_ip;VAR string stReceived;VAR num NumCharacters:=9;VAR bool bOK;PERS numnXOffs;PERS numnYOffs;PERS numnAngleOffs;VAR string XData:=;【最新整理,下载后即可编辑】VAR string YData:=;VAR string AngleData:=;VARnumnPresenceOrAbsence;P
4、ERS num nPickH:=-400;PERS num nCountX;PERS num nCountY;PERS num nCountZ;PERS num nCount;VAR num nPlaceNo;PERS bool bSMPreOrAbs;PERS bool bInpos;VAR robtarget PVision;VAR robtarget Vision;VAR robtarget ppPick;VAR robtarget pPick;PERS robtarget Pick;PERS robtarget ErCiDingWeiPlace;PERS robtarget ErCiD
5、ingWeiPick;PERS robtarget pPlace;PERS robtarget PlaceVision;PERS robtarget PZhanban;PERS robtarget PZhanbanUp;PERS robtarget PZhanbanDown;PERS robtarget PlaceZhanban;PERS robtarget Place;PERS boolbKindChoose;VAR num nAngle;VAR num nX;VAR num nCamOut;VAR num nInpos;【最新整理,下载后即可编辑】VAR num nTotalPalletH
6、igh;VAR num nPalletHigh;PERS num nPalletHighUp;PERS num nPalletHighDown;VAR num Compensation8,3;VAR num CompensationTwo8,3;PERS numCompensationErr8,3:=999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,999999,99
7、9999,999999,999999;PERS jointtargetjposHome:=0,0,0,0,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONSTrobtargetpHome:=621.23,-975.96,1166.44,0.00703884,-0.385671,-0.922573,-0.00826231,-1,0,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONSTrobtargetPZhanbanSafe:=-162.69,-1703.07,2270.38,0.0109452,-0.955357,-
8、0.295179,-0.00645602,-1,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONSTrobtargetVisionA:=-228.96,94.47,643.11,0.00434955,-0.699954,0.714102,-0.0101798,-2,-1,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONSTrobtargetPickA:=90.09,79.65,61.29,0.0102135,0.00299714,0.999935,-0.00417093,-2,-1,1,0,9E+09,9E+0
9、9,9E+09,9E+09,9E+09,9E+09;CONSTrobtargetPlaceA:=-644.46,-1019.60,396.56,0.00841448,-0.692574,0.721298,0.【最新整理,下载后即可编辑】000680825,-1,-1,1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetPZhanbanUpA:=549.64,541.39,821.21,0.000808037,-0.999985,-0.00498684,-0.00209158,-2,-1,-1,0,9E+09,9E+09,9E+09,9E
10、+09,9E+09,9E+09;CONST robtargetPZhanbanDownA:=548.40,560.53,179.18,0.00417276,0.999929,-0.00436864,0.0102239,-2,-1,-1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetPlaceZhanbanA:=2456.73,-1154.76,205.32,0.0106126,-0.0247295,-0.999603,0.00838785,1,-1,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;PER
11、S numCompensationA8,3:=0,0,0,210,136,0,430,264,99999999,645,403,99999999,855,533,99999999,99999999,670,99999999,99999999,800,99999999,99999999,936,99999999;PERS numCompensationA18,3:=860,936,0,0,0,0,215,133,99999999,430,264,99999999,645,403,99999999,99999999,533,99999999,99999999,670,99999999,999999
12、99,800,99999999;PERS numCompensationA28,3:=860,0,0,0,133,0,215,264,99999999,430,403,99999999,645,533,99999999,99999999,670,99999999,99999999,800,99999999,99999999,936,99999999;CONST num nPalletHighUpA:=100;CONST num nPalletHighDownA:=200;CONST robtargetVisionB:=936.63,959.75,378.90,0.00373262,0.1054
13、79,-0.994406,-0.00407233,-1,0,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;【最新整理,下载后即可编辑】CONST robtargetPickB:=1180.22,1009.95,213.74,0.00373443,0.1055,-0.994404,-0.00406331,-1,0,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetPlaceB:=-1194.30,-1552.83,582.17,0.0062614,0.795938,-0.605346,-0.000999
14、941,0,0,0,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetPZhanbanUpB:=511.86,550.08,92.05,0.00172284,-0.00758955,-0.99997,-0.000606164,-1,0,1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;CONST robtargetPZhanbanDownB:=511.86,550.08,92.05,0.00172284,-0.00758955,-0.99997,-0.000606164,-1,0,1,0,9E+09,9E+0
15、9,9E+09,9E+09,9E+09,9E+09;CONST robtargetPlaceZhanbanB:=511.86,550.08,92.05,0.00172284,-0.00758955,-0.99997,-0.000606164,-1,0,1,0,9E+09,9E+09,9E+09,9E+09,9E+09,9E+09;PERS numCompensationB8,3:=0,0,300,210,136,0,430,264,99999999,645,403,99999999,855,533,99999999,99999999,670,99999999,99999999,800,9999
16、9999,99999999,936,99999999;PERS numCompensationB18,3:=860,936,300,0,0,0,215,133,99999999,430,264,99999999,645,403,99999999,99999999,533,99999999,99999999,670,99999999,99999999,800,99999999;PERS numCompensationB28,3:=860,0,300,0,133,0,215,264,99999999,430,403,99999999,645,533,99999999,99999999,670,99
17、999999,99999999,800,99999999,99999999,936,99999999;CONST num nPalletHighUpB:=100;【最新整理,下载后即可编辑】CONST num nPalletHighDownB:=200;PERS speeddata vMinEmpty:=1300,100,6000,1000;PERS speeddata vMidEmpty:=1400,100,6000,1000;PERS speeddata vMaxEmpty:=1500,100,6000,1000;PERS speeddata vBigMaxEmpty:=1500,100,
18、6000,1000;PERS speeddata vMinLoad:=1200,100,6000,1000;PERS speeddata vMaxLoad:=1300,100,6000,1000;PERS speeddata vBigMaxLoad:=1400,100,6000,1000;TASK PERS wobjdatawobj1:=FALSE,TRUE,0,0,0,1,0,0,0,1984.06,-1180.48,453.803,0.661114,-0.659907,-0.252753,0.252124;PROC Main()rInitAll;WHILE TRUE DOrPickCal;
19、rPick;ENDWHILEWaitTime 0.3;ENDPROCPROC rInitAll()AccSet 60,100;Compensation:=CompensationErr;CompensationTwo:=CompensationErr;reg1:=0;reg2:=0;nCountX:=1;nCountY:=1;nCount:=0;【最新整理,下载后即可编辑】nCountZ:=1;nTotalPalletHigh:=0;nPalletHigh:=0;nInpos:=0;rKindChoose;rCheckHomePos;Reset do00_JawsOpen;Reset do01
20、_JawsClose;Set do00_JawsOpen;Reset do02_BigJaws1;WaitTime 0.3;Reset do03_BigJaws2;Reset do00_JawsOpen;Reset do13_Placing;Reset do12_PlaceOK;ENDPROCPROC rPickCal()Set do00_JawsOpen;bSMPreOrAbs:=TRUE;IF nCount=0 THENrCompressorInPos;ENDIFWHILE bSMPreOrAbs=TRUEDOIncr nCount;IF nCount=1 THENMoveL Offs(V
21、ision,0,0,CompensationnCountZ,3+100),vBigMaxEmpty,z20,tGripperWObj:=WobjCompressor;MoveJ Offs(Vision,0,0,CompensationnCountZ,3),vBigMaxEmpty,fine,tGrip【最新整理,下载后即可编辑】perWObj:=WobjCompressor;GOTO C;ENDIFIncr reg2;rnXCal;pVision:=Offs(Vision,CompensationnCountX,1,CompensationnCountY,2,CompensationnCoun
22、tZ,3);MoveLpVision,vMidEmpty,fine,tGripperWObj:=WobjCompressor;C:nPresenceOrAbsence:=1;!rServer;!socketsend client_socket Str:=T1;!socketReceive client_socket Str:=stReceived;!bOK:=StrToVal(stReceived,nPresenceOrAbsence);!IF nPresenceOrAbsence=2 OR nPresenceOrAbsence=3 THEN!bSMPreOrAbs:=FALSE;!ELSEI
23、F nPresenceOrAbsence=5 THEN!bSMPreOrAbs:=TRUE;!IF di02_PhotoelectricSensor=1 THEN!TPErase;!TPWrite The camera getpicture there is aproblem,Please check it!(2);!SystemStopAction Halt;!ELSEIF di02_PhotoelectricSensor=0 THEN!reg2:=0;!ENDIF!ELSEIF nPresenceOrAbsence=1 ORnPresenceOrAbsence=4THEN【最新整理,下载后
24、即可编辑】!TPErase;!TPWrite The Camera is wrong,and camera willrestart,;!TPWrite after a few seconds the robot willcontinue;!Stop;!ENDIFWaitTime 1;IF di02_PhotoelectricSensor=1 THENbSMPreOrAbs:=FALSE;ELSEbSMPreOrAbs:=TRUE;ENDIFIncr nCountX;!TEST di16_giBCD!CASE 1:IF nCountX=6 THENnCountX:=1;IncrnCountY;I
25、F nCountY=9 THENnCountY:=1;SystemStopAction Halt;ENDIFENDIFIF nCount=40 THENnCount:=0;IncrnCountZ;nCountX:=1;【最新整理,下载后即可编辑】nCountY:=1;nInpos:=0;IF reg2=0 THENrZhanban;IF nCountZ=2 THENrCompressorOutPos;nCountZ:=1;ENDIFENDIFreg2:=0;ENDIF!DEFAULT:!TPErase;!TPWrite The PLC communication there is aprobl
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ABB机器人程序实例ROBOT studio 6.01附带与工业相机网络通讯实例完整资料.doc ABB 机器人 程序 实例 ROBOT 6.01 附带 工业 相机 网络通讯 完整 资料 doc
链接地址:https://www.taowenge.com/p-72404606.html
限制150内