菜单
  
    摘要数控加工中,保证NC 程序的正确性和刀具轨迹的准确性非常重要。数控程序不能直接运行在数控系统上,需要一个中间软件将程序代码转换成系统能识别的代码格式,而且数控源代码无法避免地会出现一些错误,需要对其进行词法和语法的检测。对于一些小的数控程序,人工检错尚能应付,但对于上千行上万行的数控程序,人工检查费时费力而且效率很低。本文基于 PC+运动控制卡开放式数控系统,针对上述问题,设计出一个通用的数控代码编译软件,具有词法、语法检错、代码编译和显示刀具轨迹功能。 首先,本文分析了课题的意义,对国内外研究现状和存在问题进行介绍和分析。针对该领域存在的问题,本论文提出基于正则表达式的、具有面向对象思想的 NC 编译器解决方案。 接着从数控代码的结构入手,研究正则表达式的判定内容。并通过国家标准,分析了数控程序常见的词法和语法错误。程序的设计逻辑分为词法分析、语法分析和编译绘图三个部分。 软件用.NET4.5作为软件框架,C++/CLI作为开发语言,Visual Studio 2013 作为开发平台。本文将简要介绍NC 代码编译器的开发内容并重点介绍三个功能模块的实现过程。本次课题设计的NC代码编译器,可以迅速精确地找出NC程序的所有词法语法错误,并提示用户进行改正。对于正确的 NC 代码,会快速地生成其加工信息,用户将得到关于刀具轨迹和机床状态的全部信息,并以动画方式呈现。 25137
    毕业论文关键词:NC 编译器,正则表达式,代码检错,路径仿真
    Title  The Design of NC Code Complier Based on Regular Expression
    Abstract
    In the process of NC machining, it is very important to ensure the validity of NC program and
    the accuracy of tool path. Meanwhile, the NC system cannot carry out the NC program directly,
    which means a NC complier is needed to translate the NC code into the format identified by
    computer. In addition, the error in NC code is inevitable, which means a lexical check and a
    syntactic check is necessary. It is possible to check the short programs manually, but for the large
    programs, Converting manually takes a very long time. This article is based on open NC system
    built by PC & Motion controller. To solve the problems above, I design a general NC complier
    whose function is powerful, including lexical, syntactic and semantic analysis.
    First, this essay investigates the development of the NC code complier, introducing and
    analyzing its actuality and existing problems at home and abroad. Aimed at the problems in this
    field, A solution based on regular expression and object-oriented thought is proposed.
    Then I look into the structure of NC code, and decide what the regular expression contains.
    Normal error in NC code is concluded by referring to the national standard. The NC complier is
    pided into three parts: lexical analysis, syntactic analysis and semantic analysis/drawing.
    This program is based on .NET Framework 4.5, programmed by C++/CLI, whose IDE is Visual
    Studio 2013. This essay briefly introduces the code context and emphasizes on  the
    implementation process of three functional modules.
    The NC code complier  designed  in this project is able to find all lexical and syntactic error
    accurately and remind users to correct them. If the code is correct, the complier will generate the
    machining information rapidly and  show the users  all information about  the tool path and
    machine condition in picture and animation.
    Keywords: NC complier, regular expression, code check, path simulation
    目录
    1  绪论  .. 1
    1.1  概述  . 1
    1.2  本文研究意义   1
    1.3  数控代码编译技术的研究方法  .. 2
  1. 上一篇:基于表面弹性的绵蚕识别技术研究
  2. 下一篇:基于Ublox GPS模块差分定位技术研究
  1. 基于oversim的P2P通信仿真系统设计

  2. 基于力控组态软件的PLC系...

  3. 基于SIMATICS7-200的小型锅炉...

  4. 基于Arduino的自动浇花系统设计+电路图+程序

  5. DC-DC基于超级电容的电梯弱电供电系统设计

  6. 基于图像识别的电子锁设计+PCB电路图+程序

  7. 单片机的信号发生器的设计任务书

  8. 浅析中国古代宗法制度

  9. C++最短路径算法研究和程序设计

  10. 巴金《激流三部曲》高觉新的悲剧命运

  11. 江苏省某高中学生体质现状的调查研究

  12. NFC协议物理层的软件实现+文献综述

  13. 上市公司股权结构对经营绩效的影响研究

  14. 现代简约美式风格在室内家装中的运用

  15. 中国传统元素在游戏角色...

  16. 高警觉工作人群的元情绪...

  17. g-C3N4光催化剂的制备和光催化性能研究

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回