《随机刀库案例.docx》由会员分享,可在线阅读,更多相关《随机刀库案例.docx(11页珍藏版)》请在第壹文秘上搜索。
1、随机刀库程序例的操作本程序例主要是体现如何使用发那科的功能指令来实现随机刀库的寻刀、计算旋转方向、刀表的更新为目的,在实际使用中需根据实际情况来增加相应的互锁和保护。关于机械手的交换时序因不牵扯到相应的功能指令,请参照实际的时序进行编写。设定相应的数据表设定4组数据表用于管理操作:SYSTEM-PMCfPMCPARAM-DATA-4-G.CONTPHCDATATBLCONTROL用于设定当前刀位、刀盘数量用GROUPTABLECOUNT=4/NO.ADDRESS 001 B0O0 002 )DO100 003 D0200 O0d ;D0220PARAMETERTYPE NO.OF DAT0O0
2、000000000 O000QOO0 08000000用于设定刀具表56 7 8U。0 0 Oooo用于窗口功能进行HD刀号显示用用于窗口功能进行NX刀号显示后一I操作G.DATA操作/34G-SRCHPRM 04X001BINNO.ADDRESS 000D02000001D02020002 DO2Od 0003D02060004DB2080085D2180006D2120007D02140008 DOZ16 089D218NO.0000 0001 0002 0003Od 0005 0006 0(JOV OOOO 0009ADDRESSD0220D0222D0224D0226D022D0230
3、D0232D0234DO236D023S刀号的显示JC.DATAG-SRCHSEARCHC.DATAU 3KCIISEARCH面板操作:Y3:作为刀库刀位指示灯Y6.0:刀库正转指示灯Y6.I:刀库反转指示灯X11.0:模拟刀库旋转计数开关XllJ=ON:刀表更新=OFF:程序检测画面HD.T和NX.T显示更新02345N00000XYZ对座粽)0 0000 0000 000(微械座榇)X 31173. 857 Y 1690.160 Z 467.983C余移勤量)X0.000Y0.000Z0.00。(持虢)Gd0G5dFG49G6dG8。G69HG98G15DG50G25G67G160SSAC
4、T主轴刀号及待机刀号显示HD.TNX. TOMM/分S0T0000MDl+*+*间*15:12:50j相对合t操作)a程序例:R9091.0BYTTlR9091.0F0001.1-HIRSTRSTF0007.3-HHTFACTSUB14F0026T CODEDCHVD0500T BCDR0900.0-O-SUB71POOOlSPI将二进制的刀号数据转换成BCD码数据R9091.0BYTF0007.3ACTFJlTSUB15COMP0000OOlOD0500T_BCDR0900.1r_kJT10F0007.3R0900.1ACTTlIlTFT1OSUB68LOOOlJMPB如果输入刀号1。,程序
5、跳转至报警控制R9091.0BYTF0001.1TlRSTRSTF0007.3TF-TFACTSUB17DSCH0009DOlOOD0500TBCDD0020TARGETPOTR0099.2-O-根据目标刀号搜索刀表中的刀套号.R9091.0_|_BYTSUBl60000R0900.3r_IIT=SPF0007.3IIACTCOIN0000IITFD0020TARGETPOTF0007.3R0900.3ACTIIIISUB68LOOOlIIIITFT=SPJMPB目标刀如果在主轴上,则程序跳转至M、S、T结束控制。R9091.1RNOR0900.4IISUB60008r_IIyLOGlDIRR
6、9091.0BYTROTIlDOOlOCURRENT_POTR9091.1DIR-IlD0020LOGlTARGETPOTR9091.0POSIlD0030STEPinJMBERR9091.1IHCIlLOGlF0007.3ACTIlTFI根据当前刀套位和DSCH所计算出的目标刀套位,计算逸挂步数和方向。F0007.3IIR0900.414R0900.6IAY0006.0r_IInYkJTFDIRINPOSMG-CWF0007.3R0900.4R0900.6Y0006.1IIIIr-IIIITFDIRINPOSMG-CCWR9091.1CNOIISUB55D0008R0900.5LOGlkJF
7、0007.3IIR0900.4IIUPDOWWCTRCDOOlOCURRENT_POTIITFIIDIRR9091.0IIRSTIIX0011.0IIACTIICOUNTER环形计数器记录刀库当前刀位的变换R9091.0BYT I ISUB16OOooR9091.1 I IACTCOINOOOOI I LOGlD0030STEP1JMBERR0900.6O-IH_POS目标位找到。R0900.7-O-R0900.6XOOll.1F0007.3TlIlIHINPOSTFR9091.0_|I_BYTSUBl8R0901.0r_II9R9091.1IILOGlRffXMOVDOlOOF0001.1T
8、lRSTRSTDOlOOR0900.7TlACTDOOlOCURRENT_P0T刀具交换完成后,将主轴刀号更新至当前位表中R9091.0_II_BYTSuBl8R0901.1r_IIkJR9091.1TlLOGlRWXMOVDOlOOF0000.1TlRSTF0026TCODER0900.7TlACTD0502刀具交换完成后,将目标刀号更新至主轴刀表位R9091.0BYT_II_SUB180009IIR9091.0RWXMOVTlDOlOOFOOOl.1RSTTlD0300RSTR9091.1ACTTlDOOlOLOGlCURRENTPOTR0903.0R9091.6AF0007.3ACT_|ISUB25OOOlD0020TARGET_POTKl500MSCYCIITFDECB0000000001R0558R9091.1ACTIISUB25IILOGlDECBDOOlOCURRENT_POT0000000001R0560R9091.1ACTIISUB28R0558IILOGlMOVORR0560Y0003只是用Y3作为实脸演示用的处理程序部分,可以不用输入,R0902.1IIACTSUB52WIlTDWD0220R0902.2CIIF0007.3R0902.2IIITF窗口功能,在程序显示画面显示主轴和待机刀号.