摘要
在现代社会中,加工中心作为机械加工的一种重要设备,其应用日益广泛。而如何快速、准确地得到数控程序是应用加工中心进行生产时急需解决的一个重要课题。本文结合现代加工技术实验室的FEELER 800A数控加工中心开发了一种基于DXF文件的NC代码自动编程软件。
DXF(Drawing Exchange Files)文件即图形交换文件,是把有关图形的所有信息按规定格式编写而成的ASCⅡ文件,现已成为CAD领域的工业标准之一。本文通过分析DXF文件中各大段的结构及内容,找到了DXF文件中所包含的数控加工时所需的图形信息部分,并在此基础上编制程序以自动提取出这些图形信息。
考虑到应用加工中心进行数控加工的工艺要求,直接从DXF文件中提取出的图形信息并不能直接用于数控编程,还必须进一步对这些图形信息进行处理才能得到对数控加工有用的信息。首先,直接从DXF文件中提取的几何实体出现的顺序是按照其绘制图形时的先后顺序而出现的,这一顺序与数控加工顺序并不一定相同,因此本文首先对几何实体按照加工方向利用标注起点的方法进行重新排序。其次,直接从DXF文件中提取出来的几何实体的几何尺寸数据是由用户绘制时决定的,而通常情况下具体加工时所用的几何尺寸数据取决于几何实体的标注信息,本文根据图形的标注信息更新了实体的几何尺寸数据。再次,从DXF文件中提取并处理后得到的图形数据是以AutoCAD世界坐标系为基准的,其与实际数控编程时所需的工件坐标系并不一定重合,因此在进行自动编程前,必须实现从图纸坐标系到工件坐标系的转变,这样才能得到正确的数控加工信息。
根据上述处理后的图形信息数据,按照SINUMERIK 810D系统数控编程语言的编程格式,系统可自动编制出适于加工中心的数控程序,其主要应用范围包括铣削加工和钻镗孔加工,其中铣削加工又可分为铣轮廓加工和铣平面加工。
哈尔滨工程大学硕士学位论文
实际数控生产中,为了验证图纸的设计及其工艺路线是否正确,在正式
加工前,经常让机床在输入编制好的NC程序后空载运行,以观察刀具及工作
台是否能按预期的要求运动,一旦不合乎要求,则须反复对程序和图纸进行
修改,这势必造成人力、物力的浪费,因此有必要对刀具和工作台的运动过
程及其轨迹进行仿真,以便及时、准确地进行正式加工。本文利用OpenGL
对加工中心的刀具及工作台的运动轨迹进行了计算机仿真。
最后基于以上所做的工作,本文在VisualC++6.0环境下开发了FEELER
800A数控加工中心自动编程软件,经实践证明本自动编程软件运行稳定,具
有较强的实用性。
In modern society, NC machine center has been an important device for mechanical manufacture, its appliance has been more and more widely accepted. But how to get the numerical control program quickly and accurately is really an urgent problem to be tackled. In this paper, an auto programming software is developed based on DXF files, this software mainly aims at a machine center-FEELER 800A which uses the NC system of SINUMERIK 810D from SIEMENS.
DXF(Drawing Exchange Files)files are also called graphic exchange files, they translate the information about graphics into ASCII files according to the prescribed regulations. It has already been treated as the industry standard of CAD. In this paper, by analyzing the structures and contents of the main sections of DXF files, the graphic informations which are useful during NC machining are selected, then the auto programming software can automatically generate NC programmes according to these informations.
Concerned that there are technical requirements on NC maching, the information picked from the DXF files can not be used directly to NC programming, they must be processed before making the final numerical control codes which can be used by the machine center.
The sequence of the geometry objects that appear in DXF is depended on the sequence of the drawing, and so is the directly picking sequence, this sequence has nothing to do with the machining sequence. So, in this paper, the geometry objects picked from the DXF files are firstly resorted based on start-point method. The measurement of the directly picked geometry objects are determined by the users who made it, and generally the geometry measurement data are based on the label of the geometry objects, in this paper, the geometry measurement data are
renewed by the label information of the graphics.
The graphic information picked and processed from the DXF files are different from the route which the tool actually goes about, because the positions and measurements picked are based on the Paper-Coordinate, it may be different from the Part-Coordinate which the tool should goes in. Thus, before auto programming, there must be a change from Paper-Coordinate to Part-Coordinate.
According to the graphics information data, the numerical control programs which aim at the SINUMERIK 810D system are automatically made based on NC codes standards. And this system covers the machine types of mill and drill, it can also integrate dispersed points to B-curved lines which can be used as tool position.
In the actual manufacturing with NC machine, in order to check whether the parts design and the cutting route are right or not, generally it is tested by examing how the tool and work plane will move with the input NC programme and without an actual part. Once the movement does not match the prescribed process, there must be a change to the design graphics and the NC programme, and then test again, until the tested one matches the requirements. This inevitably leads to the waste of manpower and time, so it is necessary to make a computer simulation to realize the fastness and preciseness of the movement and path of the machine. In this paper, OpenGL is used to simulate the NC machine process.
Finally, based on all these work, FEELER 800A NC auto programming software is developed in the circumstance of Visual C++ 6.0, and it runs quite well after test on the machine center, thus it can be concluded that it has quite practical usability.
引文
[1]吴明友.数控机床加工技术.东南大学出版社,2000:118-126页
[2]廖卫献.数控铣床及加工中心自动编程.国防工业出版社,2002:15-21页
[3]于华.数控机床的编程及实例.机械工业出版社,1999:79-115页
[4]尚游.OpenGL图形程序设计指南.中国水利水电出版社,2001
[5]向士明.OpenGL编程与实例.电子工业出版社,1999
[6]费广正.Visual C++6.0 OpenGL篇.中国铁道出版社,2000
[7]蔡士杰.计算机图形学.电子工业出版社,2000
[8]宋斌,陈玉亭.Visual C++6.0教程.北京希望电子出版社,2000
[9]钱能.C++程序设计教程.清华大学出版社,1999
[10]王世同,李强.Visual C++6.0编程基础.清华大学出版社,2000
[11]谢灵运 战胜Visual C++必做练习50题.北京大学出版社,2001
[12]Brain,M.(美) MFC开发人员指南.机械工业出版社,1999
[13]卢纲 Visual C++6.0程序设计自学教程.清华大学出版社,1999
[14]卢阳.AutoCAD 2000应用实例.冶金工业出版社,2000
[15]王洪军,赵金伟.AutoCAD 2000图解教程.北京希望电子出版社,2000
[16]舒明玉.绘图软件AutoCAD.国防工业出版社,1995:175-189页
[17]罗卓书.AutoCAD计算技术图教程.天津大学出版社,1996:117-132页
[18]陈兆人,李迎九.CAD/CAPP/CAM集成方法与应用.机械工艺师,2001(5):13-15页
[19]兰运生.CAD/CAM专用接口编译程序开发.机械工艺师,2000(12):10页
[20]付运中,王永章.数控实验教学仿真软件的开发.机械工艺师,2001(8):28-29页
[21]张洪鑫,王鹏飞,尤波.数控加工平台AutoCAD信息读取与数据交换.哈尔滨理工大学学报,2002(3):74-77页
[22]蔡伯阳,林金明 谢明红.基于DXF文件的NC代码生成.现代制造工
程,2002(2):20-21页
[23]孙景慧,袁守华.用VC实现车削中心数控加工仿真.机械设计与制造,2001(5):7-9页
[24]马晓晨.直接利用AutoCAD图形生成数控切割程序.CAD/CAM与制造业信息化,2002(6):55-56页
[25]李军锋,李剑,席平.数控机床加工仿真技术及应用.CAD/CAM与制造业信息化,2002(4):28-30页
[26]郭爱斌,葛研军.基于Windows的数控加工刀具轨迹仿真.CAD/CAM与制造业信息化,2002(5):23-24页
[27]罗学科,王东宇,徐兴建.数控代码的计算机图形仿真.机械设计与制造,2000(3):21-22页
[28]张淑兰.面向制造的CAD/CAPP/CAM集成系统的研究.机械设计与制造,2000(3):21-22页
[29]徐特明,孙致刚,桂贵生.基于AutoCAD平台及其开发工具的数控自动编程系统.机械设计与制造工程,2001(1):36-38页
[30]袁文辉.AutoCAD中实体曲面边界数据的提取及应用.机械研究与应用,2001(3):44-45页
[31]王学光,芮执元,杨萍.计算机仿真现状及其在制造业中的应用.机械研究与应用,2000(3):37-39页
[32]陈宁,陈刚.在AutoCAD上实现数控加工的模拟与自动编程.计算机辅助计与制造,2000(9):78-80页
[33]黄锡恺.机械原理.高等教育出版社,1988
[34]谢柏青,佘晓歌.算法与数据结构.高等教育出版社,2001
[35]严尉敏,吴传民.数据结构.清华大学出版社,2001
[36]姚远.高级C语言程序设计与技巧.机械工业出版社,1995
[37]杨克劭.矩阵分析.哈尔滨工业大学出版社,1995
[38]关志.数值计算方法.清华大学出版社,1990
[39]李庆杨.数值分析.华中工学院出版社,1982
[40]吴宗泽.机械设计实用手册.化学工业出版社,1998
[41]濮良贵.机械零件.高等教育出版社,1989
[42]童秉枢.机械CAD技术基础.清华大学出版社,1994
[43]袁太生.计算机辅助设计教程.中国电力出版社,2002
[44]S.C. Park, B.K. Choi. Tool-path planning for direction-parrallel area milling. Computer-Aided Design, 2000(1): P17~26.
[45]F. Bsharah, M. Less. Requirements and strategies for the retention of automotive product data. Computer-Aided Design, 2000(2): P145~158.
[46]C. Lartigue, F. Thiebaut. CNC tool path in terms of B-spline Curves. Computer-Aided Design, 2001(2): 307~320.
[47]M. Balasubramaniam Generating 5-axis NC roughing paths directly from a tessellated representation. Computer-Aided Design, 2000(3):261~278.
[48]Jack C.H. Chung, Teng-Shang Hwang. Framework for integrated mechanical design automation. Computer-Aided Design, 2000(5):355~366.
[49]Yoram Koren, Computer Control of Manufacturing System. McGraw-Hill Book Company, 1984.
[50]Tremblay J P, Sorenson P G . An Intoduction to Data Structure with Applications, Second Edition. McGraw-Hill, Inc., 1984
[51]William D. Engeke. How to Integrate CAD/CAM System. Marcel Dekker ,1987.
[52]JohnR. Dixon, Melvin K. Simmons. Expert Systems for Mechnical Design: Example of Symbolic Representations of Design Gemometies. Engineering With Computers, 1987
[53]A. Rai, KSarma. On local gouging in five-axis sculptured surface machining using flat-end tools. Computer-Aided Design, 2001(3).
[54]Aaron d. deutschman. Machine design theory and practice. Collier Macmillan International Editions, 1995.
[55]Arthur H. Burr. Mechanical Analysis and Design. Elsevier North Holland ,Inc., 1991.
[56]Dr. Roy Williams. Machining Hard Materials. Society of Manufacturing Engineers, 1982
[57]P. Bezier. Numerical Control Mathematics and Applications. Technological Development Manager, Renault, France, 1980.
[58]Charles H. Barron. Numerical Control Machine Tools. Mc-Graw-Hill, Inc., 1981.
[59]G.E. Thyer. Computer Numerical Control of Machine Tools. Industrial Press, Inc., 1988
[60]Jack Moorhead. Numerical Control .Volume 1 Fundermental. Computer and Automated Systems Association of SME, 1980