作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 软件技术与数据库 • 上一篇    下一篇

机电系统中实时控制软件状态图模型扩展及实现

马殷元,王虎军,张伟   

  1. (兰州交通大学机电技术研究所,兰州 730070)
  • 收稿日期:2015-01-04 出版日期:2016-03-15 发布日期:2016-03-15
  • 作者简介:马殷元(1973-),男,副教授、博士研究生,主研方向为机电控制自动化、软件工程;王虎军,硕士研究生;张伟,硕士。
  • 基金资助:

    甘肃省自然科学基金资助项目“复杂物流装备系统的PLC实时控制软件设计模式及软件架构研究”(1508RJZA069)。

Extension and Implementation of Real-time Control Software Statecharts Model in Mechatronic System

MA Yinyuan,WANG Hujun,ZHANG Wei   

  1. (Institute of Mechatronic Technology,Lanzhou Jiaotong University,Lanzhou 730070,China)
  • Received:2015-01-04 Online:2016-03-15 Published:2016-03-15

摘要:

单一状态图模型不能完整地表达机电系统实时控制软件中无状态特性的控制任务。为此,结合实时多任务控制的要求和特点,引入异步并发控制任务、周期控制任务和全局实时控制任务来扩展控制软件的状态图模型,从而更清晰地描述机电控制系统的多任务行为。系统实现时采用功能或功能块封装控制任务,利用功能或功能块的输入使能执行调度任务。应用结果表明,该建模扩展和实现方法降低了任务控制模块间的耦合度与控制软件的复杂性,通过任务调度提高机电控制系统的实时性,并且案例控制软件的扫描周期由原有的2 ms~3 ms缩短至1 ms~2 ms。

关键词: 机电控制, 控制软件, 建模方法, 有限状态机, 状态图

Abstract:

The control tasks without sequential properties in the control software of mechatronic system can not be clearly presented by monogamous statecharts model.According to the characteristics of tasks in real-time multi-task control system,tasks without sequential properties are introduced in the model and the statecharts model of the control software is expended.The expended model is comprised of sequential control tasks,asynchronous concurrency control tasks,cycle control tasks and global real-time control tasks.To implement the expanded model,each task in the model is encapsulated in function block.Function blocks are scheduled by their enable bits.Application result shows that the proposed modeling extension and implementation method reduce coupling between mission control modules and complex of control software,improve the real-time of mechatronic control system through task scheduling,and in a example control system,the cycle time of the software develop by introducing modeling and implementation method is 1 ms~2 ms while the cycle time of previous software is 2 ms~3 ms.

Key words: mechatronic control, control software, modeling method, Finite State Machine(FSM), statecharts

中图分类号: