• 论文 •    

通用数控程序解析方法研究

徐建国,张友良,汪惠芬,刘佳   

  1. 1.南京航空航天大学 能源与动力学院,江苏南京210016;2.南京理工大学 机械工程学院,江苏南京210094;3.杭州华三通技术有限公司,浙江杭州310053
  • 出版日期:2008-10-15 发布日期:2008-10-25

General numerical control program interpreting method

XU Jian-guo, ZHANG You-liang, WANG Hui-fen, LIU Jia   

  1. 1.School of Energy & Power Engineering, Nanjing University of Aeronautics & Astronautics, Nanjing 210016, China;2.School of Mechanical Engineering, Nanjing University of Science & Technology, Nanjing 210094, China;3.H3C Technologies Co., Ltd., Hangzhou 310053, ChinaAiming at the problem of Numerical Control (NC program interpreting in virtual machining sytem, the key techniques of general NC program interpreting was proposed. Based on the analysis of program patterns of different NC systems, a r
  • Online:2008-10-15 Published:2008-10-25

摘要: 针对虚拟加工系统的数控程序解析问题,提出一种通用数控程序解析方法。通过分析不同数控系统的数控程序格式,设计了规则数据库。利用正则表达式进行语法分析,提出了建立语法规则方法和语法分析算法,以及基于调用堆栈的子程序处理算法。设计了数控系统定制界面,以便将现有的解析器扩展到新的数控系统。开发出一个通用数控程序解析器,并验证了所提方法的有效性,为虚拟加工系统的实现提供了技术支持。

关键词: 数控, 规则数据库, 正则表达式, 词法分析, 语法分析, 代码解析, 规则定制

Abstract: Aiming at the problem of Numerical Control (NC) program interpreting in virtual machining sytem, the key techniques of general NC program interpreting was proposed. Based on the analysis of program patterns of different NC systems, a rule database was designed. The syntax analysis was performed based on regular expressions. The establishment methods for syntax rules, the syntax analysis algorithm and stack-calling-based subprograms processing were proposed as well. Then customization interfaces were put forward to extend an existing interpreter to other new NC systems. A general NC program interpreter was developed based on these techniques, which verified the validity of this proposed approach and provided technical support for realization of virtual machining system.

Key words: numerical control, rule database, regular expression, accidence analysis, syntax analysis, program interpreting, rule customization

中图分类号: