毕业设计(论文)-基于PLC的智能家居安防系统 下载本文

内蒙古科技大学

本科生毕业设计说明书(毕业论文)

题 目:基于PLC的智能家居安防系统 学生姓名: 学 号: 0 专 业:自动化 班 级:自2005-3班 指导教师:

内蒙古科技大学毕业设计说明书(毕业论文)

基于PLC的智能家居安防系统

摘要

随着我国经济的快速发展,生活水平的不断提高,人们对居家的概念已从最初满足简单的居住功能发展到注重对住宅的人性化需求。安全、舒适、快捷、方便的智能小区,已成为住宅发展的主流趋势,其中,安全性是首要目标。智能小区安全性的实现,除了人为的因素外,主要依靠小区的智能化安全防范系统。所以研究和开发智能家居安防系统具有很高的实用价值。在安防系统中,防火和防盗是主要的。因此,通过传感器把各种防火防盗的信号传输给小区报警中心,小区报警中心能迅速做出反应,阻止不法分子的得逞和火灾的发生。智能安防系统就是保障了人们居家的安全和利益,使人们的生活更加安全、舒适。所以设计和开发智能家居安防系统,不仅具有很强的现实意义,也有广泛的市场前景。

本设计介绍了西门子 S7-300的通信协议和工控组态软件WinCC在家具安防系统中的应用,并讨论通过用 MPI 网络实现 S7-300与工控组态软件WinCC 之间通信和用PROFIBUS-DP总线实现S7-300与S7-300之间通信的方法。

关键字: 智能小区;安防系统;WinCC;住宅;报警

I

内蒙古科技大学毕业设计说明书(毕业论文)

Based on PLC intelligent household security system

Abstract

With economy rapid developed and living standard continuous improved, people’s concept of home has changed from initial simple living function to the individual demands. The intelligent community, which is safe, convenient and comfortable, has become the housing development tendency. And safety is the primary target in that tendency. The safe of the intelligent community, except for human factors, mainly rely on safe guard system of intelligent community. So the research and development of intelligent household security system has high practical value. In the security system, fireproofing and security system is very important. Therefore, if transmit various fire-theft alarm signal to the community alarm centers through the sensor, community alarm centers can rapid reaction so that prevent the lawbreakers’ actions and prevent fire occurrence. Intelligent surveillance system is the guarantee for the security and interests of the housing people and makes the life of people more safe and comfortable. So the design and development of intelligent household security system, not only has a strong practical significance, bur also has wide prospect of market.

This design introduces application of Siemens S7-300 communication protocol and the industrial control configuration software security system WinCC in furniture security system. Then the paper discusses the methods which use MPI network to realize the communicating between S7-300 and industrial control configuration software WinCC, and use PROFIBUS-DP to realize the communicating between S7-300 and S7-300.

Kye words: Intelligent village; Security systems; WinCC; House; alarm

II

内蒙古科技大学毕业设计说明书(毕业论文)

目录

摘要 ............................................................................................................................................. I Abstract ...................................................................................................................................... II 第一章 概述 .............................................................................................................................. 1

1.1 绪论 ............................................................................................................................. 1 1.2 PLC的应用领域和发展趋势 ..................................................................................... 2

1.2.1 PLC的应用领域 ................................................................................................ 2 1.2.2 PLC的发展趋势 ................................................................................................ 3 1.3 西门子S7-300简介 ................................................................................................... 4

1.3.1 一般特性 ............................................................................................................ 4 1.3.2 模块的种类 ........................................................................................................ 4 1.3.3 通信 .................................................................................................................... 5 1.3.4 扩展功能 ............................................................................................................ 6 1.4 监控软件WinCC简介 ............................................................................................... 6 1.5 STEP 7编程软件简介 ................................................................................................ 7 1.6 智能家居安防系统开发的必要性 ............................................................................. 8 1.7 国内外发展现状 ......................................................................................................... 8 1.8 论文的主要研究内容 ................................................................................................. 8 本章小结 ............................................................................................................................. 9 第二章 智能家居安防系统 .................................................................................................... 10

2.1 智能家居安防系统的组成与工作原理 ................................................................... 10

2.1.1 智能家居安防系统的组成 .............................................................................. 10 2.1.2 智能家居安防系统的工作原理 ...................................................................... 11 2.2 智能家居安防系统的设计 ....................................................................................... 11

2.2.1 系统的硬件设计 .............................................................................................. 11

2.2.1.1 S7-300系列的PLC硬件系统 ............................................................. 11 2.2.1.2 PLC的选型 ........................................................................................... 15 2.2.1.3 PLC扩展机架和供电电源的设计 ....................................................... 15 2.2.2 系统的软件设计 .............................................................................................. 15

III

内蒙古科技大学毕业设计说明书(毕业论文)

2.2.2.1 程序流程图 ........................................................................................... 15 2.2.2.2 PLC的I/O地址分配表 ....................................................................... 15 2.2.2.3 程序 ....................................................................................................... 16

本章小结 ........................................................................................................................... 17 第三章 WinCC对小区报警的组态 ....................................................................................... 18

3.1 西门子S7-300及工程组态软件的应用 ................................................................. 18

3.1.1 S7-300、多点接口网络 ( MPI ) 及PROFIBUS-DP .................................. 18 3.1.2 S7-300与S7-300之间的通信连接 ............................................................... 19 3.1.3 S7-300与工控组态软件WinCC之间的通信 ............................................. 27 3.2 组态小区报警 ........................................................................................................... 28

3.2.1 建立项目及项目管理器介绍 .......................................................................... 28 3.2.2 组态变量 .......................................................................................................... 30 3.2.3创建过程画面及组态项目 ............................................................................... 35

3.2.3.1 图形编辑器的布局 ............................................................................... 35 3.2.3.2. 建立过程画面 ...................................................................................... 36 3.2.3.3. 创建及组态过程画面 .......................................................................... 37

本章小结 ........................................................................................................................... 45 第四章 WinCC与STEP 7对小区报警的监控 ..................................................................... 46

4.1 STEP 7对PLC的模拟 .............................................................................................. 46

4.1.1 创建项目 .......................................................................................................... 46 4.1.2 硬件组态 .......................................................................................................... 47 4.1.3 在线调试 .......................................................................................................... 47 4.1.4 PLCSIM ............................................................................................................. 48 4.2 小区报警系统的模拟运行 ....................................................................................... 49

4.2.1 在STEP 7中编写运行的模拟程序 ................................................................ 49 4.2.2运行中的主画面 ............................................................................................... 50 4.2.3 运行中的报警画面 .......................................................................................... 50

4.2.3.1 运行中的报警原因画面 ....................................................................... 50 4.2.3.2 运行中的报警楼号画面 ....................................................................... 50 4.2.3.3 运行中的报警住户画面 ....................................................................... 51

IV