摘要
针对PLCopen运动控制规范中的参数传递问题,对PLCopen运动控制规范中模块参数的类型、独立性和不连续性以及IEC61131-3标准编程规范等方面进行了研究,提出了可用于在符合IEC61131-3标准的开发平台上实现PLCopen运动控制规范的IL指令传参法和参数模板构造法;第一种方法采用IL指令及临时变量进行了参数传递,使用静态函数库实现了模块的功能,第二种方法采用参数模板在编译过程中动态生成参数定义及反馈,结合动态函数库实现了模块的功能。这两种方法不同于一般的基于C语言或其他高级语言的值传递或引用传递方法,可以兼容IEC61131-3标准的编程规范并减少对PLC资源的使用。对该两种方法进行了实验分析和对比。研究结果表明,该两种方法均可以实现PLCopen运动控制规范,并各有优势,可以满足多种应用需求。
Aiming at the problems of parameter passing in PLCopen motion control specification's implementation, the types, independence and discontinuity of parameters in PLCopen motion control specification and the IEC61131-3 standard programming norms were studied. Two methods called IL passing method and parameter template structure method were proposed. IL instructions were used by the first method to transfer parameters, and static function library was used to implement blocks. The parameter template was used by the second method to generate the definition and feedback of parameters dynamically, and dynamical function library was used to implement blocks. Different from traditional methods of passing value or reference based on C language or other senior language, the IEC61131-3 standard programming norms were supported and PLC available memory was reduced. Comparison and analysis were done and the results indicate that two methods can achieve PLCopen motion control specification, and each has advantages satisfy varied requirements.
出处
《机电工程》
CAS
2014年第7期945-950,共6页
Journal of Mechanical & Electrical Engineering
基金
国家自然科学基金资助项目(61272189)
国家高技术研究发展计划"863计划"资助项目(2013AA040301)
浙江省重点科技创新团队资助项目(2010R50008)
关键词
运动控制模块
构件
IL指令
参数模板
motion control block
component
IL instructions
parameters template