基于正则表达式的串并联机床运动控制G代码解释器研究  被引量:3

The research on G-code analysis algorithm of series-parallel mechanism motion control based on regular expression

在线阅读下载全文

作  者:赵俊伟[1] 李汉超[1] 代军[1] 陈国强[1] 黄俊杰[1] 

机构地区:[1]河南理工大学机械与动力工程学院

出  处:《河南理工大学学报(自然科学版)》2017年第3期86-91,共6页Journal of Henan Polytechnic University(Natural Science)

基  金:河南省科技厅科技攻关项目(132102210430);河南省高等学校重点科研项目(17A460015)

摘  要:针对不同运动控制平台的运动控制指令复杂多样,在实际数控应用中难以进行统一有效操作的问题,提出了一种在VC++开发环境下基于正则表达式的G代码解析算法,根据现有的串并联机床的控制硬件与软件,针对其使用的运动控制卡进行设计开发,建立与数控G代码之间检查、解释、转换的解析机制。实现对所输入需执行G代码的编译,最终转化为控制卡能够识别的运动指令,并通过传输G代码中的运动参数,完成对机构的控制。通过在3-PRS-XY串并联机床上的电机控制试验,对电机运动所反馈的脉冲量进行记录与图表绘制,验证该G代码解释器算法的正确性与有效性,利用逐字符分析提高G代码检查的正确率,通过功能关键字搜索提高了代码转化效率,对串并联机床的数控系统开发具有借鉴意义。Aiming at problems that it^s hard to control the movement in numerical control application uniformly and effectively result from movement control instructions are various in different movement control platforms, one algorithm of G-code analysis based on regular expression in YC++ is proposed. According to the control hardware and software of existing mechanism, cooperated with the motion control card, the analytical mecha-nism with ability of examination, translation and transform between motion control card and NC G-code is de-signed. The compile of G-code which is input and executed is realized and the G-code is transformed into the instruction can be recognized by motion control card. Meanwhile the motion parameters are transformed to con-trol the mechanism for controlling machine. Through the experiment on the motor of 3-PRS-XY series-parallel mechanism, and records and diagrams of feedback pulses are used to verify the accuracy and effectiveness of the algorithm. The accuracy of G-code inspection is improved by analysis string by string. The efficiency ofcodes translate is improved by keywords searching. The research and development of G-code interpretation is meaningful to development of numerical control system of series-parallel mechanism.

关 键 词:正则表达式 解析算法 运动控制卡 G代码 

分 类 号:TP24[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象