首页 | 本学科首页   官方微博 | 高级检索  
     

PLC梯形图的广义表转换
引用本文:林懋恺,王晓芳,林亨.PLC梯形图的广义表转换[J].计算机工程,2007,33(13):75-77,95.
作者姓名:林懋恺  王晓芳  林亨
作者单位:清华大学工业工程系,北京,100084
摘    要:提出了利用串并联归并算法以实现PLC梯形图到指令表的转换方法。该算法将梯形图转化为有向无环图,对图中的串并联关系进行分类归并,将串并联结构按层次存储在广义表中,根据广义表生成指令表。该算法克服了传统拓扑排序算法在梯形图结构复杂时产生误判的缺陷,增加了检查逻辑错误的功能。在最佳情况下,该算法的时间复杂度为O(n),最差情况下为O(n2),与拓扑排序算法基本一致,有时略优于拓扑排序算法。

关 键 词:可编程控制器  梯形图  指令表
文章编号:1000-3428(2007)13-0075-03
修稿时间:2006-08-25

Transformation from PLC Ladder Diagram to Lists
LIN Maokai,WANG Xiaofang,LIN Heng.Transformation from PLC Ladder Diagram to Lists[J].Computer Engineering,2007,33(13):75-77,95.
Authors:LIN Maokai  WANG Xiaofang  LIN Heng
Affiliation:Department of Industrial Engineering, Tsinghua University, Beijing 100084
Abstract:To realize the transformation from ladder diagram to instruction list,a new algorithm is introduced.It translates the ladder diagram into directed acyclic graph,sorts and unites the serial and parallel relationship of the graph,and stores the serial-parallel structure in lists,generates the instruction list based on the lists.Traditional topological sort algorithm applied in the transformation does not always provide the correct instruction list when the structure of the ladder diagram is complex,while the new algorithm overcomes the flaw.The new algorithm provides the function of checking the logical faults in the ladder diagram.The time complexity of the new algorithm is O(n) in the best situation,O(n2) in the worst situation,which is basically the same with the topological sort algorithm.In normal condition,it is a little better than the topological sort algorithm.
Keywords:programmable logic controller(PLC)  ladder diagram  instruction lists
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机工程》浏览原始摘要信息
点击此处可从《计算机工程》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号