节点文献
基于二叉树的PLC梯形图转化为指令表的算法
Algorithm from PLC Ladder Diagram to Instruction Table Based on Binary-Tree
【摘要】 针对PLC梯形图利于编程,但不利于被执行的特点,利用二叉树这个中间工具,提出了一种将梯形图转化为指令表的转化算法,转化以梯级为单位,采取"从左至右,从上至下"的扫描顺序构造二叉树结构,然后对树进行后序遍历得到指令表。并简要介绍了梯形图编辑软件的各个组成部分,以及梯形图的编辑环境;描述了算法的主要数据结构。
【Abstract】 Owing to PLC ladder diagram’s traits of being programmed easily and processed inconveniently,an algorithm of transformation from PLC ladder diagram to instruction table are presented using the tool of binary tree.Based on a single rung as a conversion unit,the binary-tree data structure are created following the scanning order of from left to right,from top to bottom through the conversion process.Then the instruction table are obtained through the post-order traversal of the binary-tree.In addition,various components of PLC ladder diagram software and the editing environment of PLC ladder diagram are introduced,and main data structure of the algorithm are described simply.
【Key words】 ladder diagram; instruction table; binary-tree; post-order traversal;
- 【文献出处】 现代电子技术 ,Modern Electronics Technique , 编辑部邮箱 ,2010年04期
- 【分类号】TM571.61
- 【被引频次】29
- 【下载频次】253