数控加工信息远程通信及指令编译仿真技术研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
先进制造技术尤其是Internet/Intranet和计算机仿真技术的飞速发展,正给制造业带来一场深刻的革命。数控系统走向网络化、集成化、虚拟化己成为必然的趋势。基于TCP/IP协议的网络通信技术正为制造领域中异地数控人才资源与机床设备资源找到了连接的纽带,数控加工仿真技术为验证数控程序的可靠性、防止干涉和碰撞的发生及预测加工过程提供了强有力的工具。对基于Internet/Intranet数控机床的通信与仿真问题的研究是顺应制造领域技术、设备和市场三者飞速发展和迫切要求的结果,具有重要的理论与实用价值。
     本文以华中“世纪星”HNC-21数控铣床为例,对机床的通信与仿真问题进行深入研究,重点对几个关键技术问题进行了探讨:
     基于国内传统机床大多没有以太网卡的情况,文章首先对串行通信的接口、通信原理和方法进行了研究,找到了VB通信控件的MSComm方法,有效地实现CNC与现场PC的串行通信。然后根据远程网络通信的要求,选择Windows提供的网络编程接口Socket,采用流行的Client/Server结构模式,在Microsoft Visual Basic 6.0编程环境下实现了网络共享平台的程序开发。该网络共享平台可以充分利用全球各地富余的编程智力资源、软件资源,还充分利用了不同企业不同类型的闲置数控设备资源,使各终端很好地实现了敏捷制造和协作制造。
     在分析NC代码组成及特点基础上,通过EBNF定义了NC程序的语法规则,并使用Antlr技术快速构建编译器框架。采用平台无关的Java编程语言,在Eclipse开发平台上通过插件的辅助,简单高效地开发了一个NC编译器原型系统。以FANUC规范的NC程序作为输入对其进行测试,试验结果表明:该NC编译系统匹配速度快、精度高、通用性和兼容性好,可以准确地对NC程序进行翻译。在此基础上,本文深入研究了Java3D语言的一些功能和算法,运用JAVA3D技术快速构建了一个虚拟数控加工仿真系统原型,并在该系统中实现了NC代码的编译与刀具轨迹的仿真。
     根据本文的研究内容与成果,成功开发出能满足实际制造需求的数控机床远程通信与加工仿真的原型系统。重点介绍了原型系统的两个子系统远程通信与数控仿真系统的实现方法、界面功能、操作过程等。在运行实例中,远程客户端PC将加工文件或NC代码等通过网络传输到服务器端PC,仿真系统监听status.properties文件中NC文件的状态,读取并自动进行虚拟加工仿真,实现了两个子系统无缝连接和可靠运行。
     原型系统的开发为CAD/CAM技术的推广应用探索了一条切实可行的道路,也是把通信、图像、信息、软件等多学科专业先进技术引入机械制造领域所做的一项具有开创性的工作。
The rapid development of advanced manufacture technology, especially the Internet/Intranet and Computer Simulation technology, brings a deep revolution for manufacture industry. It has become a necessary trend for numerical control system towards networking, integration and virtualization. The network communication technology which based on TCP/IP treaty is finding a connecting tie for the separate numerical control human resource and machine tool resource in making field, NC machining simulation technique offers an effective tool for testing the liability of numerical control program and preventing interference and crash's happening and the process of prediction manufacturing. The research on the communication of numerical control machine and simulation based on Internet/Intranet is the result of adapting the rapid development and pressing requirement of technology, equipment and market in making field, which possesses important theoretical and practical value.
     This essay takes Huazhong "Century star" HNC-21 numerical control milling machine as an example, and makes a further research on the communication of machine tool and simulation problem, it focus on several key technological problems.
     Based on the fact that most traditional machine tool didn't have the Ethernet, this article started a research on the interface, communication principles and methods of serial communication. We found MSComm method of VB communication control which effectively implements CNC and the scene PC serial communication. According to the requirement of the remote communication, we choose internet program interface socket which windows provides, used the popular C/S model, to implement the program development of network sharing platform under the environment of Microsoft Visual Basic 6.0 program. The Network sharing platform can fully uses the universal programming intelligent resource, software resource, idle NC equipment resources of different enterprises and different types, which commendably realize agile manufacturing and collaborative manufacturing of the terminals.
     We define the NC program syntax rules by EBNF at the basis of analyzing NC code, and use Antlr technology to configure a compiler framework quickly. The NC complier prototype was implemented with java language, which could make it be independent of operating system, and at the Eclipse platform with the assistant of plug-in. The process was simple and efficient. We tested it with inputting FANUC NC program, the result shows that the system has fast matching speed, high precision, good versatility and compatibility, which make the system compile the NC program correctly. We had a deep research into JAVA3D functions and algorithms then developed a Virtual NC machining simulation system prototype, in which we implement NC compile and the simulation of tool path.
     On the basis of above-mentioned research and achievements, we develop the CNC machine remote Communication and Machining Simulation prototype successfully, which can meet the practical manufacture need. Then introduce the subsystems of the prototype—remote communication system and virtual nc system, mainly about the implement method, the interface function, the operating process and so on. During the running cases, remote clients sent the NC file or NC code to server through Internet transmission, and the simulation system monitor the condition of NC files in status.Properties and read even begin the simulation process automatically, which implement the two subsystem closed connection and reliable running.
     The development of prototype system has explored a practical way for the generalization used of CAD/CAM technology, and did a innovative job of introducing many advanced professional fields such as Communication, Image, Information, Software engineering and machinery manufacturing.
