数控程序解释器的研究与实现
Research and Implementation of G-code Interpreter
随着开放式数控系统的发展,作为数控系统的组成部分之一的数控代码解释器关系到加工效率、加工质量,是解析用户代码的必要途径,具有重要的作用。数控程序编译水平及效率是影响数控加工效率的一项重要因素。针对高级语言开发数控代码编译系统的局限性,本文把编译技术引入到数控代码编译中,本文在论述数控程序解释器功能的基础上,详细说明数控程序解释的框架和实现思路,介绍一种数控代码解释的方法,这种方法以微软推出的GRETA正则表达式类库为匹配和分析工具,构造了解释器的词法和语法分析模块。采用C语言开发翻译程序,实现了NC代码的解释过程。该解释器程序具有良好的可靠性、通用性。
With the development of open-systems numerical control, the NC code interpreter as an integral part of NC system is related to the processing efficiency and the processing quality, which is a necessary means to interpreter the user codes. The level and efficiency of NC code compiling is one of the important factors to affect the efficiency of NC machining. Aim to the limitation of developing NC code compiling with programming language, the compiling technology is introduced into NC code compiling. Based on the discussion of the function, it introduces a method for the development of NC code interpreter which is suitable for GRETA formula expressions library developed by Microsoft,designs the model to analyze the words and sentence structure of the interpreter. The software is developed with C language, then NC code interpretation is realized. This interpreter procedure has high reliability and versatility.
王宇洋、黎水平
自动化技术、自动化技术设备计算技术、计算机技术
数控代码解释器GRETA正则表达式
NC codeInterpreterGRETARegular Expressions
王宇洋,黎水平.数控程序解释器的研究与实现[EB/OL].(2008-11-05)[2025-08-18].http://www.paper.edu.cn/releasepaper/content/200811-105.点此复制
评论