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