节点文献
蓝天数控系统字符命令编程的设计与实现
The Design and Implementation of Scalable Character Command Programming Based on LT CNC
【作者】 李加洋;
【导师】 吴文江;
【作者基本信息】 中国科学院研究生院(沈阳计算技术研究所) , 计算机科学与技术, 2012, 硕士
【摘要】 字符命令编程是数控解释器的一个重要扩展,是利用助记码来实现文件管理、图形管理、进程间通信等方面管理的一种编程方式。引入字符命令编程的目的是:简化交互的复杂度,增强人机交互功能,扩展数控系统的编程机制。本文设计的字符命令编程具有可扩展性,通过自定义语法元素分析序列方式,使得添加字符命令的解释工作可以在无需或很少修改词法和语法分析源代码的情况下,通过配置文件实现。本文主要包括以下内容:首先,设计了字符命令编程的语法规则,为了使用户易于使用,采用类似shell命令的编程规则。为了实现字符命令的可配置性,设计了配置文件和语法解析序列。其次,设计并实现了字符命令编程的整体架构,按照其运行顺序分为五个大的模块:配置文件模块,解析器模块、语法分析模块、命令实现模块和对外接口模块。解决了实现这些模块时遇到的参数存储、低耦合以及语法解析可配置等问题。各模块的关键技术通过程序算法、流程图和部分源代码的方式予以展现。最后,对字符命令编程进行了正确性和容错性的验证,并给出了配置、使用字符命令编程的方法和步骤。
【Abstract】 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.
【Key words】 Lantian CNC; Interpreter; Character command programming; Configurability; Syntax element;
- 【网络出版投稿人】 中国科学院研究生院(沈阳计算技术研究所) 【网络出版年期】2012年 10期
- 【分类号】TG659
- 【下载频次】39
- 攻读期成果