计算机工程与应用 ›› 2014, Vol. 50 ›› Issue (13): 29-36.

• 博士论坛 • 上一篇    下一篇

基于事件图的网络化PLC控制程序编译方法

陈  晨,仲崇权   

  1. 大连理工大学 电子信息与电气工程学部,辽宁 大连 116023
  • 出版日期:2014-07-01 发布日期:2015-05-12

Compilation method for networked PLC control program based on event graph

CHEN Chen, ZHONG Chongquan   

  1. School of Electronic and Information Engineering, Dalian University of Technology, Dalian, Liaoning 116023, China
  • Online:2014-07-01 Published:2015-05-12

摘要: 针对网络化PLC控制系统特点,提出了基于事件图的控制程序建模与编译方法。通过将控制系统映射为离散事件系统,建立了控制程序的事件图模型;通过改进的深度优先搜索算法实现了事件图解耦,将串行执行的控制程序分解为可并行执行的事件序列;根据IO变量位置以及指令预期执行时间为事件序列分组,并下载至最佳设备;通过插入网络通讯指令,实现设备间变量同步。实验结果表明该方法可有效识别与提取控制程序中的并行任务,将其合理分配下载至不同的控制器中,同时保证控制逻辑的正确与同步。

关键词: 关键词, 离散事件系统, 事件图, 网络化PLC控制系统, 系统建模, 程序编译

Abstract: Aiming at the networked multi-PLC(Programmable Logic Controller) control system, a compilation method for control program based on event graph is put forward. An event graph model converting control systems to discrete event systems is created. A new traversal rule is also put forward to decouple the event graph and extract the parallel event sequence. Through optimizing dynamic device assignment and variable synchronization, the event graphs are grouped, and the instructions can be downloaded to the corresponding PLC automatically. The experimental results show that the compile method can decouple parallel tasks from serial control program and disperse into corresponding devices suitably, and keep the running logic according with the original program.

Key words: discrete event system, event graph, networked PLC control system, system modeling, program compilation