南 阳 理 工 学 院
本科生毕业设计(论文)
学院(系): 电子与电气工程系 专 业: 自动化 学 生: 指导教师:
完成日期 2011 年 5 月
南阳理工学院本科生毕业设计(论文)
基于S7-300 PLC的Simulink在线带进水纯滞后
单容水箱液位控制——控制程序设计
Tank Level Control Design Based on Simulink on-line Water of
S7-300 PLC with Pure Delay—Control Program Design
总 计:毕业设计(论文)28页 表 格: 0 个 插 图: 17 幅
南 阳 理 工 学 院 本 科 毕 业 设 计(论文)
基于S7-300 PLC的Simulink在线带进水纯滞后单容水箱液位控
制——控制程序设计
Tank Level Control Design Based on Simulink on-line Water of
S7-300 PLC with Pure Delay—Control Program Design
学 院(系): 电子与电气工程系 专 业: 自动化 学 生 姓 名:
学 号: 96106028 指 导 教 师(职称):
评 阅 教 师: 完 成 日 期:
南阳理工学院
Nanyang Institute of Technology
基于S7-300 PLC的Simulink在线带进水纯滞后单容水箱液位控制——控制程序设计
基于S7-300 PLC的Simulink在线带进水纯滞后单容水箱液位控
制——控制程序设计
自动化专业
[摘 要]根据S7-300PLC模块化编程的特点,设计了OB1、OB35、OB100三个组织块来实现控制功效。将FB41 PID调节模块放在OB1模块中,并进行参数设定及调节。设置500ms定时中断,在定时中断服务程序OB35中进行滞后补偿算法的计算,而后利用得出的结果进行系统滞后补偿。由于滞后补偿是在不断进行中的,采集的数据就要不断的存储再采集,设计了一个队列数据结构。队列的操作也放在OB35中进行,具体的队列操作封装在FB1模块中。利用OB100模块清除上一次运行时存储的数据。利用力控软件完成系统实时监控。本设计完成了设计要求但还有待改进。
[关键词]纯滞后;程序设计;补偿;控制
Tank Level Control Design Based on Simulink on-line Water of
S7-300 PLC with Pure Delay—Control Program Design
Automation Specialty ZHANG Qing
Abstract: According to S7-300PLC modular programming features, three organization blocks OB1, OB35, OB100 are designed to achieve control efficacy. The parameters of FB41 PID regulator module placed in OB1 module are set and adjusted. Then, 500ms timer interrupt is set and the compensation for delay algorithm calculated in the timer interrupt service routine OB35, then the results of calculation are used to compensate the delay system. Because of delay compensation is constantly on going, collection of data have to storage and re-collect. A queue data structure is necessary, the operation of the queue is also carried out on the OB35, and the specific queue operations is encapsulated in FB1 module. Remove last data by running the OB100 module. The real-time monitoring completed by Power control software. The requirements of the design are completed but there is room for improvement.
Key words: Delay; programming; compensation; control
I
基于S7-300 PLC的Simulink在线带进水纯滞后单容水箱液位控制——控制程序设计
目 录
1 引言 .................................................................... 1
1.1 本课题所述涉及的问题在国内(外)的研究现状 ........................ 1 1.2 对课题任务书提出的任务要求及实现预期目标的可行性分析 .............. 1 1.3 本课题需要重点研究的、关键的问题及解决的思路 ...................... 1 1.4 纯滞后的产生 ...................................................... 2 1.5 史密斯补偿控制基本原理 ............................................ 2 2 课题设计中具体实验器材的选型 ............................................ 2
2.1 PLC及其模块的选型 ................................................. 2 2.2 液位传感器选型 .................................................... 3 2.3 调节阀的选型 ...................................................... 3 2.4 智能仪表的选型 .................................................... 4 3 单容水箱供水回路设计 .................................................... 4
3.1 单回路系统的结构组成 .............................................. 4 3.2 液位单回路控制系统的硬件设计 ...................................... 5 4 编程、监控软件简介及相关应用 ............................................ 5
4.1 PLC简介 ........................................................... 5 4.2 力控软件概述 ...................................................... 6 4.3 控制程序设计思路及其OB1,OB35,OB100模块的作用 .................... 6
4.3.1 控制程序设计思路 ............................................. 6 4.3.2 OB1,OB35,OB100模块的作用 ................................... 7 4.4 力控监控系统设计 ................................................. 12 5设计中的设备介绍、设计结果及问题解决方法 ............................... 13
5.1 过程控制实验装置的介绍 ........................................... 13 5.2 设计过程中出现的问题及解决方法 ................................... 14
5.2.1 问题1 压力传感器输出滤波 ................................... 14 5.2.2 问题2 SM334(PLC中模拟量模块)去干扰 ....................... 15 5.2.3 问题3 补偿不稳定及解决方法 ................................. 15
结束语 ................................................................... 16 参考文献 ................................................................. 17 附录 ..................................................................... 18 致谢 ..................................................... 错误!未定义书签。
II