毕业设计
自动售货机(饮水机)的PLC系统设计
班 级: 10-20班 专 业: 机电一体化 姓 名: XXXXXXX 学 号: 20100657 指导教师: XXXXXXX
2013年10月
摘 要
本论文设计的是基于西门子S7-200 系列PLC构成的自动售货机控制系统,本文阐述了自动售货机的来源与发展,以及它在国内外发展的现状,对自动售货机的方案进行了论证,介绍了PLC的基本组成、特点以及工作原理,对基于西门子S7-200 系列PLC构成的自动售货机系统整体设计过程进行较为细致的论述。
文中详尽地介绍了自动售货机的各硬件组成,并完成了PLC外部接线图。在PLC梯形图的编写时,文中采用的是西门子PLC梯形图专用编译软件STEP7来进行编写。介绍了自动售货机的基本原理以及工作流程去帮助大家理解,然后把程序分为几个程序块,分别对程序块进行编程。具体说明了可编逻辑控制器在自动售货机中的作用。程序涉及到了自动售货机工作的绝大部分过程。利用PLC控制的自动售货机提高了系统的稳定性,保证自动售货机能够长期稳定运行。
关键词: PLC;梯形图;I/O点的分配;自动售货机
Abstract
This graduation design is based on Siemens S7-200 series PLC constitute a vending machine control system. The design describes the vending machine source and development, and its development both at home and abroad and the present condition of the vending machine scheme are discussed. The PLC basic composition, characteristics and working principle be introduced. Detailed discussion is based on Siemens S7-200 series PLC constitute a vending machine system overall design process.
It is a detailed description of the vending machine of the hardware composition and completed PLC exterior wiring diagram in this graduation design. During the writing of the PLC ladder diagram, this paper uses is Siemens PLC ladder diagram special compile software STEP7.This article introduces the basic principle of the vending machine and the working process to help you depth of understanding, and then the program is divided into several blocks, to block respectively for programming. The programmable logic controller is specified in the role of the vending machine. Program involving vending machine work most of the process. Using PLC automatic vending machine improves the system's stability, which ensures the vending machine can have a long-term stable operation.
Keywords: PLC: Ladder diagram; The I/O point distribution; vending machine
目 录
摘 要 .............................................................................................................................................. 2 绪 论 ................................................................................................................................................ 4 1.1自动售货机的理论背景与实际意义 .................................................................................... 4 1.2 自动售货机设计的主要内容................................................................................................ 4 1.3 自动售货机设计的基本思路................................................................................................ 4 第一章 引言 .................................................................................................................................. 6 1.1 本设计的意义 ....................................................................................................................... 6 1.2 认识PLC ............................................................................................................................. 6 第二章 PLC的概述 ....................................................................................................................... 7 2.1 PLC的定义 ............................................................................................................................ 7 2.2 PLC的简介 ............................................................................................................................ 7 2.3 PLC的工作原理 .................................................................................................................... 7 2.4 PLC的循环扫描工作 ............................................................................................................ 8 2.5 PLC的硬件组成 .................................................................................................................... 9 2.6 PLC的编程语言 .................................................................................................................... 9 2.7 PLC的特点 ............................................................................................................................ 9 第三章 自动售货机的设计 ........................................................................................................ 11 3.1 自动售货机设计软元件 ..................................................................................................... 11 3.1.1 定时器 .......................................................................................................................... 11 3.1.2 数算指令 .............................................................................................................. 11 3.2自动售货机的基本功能 ...................................................................................................... 12 3.3 自动售货机I/O点的分配 .................................................................................................. 12 3.4 顺序功能图(SFC) .......................................................................................................... 13 3.5 梯形图(LAD) ................................................................................................................. 13 3.5.1 什么是梯形图(LAD) .............................................................................................. 13 3.5.2 自动售货机设计的梯形图(LAD)........................................................................... 14 第四章 工艺流程和工作过程分析 ............................................................................................ 22 4.1工艺流程 .............................................................................................................................. 22 4.2工作过程分析 ...................................................................................................................... 22 第五章 硬件设计 ........................................................................................................................ 23 5.1 PLC外围接线图 .................................................................................................................. 23 5.2自动售货机模拟操作面板 .................................................................................................. 24 第六章 总结 ................................................................................................................................ 25 6.1 个人总结 ............................................................................................................................. 25 6.2 致谢 ..................................................................................................................................... 25 参考文献 ........................................................................................................................................ 26 附录 外文资料 .............................................................................................................................. 27
绪 论
1.1自动售货机的理论背景与实际意义
自动售货机是一种全新的商业零售形式,20世纪70年代自日本和欧美发展起来。它又被称为24小时营业的微型超市。在日本,70%的罐装饮料是通过自动售货机售出的;全球著名饮料商可口可乐公司在全世界就布有50万台饮料自动售货机。
在中国,自动售货机1999年开始进人中国市场.如今,在机场、地铁、商场、公园等客流较大的场所,已不难发现自动售货机的身影。
从自动售货机的发展趋势来看,它的出现是由于劳动密集型的产业构造向技术密集型社会转变的产物。大量生产、大量消费以及消费模式和销售环境的变化,要求出现新的流通渠道;而相对的超市、百货购物中心等新的流通渠道的产生,人工费用也不断上升;再加上场地的局限性以及购物的便利性等这些因素的制约,无人自动售货机作为一种必须的机器便应运而生了
它的售货领域非常广泛,是发达国家商品零售的一种主要方式。近几年,自动售货机逐渐被越来越多的消费者所接受。但由于售货机分布零散、范围广阔的特点,自动售货机在为消费者带来方便的同时,也为经营者在监控、管理、维护等方面带来很大的不便。目前售货机运行的各种情况都需要由人工判断,包括缺货、缺零钱、币箱已满、售货机机械故障等,经营者普遍采用人工定时巡回视察的管理办法,既费时费力,又无法及时准确获取自动售货机状态报告,给经营者增加了管理成本和难度,也有可能给消费者的正常消费造成不便。
本系统的设计和实现可以使自动售货机的经营者可以根据网络统计的销售状况进行商品销售状况分析,预测商品的销售走势,确定合理的采购和配送策略,以期获得最高的投资回报率。同时售货机的一些故障信息和警报信息可以实时的传送到相应运营人员,从而可以在第一时间内发现并解决问题。
1.2 自动售货机设计的主要内容
1.此自动售货机只可以投入一元的硬币;
2.如果顾客投入硬币在限定的时间内(2分钟)不按任何按键,自动售货机将退还所投硬币;
3.当投入硬币的总值等于或超过物品价值时,对应的物品指示灯亮绿灯;
4.当物品对应的指示灯亮绿灯时,按下相应的按键,相应的物品排出,同时指示灯绿灯闪烁;
5.如果顾客投入硬币总值超过所选物品的价值时,自动售货机会自动将余款退还顾客; 6.当顾客成功购买完一件物品后(20秒)无操作,自动售货机会自动将余款退还顾客; 7.如果顾客投入硬币后又不想买物品,按下退款按键,自动售货机会自动将余款退还顾客;
8.当物品不足时,对应的物品指示灯亮红灯,顾客按下相应的按键无反应(不出物品,不减余额),并向总部发送所缺物品的信息。
1.3 自动售货机设计的基本思路
本次设计的题目是自动售货机,主要是应用西门子S7-200型PLC的梯形图来设计控制
程序,并简单介绍相关的知识,如:PLC的定义、PLC的编程语言、PLC的硬件组成等。根据设计内容和控制要求画出顺序功能图和梯形图,再根据PLC的相关知识设计出它的外部接线图,结合梯形图和外部接线图分析说明该设计的控制原理过程。
本次设计的重要部分是第三章的设计部分,即自动售货机梯形图的设计。首先就得根据设计内容和控制要求准确画出它的顺序功能图,再根据所画出的顺序功能图准确设计出它的梯形图,这样才能真正理解本次自动售货机的控制原理。
第一章 引言
1.1 本设计的意义
随着社会不断的进步,人们的物质文化与精神文化都在明显的提高,这样表现在出入各个场所采用信用卡支付现金,一人一部手机,节假日看电影,坐地铁,听音乐会,逛步行街。。。这个现象都表明在物质生活提高的同时,精神生活也提高了,随处可见的出租车,还有随处可见的售货机,这在繁华的都市也已成为不可缺少的一个为市民提供方便的一部机器,只需要投几个硬币就可以选择自己想要的物品。自动售货机可以充分补充人力资源的不足,适应消费环境和消费模式的变化,24小时无人售货的系统可以更省力,运营时需要的资本少、面积小,有吸引人们购买好奇心的自身性能,可以很好地解决人工费用上升的问题等各项优点。自动售货机了人力,方便了生活,创造了效益,方便广大的市民。所以设计自动售货机是非常必要的。
1.2 认识PLC
可编程控制器简称PLC,是一种以微处理器为核心的用于工程自动控制的工业控制机,其本质是一台工业控制专用计算机。它的软件,硬件配置与计算机极为类似,只不过它比一般计算机具有更强的与工业过程相连接的接口和更直接的适应于控制要求的编程语言。硬件主要由处理器CPU、存贮器、输入/输出单元以及编程器、电源和智能输入/输出单元等构成。
PLC是一种专为在工业环境应用而设计的数字运算电子系统,它是以微处理机为基础,综合了计算机技术、自动控制技术和通信技术等现代科技而发展起来的一种新型工业自动控制装置,是当今工业发达国家自动控制的标准设备之一。PLC是专门为在工业环境下应用而设计的一种数字运算操作的电子装置,是带有存储器、可以编制程序的控制器。它的种类很多、模块丰富、指令功能强大、编程简单、使用方便,而且随着计算机技术的发展,其功能仍然在不断扩大和完善。
PLC总的发展趋势是向高集成度、小体积、大容量、高速度、易使用、高性能方向发展。目前,PLC的处理速度与计算机相比还比较慢,其高的CPU也不过80486,将来会全面使用位的RISC芯片,采用多CPU进行处理、分时处理或分任务处理方式,将各种模块智能化,部分系统程序用门阵列电路固化,这样可使PLC的处理速度达到纳秒级。
第二章 PLC的概述
2.1 PLC的定义
PLC是一种专门为在工业环境下应用而设计的数字运算操作的电子装置。它采用可以编制程序的存储器,用来在其内部存储执行逻辑运算、顺序运算、计时、计数和算术运算等操作的指令,并能通过数字式或模拟式的输入和输出,控制各种类型的机械或生产过程。PLC及其有关的外围设备都应该按易于与工业控制系统形成一个整体,易于扩展其功能的原则而设计。
2.2 PLC的简介
PLC是以CPU为核心,综合了计算机技术和通信技术发展起来的一种通用的工业自动控制装置,是现代工业控制的三大支柱(PLC、机器人和CAD/CAM)之一。目前,世界上生产PLC的主要厂家有65个,其中最有名气的厂家在日本、美国和德国。日本的几个厂家为三菱、富士。日立、东芝、横河、立石、光洋、夏普等公司。美国的几个厂家为德州食品公司、通用电器公司、歌德公司、数字设备公司等。还有德国的西门子,荷兰的飞利浦,的鹰达等公司也是很有名气的。
日本三菱电机公司(MITSUBISHI)于1971年开始研制PLC,目前主要有F1,F2,FX,K,A等十几个系列几十种产品,在我国(主要是华东和华南地区)的工业控制领域具有一定的市场占有率。
2.3 PLC的工作原理
PLC的工作原理与计算机的工作原理基本是一致的,可以简单地表述为在系统程序的管理下,通过运行应用程序完成用户任务。PLC通电后,首先对硬件和软件作一些初始化操作,初始化反复不停地分阶段处理各种不同的任务(见图2-1)。但是PLC也有它自己的特点,PLC在确定了工作任务,装入了专用程序后成为一种专用机,它采用循环扫描工作方式,系统工作任务管理及应用程序执行都是用循环扫描方式完成的。
读取输入 执行用户处理通信自诊断检改写输出 读取输入 处理通信要求 自诊断检查 改写输出 RUN状STOP状图2-1 各阶段处理任务
2.4 PLC的循环扫描工作
对每个程序,CPU从第一条指令开始执行,按指令步序号做周期性的程序循环扫描,如果无跳转指令,则从则从第一条指令开始逐条顺序执行用户程序,直至遇到结束符后又返回第一条指令,如此周而复始不断循环,每一个循环称为一个扫描周期。PLC的扫描全过程如图2-2所示。
(1) 输入刷新阶段
在输入刷新阶段,CPU扫描全部输入端口,读取其状态并写入输入状态寄存器。完成后关闭输入端口,转入程序执行阶段。
(2) 程序执行阶段
在程序执行阶段,根据用户输入的控制程序,从第一条开始逐条执行,并将相应的逻辑运算结果存入对应的内部辅助寄存器和输出状态寄存器。
(3) 输出刷新阶段
当所有指令执行完毕后,将输出状态寄存器中的内容,依次送到输出锁存电路,并通过一定输出方式输出,驱动外部相应执行元件工作,这才形成PLC的实际输出。
图2-2 PLC的扫描全过程
2.5 PLC的硬件组成
PLC的硬件主要由处理器(CPU)、存储器、输入单元、输出单元、通信接口、扩展接口、电源等几部分组成。其中,CPU是PLC的核心;输入单元/输出单元是CPU与现场输入/输出设备之间的接口电路;通信接口用于连接编程器、上位计算机等外部设备,其硬件构成图如图2-3。
图2-3 PLC硬件结构图
2.6 PLC的编程语言
PLC为用户提供了完善的编程语言来满足编制用户程序要求。它提供的编程语言通常有以下5种:梯形图(LAD)、语句表(STL)、顺序功能图(SFC)、功能块图(FBD)和结构文本(ST)。
2.7 PLC的特点
(1)抗干扰能力强,可靠性好
I/O系统设计有完善的通道保护与信号调理电路;在结构上对耐热、防潮、防尘、抗震等都有周到的考虑。
(2)控制系统结构简单,通用性强
PLC及外围模块品种多,可由各种组件灵活组合成各种大小和不同要求的控制系统。 (3)编程方便,易于使用
PLC程序的编制,采用梯形图或面向工业控制的简单指令形式。
(4)功能完善
在PLC内部具有许多控制功能,诸如时序、计算机、主控继电器以及移位寄存器、中间寄存器等。
(5)设计、施工、调试、的周期短
PLC采用模块化积木式结构,故仅需按性能、容量等选用组装,因而缩短了设计周期,使设计和施工可同时进行。
(6)体积小,维护操作方便 PLC体积小,质量轻,便于安装。 (7)易于实现网络化
PLC可连成功能很强的网络系统。 (8)可实现三电一体化
PLC将电控(逻辑控制)、电仪(过程控制)和电结(运动控制)这三电集于一体。
第三章 自动售货机的设计
3.1 自动售货机设计软元件 3.1.1 定时器
定时器是PLC中重要的编程元件,是累计时间增量的内部器件。定时器的工作过程与继电器控制系统的时间继电器基本相同,但它没有瞬动触点,失电时,常闭触点闭合,常开触点打开;定时器得电时,常闭触点打开,常开触点闭合。定时器的当前值、设定值均为10位有符号整数(INT),允许的最大值为32767。定时器指令表见表3-1。 表3-1 定时器指令 语句 TON Txxx,PT TOF Txxx,PT TONR Txxx,PT BITIM OUT CITIM IN,OUT 3.1.2 数算指令
在梯形图中,整数、双整数与浮点数的加、减、乘、除指令(见表3-2)分别执行下列运算:IN1+IN2=OUT,IN1—IN2=OUT,IN1*IN2=OUT,IN1/IN2=OUT。
描述 接通延时定时器 断开延时定时器 保持型接通延时定时器 起动间隔定时器 计算间隔定时器 表3-2 加减乘除指令
梯形图 ADD_I SUB_I MUL_I DIV_I ADD_DI SUB_DI MUL_DI 语句表 +I INT1,OUT -I INT1,OUT *I INT1,OUT /I INT1,OUT +D INT1,OUT -D INT1,OUT *D INT1,OUT 描述 整数加法 整数减法 整数乘法 整数除法 双整数加法 双整数减法 双整数乘法 梯形图 DIV_DI ADD_R SUB_R MUL_R DIV_R MUL DIV 语句表 /D INT1,OUT +R INT1,OUT -R INT1,OUT *R INT1,OUT /R INT1,OUT MUL INT1,OUT DIV INT1,OUT 描述 双整数除法 实数加法 实数减法 实数乘法 实数除法 整数乘法产生双整数 带余数的整数除法 在语句表中,整数、双整数与浮点数的加、减、乘、除指令分别执行下列运算:
IN1+ OUT =OUT,OUT—IN1=OUT,IN1* OUT =OUT,OUT /IN2=OUT。
3.2自动售货机的基本功能
自动售货机的各种动作功能和控制要求,给出了完整的自动售货机操作规程(如图3-1),并介绍了自动售货机运行系统中所包括的人工操作步骤。
在实际生活中,我们见到的售货机可以销售一些简单的日用品,如饮料、常用药品和小的生活保健用品等。售货机的基本功能就是对投入的货币进行运算,并根据货币数值判断是否能够购买某种商品,并作出相应的反应。例如:售货机中有2种商品,A商品价格为0.5元,B商品为1元。现投入1个1元硬币,当投入的货币超过A商品的价格时,A商品的选择按钮处应有变化,提示可以购买,B商品也提示。当按下选择A商品的价格时,售货机进行减法运算,从投入的货币总值中减去A商品的价格同时启动相应的电机,提取A号商品到出货口。此时售货机继续进行等待外部命令,如继续交易,则同上,如果此时不再购买而按下退币按钮,售货机则要进行退币操作,退回相应的货币,并在程序中清零,完成此次交易。由此看来,售货机一次交易要涉及加法运算、减法运算以及在退币时的除法运算,这是它的内部功能。还要有货币识别系统和货币的传动来实现完整的售货、退币功能。
图3-1 自动售货机工作流程图
3.3 自动售货机I/O点的分配
输入/输出单元通常也称I/O单元或I/O模块,是PLC与工业生产现场之间的连接部件。 PLC通过输入接口可以检测被控对象的各种数据,以这些数据作为PLC对被控制对象进行控制的依据;同时PLC又通过输出接口将处理结果送给被控制对象,以实现控制目的。本次智能抢答器I/O点的分配如表3-3所示。
表3-3 自动售货机I/O点的分配表
序号 1 2 3 4 5 6 7 8 定义点 I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7 符号 SB1 SB2 SB3 SB4 SB5 SB6 SB7 SB8 功能 找零按钮 食品五角按钮 饮料一元按钮 饮料二元按钮 饮料2.5元按钮 投五角硬币 投一元硬币 找零五角 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 I1.0 I1.1 I1.2 I1.3 I1.4 I1.5 Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 Q0.5 Q0.6 Q0.7 Q1.0 Q1.1 Q1.2 Q1.3 Q1.4 Q1.5 SB9 SB10 SB11 SB12 SB13 SB14 找零一元 食品五角上货 饮料一元上货 饮料二元上货 饮料2.5元上货 清除货物 找零 出食品五角 出饮料一元 出饮料二元 出饮料2.5元 食品五角绿灯(可以购买) 饮料一元绿灯(可以购买) 饮料二元绿灯(可以购买) 饮料2.5元绿灯(可以购买) 食品五角红灯(物品售完) 饮料一元红灯(物品售完) 饮料二元红灯(物品售完) 饮料2.5元红灯(物品售完) 3.4 顺序功能图(SFC)
转换1 步1 顺序功能图是一种位于其他编程语言之上的图形语言,使用它可
步2 动作1 以对具有并发、选择等复杂结构的系统进行编程。顺序功能图提供了一
种组织程序的图形方法,在顺序功能图中允许和别的语言编程的程序动作2 转换2 嵌套。顺序功能图由步、转换和动作三种主要元件组成,如图3-2所
步3 示。可以用顺序功能图来描述系统的功能,根据它可以很容易地设计出梯形图程序。
图3-2 顺序功能图
3.5 梯形图(LAD)
3.5.1 什么是梯形图(LAD)
梯形图是用的最多的PLC图形编程语言。梯形图语言是在传统电器控制系统中常用的接触器、继电器等图形表达符号的基础上演变而来的。它与电器控制线路图相似,如图3-4所示。继承了传统电器控制逻辑中使用的框架结构、逻辑运算方式和输入输出形式,具有形象、直观、实用的特点。因此,这种编程语言为广大电气技术人员所熟知,是应用最广泛的PLC的编程语言,是PLC的第一编程语言。
图3-4 传统继电器控制线路图和PLC梯形图 a传统继电器控制线路图 b PLC梯形图
在梯形图中,有两根竖直的直线,被称为母线,现在很多PLC只保留了左边的母线,而把右边的母线略去不写。在梯形图中引入了“能流”的概念。左边的母线就如电源的“正极”,而右边的母线就如电源的“负极”。如果有“能流”从左至右流向线圈,则线圈被激励。如果没有能流,则线圈未被激励,“能流”在任何时刻都不会通过接点自右向左流。 3.5.2 自动售货机设计的梯形图(LAD)
本此设计自动售货机主要销售食品、饮料、日用三大类,而食品有五角和一元,饮料有一元和二元,日用有二元和三元。
本次自动售货机的梯形图如下所示:
第四章 工艺流程和工作过程分析
4.1工艺流程
1.此自动售货机可以投入五角、一元的硬币;
2.如果顾客投入硬币在限定的时间内(2分钟)不按任何按键,自动售货机将退还所投硬币;
3.当投入硬币的总值等于或才超过物品价值时,对应的物品指示灯亮绿灯;
4.当物品对应的指示灯亮绿灯时,按下按下相应的按键,相应的物品排出,同时指示灯绿灯闪烁;
5.如果顾客投入硬币总值超过所选物品的价值时,自动售货机会自动将余款退还顾客; 6.当顾客成功购买完一件物品后20秒无操作,自动售货机会自动将余款退还顾客; 7.如果顾客投入硬币后又不想买物品,按下退款按键,自动售货机会自动将余款退还顾客;
8.找零时顾客可选择退一元的还是五角的;
9.当物品不足时,对应的物品指示灯亮红灯,顾客按下相应的按键无反应(不出物品,不减余额),并向总部发送所缺物品。(每样物品都可单独加数)
4.2工作过程分析
网络1是五角信号到加五。网络2是一元信号到加十。网络3是当余额大于或等于五角时,如果按下食品五角按键,余额减五,并出食品五角,八秒后停止。当无食品五角时按下食品五角按键,不减余额,不出物品。网络4、5是食品五角闪烁控制。网络6是当余额大于或等于五角时,如果没按下食品五角按键,则食品五角绿灯常亮。如在出食品五角,则绿灯闪烁。等物食品五角时绿灯不亮不闪烁。网络7是当无食品五角时,食品五角红灯亮。同理,网络8至网络12是食品一元控制程序,网络13至网络17是饮料一元控制程序,网络18至网络22是饮料两元控制程序,网络23至网络27是日用两元控制程序,网络28至网络32是日用三元控制程序。网络33是两分钟无操作计时。网络34是无人操作计时。网络35是无操作找零灯亮。网络36、37分别是找五角、找一元。
第五章 硬件设计
5.1 PLC外围接线图
售货机的外部接线图如图4.1所示,SB2—SB7为物品选择按钮,当投入货币物品绿灯亮(Q2.1—Q2.6),按下SB2—SB7其中一个,对用的KM线圈得电电机转动出相应的物品(Q0.1—Q0.6),当有物品销售完其行程开关断开,物品红灯亮并同时向总部发送物品销售完的信息;当收买物品总值低于投入总值时,可按找零按钮SB1选择找一元还是五角(SB10、SB11)后KM1得电电机转动找零(Q0.0)。
图5-1 售货机的外部接线图
5.2自动售货机模拟操作面板
图5-2 自动售货机模拟操作面板
本设计统一采用按钮开关模拟物品选择,按钮内有绿灯和红灯分别表示可购买物品和物品销售完;指示灯模拟物品输出及找零如图5-2所示。
第六章 总结
6.1 个人总结
本次课程设计我们的主要任务是用PLC实现自动售货机的功能。一个平常看似简单使用方便的自动售货机,其实并不是那么容易就做成的。我们本次设计所做的只是PLC编程部分,以此实现它的功能。
在接到题目后,起初感觉无从下手,在思考过一段时间后,我们通过网络以及去图书馆查阅资料,获得了一些有关自动售货机以及PLC编程方面的信息。基于我们本学期所学习的PLC课程,我们自己尝试着编写了程序。经过多次修改以及调试,我们最终获得成功,实现了预期的功能。在设计中我们用到了光电开关、电磁阀、执行机构等我们没怎么接触过的电子器件,之前我对这些元器件不是很了解,由于在设计中用到了,我查阅了一些资料,对它们的原理以及应用有了深刻地认识。
经过两个礼拜的学习、研究以及经过孙老师的指导.终于按时完成了课程设计。设计主要研究的是自动售货机中有关于PLC的部分。自动售货机是由于劳动密集型的产业构造向技术密集型社会转变的产物。自动售货机可以充分补充人力资源的不足,适应消费环境和消费模式的变化,24小时无人售货的系统可以更省力,运营时需要的资本少、面积小,有吸引人们购买好奇心的自身性能,可以很好地解决人工费用上升的问题等各项优点。所以说,自动售货机是今后小商品和饮料销售方式的一个很好的发展趋势。它的出现将极大的方便人们购买所需要的小商品。
通过本次课程设计,我的收获很大,对PLC的编程有了更进一步的掌握,增加了我的实践动手能力。另外,我还学会了一些基本软件的应用,比如STEP 7 MicroWIN 等。
6.2 致谢
这次课程设计之所以取得成功,得到了多方面的帮助。首先,感谢学校为我们提供这次学习的机会,使我们在多方面有了提高和完善,在理论方面得到了巩固,实践动手能力方面有了提高。再次,感谢指导老师的帮助,在设计过程中遇到难题时,指导老师总是耐心的提供帮助,在这里向老师表示由衷地感谢。最后,对帮助我的同学表示感谢,这次设计能取得成功,也离不开彼此之间的团结互助!
参考文献
【1】 程周·可编程序控制器原理与应用 ·北京:高等教育出版社, 2003年 【2】 王永华·现代电气控制及PLC 应用技术. ·北京:北京航空航天大学出版社,2000
【3】 周美兰,周封,忘岳宇·PLC电气控制与组态设计·北京:科学出版社,2003 【4】 吴建强,姜三勇·可编程控制器原理及应用·哈尔滨工业大学出版社,2000 【5】 吴中俊,黄永红·可编程序控制器原理及应用·北京:机械工业出版社,2003 【6】 张万忠,刘明芹·电器与PLC控制技术·北京:化学工业出版社。2003 【7】 王兆义·可编程序控制器教程·北京:机械工业出版社,2001
【8】 宋继玉·可编程序控制器原理及应用系统设计技术[M] ·北京:冶金工业出版社,1991.
【9】 宋伯生·可编程控制其配置、编程、联网[M] ·北京:中国劳动出版社,1998 【10】 严盈富·西门子S7-200PLC入门[M] ·北京:人民邮电出版社,2007 【11】 网络资料
附录 外文资料 PLC technique discussion and future development Along with the development of the ages, the technique that is nowadays is also gradually perfect, the competition plays more strong; the operation that list depends the artificial has already can't satisfied with the current manufacturing industry foreground, also can't guarantee the request of the higher quantity and high new the image of the technique business enterprise. The people see in produce practice, automate brought the tremendous convenience and the product quantities for people up of assurance, also eased the personnel's labor strength, reduce the establishment on the personnel. The target control of the hard realization in many complicated production lines, whole and excellent turn, the best decision etc., well-trained operation work, technical personnel or expert, governor but can judge and operate easily, can acquire the satisfied result. The research target of the artificial intelligence makes use of the calculator exactly to carry out, imitate these intelligences behavior, moderating the work through person's brain and calculators, with the mode that person's machine combine, for resolve the very complicated problem to look for the best path We come in sight of the control that links after the electric appliances in various situation, that is already the that time generation past, now of after use in the mold a perhaps simple equipments of grass-roots control that the electric appliances can do for the low level only; And the PLC emergence also became the epoch-making topic, adding the vivid software control through a very and stable hardware, making the automation head for the new high tide. The PLC biggest characteristics lie in: The electrical engineering teacher already no longer electric hardware up too many calculations of cost, as long as order the importation that the button switch or the importation of the sensors order to link the PLC up can solve problem, pass to output to order the conjunction contact machine or control the start equipments of the big power after the electric appliances, but the exportation equipments direct conjunction of the small power can. PLC internal containment have the CPU of the CPU, and take to have an I/ O for expand of exterior to connect a people's address and saving machine three big pieces to constitute, CPU core is from an or many is tired to add the machine to constitute, mathematics that they have the logic operation ability, and can read the procedure save the contents of the machine to drive the homologous saving machine and I/ Os to connect after pass the calculation; The I/ O add inner part is tired the input and output system of the machine and exterior link, and deposit the related data into the procedure saving machine or data saving machine; The saving machine can deposit the data that the I/ O input in the saving machine, and in work adjusting to become tired to add the machine and I/ Os to connect, saving machine separately saving machine RAM of the procedure saving machine ROM and dates, the ROM can do deposit of the data permanence in the saving machine, but RAM only for the CPU computes the temporary calculation usage of hour of buffer space. The PLC anti- interference is very and excellent, our root need not concern its service life and the work situation bad, these all problems have already no longer become the topic that we fail, but stay to our is a concern to come to internal resources of make use of the PLC to strengthen the control ability of the equipments for us, make our equipments more gentle. PLC language is not we imagine of edit collected materials the language or language of Cs to carry on weaving the distance, but the trapezoid diagram that the adoption is original after the electric appliances to control, make the electrical engineering teacher while weaving to write the procedure very easy comprehended the PLC language, and a lot of non- electricity professional also very quickly know and go deep into to the PLC. Is PLC one of the advantage above and only, this is also one part that
the people comprehend more and easily, in a lot of equipments, the people have already no longer hoped to see too many control buttons, they damage not only and easily and produce the artificial error easiest, small is not a main error perhaps you can still accept; But lead even is a fatal error greatly is what we can't is tolerant of. New technique always for bringing more safe and convenient operation for us, make we a lot of problems for face on sweep but light, do you understand the HMI? Says the HMI here you basically not clear what it is, also have no interest understanding, change one inside text explains it into the touch to hold or man-machine interface you knew, and it combines with the PLC to our larger space. HMI the control not only is reduced the control press button, increase the vivid of the control, more main of it is can sequence of, and at can the change data input to output the feedback with data, control in the temperature curve of imitate but also can keep the manifestation of view to come out. And can write the function help procedure through a plait to provide the help of various what lies in one's power, the one who make operate reduces the otiose error. Currently the HMI factory is also more and more, the function is also more and more strong, the price is also more and more low, and the noodles of the usage are wide more and more. The HMI foreground can say that think ° to be good very. At a lot of situations, the list is a smooth movement that can't guarantee the equipments by the control of the single machine, but pass the information exchanges of the equipments and equipments to attain the result that we want. For example fore pack and the examination of the empress work preface, we will arrive wrapping information feedback to examine the place, and examine the information of the place to also want the feedback to packing. Pass the information share thus to make both the chain connect, becoming a total body, the match of your that thus make is more close, at each other attain to reflect the result that mutually flick. The PLC correspondence has already come more body now its value, at the PLC and correspondence between PLCs, can pass the communication of the information and the share of the dates to guarantee that of the equipments moderates mutually, the result that arrive already to repair with each other. Data conversion the adoption RS232 between PLC connect to come to the transmission data, but the RS232 pick up a people and can guarantee 10 meters only of deliver the distance, if in the distance of 1000 meters we can pass the RS485 to carry on the correspondence, the longer distance can pass the MODEL only to carry on deliver. The PLC data transmission is just to be called a form to it in a piece of and continuous address that the data of the inner part delivers the other party, we, the PLC of the other party passes to read data in the watch to carry on the operation. If the data that data in the watch is a to establish generally, that is just the general data transmission, for example today of oil price rise, I want to deliver the price of the oil price to lose the oil ally on board, that is the share of the data; But take data in the watch for an instruction procedure that controls the PLC, that had the difficulty very much, for example you have to control one pedestal robot to press the action work that you imagine, you will draw up for it the form that a procedure combine with the data sends out to pass by. The form that information transport contain single work, the half a work and the difference of a workers .The meaning of the single work also is to say both, a can send out only, but a can receive only, for example a spy he can receive the designation of the superior only, but can't give the superior reply; A work of half is also 2 and can send out similar to accept the data, but can't send out and accept at the same time, for example when you make a phone call is to can't answer the phone, the other party also; But whole pair works is both can send out and accept the data, and can send out and accept at the same time. Be like the Internet is a typical example. The
process that information transport also has synchronous and different step cent: The data line and the clock lines are synchronous when synchronous meaning lie in sending out the data, is also the data signal and the clock signals to be carry on by the CPU to send out at the same time, this needs to all want the specialized clock signal each other to carry on the transmission and connect to send, and is constrained, the characteristics of this kind of method lies in its speed very quick, but correspond work time of take up the CPU and also want to be long oppositely, at the same time the technique difficulty also very big. Its request lies in canting have an error margins in a dates deliver, otherwise the whole piece according to compare the occurrence mistake, this on the hardware is a bigger difficulty. Applied more and more extensive in some appropriative equipments, be like the appropriative medical treatment equipments, the numerical signal equipments...etc., in compare the one data deliver, its result is very good. And the different step is an application the most extensive, this receive benefit in it of technique difficulty is opposite and want to be small, at the same time not need to prepare the specialized clock signal, its characteristics to lie in, its data is partition, the long-lost send out and accept, be the CPU is too busy of time can grind to a stop sex to work, also reduced the difficulty on the hardware, the data throw to lose at the same time opposite want to be little, we can pass the examination of the data to observe whether the data that we send out has the mistake or not, be like strange accidentally the method, tired addition and eight efficacies method etc., can use to helps whether the data that we examine to send out have or not the mistake occurrence, pass the feedback to carry on the discriminator. A line of transmission of the information contains a string of and combine the cent of: The usual PLC is 8 machines, certainly also having 16 machines. We can be an at the time of sending out the data a send out to the other party, also can be 88 send out the data to the other party, an and 8 differentiations are also the as that we say to send out the data and combine sends out the data. A speed is more and slowly, but as long as 2 or three lines can solve problem, and can use the telephone line to carry on the long range control. But combine the ocular transmission speed is very quick of, it is a string of ocular of 25600%, occupy the advantage in the short distance, the in view of the fact TTL electricity is even, being limited by the scope of one meter generally, it combine unwell used for the data transmission of the long pull, thus the cost is too expensive. Under a lot of circumstances we are total to like to adopt the string to combine the conversion chip to carry on deliver, under this kind of circumstance not need us to carry on to deposited the machine to establish too and complicatedly, but carry on the data exchanges through the data transmission instruction directly, but is not a very viable way in the correspondence, because the PLC of the other party must has been wait for your data exportation at the time of sending out the data, it can't do other works. When you are reading the book, you hear someone knock on door, you stop to start up of affair, open the door and combine to continue with the one who knock on door a dialogue, the telephone of this time rang, you signal hint to connect a telephone, after connecting the telephone through, return overdo come together knock on door to have a conversation, after dialogue complete, you continue again to see your book, this kind of circumstance we are called the interruption to it, it has the authority, also having sex of have the initiative, the PLC had such function .Its characteristics lie in us and may meet the urgently abrupt affairs in the operation process of the equipments, we want to stop to start immediately up of work, the whereabouts manages the more important affair, this kind of circumstance is we usually meet of, PLC while carry out urgent mission, total will keep the current appearance first, for example
the address of the procedure, CPU of tired add the machine data etc., be like to stick down which the book that we see is when we open the door the page or simply make a mark, because we treat and would still need to continue immediately after book of see the behind. The CPU always does the affair that should do according to our will, but your mistake of give it an affair, it also would be same to do, this we must notice.
译文:PLC技术的讨论和未来的发展,随着年龄的发展,该技术是时下的竞争也日趋完善,发挥更强大的操作列表取决于人工已经不能满足目前的制造行业前景,也不能保证的要求,更高的数量和高新技术企业的形象。人们在生产实践中看到,自动化带来了极大的便利和产品数量的人的保证,也缓解了人员的劳动强度,减少人员建立。的目标控制的努力实现许多复杂的生产线,整体和出色的转弯,最好的决定等,训练有素的操作人员,技术人员或专家,州长,但可以很容易判断和操作,可以取得满意的结果。的研究目标的人工智能使得使用计算器完全以携带出来,模仿这些智能行为,调节工作通过人的大脑和计算器,人的机相结合的模式,为解决非常复杂的问题寻找最好的路径在眼前的控制,后在各种场合的电器,已经是当时一代人的时间,现在在模具使用后的基层控制的电器可以做一个也许是设备简单,低的水平,以及PLC的出现也成为了具有划时代意义的主题,添加了生动的一个非常稳定的硬件,通过软件控制的自动化头的新高潮。 PLC的最大特点在于:电气工程教师已经不再是电了太多的硬件成本计算,只要输入按钮开关或进口的传感器订单的PLC连接起来,就可以解决问题,通过输出到命令一起交流接触器或控制设备功率大的电器后开始,但出口的小功率设备直接结合。 PLC内部牵制拥有的CPU的CPU,并采取到有一个I / O,扩大外部连接一个人的地址和节省机3大作品构成,CPU核心是由一个或许多是累到添加机器到构成“,”数学“,他们的逻辑运算能力,并能读取程序的机器驱动的内容保存了相应的节能机和I / O连接后,通过计算,I / O添加内部累了输入输出系统的机器和外部链接的相关数据,并存入到程序中保存计算机的或保存数据机的节能机可存放的数据,I / O输入的节能机,并在工作中调整变得疲惫添加本机的I / O连接,节省机分别保存计算机内存的程序,节省了机器的ROM和日期,可以做的ROM存放的数据持久性的节能机,但RAM的CPU计算临时计算小时的缓冲空间的使用。 PLC的抗干扰是非常出色,我们的根不用关心它的使用寿命和工作的情况不好,所有这些问题已经不再成为话题,我们失败了,但留下来,我们的内部资源来关注利用了PLC的控制能力加强我们的设备,我们的设备更加柔和。
PLC语言是不是我们想象的编辑收集材料的语言或语言CS进行编织的距离,但通过后,电器控制,电气工程教师在编织写的程序梯形图很容易理解的PLC语言,大量的非电专业也很快知道,深入到PLC。以上的优势之一是PLC和唯一的,这也是其中的一部分的人理解和方便,在很多的设备,人们已经不再希望看到太多的控制按钮,它们不仅容易损坏产生人为误差最简单的,小的是没有一个主要的错误,也许你仍然可以接受;但铅,甚至是致命的错误大大是什么,我们不能宽容。新技术总是为我们带来更安全,更方便的操作,使我们有很多的人脸扫描,但光的问题,你了解HMI?说的人机界面,在这里你基本上没有清楚它是什么,也没有兴趣了解,改变一个内文解释它到触摸持有或人机界面,你知道,和,结合PLC我们更大的空间。 HMI的控制,不仅减少的控制按下按钮,增加了生动的控制,更主要的是可以序列,可以改变数据输入到输出的反馈数据,控制温度曲线在模仿,但也能保持的表现看出来。并且可以写入功能的帮助过程,通过辫子提供的帮助下,不同的是什么样的一个人的力量,使操作减少没有用的错误。目前HMI厂也越来越多,功能也越来越强,价格也越来越低,使用面广泛的越来越多。可以说,认为°很好很HMI前景。在很多情况下,该列表是平稳的运动,不能保证设备的单台计算机的控制,但通过信息交流,设备和设备,以达到我们想要的结果。例如,前组和后工序的检查,我们将,到达包装信息反馈到检查的地方,检查的地方,也希望反馈到包装的信息。通过信息共享,从而使两个链连接,成为一个总的身体,你的比赛,从而使更接近,在彼此达到反映的结果是相互挥。 PLC的通信已经更多的身体现在它的价值,在PLC与PLC之间的通信,可以通过交流信息和份额的日期,以保证设备的温和派互相到达已经修复,结果彼此。数据转换PLC之间通过RS232连接来传输数据,但RS232拿起一个人,只可保证10米的传输距离在1000米的距离,如
果我们可以通过RS485进行通信更长的距离可以通过该模型仅进行传递。 PLC的数据传输是PLC的对方只是被称为形式和连续的地址内的数据,提供了对方,我们在一块,传递给读取的表中的数据进行该操作。如果数据的表中的数据是一个普遍建立,这只是一般的数据传输,例如石油价格上涨的今天,我要在船上提供的价格,成品油价格就失去了油的盟友,这是的份额的数据,但在手表的指令过程控制PLC,有困难非常多,例如按行动工作,你能想象,你要控制一个基座机器人的数据,你会得出它的程序与数据相结合的形式,发送到通过。信息传输的形式,包含单一的工作,一半的工作和工人的区别。单一的工作的意义,也就是都认为,可以送出去而已,但只能接收,例如一个间谍,他可以上级只接受指定的,但不能给上级的答复;一个工作的一半是可以发出类似的接受数据,但不能发送和接受的同时,例如,当你打个电话,是不能接听电话时,对方也;但整双鞋的作品,都可以发送和接受数据,并能同时发送和接受。喜欢上网,是一个典型的例子。信息传输的方法,也有同步和不同的步骤占:数据线和时钟线时是同步的同步的意义在于,在发送的数据,也是要由CPU来进行发送的数据信号和时钟信号在同一时间,这需要所有要相互进行传输,发送连接到专门的时钟信号,并受到约束,这种方法的特点在于它的速度非常快,但对应的工作时间,占用CPU,并且还需要很长,相反,在同一时间,技术难度也非常大。它的要求是伪善的有正负误差在日期交付,否则整片比较发生的错误,这在硬件上是一个更大的困难。应用越来越广泛一些专用的设备,像的专用医疗设备,数字信号设备...等,在比较一个数据传输,其结果是非常好的。而不同的步骤是应用最广泛的,这受益于它的技术难度是相对要小,在相同的时间,需要准备专门的时钟信号,其特点在于,它的数据分区,失传已久的发送和接受,CPU是太忙的时间可能被迫停止性工作,也减少了在硬件上的困难,的数据扔失去的同时相反要小,我们可以通过检查数据来观察我们发送的数据是否有错或不喜欢奇怪的意外的方法,累此外,8疗效的方法等,可以用它来帮助我们检查数据是否发送有或没有错误发生,通过反馈来进行的鉴别。 A线的发送的信息中包含的字符串,并结合%的:通常的PLC是8机,当然也具有16台机器。我们可以发送出的数据发送给对方,也可以是88对方发送的数据的时候,和8的分化,我们也说,发送出的数据,结合发出数据。的速度,慢慢地,但只要2或3线就可以解决问题,并且可以使用电话线进行远程控制。但是,结合眼传输速度是非常快的,它是一个字符串眼的25600%,占据优势在短距离内,在图的事实TTL电甚至,被的范围1米一般,结合不适用于数据传输的长拉,因而成本是太昂贵了。在很多情况下,我们总喜欢采用字符串,结合转换芯片进行提供,在这种情况下,并不需要我们进行沉积也和复杂的机器上建立的,但进行数据交流,通过直接的数据传输指令,但不是一个非常可行的方法,在通信,因为对方的PLC必须一直等待发送数据的时候,为您的数据出口,不能做其他工作。当你读完这本书,你听到有人敲门,你停止启动的恋情,打开门,一个人敲门对话结合起来,继续的这个时候,电话响了,你的信号提示,连接电话,通过电话连接后,回过头来敲门进行对话,对话完成后,你再继续看你的书,这种情况我们称为中断,它具有权威,也有主动的性别,PLC有这样的功能,它的特点在于我们的设备在运行过程中可能会遇到的紧急突发事件,我们要停下来立即开始工作,下落管理更重要的事情,这种情况是我们经常遇到,PLC,同时开展紧迫的任务,总量将保持目前的外观,例如地址的程序,CPU的疲惫添加本机数据等,如:坚持下来,这本书我们看到的是,当我们打开门的页面或简单地做一个记号,因为我们处理仍然需要继续看到后面的书后,立即。 CPU始终不应该做这件事,按照我们的意志,但你给它婚外情的错误,它也将是相同的,这一点,我们必须注意的。
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- fupindai.com 版权所有 赣ICP备2024042792号-2
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务