机床CNC系统的智能数控程序处理器外文文献翻译、中英文翻译_第1页
机床CNC系统的智能数控程序处理器外文文献翻译、中英文翻译_第2页
机床CNC系统的智能数控程序处理器外文文献翻译、中英文翻译_第3页
机床CNC系统的智能数控程序处理器外文文献翻译、中英文翻译_第4页
机床CNC系统的智能数控程序处理器外文文献翻译、中英文翻译_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

An intelligent NC program processor for CNC system of machine toolYadong Liua,_, Xingui Guoa, Wei Lia, Kazuo Yamazakia,Keizo Kashiharab, Makoto FujishimabAbstract NC program interpreting is one of the most important tasks of CNC in machine tool system. The existing CNC systems only supportvendor-specific NC program input, which restrict the applying of other similar functional NC programs with different program format.Especially for those users owning several machine tools with different CNC from the same provider, the diversity of NC programsdramatically increases their cost and time on operator training and machine tool maintenance. In order to deal with the variety of NCprogram, an intelligent NC program processor (NCPP) is proposed in this paper. 1. IntroductionIn the CNC system of modern machine tool, NCprogram interpreting is very important, which is in charge of the accurate resolving of machining intention generated from CAM system. The major function of NCPP is to decode the input into motion command and programmable logiccontroller (PLC) command, and send them to the motion control processor (MCP) and PLC of CNC separately in order to control the movement of the cutting tool and auxiliary machine logic. Most CNC systems can handleonly one specific NC program format, while the diversity of NC programs always entangles the machine tool users,especially for those owning several machine tools with different CNC but from the same provider. 2. Interface of NC program processorNCPP is one module of the CNC, which requires cooperation between different modules; therefore its quite necessary to clarify the interface before starting design. The purpose of NCPP is to translate the input NC program into machine instruction, such asmotion command, PLC command or simple parameter settings and error messages. NIST calls these outputs as Canonical Machining Functions.The canonical machining functions were devised with two objectives in mind:_ All the functionality of common 3- to 5-axis machining centers had to be covered by the functions; for any function a machining center can perform, there has to be a way to tell it to do that function._ It must be possible to interpret RS274-compatible NC program into canonical machining function calls.3. Conceptual model of proposed NCPPCompared to the traditional design, the major feature of this NCPP is the structure with separation of NCSD and processing engine.Within this NCPP, different NC program could be interpreted in terms of different NCSD, while the processing engine keeps the same. For example, suppose the inputNC program follows Fanuc specification, the engine will refer to the Fanuc NCSD to do interpretation. Next time, if a NC program following Mitsubishi specification is given, the same engine will refer to the Mitsubishi NCSD to interpret it. For the two cases, it can be seen that each time only different NCSD is chosen, while the processing engine does not change. Such a solution provides dramatic flexibility and stability for the NCPP development, only one set of software code of the processing engine needs to be maintained. Even if there is an input NC program following a NC specification which is not available in the existing NCSDs, a new NCSD can be generated and added easily without recompiling the source code of the processing engine.4. Design of proposed NCPPBased on the conceptual model of the proposed NCPP If looking inside the NCPP, the key portion is the interpreting (processing) engine mentioned before, from a compilers point of view, the engine can be divided into four steps in order to check and decode an input NC program.These four steps are:_ Lexical analysis, which checks the character-based error within a NC program._ Syntax analysis, which makes sure the logic relation within each block of NC program is correct._ Semantic analysis, which checks the inter-block logic correctness of a NC program._ Optimization and code generation, which decode block and generate the canonical machining functions.4.1. Lexical analysisThe major functionality of lexical analysis is to merge a sequence of characters from the input NC program intosequence of words, which is a high-level representation unit,Meanwhile, in this step, all blank and comments within the program will be deleted. After lexical analysis, a symbol table with the same information but more systematic compared to the original character-based program will be built. During analysis, allcharacter-based error will be checked, for example whether the unacceptable address letters has been used or not. In this paper, one dictionary has been designed in this step to store all the valid address letters.4.2. Syntax and semantic analysisSyntax analysis is to determine if a sequence of words within a block is syntactically correct, it is also called intra-block check. It includes the range checking of the data portion of a word and the parameters format checking.Semantic analysis checks the major inter-block error,which means to make sure whether the logical relationship among several blocks of NC program is correct or not, for example, the same group G/M word cannot appear more than once in a block; block/word sequence should be subject to the G/M word execution order table, spindle should be turned on before any cutting motion starts, etc.In order to design NCSD for syntax and semanticanalysis, three kinds of cases of NC blocks should be analyzed:Case 1: Extract data expression in each word of NCprogram. For example, X 1+2_34/5, Zsin30,#1 2.0 F #1 should be correctly decoded as X6.2, Z0.5, F2.0.Case 2: Check syntax relation of words within each block. For example, within block G17 G02 X10 Y20 I-10F15 S100 M03, Z-axis value should not appear since in_ Terms with quote symbol as header and ender are terminal symbol._ Interpreting an expression is to apply one or more of the syntax rules.NC language can be considered as one type of simple computer programming language; therefore its quite reasonable to use EBNF to represent the NC program syntax. Based on that, the structure of NCSD can be systematically defined.4.3.1. Syntax representation using EBNFBased on these EBNF representations, case 1 mentioned in Section 4.2 can be easily solved. The fig shows an example of how to interpret word X1+2_34/5 using these EBNF representations, as shown in this figure, two stacks (first in last outFundamental EBNF representation of NC languagemechanism) are used: value stack and operator stack. The operator stack is subject to a rule: the priority of each item is always in a decreasing order while the execution with highest priority always happens first. Following is the ordered operation list of interpreting:(1) Apply first EBNF rule defined, read the symbol and push it into the operator stack.(2) Apply EBNF rule 2,1,7,9 in turn, read value 1 and symbol +, and then push them into value stack and operator stack, respectively.(3) Continue to apply rule 1,7,9 twice, read 2/3 and */_ separately, and push them into corresponding stacks.(4) Since operator * on the top of the operator stack has higher priority than its previous one + and higher than the current one _, current value 3 is used to execute multiplication with 2 popped up from the value stack. The result is pushed back into the value stack, while current operator _ is pushed into the operator stack.(5) Continue the quite similar operation as above mentioned until the operator stack is empty and the last value 6.2 is popped up from the value stack.(6) The last value 6.2 is the final result. Therefore, X 1+2_34/5 is interpreted as X6.2.For case 2 and 3, Fig. 9 gives the EBNF representation of a general NC block while Fig. 10 shows partial syntax EBNF representation of each G/M/F/S/T word in a group manner.Let us use a NC blocks example shown before in Section4.2 to explain how these EBNF rules are being applied. For each block of the following example:N0010 G91 G40N0020 S100 M03N0030 G01 G53 X20 F15EBNF rules B.1 in Fig. 9 will be firstly applied, and then the detailed word EBNF rules in Fig. 10 will be applied. Now for the first block, assuming the default modal is G01, the rule 1, 2 and 6 of B.1 will take effective, then in rule 6 of B.1, rule B.3 is applied further and a correct check result will be returned. The similar procedure will be done for thesecond block. Then for the third block, as rule B.3 is applied, rule 4 of B.2 will be applied too, which is (G53_Expr g53+ABS_Mode+G40_Expr+g00|g01). In this rule, ABS_Mode (g90) is required when g53 isEBNF representation of G/M word. given with g01, however, the third block does not satisfy this rule because INC_Mode (g91) is effective(this is given in the first block); therefore a syntax error is found.4.3.2. Syntax dictionary implementation using tool command languageThe above-mentioned EBNF-based syntax of NC program is programmed using tool command language (TCL), one kind of script language which works in an interpretive execution manner instead of compiling way. As all the NC program syntax is represented using TCL as TCL procedures, it will be loaded to work as the syntax dictionary of NCSD in the proposed NCPP.4.4. Processing engine design4.4.1. Conceptual model of processing engine. An event generator and an embedded TCL interpreter are involved to handle each input NC block in terms of the loaded syntax dictionary of NCSD.The event generator triggers the TCL interpreter by extracting words within a NC block according to priority.For each words syntax, a corresponding TCL procedure defined in syntax dictionary will be called by the TCL interpreter. The Syntax and semantic analysis will be done during this process; canonical machining functions will be generated too. The dictionary generator in this figure is used to generate the syntax dictionary from NC program syntax EBNF representation whenever a new NC specification is given.4.4.2. Processing flowThe fig shows the complete processing flow of proposed NCPP using one NC block example:(1) Initialization of the environment, which involves initializing parameters of NCPP (such as tool information, tool offset, coordination origin etc), loading the NCSD and starting the embedded TCL interpreter(2) Suppose one block N10 G94 G01 G90 X2 Y4 F5 M03 is ready to process.(3) NCPP processing engine search for the WORD with highest priority within this block in terms of the priority rules table. In this case first is word G01 and second is M03. As shown in the figure, priority rulestable gives the definition of priority of words as they explicitly appear in the same block. Basically, group 1 of G word has the highest priority, followed by group 0 and other groups. For example, if G01 (group 1) andG92 (group 0) both given in a block, G01 should be taken care first. In the same sense, G words precede F, M and T words. In addition, modal information has the same effect, which means that the G modal word from higher priority group takes effect, as there is no G word explicitly appearing in the block.5. Prototype system implementationSo far, a prototype system of proposed NCPP has been implemented using C and TCL. This prototype was developed based on an existing RS274NGC interpreter written by Thomas Kramer from NIST in 2000. The current version realized almost all the functionality proposed in this paper, while the dictionary generator of NCSD is still under developing. By using the standard RS274 and Fanuc specification NC program as input, theresult of the developed prototype system shows that a successful design was obtained. After being processed by A NC program example with syntax errors proposed NCPP, two syntax errors are both detected out with error messages, as those shown in the fig in italic and bold fonts. The corresponding canonical machining functions of the given NC program are generated too.6. ConclusionAn intelligent NCPP is proposed for the CNC system of machine tool. It has separated NCSD and processing engine. NCSD varies in terms of different NC program format, while the engine is fixed. Based on this newstructure, it is easy to adjust the CNC system to adapt to various NC program format by only updating the corresponding NCSD in NCPP. In this paper, the NCSD has been designed by using EBNF and implemented as TCL procedures. AcknowledgementsThe authors wish to express their sincere appreciation for the generous support from Mori Seiki Corporation which makes this research possible. We also owe our thanks to the work of Dr. Thomas Kramer from NIST, whose work laid a great foundation for this research project.Further reading1 Vickors GW, Ly MH, Oetter RG. Numerically controlled machinetools. Chichester, UK: Ellis Horwood; 1990.2 Peter S. CNC programming handbook. Industrial Press; 2000.3 Karen AL. Fundamentals of compilersan introduction to computerlanguage translation. Englewood Cliffs, NJ: Prentice-Hall; 1992.4 Thomas RK. The NIST RS274/NGC Interpreterversion 3, ISD ofNIST; 2000.5 Frederick MP. Canonical machining functions, ISD of NIST; 19976 Ronald M. Writing compilers and interpretersan applied approach;1991.7 ISO/IEC 14977:1996(E) The standard of extended BNF,1997.8 John KO. TCL and the TK Toolkit. Reading, MA: Addison-Wesley;1994.机床CNC系统的智能数控程序处理器Yadong Liua,_, Xingui Guoa 、 Wei Lia , Kazuo Yamazakia,Keizo Kashiharab,Makoto Fujishimab摘要 NC程序编译是机床CNC 的最重要工作之一。 现有的 CNC 系统只有支持厂商-特性的NC程序编译, 限制其他相似的功能NC的应用以不同的NC程序编译。尤其为那些使用者用来自相同的提供者的不同的 CNC 拥有一些机床, 收据控制的不同规划在操作员训练和机床维护上增加他们的费用和时间。为了处理不同的NC程序,在这遍论文中提到的了NC智能程序处理器(NCPP)。1. 介绍在现代工作母机的 CNC 系统,解释的 NCprogram 非常重要, 哪一个是从凸轮系统被产生的掌管机制意图的正确的解决。NCPP 的主要功能将解码输入进入运动指令和可设计的逻辑控制器 (PLC) 命令, 而且分开地将他们送到运动控制处理器 (MCP) 和 CNC 的 PLC 为了要控制刀具的运动,而且帮助者以机器制造逻辑。 大多数的 CNC 系统能处理只有的特定NC程序编译, 当NC程序编译的不同总是使工作母机使用者纠缠的时候,尤其为正在从相同的提供者用不同的 CNC 除了拥有一些工作母机的人。 2. 数据控制处理器的接口NCPP 是 CNC 的一个组件,需要在不同的组件之间的合作; 因此它是相当必需澄清接口在出发之前设计。 NCPP 的目的将将输入收据控制计画翻译成机器指导, 像是运动指令, PLC 指令或简单的叁数设定和错误信息。 NIST 呼叫这些输出当做标准的机制动作。标准的机制功能与思想的二个目的一起设计:_ 所有的通常 3个 功能性- 对 5 轴的机制中心必须被功能复盖; 对于任何的功能机制中心能运行, 在那里必须是一个方法告诉它做那些功能。_ 解释 RS274-可并立的收据控制计画进入标准的机制功能呼叫一定是可能的。3. 被提到的 NCPP 的概念上模型与传统的设计相较,这一 NCPP 的主要特征用 NCSD 的分离是结构而且处理引擎。在这一 NCPP 里面,不同的收据控制计画可能根据不同的 NCSD 被解释而处理引擎保存相同。 举例来说,推想输入收据控制计画跟随 Fanuc 规格,引擎将会提及 Fanuc NCSD 做解释。下次,如果一个收据控制计画在三菱规格之后有,相同的引擎将会提及三菱 NCSD 解释它。 对于这二个情形,它能被见到每次唯一的不同 NCSD 被选择而处理引擎不改变。 如此的解决提供戏剧性的柔性和安定给 NCPP 发展,处理要维护的引擎需要的只有一组软件密码。 即使有输入收据控制计画跟随在现有的 NCSDs 中不是可得的一件收据控制规格,新的 NCSD 能被产生而且容易地没有再编译处理引擎的原始码增加。4. 被提到的 NCPP 的设计如果看进 NCPP ,基于被提到的 NCPP 的概念上模型,从一个编辑者的观点,主要部分是那解释 (处理) 以前被提到的引擎,引擎能被区分为四个步骤为了要检查而且解码一个被输入的收据控制计画。这些四个步骤是:_ 字典的分析,在一个收据控制计画里面检查以个性為主的错误。_ 语法分析, 确定收据控制计画的每个范围里面的逻辑关系是正确的。_ 与语意有关的分析,检查收据控制计画的在区段之间逻辑正确性。_ 最佳化和密码世代,解码区段,而且产生标准的机制功能。4.1. 字典的分析字典分析的主要功能性将合并个性的序列从那输入收据控制计画字的 intosequence,是一个高阶层的表现单位,同时,在这一个步骤,全部留空白,而且计画里面的意见将会划除。 在字典的分析之后, 一张符号桌子用相同的数据除了更有系统的与最初的以个性為主的计画相较将会被建造。 在分析期间, 所有的以个性為主的错误将会被检查,举例来说,是否无法接受的住址信已经被用。 在这纸中,一本字典已经被在这个的步骤设计储存所有的有效住址信。4.2. 语法和与语意有关的分析如果一个区段里面的字的序列依照文章构成法正确,语法分析将决定,它也被呼叫内部-区段检查。 它包括范围字的数据部分和叁数格式检查的检查。与语意有关的分析检查主要的在区段之间的错误, 意谓确定是否在一些范围的收据控制计画之中的合乎逻辑的关系是正确的, 举例来说,相同的小组 G/M 字不能够在一个区段中出现超过一次;区段/字序列应该受制于 G/M 字实行次序桌子,在任何的锐利运动开始之前,纱锭应该被打开, 等等为了要为语法和 semanticanalysis 设计 NCSD ,收据控制区段的情形的三个类型应该被分析:情形 1: 在收据控制的每个字中吸取数据表达计画。 举例来说, X1+2_3-4/5, Zsin30,#12.0 F#1 应该确地当做 X6.2 、 Z0.5, F2.0 被解码.情形 2: 在每个区段里面检查语法字的关系。 举例来说, 在区段里面 G17 G02 X10 Y20 我 -10F15 S100 M03, Z轴价值自从不后应该出现在_ 期限用引证符号当首领之时而且结束是终点的符号。_ 解释表达将应用一条或更多条语法规则。收据控制语言能当做简单计算机规画语言的一个类型被考虑; 因此使用 EBNF 表现收据控制计画语法相当合理。 基于那, NCSD 的结构可能是有系统地定义。4.3.1. 语法表现使用 EBNF基于这些 EBNF 表现, 在第 4.2 节被提到的情形 1 可能是容易地解决。 无花果树表示一个该如何解释字 X1+2_3-4/5 的例子 使用这些 EBNF 表现, 如这一个身材所示, 二堆叠 (第一在最后在外收据控制语言的基本 EBNF 表现机制) 被用: 价值堆叠和操作员堆叠。 操作员堆叠受制于一条规则: 当实行用最高的优先总是首先发生的时候,每个项目的优先总是在一个减退次序中。 下列各项是解释的被命令的操作目录:(1) 首先应用定义的 EBNF 规则,读符号 而且推动它进入操作员堆叠。(2) 应用 EBNF 规则 2,1,7,9 依次,读价值 1 和符号 +, 然后推动他们进入价值堆叠和操作员堆叠, 分别地。(3) 继续应用规则 1,7,9 两次,读 2/3 和 */_ 分开地, 而且推动他们进入对应的堆叠。(4)自从操作员在操作员的顶端上的 * 以后堆叠超过它的早先一 + 有比较高的优先和比现在的 _ 高, 现在的价值 3 用来用从价值堆叠被出现的 2 运行乘法。 结果进入价值堆叠之内被推向后面, 当现在的操作员 _的时候是推入了操作员堆叠。(5) 继续相当相似的操作如上述的直到堆叠是空的操作员和最后价值提到 6.2 从价值堆叠被出现。(6) 最后价值 6.2 是最后的结果。 因此, X1+2_3-4/5 当做 X6.2 被解释.因为情形 2 和 3 ,图 9 给予一般收据控制区段的 EBNF 表现当以小组样子的图 10 表演部份语法 EBNF 每 G/M/F/S/T 字的表现的时候。让了我们使用一个收据控制阻塞以前被在区段显示的例子4.2 解释如何这些 EBNF 规则是在应用。 对于每个范围的下列例子:N0010 G91 G40N0020 S100 M03N0030 G01 G53 X20 F15EBNF 规定 B 。1 在图 9 将会第一被应用, 然后详细的字 EBNF 在图 10 规定将会被应用。 现在为第一个区段, 假定假设值型的是 G01,B 的规则 1, 2 和 6。1 将会拿有效的, 然后在 B.1 的规则 6,规则 B 中。3 更进一步被应用而且一个正确的检查结果将会被退还。 相似的程序将会是完蛋了那第二个区段。 然后为第三个区段, 当做规则 B。3 被应用, 规则 B 中的 4。2 意志也被应用, 哪一个是.(G53_ Exprg 53+ABS_Mode+ G40_ Expr+g 00|g 01) 在这一条规则中, ABS_Mode(g 90) 被需要 g 53 是何时EBNF G/M 字的表现。 然而,以 g 01 给,第三个区段不使这一条规则满意因为 INC_Mode(g 91) 是有效的(这被屈服第一个区段); 因此一个语法错误被发现。4.3.2. 语法字典落实使用工具指令语言收据控制计画的上述以 EBNF 为基础语法使用工具指令语言 (TCL), 以解释的实行样子工作而非编译方法的手写体语言的一个类型被规划。 同样地所有的收据控制计画语法被表现使用 TCL 当做 TCL 程序, 它将会被装载在被提到的的 NCPP 中工作当做 NCSD 的语法字典。4.4. 处理引擎设计4.4.1. 处理引擎的概念上模型。 一个事件产生器和植入的 TCL 翻译员被牵涉根据 NCSD 的被装载的语法字典

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论