摘要
针对目前PLC梯形图编辑软件中梯形图存储结构的复杂和不足,本文基于面向对象的方法,采用二叉树和双向链表相结合的数据结构来描述梯形图功能单元及其拓扑关系,并提出了相应的转换算法,然后简化为只含有功能单元的模型,使后续的指令表转换得到简化。这种模型结构简单、通用性强、易于用C++语言实现,在PLC梯形图编辑软件中应用效果良好。
Aiming at the complexity and limitation of the storage structure of the edit software for the PLC ladder diagram (LD), based on the object-oriented method, the paper adopts the data structure which combines binary trees and double linked lists to describe the functional units and their topological connections in LD, and proposes a transformation algorithm. Then the paper simplifies the structure and transforms it to a model that contains the functional units only, which avoids the difficulty from the transformation of LD to instruction list(IL). The structure is simple, and has strong interoperability. It is very easy to implement the structure with the C++ language, which is applied well in the edit software for PLC LD.
出处
《计算机工程与科学》
CSCD
北大核心
2009年第12期87-89,共3页
Computer Engineering & Science
关键词
PLC
梯形图
二叉树
双向链表
指令表
programmable logic controller (PLC)
ladder diagram(LD)
binary tree
double linked list
instruction list(IL)