Computer Engineering and Applications ›› 2010, Vol. 46 ›› Issue (18): 244-248.DOI: 10.3778/j.issn.1002-8331.2010.18.074

• 工程与应用 • Previous Articles    

Research on new strategy for transforming from soft PLC ladder diagram to sentence list

SHI Rui1,ZHOU Lei1,YANG Zheng-yi2   

  1. 1.School of Computer Science,Chongqing University,Chongqing 400044,China
    2.School of Software,Chongqing University,Chongqing 400044,China
  • Received:2008-12-15 Revised:2009-02-27 Online:2010-06-21 Published:2010-06-21
  • Contact: SHI Rui

软PLC梯形图到语句表转换新策略的研究

石 锐1,周 雷1,杨正益2   

  1. 1.重庆大学 计算机学院,重庆 400044
    2.重庆大学 软件学院,重庆 400044
  • 通讯作者: 石 锐

Abstract: To realize the transformation from soft PLC ladder diagram to sentence list,a new strategy is introduced.The strategy maps the ladder diagram to AOV graph at first,and then scans the AOV graph to confirm the serial and parallel relationship in different degrees between every vertex;in the meantime,constructs a logic tree from bottom to top in order to save the result of scanning;at last generates sentence list via traversing the logic tree.Through an example,it illustrates that the strategy can show the logic relationship of each element in ladder diagram clearly,and can transform correctly and quickly.In addition,while being executed,the strategy is able to check the logic faults and regulations of the ladder diagram.

Key words: soft Programmable Logic Controller(PLC), ladder diagram, sentence list, scanning algorithm, logic tree

摘要: 提出了一种用于实现软PLC梯形图到语句表转换的新策略。首先将梯形图映射为AOV图,然后对每级的AOV图进行扫描以确定各顶点之间的不同层次的串并联关系,扫描的同时自底向上建立一棵逻辑树以保存扫描结果,最后通过遍历这棵树生成语句表。通过实例说明此策略能清晰地表达出梯形图各元件的逻辑关系,语句表转换过程准确快速。执行过程中还能对梯形图进行逻辑查错和规范检查。

关键词: 软可编程逻辑控制器(PLC), 梯形图, 语句表, 扫描算法, 逻辑树

CLC Number: