Control Engineering of China ›› 2020, Vol. 27 ›› Issue (1): 121-126.

Previous Articles     Next Articles

Research of Electronic Cam Function Block Algorithm Based on PLCopen

  

  • Online:2020-01-20 Published:2023-11-29

基于PLCopen的电子凸轮功能块算法的研究

  

Abstract:  The core of CNC machine tools and industrial robots is motion control system, in order to improve the performance of motion control system, based on the MC motion control specification defined by PLCopen, combined with SoftPLC and motion control program, design and implement the periodic and non-periodic position coordination of electronic cam, and spline interpolation algorithm is used to fit aperiodic curves in non-periodic electronic cam. First, C# is adopted as the programming language to design the framework of function block. Then, C/C++ is adopted as the programming language to carry out motion planning for master axis and combine the discrete points into a curve in the non-periodic condition, the whole control procedure is running in the ProConOS eClR kernel. Finally, the function block is called in the upper platform Multiprog to ensure master axis and slave axis to move cooperatively. The experimental results show that, this kind of cam function block can work not only in periodic condition according to scheduled trajectory but also in non-periodic condition according to key point position, its velocity will not change suddenly, and it has wider application scope.

Key words: Motion control, PLCopen, electronic cam, SoftPLC, spline interpolation

摘要: 数控机床及工业机器人的核心是其运动控制系统,为了提高运动控制系统的性能,依据PLCopen定义的MC运动控制规范,结合SoftPLC和运动控制编程,设计并实现了MC运动规范Part2部分中周期性和非周期性位置协同的电子凸轮,并在非周期性电子凸轮中采用三次样条插值算法拟合非周期性曲线。首先,采用C#语言设计功能块的框架;然后,采用C/C++为编程语言给主轴进行运动规划并且在非周期条件下将离散点拟合成一条曲线,整个控制程序在ProConOS eCLR内核中运行;最后在上位平台Multiprog中调用功能块让主从轴协同运动。实验结果表明,这种电子凸轮功能块在工业控制中既可以按照预定轨迹周期性运动,也能仅仅依据关键点位置进行非周期性运动,并且速度平滑无突变,应用前景广泛。

关键词: 运动控制, PLCopen, 电子凸轮, SoftPLC, 样条插值