首页|应用于PLC开发的梯形图向语句表转换的新方法

应用于PLC开发的梯形图向语句表转换的新方法

扫码查看
为了设计一种PLC控制器,文中重点研究了PLC编程系统中由梯形图到语句表编译解算的实现过程,并提出一种应用于PLC开发的梯形图转换为语句表的新方法,即基于节点势能的转换方法.该方法将梯形图类比电路图,仿照电势能,以节点势能表示虚拟梯形图中的能量流动,通过对梯形图节点势能的确定,将梯形图各图元之间的连接关系抽象为数值关系,并以此关系建立二叉树,遍历生成语句表.该方法简单清晰,以一种复杂度较低的数据结构将梯形图完整地描述出来,能够准确快速地完成由梯形图到语句表的编译解算,并可适用于逻辑关系比较复杂的梯形图程序的转换.该转换方法也能够为其他类似图形关系的解算提供参考,具有普遍适用性.
A new method of converting ladder diagram into statement list applied in PLC development
In order to design a PLC controller,the realization process of compiling and calculating from ladder diagram to statement list is taken as the focus of the research,and a new method of converting ladder diagram into statement table applied in PLC development is proposed.It is a conversion method based on node potential energy.In this method,the ladder diagram is analogous to the circuit diagram.By imitating the electric potential energy,the energy flow in the virtual ladder diagram is represented by the node potential energy.The connection relationship between the primitives of the ladder diagram is abstracted into a numerical relationship by the determination of the node potential energy of the ladder diagram,and the binary tree is established based on this relationship,and the statement table is generated by traversing.This method is simple and clear,and can completely describe the ladder diagram with a low complexity data structure,and easily and accurately complete the compiling and calculating from the ladder diagram to the statement list.In addition,it can be applied to the conversion of ladder diagram programs with complex logical relationship.This conversion method can also provide a reference for the solution of other similar graph relationships,so it has universal applicability.

PLCladder diagramstatement listconversion methodnode potential energybinary tree

魏晓晴、郝方、姜涛、康冰冰、赵念

展开 >

海军航空大学 航空基础学院,山东 烟台 264001

空军装备部驻沈阳地区第一军事代表室,辽宁 沈阳 110034

PLC 梯形图 语句表 转换方法 节点势能 二叉树

2025

现代电子技术
陕西电子杂志社

现代电子技术

北大核心
影响因子:0.417
ISSN:1004-373X
年,卷(期):2025.48(1)