基于Qt 的软PLC 梯形图编辑软件的设计与实现① - 计算机系统应用.PDF
文本预览下载声明
计 算 机 系 统 应 用 2011 年 第 20 卷 第 12 期
基于Qt 的软PLC 梯形图编辑软件的设计与实现①
1,2 2 1,2
陈 雪 ,刘荫忠 ,徐恩松
1(中国科学院研究生院,北京 100049)
2(中国科学院沈阳计算技术研究所,沈阳 110168)
摘 要:本文重点是软 PLC 梯形图编辑软件的设计与实现。采用跨平台能力很强的 Qt 作为开发工具,能够将系
统应用于多种操作平台,使系统具有更强的开放性;在对梯形图整体结构进行深入分析的基础上,利用面向对
象的方法,对系统进行了类层次结构的设计,提高了软件开发的执行效率;采用双层双向链表存储梯形图,使
得动态编辑操作更加方便、灵活;通过顺序扫描梯形图程序,将源语言转换为指令表程序,此方法使得转换过
程相对简单。最后对软件进行测试,验证了设计方法的正确性与可用性。
关键词:Qt ;梯形图;指令表;类层次;存储结构;
Design and Implementation of SoftPLC Ladder Diagram Editing Software Based on Qt
1,2 2 1,2
CHEN Xue , LIU Yin-Zhong , XU En-Song
1(Graduate University, Chinese Academy of Sciences, Beijing 100049, China)
2(Shenyang Institute of Computing Technology, Chinese Academy of Sciences, Shenyang 110168, China)
Abstract: This paper mainly introduces the design and performance of SoftPLC Ladder Diagram editing software.
Adoppting Qt as the developing tool which applied in multi-operating system, so the system is more opening. Based on
in-depth analysis of the ladder diagram’s overall structure, the systerm’s class hierarchy is designed using
object-oriented method, which enhances the efficiency of the software. Applying the storage structure of double layer
and double linked list makes the dynamic editing operations more flexible and convenient. The source language
converted to instruction list through sequential scanning the ladder diagram makes the process simpler. At last, the
experimental results in testing the software show that the design method is accurate and feasible.
Key words: Qt; ladder diagram; instruction list; class hierarchy; storage structure
1 引言 图形语言,沿用了继电器的触点、线圈、串并联等术
可编程逻辑控制器 PLC ,是利用来自输入输出 语和图形符号[4] ,在计算机上和控制技术上称为“面
装置的信号及存储的程序,来控制机械或程序的动
显示全部