摘要
为了设计一种PLC控制器,文中重点研究了PLC编程系统中由梯形图到语句表编译解算的实现过程,并提出一种应用于PLC开发的梯形图转换为语句表的新方法,即基于节点势能的转换方法。该方法将梯形图类比电路图,仿照电势能,以节点势能表示虚拟梯形图中的能量流动,通过对梯形图节点势能的确定,将梯形图各图元之间的连接关系抽象为数值关系,并以此关系建立二叉树,遍历生成语句表。该方法简单清晰,以一种复杂度较低的数据结构将梯形图完整地描述出来,能够准确快速地完成由梯形图到语句表的编译解算,并可适用于逻辑关系比较复杂的梯形图程序的转换。该转换方法也能够为其他类似图形关系的解算提供参考,具有普遍适用性。
ed 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.
作者
魏晓晴
郝方
姜涛
康冰冰
赵念
WEI Xiaoqing;HAO Fang;JIANG Tao;KANG Bingbing;ZHAO Nian(Institute of Aviation Basic,Naval Aviation University,Yantai 264001,China;No.1 Military Representative Office of Equipment Department of PLA Air Force in Shenyang,Shenyang 110034,China)
出处
《现代电子技术》
北大核心
2025年第1期168-172,共5页
Modern Electronics Technique
关键词
PLC
梯形图
语句表
转换方法
节点势能
二叉树
PLC
ladder diagram
statement list
conversion method
node potential energy
binary tree