摘要
针对PLC梯形图利于编程,但不利于被执行的特点,利用二叉树这个中间工具,提出了一种将梯形图转化为指令表的转化算法,转化以梯级为单位,采取"从左至右,从上至下"的扫描顺序构造二叉树结构,然后对树进行后序遍历得到指令表。并简要介绍了梯形图编辑软件的各个组成部分,以及梯形图的编辑环境;描述了算法的主要数据结构。
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 traversat of the binary - tree. In addition,various components of PI.C ladder diagram software and the editing environment of PLC ladder diagram are introduced,and main data structure of the algorithm are described simply.
出处
《现代电子技术》
2010年第4期125-127,134,共4页
Modern Electronics Technique
关键词
梯形图
指令表
二叉树
后序遍历
ladder diagram
instruction table
binary - tree
post - order traversal