蓝天数控系统字符命令编程的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
字符命令编程是数控解释器的一个重要扩展,是利用助记码来实现文件管理、图形管理、进程间通信等方面管理的一种编程方式。引入字符命令编程的目的是:简化交互的复杂度,增强人机交互功能,扩展数控系统的编程机制。
     本文设计的字符命令编程具有可扩展性,通过自定义语法元素分析序列方式,使得添加字符命令的解释工作可以在无需或很少修改词法和语法分析源代码的情况下,通过配置文件实现。本文主要包括以下内容:
     首先,设计了字符命令编程的语法规则,为了使用户易于使用,采用类似shell命令的编程规则。为了实现字符命令的可配置性,设计了配置文件和语法解析序列。
     其次,设计并实现了字符命令编程的整体架构,按照其运行顺序分为五个大的模块:配置文件模块,解析器模块、语法分析模块、命令实现模块和对外接口模块。解决了实现这些模块时遇到的参数存储、低耦合以及语法解析可配置等问题。各模块的关键技术通过程序算法、流程图和部分源代码的方式予以展现。
     最后,对字符命令编程进行了正确性和容错性的验证,并给出了配置、使用字符命令编程的方法和步骤。
Character command programing is an important part of the CNC interpreter, whichis a programming mode using the mnemonic code to realize the file management,graphics management and interprocess communication. The purpose of the introductionof the character command programming is to simplify the complexity of the interaction,to enhance human-computer interaction, and to expanded CNC programmingmechanism.
     This characters command programing in this paper is able to implement scalabilitythrough a configuration file, by the way of costuming the sequence of syntax elements,realizing the interpretation of the character command with little or no modify the lexicaland syntax analysis of source code. The following is included in this paper:
     Firstly, This paper designed the programming rules of the characters commandprograming. In order to make users use it esaily, programming rules are designedsimilarly to shell commands. In order to make the programming mechanismconfigurablely,the paper designed the configuration files and parsing sequence.
     Secondly, the overall structure of the characters in the command programing wasdesigned and carried out in this paper, in accordance with the running order of theinterpreter it is divided into five major modules: the parser module, the syntax analysismodule, command module and the external interface module. This paper proposed andsolved the problems encountered in implementing these modules, parameter storage,low coupling, and the parser can be configured. The key technologies of each modulethrough the program algorithms, flow charts, and some source code to be displayed.
     Finally, the paper verifies the correctness and fault tolerance of the charactercommand programing, and gives the methods and steps to use the character of thecommand programing.
引文
[1]中国工业报.我国机械产品数控升级进入最佳机遇期[M].2011-12-22.
    [2]赵娇.数控特殊编程方法研究及编译功能实现[D];上海交通大学,2008.
    [3]王琦魁,李伟,陈友东.新型的数控译码模块结构的研究与实现[J].北京航空航天大学学报,2009,35(1):
    [4]吴胜强.我国数控技术与装备的现状与发展[J].商场现代化,2008,4):323-.
    [5]周凯. PC数控原理,系统及应用[M].机械工业出版社,2006.
    [6] NING Q, WANG T, LIU L, et al. Research on CNC Machine Tools IntegrationCondition Monitoring System and Its Information Exchange Technology [J].Future Computing, Communication, Control and Management,2012,441-50.
    [7] RAUCH M, LAGUIONIE R, HASCOET J Y, et al. An advanced STEP-NCcontroller for intelligent machining processes [J]. Robotics andComputer-Integrated Manufacturing,2011,
    [8] XU X, HE Q. Striving for a total integration of CAD, CAPP, CAM and CNC [J].Robotics and Computer-Integrated Manufacturing,2004,20(2):101-9.
    [9] XU X, NEWMAN S. Making CNC machine tools more open, interoperable andintelligent--a review of the technologies [J]. Computers in Industry,2006,57(2):141-52.
    [10] ZHANG Y, LIU Y, BAI X. The research on the intelligent interpreter for ISO14649programs [J]. Advances in Computation and Intelligence,2011,523-34.
    [11]魏志强,施平,冯开林.一种数控自动编程及数控代码仿真系统的设计[J].哈尔滨工业大学学报,1996,28(3):94-9.
    [12] YUAN L, YONG-ZHANG W, HONG-YA F, et al. Open Architecture CNCSoftware Package and Key Technology, F,2009[C]. IEEE.
    [13] HANWU H, YUEMING W. Web-based virtual operating of CNC milling machinetools [J]. Computers in Industry,2009,60(9):686-97.
    [14] FICKO M, BALIC J, PAHOLE I, et al. Expectations of automatic programming ofCNC machine tools [J]. Advances in Production Engineering&Management,2010,193.
    [15] KHAN W A, RAOUF A, CHENG K. Automation and Control in Manufacturing[J]. Virtual Manufacturing,2011,91-6.
    [16]刘明烈,于东.高档数控——蓝天一号和蓝天系列CNC系统[J].中国机械工程,1998,9(5):52-4.
    [17]孔芹芹.蓝天数控仿真系统的设计与实现[D];中国科学院研究生院(沈阳计算技术研究所),2007.
    [18]吴文江,张杰,彭正森.基于RT—Linux的数控系统进程间通信方式的研究[J].小型微型计算机系统,2007,28(5):952-5.
    [19]甘星明.基于RS274/NGC的数控系统刀具补偿的设计与实现[D];沈阳:中国科学院研究生院,2006.
    [20]安晓荣.蓝天数控会话式编程系统的设计与实现[D];中国科学院研究生院(沈阳计算技术研究所),2010.
    [21]高慧.蓝天数控系统宏编程及图形辅助编程模块的设计与实现[D];中国科学院研究生院(沈阳计算技术研究所),2007.
    [22]魏智强. C++静态安全规则检查工具实现[D];北京邮电大学,2009.
    [23] AHO A V,赵建华,郑滔, et al.编译原理[M].机械工业出版社,2009.
    [24]王军,宋殿忠,孙军, et al.基于功能块技术的STEP-NC模块化数控铣削系统的研究[J].沈阳建筑大学学报:自然科学版,2009,25(002):355-61.
    [25]熊清平,张正勇,李作清. CNC系统巨量NC程序解释实现的方法[J].中国机械工程,1999,10(6):673-5.
    [26]吉华,李彦,肖世广. Linux下G代码解释器的设计与实现[J].计算机应用研究,2006,12
    [27]杜利俊. XML在多Agent系统(MAS)中的应用研究[D];华中科技大学,2006.
    [28]许小明,王硕桂.基于PC的开放式数控系统代码编译器的开发[J].机床与液压,2009,011:41-4.
    [29]严蔚敏,吴伟民.数据结构: C语言版[M].清华大学出版社,1997.
    [30] CHRISTOPHER W.FRASER, R.HANSON D.可变目标C编译器—设计与实现
    [M].电子工业出版社.2005.1.1:16-39.