摘要
利用正则表达式建立了数控程序的词法、语法规则,结合Boost Regex类库,提出了一种NC代码正确性检查的方法。基于Visual C++6.0为平台结合数控程序的仿真方法和OpenGL技术,开发了NC代码检错与仿真系统。该系统能够快速、准确地实现数控程序的错误检查和实现加工轨迹的三维仿真。系统采用模块化设计思想,具有良好的可扩展和二次开发性,为通用数控程序编译器的开发奠定了基础。
A method of NC code error detection was proposed in association with Boost Regex by building lexical rules and grammatical rules of Regular Expression.The NC code error detection and simulation system was developed,based on the simulation method of NC code,OpenGL and Visual C++6.0.The system could detect errors of NC code in a fast and accurate manner and implement three-dimensional simulation of the machining trace.In addition,using the designing thought of modularization,the system can be extended and further developed which lays a foundation for general NC code compiler.
出处
《青岛大学学报(自然科学版)》
CAS
2015年第4期72-76,共5页
Journal of Qingdao University(Natural Science Edition)
关键词
数控程序
词法分析
语法分析
仿真
NC code
lexical analysis
syntax analysis
simulation