引文
[1]何涛,杨竞,范云等编著.先进制造技术[M].北京:北京大学出版社,2006.1
    [2]Colleen D.Working the Web.Automotive manufacturing &Production,1998(12):56-57
    [3]Colin R Earl.NC Verification Comes to CAD/CAM,Automation,Aug.1988,35(8):46-48
    [4]Yu Zhanyue,An Lining,Liu Weiwei.Development of Web-based CAD/CAM system.Journal of Computer Aided Design&Computer Graphics,2003,12(15):1557-1565
    [5]Yoonho Seo,Dae-Young Kim,Suk-Hwan Suh.Development of Web-based CAM system.The International Journal of Advanced Manufacturing Technology(online),2005,4.
    [6]CNC&CAD/CAM inital&continuing vocational training,TMS Company,URL:http://www.mts-cnc.com/
    [7]曹甜东.数控技术[M].武汉:华中科技大学出版社,2005.9
    [8]张祥永,左建华.数控机床与计算机之间数据传输软件系统的研究.计算机辅助设计与制造.1999,4:40-42
    [9]I.N.Tansel and C.Mclaughlin.Monitoring of tool breakage with restricted coulomb energy type neural networks.Sensors,Controls and Quality Issues in Manufacturing,ASM,(1991),Vol.55:59-65
    [10]严隽琪.数字化与网络化制造.工业工程与管理.2000,1
    [11]毕承恩等.现代数控机床[M].北京:机械工业出版社.1991
    [12]Warwick K.Automatic Control in Manufacturing-Current Status.Advanced Manufacturing Pngineering,1990,2(1):17-20
    [13]孙大涌,徐贤明,张松滨。先进制造技术[M].北京:机械工业出版社.1999,12.569-808
    [14]Colleen D.Working the Web.Automotive manufacturing&Production,1998(12):56-57
    [15]盛晓敏,邓朝晖.先进制造技术[M].机械工业出版社.2000,9:242-249
    [16]张祥永,左建华.数控机床与计算机之间数据传输软件系统的研究.计算机辅助设计与制造,1999
    [17]肖力,韩世强,易永江.数控机床DNC网络两级通信的实现.机械与电子,2000,9,242-249
    [18]纪伟.数控机床网络通讯技术的研究与开发.南京航空航大大学硕士论文.1998.3
    [19]刘晓胜,杨涛,周爽,马玉林.FMS环境下计算机与机床的通信技术.机械与电子,1998,3:5-7
    [20]杨雪宝,秦现生,唐虹.对FANUC系统数据传送装置的改造.制造技术与机床.1996,9:41-43
    [21]Zhou E P.Harrison D K,Link D.Effecting in cycle measurement with preteritic CNC machine tools.Computers in industry.1996,28:95-102
    [22]郭鼎印.计算机基础教程.黑龙江科学技术出版社.1999,1:261-376
    [23]张炳杰,程庆伟.加工中心与计算机间的数据传输.制造技术与机床.1998,6:12-14
    [24]李兴兰,张友根,陶以政,潘振显.基于RS-485/422网络的Windows98/95环境下远程数据传输系统.工程设计.2001,1:48-52
    [25]ADAM-4520/4522 RS-232 to RS422/485 Converter User's Manual.Printed in Tai Wan,October 1998.
    [26]Gary S V.Networking the Organization:Ford's CAD/CAM/CAF/PIM Strategy.Automotive Manufacturing&Production,1998(8):52-54
    [27]YANG Wen- Lin.Adistributed Processing Architecture for Remote Simulation System in a Multi-User Environment.Computers in Industry,1999,40
    [28]任建平,赵美虹.加工中心与微机间数据传输的实现.机械与电子.2001,2,7-26
    [29]刘宏,旷生平.经济型数控机床的网络通讯和控制技术研究.机械,2001,4,54-64
    [30]赵晓辉,危建国.基于WinSock的网络应用程序的开发[J].西南民族大学学报(自然科学版),2007.(1)
    [31]Li,Hu.E-manufacture modeling based on network and its function[J].Dongbei Daxue Xuebao/Journal of Northeastern University,August,2006,27(8):p 911-913
    [32]杨文通等编著,数字化网络化制造技术[M],北京:电子工业出版社,2004.5
    [33]张友生.远程控制编程技术[M].北京:电子工业出版社,2002,40-58
    [34]Shinn-Liang Chang.Development of a remote monitor and diagnosis system through a PC-based controller[J].Journal of Internet Technology,July 2004,5(3):p279-87
    [35]Anthony Jones,Jim Ohlund.Microsoft Windows网络编程[M]:第二版,杨合庆译.北京:清华大学出版社,2002.
    [36]龚安.基于VB的Winsock控件实现C/S网络通信[J].科学技术与工程,2006,10
    [37]陈峰棋.Visual Basic网络编程从入门到精通(含盘)[M].北京:中国铁道出版社,2002.9
    [38]张滢,刘宝明,王子豪等.微机与数控机床远程通信软件开发[J].组合机床与自动化加工技术.2005
    [39]Y Liu,X Guo,W Li,K Yamazaki,K Kashihara,and M Fujishima,An intelligent NC program processor for CNC system of machine tool.Robotics and Computer-Integrated Manufacturing.2007,23(2):160-169
    [40]杨旭东,廖文和.仿真系统中通用NC代码处理技术的研究[J].机械制造与自动化,2003,(1):49-51
    [41]金龙飞,刘磊.编译器前端构造工具及JLUCC的实现[J].吉林大学学报(信息科学版),2005,(4):429-435
    [42]Terence Parr.ANTLR Reference Manual.[2007-07-08]http://www.antlr.org/doc/glossary.html
    [43]许宇胜,杨文通,王蕾,刘志峰.一个NC代码翻译模块的设计与开发[J].机床与液压,2005,(7):55-56
    [44]任松涛.NC代码编译器的设计与实现[D].西安:西北工业大学,2007.3
    [45]南雁.基于虚拟数控加工的NC代码翻译[D].西安:西北工业大学,2005
    [46]W.B.Iee、D.Dao,J.G.Li,An NC tool path translator for virtual machining of precision optical products.Journal of Materials Processing Technology.140(2003):211-216
    [47]葛研军,数控加工关键技术与应用[M],北京:科学出版社,2005,229-248
    [48]张生芳.通用代码解释器的研究[D].大连:大连铁道学院,2002
    [49]David A Watt.Programming Language Syntax and Semanties.London:PrenticeHall.1991.
    [50]Guo Degui,Liu Lei~*,Wang Shengjun.Precedence Grammar and Its Transformation.IEEE Computer Society,2006,171-176
    [51]沙智华,张生芳,葛研军,赵亮.通用数控代码编译系统研究与实现[J].中国机械工程,2003,(9).763-766
    [52]梁宏宝,杨胡坤,刘丽娜,曹喜承.虚拟加工中NC代码转化技术研究 [J].计算机仿真,2004,21(11):219-222
    [53]王霄,刘会霞,杨润党等.虚拟设备的建模和加工过程仿真[J].中国机械工程,2003,14(17):1489-1492.
    [54]林清安.Pro/Engineer零件设计初、高级篇[M].北京:北京大学出版社,2000.4.
    [55]孙江宏,黄小龙,罗坤.Pro/ENGINEER2001中文版入门与提高[M].北京:清华大学出版社,2003.5
    [56]牛忠良,孙立锈.Java3D在虚拟现实中的应用[J].机械工程师,2005,(2):15-17.
    [57]姜俊杰,陈炳发,燕惠芳.基于Java3D技术的虚拟随机场景生成及其应用[J].东华大学学报(自然科学版),2005,31(4):8-10.
    [58]J Wang.Development of a general tool model for turning operations based on a variable flow stress theory[J].Machine Tools Manufacturing,1996,36(1):103-113.
    [59]龚建成,张佑生.基于Java3D的3D图形开发技术[J].安徽工程科技学院学报,2003.18(1)57-61.
    [60]陈铮,龚建华.一个基于Java3D的协同虚拟环境工作平台[J].计算机应用研究,2005,(8):136-139.
    [61]X D Fang.A hybrid algorithm for prediction chip form/chip breakability in machining[J].Machine Tools Manufacturing,1996,36(10):1593-1607.
    [62]M Rahman.A three dimensional model of chip flow,chip curl and chip breaking under the concept of equivalent parameters[J].Machine Tools Manufacturing,1995,35(7):1015-1031.
    [63]Zhao Bin,Shi Zhi hui,etal.Study about real-time simulation of chip generating,curling and breaking[J].Modular Machine Tool&Automatic Manufacturing Technique.2000(8):12-15.
    [64]石教英.虚拟现实基础及使用算法[M].北京:科学出版社,2002.
    [65]王蕾.基于网络化制造的数控加工技术的研究[D].沈阳:东北大学,2003.
    [66]顾寄南,高传玉,戈晓岚.网络化制造技术[M].北京:化学工业出版社,2004.8
    [67]段光前,阳道善,李水进,唐小琦,毕波.基于网络的数控制造技术[J].机械与电子.2001,2:61-63
    [68]杨平,廖宁波,丁建宁等.数字化设计制造技术概论[M].北京:国防工业出版社,2005.10