首页 自动加料机PLC控制系统

自动加料机PLC控制系统

举报
开通vip

自动加料机PLC控制系统自动加料机PLC控制系统 目录 0 前言 ................................................................................................................... 1 1概述 ......................................................................................................................

自动加料机PLC控制系统
自动加料机PLC控制系统 目录 0 前言 ................................................................................................................... 1 1概述 .................................................................................................................... 2 1.1课题总体 分析 定性数据统计分析pdf销售业绩分析模板建筑结构震害分析销售进度分析表京东商城竞争战略分析 与设计 ...................................................................................... 2 2 可编程控制器 .................................................................................................... 4 2.1 可编程控制器的基本结构 ............................................................................. 4 2.2 可编程控制器的工作原理 ............................................................................. 5 2.3 可编程控制器的性能 ..................................................................................... 5 2.4 可编程控制器的应用 ..................................................................................... 6 3 S7-200系列可编程控制器 .............................................................................. 7 3.1 S7-200 系列PLC的CPU ............................................................................... 7 3.2 S7-200 系列PLC的通信 ............................................................................... 8 3.3 PLC应用中需要注意的问题 ....................................................................... 9 3.3.1 工作环境 ..................................................................................................... 9 3.3.2 控制系统中干扰及其来源 ...................................................................... 10 3.3.3 主要抗干扰措施 ...................................................................................... 11 3.4 S7-200系列PLC模块 .................................................................................. 13 3.4.1 数字量扩展模块 ........................................................................................ 13 3.4.2 模拟量扩展模块与热电阻、热电偶扩展模块 ......................................... 13 3.3 PLC与其他 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 的比较 ................................................................................ 14 4 自动加料机PLC控制系统硬件设计 ............................................................. 16 4.1 CPU选型 ....................................................................................................... 16 4.2 PLC输入输出点的地址分配表 ................................................................. 16 4.3 PLC主机I/O接线图 .................................................................................... 17 4.4 模拟量输入模块的选用 ............................................................................... 17 4.4.1 模拟量输入模块概述 .............................................................................. 17 4.4.2 模拟量输入模块的选用原则 .................................................................... 18 4.4.3 模拟量输入模块选型 ................................................................................ 18 4.4.4 模拟量输入模块与传感器接线图 ............................................................. 20 4.5 执行机构的选择 ........................................................................................... 20 4.5.1 电磁阀原理 ................................................................................................ 20 4.5.2 电磁阀选用原则 ........................................................................................ 21 4.5.3 电磁阀选型 ................................................................................................ 22 4.5.4电磁阀与PLC的连接 ............................................................................... 22 4.6 测量机构的选用原则 ................................................................................. 23 4.6.1 传感器简介 ................................................................................................ 23 4.6.2 传感器选择的基本原则 ............................................................................ 23 4.6.3 传感器的选型 ............................................................................................ 24 4.6.4 传感器的选用小结 .................................................................................... 24 4.6.5 传感器信号放大电路 ................................................................................ 25 4.6.6 影响测量结果的因素及解决办法 ............................................................. 26 5 自动加料机PLC控制系统软件设计 ............................................................. 27 5.1系统流程图 .................................................................................................... 27 5.2 控制程序设计 ............................................................................................... 28 5.2.1 系统功能块图 ............................................................................................ 28 5.2.2 控制程序设计 ............................................................................................ 29 5.3 自动加料机系统控制程序图 ....................................................................... 31 5.4 提高系统动态称重精度的建议.................................................................... 37 6 技术经济分析 .................................................................................................. 38 7结 论 ................................................................................................................ 39 致谢 .................................................................................. 错误~未定义书签。40 参考文献 ............................................................................................................. 40 附录A 译文 ...................................................................................................... 41 附录B 外文文献 .............................................................................................. 53 0 前言 近年来,随着我国经济、计算机技术和自动化技术的发展,自动加料机控制系统的相关技术也日益成熟,并以其计量准确、安全可靠、自动化程度高,广泛应用于化工、矿山、建材、食品、冶金、港口、电力等多种行业。 自动加料机的加料精确度直接影响到企业的信誉和经济效益。过去很多企业采用机械称量、人工装袋,劳动强度大、速度慢、精度低。近几年,采用电子称量装置虽然可使其静态称量精度大大提高,但在连续生产过程中,其动态精度仍不能保证。PLC作为一个新兴的工业控制器,以其体积小,功能齐全,价格低廉,可靠性高,维护方便等优点,在各个领域获 [1]得了广泛应用,并且在许多工业领域取得了良好的经济效益和社会效益。 本设计的自动加料机控制系统就是采用自动控制技术来实现功能的,并采用了特有的二级给料方式,这样就大大提高了工作的效率,整个过程又快又稳。通过技术改造后生产效率大幅度提高,工人的劳动强度明显降低,控制精度进一步提高。 1 1 概述 1.1 课题总体分析与设计 本系统设计了秤体机械结构,设置一缓冲料斗将物料送往称斗,由称重传感器实现电子称量。控制器根据称重传感器的检测信号顺序控制缓冲料斗、称量斗、包装机构的动作,由可编程控制器通过软件对称重误差进行补偿,提高计量精度。动态定量称重和自动包装系统总体结构如图1-1所示。本系统采用二级给料方式,粗给料流量大,用较短的时间加入额定重量的约95%,而细给料流量小,为额定重量的约5%。前者侧重于包装速度,后者保证称量精度,解决了包装效率与称量精度之间的矛盾。 当按下启动按扭的时候,称重电磁阀1-1得电,气缸打开放料闸板,成品仓中的化肥通过大口径漏斗灌装到包装袋中,当重量达到48kg的时候,称重传感器重量信号转化成电压信号,传到PLC内部,PLC经过内部运算,关闭称重电磁1-1闸板,打开电磁阀1-2闸板,化肥通过小口径漏斗灌状到包装袋中,这样就提高了计量的精度。灌装任务完成之后,延迟0.5 s,推包电磁阀得电,推杆动作,然后复位,完成一次袋装过程。循环整个工作过程。 图1-1自动加料机控制系统示意图 Fig.1-1 Fertilizer bag system diagram 2 从示意图中,可以得到整个系统分为两大部分:测量系统和控制系统。这两大部分又包括了许多小的细节,在后面的章节里给出了系统的设计过程。 1.2 论文构成介绍 论文第一章主要内容为系统的研究方案及论证、系统总体分析和设计,为整个系统设计定下了基调并搭建了主体框架。第二章为可编程控制器的简介,介绍PLC的基本结构、工作原理、及其性能和应用。第三章为西门子公司的S7-200的简介,以及本设计采用S7-200的原因和优点。第四章为自动加料机PLC控制系统的硬件设计,以CPU、模拟量输入模块、电磁阀、传感器的分析和选型为主要内容。第五章为自动加料机PLC控制系统软件设计,软件的设计及调试,内容比较详细,基本达到了设计要求,用STEP7-Micro/WIN32编程软件编写的系统程序。第五章,为本系统的技术经济分析。第六章,是结合资料和感想对本文的总结。 3 2 可编程控制器 现代社会要求制造业对市场需求做出迅速的反应,生产出小批量,多品种,多规格,低成本和高质量的产品,为了满足这一要求,生产设备和自动生产线的控制系统必须具有极高的可靠性和灵活性,可编程控制器( Programmable logic Controller ,PLC)正是顺应这一要求出现的,它是以微处理器为基础的通用工业控制装置。 国际电工委员会(IBC)在1985年的 标准 excel标准偏差excel标准偏差函数exl标准差函数国标检验抽样标准表免费下载红头文件格式标准下载 草案第3稿中,对PLC作了如下定义:可编程控制器是一种数字运算操作的电子系统,专为在工业环境下应用而设计。它采用可编程序的存储器,用来在其内部存储执行逻辑运算,顺序控制,定时,计数和算术运算等操 [2] 作的指令,并通过数字式,模拟式的输入和输出,控制各种类型的机械或生产过程。2.1 可编程控制器的基本结构 PLC主要由CPU模块,输入模块,输出模块和编程装置组成。PLC的特殊功能模块用来完成某些特殊的任务。PLC的控制系统如图1-1所示。 扩展机架 电源模块 接口模块 输输 接触器 按 钮 电磁阀 入出 选择开关 CPU模块 指示灯 模模 限位开关 块块 通信接口 电 源 , 电 源 通信网络 其他设备 其他PLC 计算机 图2-1 PLC的控制系统示意图 Fig. 2-1 PLC control system diagram 1)CPU模块:CPU模块主要由微处理器和存储器组成。在PLC控制系中,CPU 相当于人的大脑和心脏,它不断的采集输入信号,执行用户程序,刷新系统的输出;存储器用来存储程序和数据。 2)I/O模块:输入模块和输出模块简称为I/O模块,是连接系统外部设备和CPU模块的桥梁。 3)编程器:编程器用来生成用户程序,并用它进行编辑,检查,修改和监视用户程 4 序的执行情况。 4)电源:PLC一般使用AC220V电源或DC24V电源。内部的开关电源为各模块提供 [3] 不同的电压等级的直流电源。 2.2 可编程控制器的工作原理 PLC的工作一般分为三个主要阶段:输入采样阶段、程序执行阶段和输出刷新阶段。 1)输入采样阶段:PLC以工作方式,按顺序将所有信号读入到寄存器输入状态的输入映像区中存储,这一过程称为采样。在整个工作周期内,这个采样结果的内容不会改变,而且这个采样结果将在PLC执行程序时被使用。 2)程序执行阶段:PLC按顺序对程序进行扫描,即从上到下、从左到右地扫描每条指令,并分别从输入映像区和输出映像区中 获得所需的数据进行运算、处理,再将程序执行的结果写入寄存结果的输出映像区中保存。这个结果在程序执行期间可能发生变化,但在整个程序未完毕之前不会送到输出端口。 在执行完用户所有程序后,PLC将输出映像区中的内容送到寄存 3)输出刷新阶段: [2]输出状态的输出锁存器中,再去驱动用户设备。 2.3 可编程控制器的性能 1)编程方法简单易学:梯形图是使用最多的PLC的编程语言,其电路符号和表达方式与继电器电路原理图相似。梯形图语言实际上是一种面向用户的高级语言,PLC在执行梯形图程序时,用解释程序将它“翻译”成汇编语言后再去执行。 2)功能强,性能价格比高:一台小型PLC内有成百上千个可供用户使用的编程元件,有很强的功能,可以实现非常复杂的控制功能。与功能相同的继电器相比,具有很高的性能价格比。PLC可以通过信联网,实现分散控制,集中管理。 3)硬件配套齐全,用户使用方便,适应性强:PLC产品已经标准化,系统化,模块化,配备有品种齐全的各种硬件装置供用户选择,用户能灵活的进行系统配置,组成不同功能,不同规模的系统。PLC的安装接线也很方便,一般用接线端子连接外部接线,带负载能力强,可以直接驱动一般的电磁阀和小型交流接触器。硬件配置确定后,还可以通过修改用户程序,适应工艺条件的变化。 4)可靠性高,抗干扰能力强:用软件代替大量的中间继电器和时间继电器,仅剩下与输入和输出有关的少量硬件元件,接线可减少继电器控制系统的1/10~1/100,因触点接触不良造成的故障大大减少。PLC采用一系列硬件和软件抗干扰措施,具有很强的抗干扰 5 能力,平均无故障时间达到书万小时以上,可以直接用于有强烈干扰的工业生产现场。 5)系统的设计、安装、调试工作量少:PLC用软件功能取代了继电器控制系统中大量的中间继电器、时间继电器、计数器继电器,使控制柜的设计、安装、接线工作量大大减少。PLC的梯形图程序一般采用顺序控制设计法来设计。对于复杂的系统,设计梯形图的时间比设计相同功能的继电器系统电路图的时间要少得多。PLC的用户程序可以在实验室内调试。完成了系统的安装和接线后,在现场的统调过程中发现的问题一般通过修改程 [4] 序可以解决。 2.4 可编程控制器的应用 在发达的工业国家,PLC已经广泛地应用在所有的工业部门,随着其性能价格比的不断提高,应用范围不断的扩大,主要有以下几个方面: 1)数字量逻辑控制:PLC用“与”,“或”,“非”等逻辑指令来实现触点和电路的串,并联,代替继电器进行组合逻辑控制,定时控制与顺序逻辑控制。数字逻辑控制可以用于单台设备,也可用于自动生产线 2)运动控制:PLC使用专有的运动控制模块,对直线运动和圆周运动的位置,速度和加速度进行控制,可以实现单轴,双轴,3轴和多轴位置控制,使运动控制与顺序控制功能有机的结合在一起, PLC的运动控制 功能广泛应用于各种机械。 3)闭环过程控制:PLC通过模拟量I/O模块,实现对模拟量(Analog)和数字量(Digital)之间的转换,一般称为A/D转换和D/A转换,并对模拟量实行闭环PID控制。其PID闭环控制功能已经广泛地应用与塑料挤压成型机,加热炉,热处理炉,锅炉等设备,以及轻工,化工,机械,冶金,电力,建材等行业。 4)数据处理:现代的PLC具有数学运算,数据传送,转换,排序和查表,位操作等功能,可以完成数据的采集,分析和处理。 5)通信联网:PLC的通信包括主机与远程I/O之间的通信,PLC与其他智能控制设备之间的通信。PLC与其他智能的设备组成“集中管理,分散控制的”的分布式控制系统。 6 3 S7-200系列可编程控制器 西门子公司的SIMATIC S7-200 系列属于小型PLC,可用于替代继电器的简单控制场合,也可用于复杂的自动化控制系统。适用于各行各业检测监测及控制的自动化。S7-200的外形如图2-1所示。 图3-1 S7-200 PLC Fig. 3-1 S7-200 PLC S7-200 系列的强大功能使其无cv 论在独立运行中或相连成网络皆能实现复杂控制功能,因此S7-200系列具有极高的性价比。 S7-200 系列出色表现在以下几个方面:极高的可靠性,极丰富的指令,易于掌握便捷的操作丰富的内置集成功能,实时特性强劲的通讯能力,丰富的扩展模块。 S7-200CPU的指令功能强,有传送、比较、移位、循环移位、产生补码、调用子程序、脉冲宽度调整、脉冲序列输出、跳转、数制转换、算术运算、字逻辑运算、浮点数运算、开平方、三角函数和PID控制等指令。采用主程序、最多8级子程序和中断程序的程序结构,用户可以使用1,255ms的定时中断。用户程序可以设3级口令保护,监控定时器(看门狗)的定时时间为300ms。 S7-200 系列在集散自动化系统中充分发挥其强大功能,使用范围可覆盖从替代继电器的简单控制到更复杂的自动化控制应用领域。极为广泛覆盖所有与自动检测自动化控制有关的工业及民用领域,包括各种机床机械,电力设施,民用设施,环境保护设备等等。如: [5] 冲压机床,磨床,印刷机械,橡胶化工机械,中央空调电梯,控制运动系统。3.1 S7-200 系列PLC的CPU S7-200 系列PLC CPU可提供4个不同的基本型号的8种CPU 1)CPU 221:本机集成6输入/4输出共10个数字量I/O点无I/O扩展能力,6K字节程序和数据存储空间。4个独立的30kHz高速计数器。2路独立的20kHz高速脉冲输出。1个RS-485 7 通讯/编程口,具有PPI 通讯协议MPI、通讯协议和自由方式通讯能力,非常适合于小点数控制的微型控制器。 2)CPU 222:本机集成8输入/6输出,共14个数字量I/O点可连接2个扩展模块,最大扩展至78路数字量I/O点或10路模拟量I/O点。6K字节程序和数据存储空间,4个独立的30kHz高速计数器。2路独立的20kHz高速脉冲输出。具有PID控制器。1个RS-485通讯/编程口具有PPI、通讯协议MPI通讯协议和自由方式通讯能力,是具有扩展能力的适应性更广泛的全功能控制器。 3)CPU 224:本机集成14输入/10输出共24个数字量I/O点。可连接7个扩展模块,最大扩展至168路数字量I/O点或35路模拟量I/O点,13K字节程序和数据存储空间。6个独立的30kHz高速计数器。2路独立的20kHz高速脉冲输出,具有PID控制器。1个RS-485通讯/编程口,具有PPI通讯协议MPI通讯协议和自由方式通讯能力。I/O端子排可很容易地整体拆卸,是具有较强控制能力的控制器。 4)CPU 226:本机集成24输入/16输出共40个数字量I/O点。可连接7个扩展模块,最大扩展至248路数字量I/O点或35路模拟量I/O点。13K字节程序和数据存储空间。6个独立的30kHz高速计数器。2路独立的20kHz高速脉冲输出。具有PID控制器2个。RS-485通讯/编程口具有PPI通讯协议、MPI通讯协议和自由方式通讯能力。I/O端子排可很容易地整体拆卸,用于较高要求的控制系统,具有更多的输入/输出点,更强的模块扩展能力,更快的运行速度和功能更强的内部集成特殊功能可完全适应于一些复杂的中小型控制系统。 5)CPU 226XM:本机集成24输入/16输出共40个数字量I/O点。可连接7个扩展模块。最大扩展至248路数字量I/O 点或35路模拟量I/O点。26K字节程序和数据存储空间。6个独立的30kHz高速计数器,2路独立的20kHz高速脉冲输出。具有PID控制器,2个R-S485通讯/编程口,具有PPI通讯协议MPI、通讯协议和自由方式通讯能力。I/O端子排可很容易地整体拆卸,用于较高要求的控制系统具有更多的输入/输出点,更强的模块扩展能力,更快的 [7]运行速度和功能更强的内部集成特殊功能可完全适应于一些复杂的中小型控制系统。 3.2 S7-200 系列PLC的通信 内部集成的PPI接口为SIMATIC S7-200的用户提供了强大的通讯功能。PPI接口物理特性为RS-485可在三种方式下工作: 1)PPI方式:PPI通讯协议是西门子专为S7-200系列PLC开发的一个通讯协议。可通过普通的两芯屏蔽双绞电缆进行联网。 8 2)MPI 方式:S7-200可以通过内置接口连接到MPI 网络上。S7-200CPU在MPI网络中作为从站,它们彼此间不能通讯。 3)自由通讯口方式:自由通讯口方式是S7-200PLC的一个很有特色的功能。它使S7-200 PLC可以与任何通讯协议公开的其它设备控制器进行通讯,即S7-200 PLC可以由用户自己 [4]定义通讯协议。 3.3 PLC应用中需要注意的问题 PLC是一种用于工业生产自动化控制的设备,一般不需要采取什么措施,就可以直接在工业环境中使用。然而,尽管有如上所述的可靠性较高,抗干扰能力较强,但当生产环境过于恶劣,电磁干扰特别强烈,或安装使用不当,就可能造成程序错误或运算错误,从而产生误输入并引起误输出,这将会造成设备的失控和误动作,从而不能保证PLC的正常运行,要提高PLC控制系统可靠性,一方面要求PLC生产厂家提高设备的抗干扰能力;另一方面,要求设计、安装和使用维护中引起高度重视,多方配合才能完善解决问题,有效地增强系统的抗干扰性能。因此在使用中应注意以下问题: 3.3.1 工作环境 1)温度 PLC要求环境温度在0,55?,安装时不能放在发热量大的元件下面,四周通风散热的空间应足够大。 2)湿度 为了保证PLC的绝缘性能,空气的相对湿度应小于85%(无凝露)。 3)震动 应使PLC远离强烈的震动源,防止振动频率为10,55Hz的频繁或连续振动。当使用环境不可避免震动时,必须采取减震措施,如采用减震胶等。 4)空气 避免有腐蚀和易燃的气体,例如氯化氢、硫化氢等。对于空气中有较多粉尘或腐蚀性气体的环境,可将PLC安装在封闭性较好的控制室或控制柜中。 5)电源 PLC对于电源线带来的干扰具有一定的抵制能力。在可靠性要求很高或电源干扰特别严重的环境中,可以安装一台带屏蔽层的隔离变压器,以减少设备与地之间的干扰。一般PLC都有直流24V输出提供给输入端,当输入端使用外接直流电源时,应选用直流稳压电 9 [6] 源。因为普通的整流滤波电源,由于纹波的影响,容易使PLC接收到错误信息。3.3.2 控制系统中干扰及其来源 现场电磁干扰是PLC控制系统中最常见也是最易影响系统可靠性的因素之一,所谓治标先治本,找出问题所在,才能提出解决问题的办法。因此必须知道现场干扰的源头。 干扰源及一般分类影响PLC控制系统的干扰源,大都产生在电流或电压剧烈变化的部位,其原因是电流改变产生磁场,对设备产生电磁辐射;磁场改变产生电流,电磁高速产生电磁波。通常电磁干扰按干扰模式不同,分为共模干扰和差模干扰。共模干扰是信号对地的电位差,主要由电网串入、地电位差及空间电磁辐射在信号线上感应的共态(同方向)电压叠加所形成。共模电压通过不对称电路可转换成差模电压,直接影响测控信号,造成元器件损坏(这就是一些系统I/O模件损坏率较高的主要原因),这种共模干扰可为直流,亦可为交流。差模干扰是指作用于信号两极间的干扰电压,主要由空间电磁场在信号间耦合感应及由不平衡电路转换共模干扰所形成的电压,这种干扰叠加在信号上,直接影响测量与控制精度。 PLC系统中干扰的主要来源及途径 1)强电干扰: PLC系统的正常供电电源均由电网供电。由于电网覆盖范围广,它将受到所有空间电磁干扰而在线路上感应电压。尤其是电网内部的变化,刀开关操作浪涌、大型电力设备起停、交直流传动装置引起的谐波、电网短路暂态冲击等,都通过输电线路传到电源原边。 2)柜内干扰: 控制柜内的高压电器,大的电感性负载,混乱的布线都容易对PLC造成一定程度的干扰。 3)来自信号线引入的干扰: 与PLC控制系统连接的各类信号传输线,除了传输有效的各类信息之外,总会有外部干扰信号侵入。此干扰主要有两种途径:一是通过变送器供电电源或共用信号仪表的供电电源串入的电网干扰,这往往被忽视;二是信号线受空间电磁辐射感应的干扰,即信号线上的外部感应干扰,这是很严重的。由信号引入干扰会引起I/O信号工作异常和测量精度大大降低,严重时将引起元器件损伤。 4)来自接地系统混乱时的干扰: 接地是提高电子设备电磁兼容性(EMC)的有效手段之一。正确的接地,既能抑制电 10 磁干扰的影响,又能抑制设备向外发出干扰;而错误的接地,反而会引入严重的干扰信号,使PLC系统将无法正常工作。来自PLC系统内部的干扰主要由系统内部元器件及电路间的相互电磁辐射产生,如逻辑电路相互辐射及其对模拟电路的影响,模拟地与逻辑地的相互影响及元器件间的相互不匹配使用等。 5)变频器干扰: 一是变频器启动及运行过程中产生谐波对电网产生传导干扰,引起电网电压畸变,影响电网的供电质量;二是变频器的输出会产生较强的电磁辐射干扰,影响周边设备的正常 [6]工作。 3.3.3 主要抗干扰措施 1)电源的合理处理,抑制电网引入的干扰。 对于电源引入的电网干扰可以安装一台带屏蔽层的变比为1:1的隔离变压器,以减少设备与地之间的干扰,还可以在电源输入端串接LC滤波电路。 2)安装与布线 动力线、控制线以及PLC的电源线和I/O线应分别配线,隔离变压器与PLC和I/O之间应采用双胶线连接。将PLC的I/O线和大功率线分开走线,如必须在同一线槽内,分开捆扎交流线、直流线,若条件允许,分槽走线最好,这不仅能使其有尽可能大的空间距离,并能将干扰降到最低限度。 PLC应远离强干扰源如电焊机、大功率硅整流装置和大型动力设备,不能与高压电器安装在同一个开关柜内。在柜内PLC应远离动力线(二者之间距离应大于200mm)。与PLC装在同一个柜子内的电感性负载,如功率较大的继电器、接触器的线圈,应并联RC消弧电路。 PLC的输入与输出最好分开走线,开关量与模拟量也要分开敷设。模拟量信号的传送应采用屏蔽线,屏蔽层应一端或两端接地,接地电阻应小于屏蔽层电阻的1/10。交流输出线和直流输出线不要用同一根电缆,输出线应尽量远离高压线和动力线,避免并行。 3)I/O端的接线 输入接线: 输入接线一般不要太长。但如果环境干扰较小,电压降不大时,输入接线可适当长些。输入/输出线不能用同一根电缆,输入/输出线要分开。尽可能采用常开触点形式连接到输入端,使编制的梯形图与继电器原理图一致,便于阅读。 11 输出连接: 输出端接线分为独立输出和公共输出。在不同组中,可采用不同类型和电压等级的输出电压。但在同一组中的输出只能用同一类型、同一电压等级的电源。 由于PLC的输出元件被封装在印制电路板上,并且连接至端子板,若将连接输出元件的负载短路,将烧毁印制电路板。 采用继电器输出时,所承受的电感性负载的大小,会影响到继电器的使用寿命,因此,使用电感性负载时应合理选择,或加隔离继电器。 PLC的输出负载可能产生干扰,因此要采取措施加以控制,如直流输出的续流管保护,交流输出的阻容吸收电路,晶体管及双向晶闸管输出的旁路电阻保护。 4)正确选择接地点,完善接地系统。 良好的接地是保证PLC可靠工作的重要条件,可以避免偶然发生的电压冲击危害。接地的目的通常有两个,其一为了安全,其二是为了抑制干扰。完善的接地系统是PLC控制系统抗电磁干扰的重要措施之一。 PLC控制系统的地线包括系统地、屏蔽地、交流地和保护地等。接地系统混乱对PLC系统的干扰主要是各个接地点电位分布不均,不同接地点间存在地电位差,引起地环路电流,影响系统正常工作。例如电缆屏蔽层必须一点接地,如果电缆屏蔽层两端A、B都接地,就存在地电位差,有电流流过屏蔽层,当发生异常状态如雷击时,地线电流将更大。 此外,屏蔽层、接地线和大地有可能构成闭合环路,在变化磁场的作用下,屏蔽层内又会出现感应电流,通过屏蔽层与芯线之间的耦合,干扰信号回路。若系统地与其它接地处理混乱,所产生的地环流就可能在地线上产生不等电位分布,影响PLC内逻辑电路和模拟电路的正常工作。PLC工作的逻辑电压干扰容限较低,逻辑地电位的分布干扰容易影响PLC的逻辑运算和数据存贮,造成数据混乱、程序跑飞或死机。模拟地电位的分布将导致 [8] 测量精度下降,引起对信号测控的严重失真和误动作。 安全地或电源接地将电源线接地端和柜体连线接地为安全接地。如电源漏电或柜体带电,可从安全接地导入地下,不会对人造成伤害。 系统接地PLC控制器为了与所控的各个设备同电位而接地,叫系统接地。接地电阻值不得大于4Ω,一般需将PLC设备系统地和控制柜内开关电源负端接在一起,作为控制系统地。 信号与屏蔽接地一般要求信号线必须要有唯一的参考地,屏蔽电缆遇到有可能产生传导干扰的场合,也要在就地或者控制室唯一接地,防止形成“地环路”。信号源接地时,屏 12 蔽层应在信号侧接地;不接地时,应在PLC侧接地;信号线中间有接头时,屏蔽层应牢固连接并进行绝缘处理,一定要避免多点接地;多个测点信号的屏蔽双绞线与多芯对绞总屏蔽电缆连接时,各屏蔽层应相互连接好,并经绝缘处理,选择适当的接地处单点接点。 变频器的干扰处理一般有下面几种方式: 1)加隔离变压器,主要是针对来自电源的传导干扰,可以将绝大部分的传导干扰阻隔在隔离变压器之前。 2)使用滤波器,滤波器具有较强的抗干扰能力,还具有防止将设备本身的干扰传导给电源,有些还兼有尖峰电压吸收功能。 3)使用输出电抗器,在变频器到电动机之间增加交流电抗器主要是减少变频器输出在能量传输过程中线路产生电磁辐射,影响其它设备正常工作。 PLC控制系统中的干扰是一个十分复杂的问题,因此在抗干扰设计中应综合考虑各方面的因素,合理有效地抑制抗干扰,才能够使PLC控制系统正常工作。随着PLC应用领域的不断拓宽,如何高效可靠的使用PLC也成为其发展的重要因素。21世纪,PLC会有更大的发展,产品的品种会更丰富、规格更齐全,通过完美的人机界面、完备的通信设备会更好地适应各种工业控制场合的需求,PLC作为自动化控制网络和国际通用网络的重要 [9]组成部分,将在工业控制领域发挥越来越大的作用。 3.4 S7-200系列PLC模块 3.4.1 数字量扩展模块 可以选用8点、16点、和32点的数字量输入/输出模块来满足不同的控制需要。除CPU221外,其他CPU模块均可以配接多个扩展模块,连接时CPU模块放在最左侧,扩展模块用扁平电缆与左侧的模块相连。 3.4.2 模拟量扩展模块与热电阻、热电偶扩展模块 1)PLC对模拟量的处理 在工业控制中,某些执行机构(例如电动调节阀和变频器等)要求PLC输出模拟信号,而PLC的CPU只能处理数字量。模拟量首先被传感器和变送器转换为标准量程的电流或电压,例如DC4,20mA,1,5V,0,10V,PLC用A/D转换器将它们转换成数字量。带正负号的电流或电压在A/D转换后用二进制补码表示。 D/A转换器将PLC的数字量转换成模拟电压或电流,然后再去控制执行机构。模拟量I/O模块的主要任务就是实现A/D转换(模拟量输入)和D/A转换(模拟量输出)。 13 A/D转换器和D/A转换器的二进制位数反映了它们的分辨率,位数越多,分辨率越高。模拟量输入/输出模块的另一个重要指标是转换时间。 2)模拟量输入模块 模拟量输入模块的量程有DC 0,10 V、0,1 V、0,500mV,0,100 mV、0,50 mV、?10 V、?5V、?2.5V、?250 mV、? 100mV和0,20 mA等,量程用模块上的DIP开关来设置。转换时应考虑变送器的输入/输出量程和模拟量输入模块的量程,找出被测物理量与A/D转换后的数字之间的比例关系。 3)模拟量的输出模块 模拟量的输出模块的量程有?10V和0,20mA 两种,对应的数字量分别为-32000,+32000和0,32000。满量程时电压输出和电流输出的分辨率分别为12位和11位。25?时的精度典值?0.5%,电压输出和电流输出的稳定时间分别为100μs和2ms最大驱动能力如下:电压输出时负载电阻最小值5kΩ;电流输出时负载电阻最大500Ω.热电偶、热电阻扩展模块EM231热电偶、热电阻扩展模块具有冷端温度补偿电路,如果环境温度迅速变 化,则会产生额外的误差,所以热电阻扩展模块安装在环境温度稳定的地方 此次设计的自动加料机PLC控制系统,我们就要采用S7-200,S7-200 PLC在控制规模上属于小型机,在结构形式上属于叠装式PLC。其特点是非常紧凑,它将CPU板、输入板、输出板、电源板都装入一个机体内,构成一个整体。这样体积小巧、成本低、安装 方便,可以直接装入机床或电控柜内,是机电一体化特有产品。 3.3 PLC与其他方案的比较 在工控领域,继电器、PLC、单片机、工控计算机是比较几种常见的方案。下面就以PLC与其他方案的对比来说明选择PLC的原因。 继电器的控制是采用硬件接线实现的,是利用继电器机械触点的串联或并联及延时继电器的滞后动作等组合形成控制逻辑,只能完成既定的逻辑控制。控制逻辑是依靠触点的机械动作实现控制,工作频率低,毫秒级,机械触点有抖动现象。而且定时精度不高,受环境影响大,调整时间困难。 PLC采用存储逻辑,其控制逻辑是以程序方式存储在内存中,要改变控制逻辑,只需改变程序即可,称软接线。PLC是由程序指令控制半导体电路来实现控制,速度快,微秒级,严格同步,无抖动。而且PLC用半导体集成电路作定时器,时钟脉冲由晶体振荡器产生,精度高,调整时间方便,不受环境影响。虽然继电器控制价格低廉,然后这里适应不 14 了设计的要求,而PLC更能满足设计的需要。 PLC与单片机智能仪表或工控计算机相比有着很高的性价比,主要优点如下: 1)具有I/O点状态同步显示,可以直观地判断外部电气部件的运行状态以及可汉字显示报警与故障信息,极大地缩短了平均维修时间。 2)系统构成灵活,扩展容易,系统可应用于四条袋装线,如果是六条或更多条袋装的生产线,只要增加相应的扩展模块;通信能力强,可以三种方式与多个主机、显示器或上位机组成网络控制系统。 3)指令丰富功能强大,但编程与操作十分简单,不但开发周期短,而且现场调试容易,如称重设定值、推包延迟时间、复位时间等都可通过中文显示器在线调试;日后维护、修改程序甚至扩展等都极易被现场技术人员掌握。 4)系统可靠性高,实时性好,实际称重精度高。 5)具有较强的价格竞争优势 此外,单片机I/O口太少,工控计算机抗干扰能力差,不适合恶劣环境下作业,综上所述,PLC比继电器、单片机、工控计算机更适合本次设计。 15 4 自动加料机PLC控制系统硬件设计 4.1 CPU选型 选择主机为CPU226模块,集成24输入/16输出共40个数字量I/O 点。可连接7个扩展模块,最大扩展至248路数字量I/O 点或35路模拟量I/O 点。13K字节程序和数据存储空间。6个独立的30kHz高速计数器,2路独立的20kHz高速脉冲输出,具有PID控制器。2个RS485通讯/编程口,具有PPI通讯协议、MPI通讯协议和自由方式通讯能力。I/O端子排可方便地整体拆卸。用于较高要求的控制系统,具有更多的输入/输出点,更强的模块扩展能力,更快的运行速度和功能更强的内部集成特殊功能。 4.2 PLC输入输出点的地址分配表 表4-1 I/O分配表 Tablet.4-1 I / O allocation table I0.0 Q0.0 M1起动按扭SB1 称重电磁阀1-1 I0.1 Q0.1 M1停止按扭SB2 称重电磁阀2-1 I0.2 Q0.2 M2起动按扭SB3 称重电磁阀3-1 I0.3 Q0.3 M2停止按扭SB4 称重电磁阀4-1 I0.4 Q0.4 紧急停车按钮SB5 称重电磁阀1-2 AIWO Q0.5 力传感器1 称重电磁阀2-2 输输 入出AIW2 Q0.6 力传感器2 称重电磁阀3-2 信信 号号 AIW4 Q0.7 力传感器3 称重电磁阀4-2 AIW6 力传感器4 推包气缸与电磁阀1 Q1.0 推包气缸与电磁阀2 Q1.1 推包气缸与电磁阀3 Q1.2 推包气缸与电磁阀4 Q1.3 I0.0按下,启动1,、2,生产线开始装料;I0.2按下,启动3,、4,生产线开始装料;I0.1按下,停止1,、2,生产线;I0.3按下,停止3,、4,生产线;I0.4按下,4条生产线全停。 16 4.3 PLC主机I/O接线图 PLC主机输入输出接线图如图3-1。 图4-1 PLC主机I/O接线图 Fig.4-1 PLC host I / O wiring diagram 4.4 模拟量输入模块的选用 4.4.1 模拟量输入模块概述 输入输出扩展接口是PLC主机为了扩展输入输出点数和类型的部件。输入输出扩展接 17 口有并行接口、串行接口和双口存储器接口等多种形式。用扩展电缆将需要的模块与PLC主机右侧相连接。接口模块分为三类,分别是数字量模块(数字量输入扩展模块、数字量输出扩展模块、数字量输入输出扩展模块)和模拟量模块(模拟量输入扩展模块、模拟量输出扩展模块、模拟量输入输出扩展模块),以及智能模块(PID调节模块、高速计算数器模块、温度传感器模块等)。 模拟量输入模块的每一个输入点可接收一种连续变化的物理量,如电流、电压、温度、压力、位移、速度等。工业控制中,要对这些模拟量进行采集并送给PLC的CPU,必须先对这些模拟量进行A/D转换。模拟量输入模块就是用来将模拟信号转换成PLC所能接受的数字信号的。模拟量输入模块一般由滤波、模/数转换、光耦合器等部分,如图3-2,光耦合器有效防止了电磁干扰。 模模模模模模滤 波模模模模模模 图4-2 模拟量输入模块框图 Fig.4-2 Analog Input Module diagram 模块设有电压信号和电流信号输入端。输入信号经滤波、放大、A/D转换得到的数字 [10]量信号,再经光耦合器进入PLC内部电路。 4.4.2 模拟量输入模块的选用原则 模拟量输入模块的电压输入范围或电流输入范围要与传感器输出的信号电压或信号电流相匹配。模拟量输入模块接收的是来自传感器的模拟量信号,这种模拟量信号如果很微小,模拟量就接收不到。 模拟量输入模块具有的模拟量输入通道要足够。传感器的模拟量信号有几个,模拟量输入通道至少要等于其信号个数。 4.4.3 模拟量输入模块选型 根据系统的实际情况,选用模拟量输入模块EM231。EM231具有4个模拟量输入通道。每个通道占用存储器AI2区域2个字节。该模块模拟量输入为只读数据,需要24V直流,可由CPU模块的传感器电源DC24V/400mA供电,电源由模块下部的左部的M、L两 18 端接入,右部为校准电位器和配置设定开关(DIP)。模块上部共有12个端子,每3个为一组,共4组。对于电压信号只用两个端子,电流信号则需要3个。对于未用的输入通道应短接。本系统中EM231电源电压使用单极性(5V),接收来自1#—4#传感器的标准电压信号,主要技术参数如表3-2。 表4-2 EM231主要技术参数 Tablet.4-2 EM231 main technical parameters EM231 总体特性 2W 功耗 点数 4路模拟量输入 10mA 电流损耗:+5V DC(从I/O总线) 60mA 从L+ L+电压范围 20、4,28、8 输入范围:电压(单极性) 0 ,10V, 0,5 V 电压(双极性) -5,+5V ,-2.5,+2.5V 电流 0,20mA <250us 模数转换时间 模拟量输入响应 1.5ms,95% 40dB,DC to 60Hz 共模抑制 模拟量输入模块的分辨率通常以A/D转换后的二进制数数字量的位数来表示,EM231的输入信号经A/D转换后的数字量数据值是12的二进制,在CPU中的存放格式如图4-3。最高有效位是符号位;0表示正值数据,1表示负值数据。对于单极性数据,是存放在第3-14区域。由于第15位是0,所以表示是正值数据。 MSBLSB 1514210 0000模模模模12模 图4-3 EM231输入数据格式(单极性) Fig.4-3 EM231 input data format (unipolar) 19 4.4.4 模拟量输入模块与传感器接线图 模拟量输入模块与传感器接线图如4-4,由于输入的是电压信号,所以输入接口每组只用2个端子。4组模拟量通道全部使用,无需短接。 BK-2型S型测力BK-2型S型测力BK-2型S型测力BK-2型S型测力称重传感器称重传感器称重传感器称重传感器 RAA+A-RBB+B-PCC+C_RDD+D- EM231 A14 ML+接地增益配置 24V 没有使用 图4-4 模拟量输入模块与传感器接线图 Fig.4-4 Analog Input Module with sensor wiring diagram 4.5 执行机构的选择 4.5.1 电磁阀原理 追朔电磁阀的发展史,到目前为止,国内外的电磁阀从原理上分为三大类(即:直动式、分步直动式、先导式),而从阀瓣结构和材料上的不同与原理上的区别又分为六个分支小类(直动膜片结构、分步膜片结构、先导式膜片结构、直动活塞结构、分步活塞结构、先导活塞结构)。 1) 直动式电磁阀 原理:通电时,电磁线圈产生电磁力把关闭件从阀座上提起,阀门打开;断电时,电磁力消失,弹簧力把关闭件压在阀座上,阀门关闭。特点:在真空、负压、零压时能正常 20 工作,但一般通径不超过25mm。 2) 分步直动式电磁阀 原理:它是一种直动和先导式相结合的原理,当入口与出口压差?0.05Mpa,通电时,电磁力直接把先导小阀和主阀关闭件依次向上提起,阀门打开。当入口与出口压差>0.05Mpa,通电时,电磁力先打开先导小阀,主阀下腔压力上升,上腔压力下降,从而利用压差把主阀向上推开;断电时,先导阀和主阀利用弹簧力或介质压力推动关闭件,向 特点:在零压差或真空、高压时亦能可靠工作,但功率较大,要求下移动,使阀门关闭。 竖直安装。 3) 先导式电磁阀 原理:通电时,电磁力把先导孔打开,上腔室压力迅速下降,在关闭件周围形成上低下高的压差,推动关闭件向上移动,阀门打开;断电时,弹簧力把先导孔关闭,入口压力通过旁通孔迅速进入上腔室在关阀件周围形成下低上高的压差,推动关闭件向下移动,关闭阀门。特点:流体压力范围上限很高,但必须满足流体压差条件 4.5.2 电磁阀选用原则 1) 安全性 腐蚀性介质:宜选用塑料电磁阀和全不锈钢;对于强腐蚀的介质必须选用隔离膜片式。中性介质,也宜选用铜合金为阀壳材料的电磁阀,否则,阀壳中常有锈屑脱落,尤其是动作不频繁的场合。氨用阀不能采用铜材。爆炸性环境:必须选用相应防爆等级产品,露天安装或粉尘多场合应选用防水、防尘品种。电磁阀公称压力应超过管内最高工作压力。 2) 适用性 管路中的流体必须和选用的电磁阀系列型号中标定的介质一致。流体的温度必须小于选用电磁阀的标定温度。电磁阀允许液体粘度一般在20CST以下,大于20CST应注明。最高工作压差应小于电磁阀的最大标定压力;一般电磁阀都是单向工作,若有反压差,则安装止回阀。流体清洁度不高时应在电磁阀前安装过滤器,一般电磁阀对介质要求清洁度要好。注意流量孔径和接管口径;电磁阀一般只有开关两位控制;条件允许请安装旁路管,便于维修;有水锤现象时要定制电磁阀的开闭时间调节。注意环境温度对电磁阀的影响。电源电流和消耗功率应根据输出容量选取,电源电压一般允许?10%左右,必须注意交流起动时VA值较高。 3) 可靠性 21 电磁阀分为常闭和常开二种;一般选用常闭型,通电打开,断电关闭;但在开启时间很长关闭时间很短时要选用常开型,动作时间很短频率较高时一般选取直动式,大口径选用快速系列。 4) 经济性 有很多电磁阀可以通用,但在能满足以上三点的基础上应选用最经济的产品。 4.5.3 电磁阀选型 本设计采用的是上海巨良公司生产的型号为ZDLP型电子式电动单座、套筒调节阀。工作方式为接受调节仪表传来的支流电流信号量,使被控工艺参数保持在给定值。广泛应用于电力、冶金、化工、石油轻纺、制药等生产自动化控制。ZDLP型电磁阀技术参数如 -3。 表4 表4-3 ZDLP型电磁阀技术参数 Tablet.4-3 Solenoid valve type ZDLP technical parameters 20 25 32 40 50 65 80 100 公称通径DN(mm) (阀座直径dn) 12 15 20 1.8 2.8 4.4 6.9 11 17.6 27.5 44 69 110 额定流量系数Kv 直线 等百 1.6 2.5 4 6.3 10 16 25 40 63 100 分比 10 16 25 40 额定行程L(mm) 固有流量特性 直线、等百分比 信号范围(mA.DC) 0,10、 4,20 电源电压 220V 、50HZ 作用方式 故障时:全开、全闭、自锁位 4.5.4 电磁阀与PLC的连接 PLC的输出与继电器输出一样,都要输出端和COM(零线)形成一个回路才可以正常工作。电磁阀两根线,一根接PLC输出端,还有一根接在相应输出组的COM端子上就可以形成回路,从而达到PLC控制电磁阀的效果。但是电磁阀作为负载会产生感应电流,导致回路中的电流远远超过额定电流,进而烧毁电路中的元件,所以通常会在PLC和电磁阀之间接一个继电器,起保护作用。 22 4.6 测量机构的选用原则 4.6.1 传感器简介 传感器实际上是一种将非电量信号转变为可测量的电信号输出装置,类似于人的感觉器官,一般由敏感元件和其他辅助零件组成。敏感元件直接感受被测物理量并将其转换成另一种信号,是传感器的核心。传感器处与测试装置的输入端,其性能直接影响整个测试装置和测试结果的可靠性。传感器技术已经在工业生产以及科学技术领域发挥重要作用,随着科技的发展,传感器正向高度集成化、智能化方向发展。 物理量电测传感器种类繁多,一种物理量往往可以用多种类型的传感器检测;一种传感器可以测量多种物理量。由于传感器种类繁多,分类方式也千差万别,它们都有各自的特点,所以选用传感器的时候要有依据有步骤的进行。 4.6.2 传感器选择的基本原则 1) 测量对象与测量环境 根据被测对象的物理特性选择传感器,但即使是测量同一物理量,也有多种原理的传感器可供选用,哪一种原理的传感器更为合适,则需要根据具体情况做具体分析。同时,传感器所处的测量环境(温度、湿度、粉尘等)也是一个重要的考虑因素。 2) 灵敏度 通常灵敏度高时,与被测量变化对应的输出信号的值才比较大,有利于信号处理。但灵敏度高时,与被测量无关的外界噪声也容易混入,也会被放大系统放大,影响测量精度。因此,要求传感器本身应具有较高的信噪比,尽量减少从外界引入的干扰信号。 3) 频率特性 传感器的频率响应特性决定了被测量的频率范围,必须在频率允许范围内保持不失真的测量条件。传感器的频率响应高,可测的信号频率范围就宽,而由于受到结构特性的影响,机械系统的惯性较大。在动态测量中,应根据信号的特点(稳态、瞬态、随机等)来选择传感器,以免产生过大的误差。 4) 线性范围 传感器的线形范围是指输出与输入成正比的范围。传感器的线性范围越宽,则其量程越大,并且能保证一定的测量精度。但实际上,任何传感器都不能保证绝对的线性,其线性度也是相对的。当所要求测量精度比较低时,在一定的范围内,可将非线性误差较小的传感器近似看作线性的,这会给测量带来方便。 23 5) 稳定性 传感器使用一段时间后,其性能保持不变的能力称为稳定性。影响传感器长期稳定性的因素除传感器本身结构外,主要是传感器的使用环境。因此应对其使用环境进行调查,并根据具体的使用环境选择合适的传感器,或采取适当的措施,减小环境的影响。在某些要求传感器能长期使用而又不能轻易更换或标定的场合,所选用的传感器稳定性要求非常严格,要能够经受住长时间的考验。 6) 精度 精度是传感器的一个重要的性能指标,它是关系到整个测量系统测量精度的一个重要环节。传感器的精度越高,其价格越昂贵,因此,传感器的精度只要满足整个测量系统的精度要求就可以,不必选得过高。 当然,传感器不可能满足上述全部性能要求,应根据实际情况综合考虑,适当变换原理、结构形式、基本特性等以满足测试要求。对某些特殊使用场合,无法选到合适的传感器,则需自行设计制造传感器。自制传感器的性能应满足使用要求。 4.6.3 传感器的选型 目前,在称重技术领域广泛使用电阻应变式传感器,其具有精度高、温度影响小、线性好、价格适中等特点,根据系统的设计要求我选择的是BK-2型S形测力/称重传感器。它采用国际流行的双梁式或剪切S梁结构,拉、压输出对称性好,精度高,量程范围广,结构紧凑,安装使用方便,广泛用于机电结合秤、包装秤等各种测力、称重系统中。承载方式为拉压式,并可带分体式变送器,直接输出标准模拟信号如0,5V,4―20mA等。BK-2型S形测力/称重传感器的详细技术参数如表4-1和表4-2。 4.6.4 传感器的选用小结 现代传感器在原理与结构上千差万别,当传感器确定之后,与之相配套的测量方法和测量设备也就可以确定了。测量结果的成败,在很大程度上取决于传感器的选用是否合理,以下是本次设计选择传感器的一些心得。 本系统的工作环境,非高温环境、非腐蚀性较高环境、非易燃易爆环境、外界电磁干扰影响也不大,只有粉尘会对系统造成一定的影响,比如说短路之类的,因此选用传感器的时候要特别注意所选用的传感器密封性要好。 在工业上一般选择十倍于所测量参数的量程。在本系统中,测量的重量参数是50kg ,因此最好选择500kg的传感器量程。这样在编程过程中易于计算,而且也很清晰。 24 表4-4 BK-2型S形测力/称重传感器主要技术指标 Tablet.4-4BK-2 type S-shaped force / weight sensor main technical indicators 技术参数 技术指标 单位 t 量程 0.01,10 mV/V 灵敏度 1,2.5 0.03 0.05 0.1 %FS 非线性 0.03 0.05 0.05 %FS 重复性 0.03 0.05 0.05 %FS 滞后 输出阻抗 380?20或400?20 Ω 绝缘电阻 ?1000 MΩ/100V 工作温度 -10,+60 ? 0.05 0.05 0.05 热零点偏移 %FS/10? 0.05 0.05 0.05 热灵敏度偏移 %FS/10? 120 %FS 允许过负荷 插座:1、电源(+)2、输出(+)3、输出(-)4、电源(-) 接线方式 引线:导线连接方式见合格证书 表4-5 BK-2型S形测力/称重传感器量程及尺寸参数 Tablet.4-5BK-2 type S-shaped force / weight sensor range and size parameters L0 L1 L2 L3 SR M 量程(kg) Φ1 Φ2 Φ3 80 70 10 85 67 16 12 10 30,50,80 M10深12 100,150,200, 300,400,500, 110 95 16 98 83 24 18 15 M16×1.5 深16 600,800,1000 4.6.5 传感器信号放大电路 传感器将所采集的电信号送往PLC需要经过放大处理。传感器桥路输出为0-24mv的 微弱电信号,由于传感器的工作环境比较恶劣,使运算放大器两端上有共模干扰信号,即 使采用高性能的运算放大器,误差也不能满足精度要求,为此采用集成仪用放大器AD524, 25 其主要特点是高线性度、高共模抑制比、低失调电压、低漂移及低噪音,特别适合高速数据采集系统和恶劣环境下小信号放大等。放大电路如图4-5。 R隔离电阻 V+ -in 8110K161415传感器1109Rg6Vogt5 4310K27R+in+12VDC -V-屏蔽 图4-5传感器信号放大电路 Fig.4-5 Sensor signal amplification circuit AD524是基于传统的三运放放大电路,通过不同的联接方式可得到×10、×100、×1000几档增益,也可以通过3,16脚联接外部电阻获得任意大小的增益,外接电阻Rg=40(G+1)。实际上采用了外部电阻与片内电阻并接的方式,以减小温度的影响。 4.6.6 影响测量结果的因素及解决办法 影响测量结果的主要因素是系统灵敏度和系统准确度。 影响系统灵敏度的主要因素是检测电路的内部噪声和外部干扰电压Un ,它与放大器所工作的频带相关。选择低噪声器件,在满足采集速度所需足够宽的频带的前提下,通过选配电阻来提高放大电路本身的共模抑制能力,整个检测系统采用双层屏蔽,采样时间定为工频周期整数倍等项措施,使整个系统获得了能分辨5g质量的灵敏度。 影响系统准确度的主要因素是整个检测系统的非线性和漂移ΔUi。其中系统的非线性,在选配元器件校正的基础上, 采用了软件修正,对于随温度和时间产生的漂移电压ΔUi , 主要采用元器件的老化、测试与分选工艺,筛选掉漂移电压大的,然后选配温度系数进行补偿, 使整个系统的静态精度达到了0.07%,为实现动态称量精度奠定了基础。 26 5 自动加料机PLC控制系统软件设计 5.1 系统流程图 开机 系统初始化 NO是启动键吗, YES 打开闸板1-4 调功能键子程序 调数据计算程序 NO称重达到1设定值吗, YES 关断闸板1-4 打开闸板5-8 NO称重达到2设定值吗, YES 关断闸板5-8 打开推包气缸电磁阀1-4 延时推包 图5-1 系统流程图 Fig. 5-1 System flow chart 27 5.2 控制程序设计 5.2.1 系统功能块图 模块化的程序设计方法,是PLC程序设计最有效、最基本的方法。程序结构分析和设计的基本任务就是以模块化程序结构为前提,以系统功能要求为依据,按照相对独立的原则,将全部程序划分为若干个“程序模块”。根据系统流程图及功能要求,做出系统功能块图,如图5-2。 初始状态0 称重电磁阀1-4打开1 称重传感器2模拟量PLC 重量到48KG时称重电3磁阀1-4关闭5-8打开 重量达到50KG时 称重电磁阀5-8关闭4推包电磁阀1-4打开 延时0.5s 5结束 图5-2 系统功能块图 Fig 5-2System block diagram 28 5.2.2 控制程序设计 根据功能模块图,首先是在初始化状态下启动,称重电磁阀1-4打开,如图5-3。 图5-3系统初始化启动 Fig.5-3to start the system initialization I0.0按下,M0.0和,M0.1启动,M1.0和M1.1清零,称重电磁阀1-1和2-1打开,, 1,、2,生产线启动;同理I0.2按下启动3,、4,生产线;I0.1按下,Q0.1和Q0.2停止,M0.1至0.4清零,1,、2,生产线停止;同理I0.3按下,停止3,、4,生产线;I0.4按下,Q0.0至0.4清零,4条生产线全停。 本系统中,PLC同时控制4条生产线,以1,生产线为例,简单介绍程序设计步骤,首先是将传感器所测的模拟量传给PLC。程序梯形图如图5-4。 29 图5-4传感器检测信号送入PLC Fig 5-4sensor signals into the PLC 传感器所采集的是一种连续变化的物理量,这些模拟量要先进入模拟量输入模块,经过A/D转换才能送给PLC的。由上图可知,1,生产线传感器AIW0所采集的压力值经过模/数转换后存入PLC中VW120存储单元。PLC接收传感器传来的实时测量信号,经过计算,顺序控制执行机构的动作,程序梯形图如图5-5。 图5-5 PLC顺序控制执行机构 Fig 5-5PLC sequence control executing agency 30 当VW120里的数据小于48Kg时,Q0.0启动,Q0.4清零,称重电磁阀1-1运行,电磁阀1-2处于关闭状态,粗给流量大,袋装速度快。当VW120里的数据大于或等于48Kg时,Q0.0清零,Q0.4启动,关闭电磁阀1-1,启动电磁阀1-2,细给流量小,进入精度控制环节。当重量达到50Kg,Q0.4清零,M1.0启动,给料过程结束。 由于是流水作业,给料完毕后,要完成推包动作,程序梯形图如5-6。 图5-6 延时推包 Figure 5-6 Packet delay push M1.0启动后,时间继电器T37工作,5秒后推包电磁阀Q1.0启动,推杆动作,一个袋装过程完成,系统复位,下一个袋装开始,循环整个过程。 5.3 自动加料机系统控制程序图 31 32 33 34 35 36 5.4 提高系统动态称重精度的建议 影响动态精度的主要因素是被称物料的比重、流量和落差的大小,它是由成品仓的压力和PLC所控制的进料驱动装置产生的。因此,改进控制思路,借鉴静态称量精度高的特点是提高动态计量精度的关键。我们可以采用双速变径变距螺旋加料机,采用“先快后慢,最后点动”的控制下料方式。也可以在硬件上改变一些工艺结构,来达到很好的控制精度。也就是说可以不选用电磁阀,用笼型电动机来代替,就可以实现由快到慢的下料方式。而用PLC来控制笼型电动机是一项很成熟的技术。只是可能会存在一定的不安全因素。因此,在使用过程中,可以根据实际情况来选择具体的工作环境和工艺,以及所需要的控制程序。 37 6 技术经济分析 PLC技术经过不断的发展已经成为工业领域中不可替代的成品。它的电路设计比较成熟,稳定性自然很高,软件集成化,也是成品。综合上述两项,容易学习,开发周期短。本设计用到的S7系列的PLC以结构紧凑、可靠性高、功能齐全等优点,在自动控制领域占有重要的地位。 S7-200 PLC系列具有极高的性价比,较强的功能使其无论在独立运动中,还是连成网络皆能完成各种控制任务。它的使用范围可以覆盖从替代继电器的简单控制到更加复杂的自动控制。 PLC是专为工业自动化设计的,在控制电路这一块,功能的强大是单片机无法比拟的,通过多种多样的扩展模块,使外部接线量小、内部工作性能的可靠性高,易学易懂,虽然 [11]单个CPU贵,但性价比是最高的。 单片机的价格较低,一般从几元到几十元不等,像51系列中的AT89C51 6元左右,AT89C2051 5元左右,AT89S52 8元左右;但是PLC的价格就要贵一些大约是单片机的10倍左右,这也是PLC的不足之处,在开发过程中一定要加以已考虑。其中西门子PLC价格相对较低,属中国主流使用。型号为6ES7214AD230*B0型CPU价格大约在1699.00-1800.00元左右,而三菱系列要7833.00-20000.00左右,相比较来看西门子PLC既能完成相同的功能而且价格相对便宜,应该是我们的首选。 表6-1系统的成本预算 Tab.6-1 The cost budget of the system 材料名称 规格型号 数量 单价 厂家 S7-200 CPU 6ES72162AD230XB0 1 1500 北京力天昭阳公司 传感器 BK-2型S形称重传感器 4 2000 上海天沐公司 模拟量输入输出模块 EM231 1 1000 北京力天昭阳公司 电磁阀 ZDLP型电子式电动单4 4000 上海巨良公司 座套筒调节阀 传感器放大电路 AD524 1 90 广东风华公司 38 7 结 论 本文针对自动加料控制系统,提出了一种基于S7-200系列的PLC的设计方案。设计中利用称重传感器对物料重量的检测,进而控制冲料斗,称量斗,包装机构的动作。本设计采用了二级给料的方法,一级给料为粗给料,流量大,用较短的时间加入额定重量的约95%,二级给料为细给料,流量小,为额定重量的约5%。前者侧重于包装速度,后者保证称量精度,解决了包装效率与称量精度之间的矛盾。 本次设计使用了S7-200系列的PLC,其在控制规模上属于小型机,在结构形式上属于叠装式PLC。其特点是非常紧凑,它将CPU板、输入板、输出板、电源板都装入一个机体内,构成一个整体。这样体积小巧、安装方便,整个系统硬件简单、可靠、系统成本低。 到此,本次设计基本完成了预期的目标;但是由于时间仓促、资料有限。所以设计成果并不是很完美,仍然存在着漏洞和不足,我准备在今后的学习过程中继续发扬我校的优良传统进一步完善。 39 参考文献 [1] 赵淮(包装机械产品大全[M](北京:化学工业出版社,2003: [2] 廖常初(PLC编程与应用[M](北京:机械工业出版社,2005( [3] 刘笃仁,韩保君(传感器原理及运用技术[M](西安:西安电子科技大学出版社,2003: [4] 吴中俊,黄永红可编程控制器原理及应用[M](北京:机械工业出版社,2004( [5] 西门子公司(SIMATIC S7,200可编程控制器系统 手册 华为质量管理手册 下载焊接手册下载团建手册下载团建手册下载ld手册下载 [P](2003( [6] 刘延俊等(液压与气压传动[M](北京:机械工业出版社,2004:22-34( [7] 陈在平(可编程控制器技术与应用系统设计[M](北京:机械工业出版社,2002 [6] 张凤珊(电气控制及可编程序控制器[M](北京:中国轻工业出版社.2002 [7] 文福安(AutoCAD 2002基础教程[M](北京:人民邮电出版社.2003 [8] 马西秦等(自动检测技术[M](北京:机械工业出版社.2003:35-50( [9] 赵明,许廖编(工厂电气控制设备[M](北京:机械工业出版社.2002( [10] 方康玲,王新民(过程控制系统[M](武汉:武汉理工大学出版社.2001( [11] 吴亦锋(可编程控制器原理与应用速成[M](福州:福建科学技术出版社(2004 [12] SIEMENS.SINUMERIK 802S installation and Start-up Software Version Technical Manual[C].GERMAN,1997. 40 附录A 译文 可编程控制器原理及其应用 可编程控制器,英文称Programmable Logic Controller,简称PLC。 定义是:一种数字运算操作的电子系统,专为在工业环境应用而设计的。它采用一类可编程的存储器,用于其内部存储程序,执行逻辑运算,顺序控制,定时,计数与算术操作等面向用户的指令,并通过数字或模拟式输入/输出控制各种类型的机械或生产过程。 1 PLC的发展历程 在工业生产过程中,大量的开关量顺序控制,它按照逻辑条件进行顺序动作,并按照逻辑关系进行连锁保护动作的控制,及大量离散量的数据采集。传统上,这些功能是通过气动或电气控制系统来实现的。1968年美国GM(通用汽车)公司提出取代继电气控制装置的要求,第二年,美国数字公司研制出了基于集成电路和电子技术的控制装置,首次采用程序化的手段应用于电气控制,这就是第一代可编程序控制器,称Programmable Controller(PC) 个人计算机(简称PC)发展起来后,为了方便,也为了反映可编程控制器的功能特点,可编程序控制器定名为Programmable Logic Controller(PLC),现在,仍常常将PLC简称PC。 2 可编程控制器基本原理 PLC是基于电子计算机,且适用于工业现场工作的电控制器。它源于继电控制装置,但它不像继电装置那样,通过电路的物理过程实现控制,而主要靠运行存储于PLC内存中的程序,进行入出信息变换实现控制。 PLC基于电子计算机,但并不等同于普通计算机。普遍计算机进行入出信息变换,多只考虑信息本身,信息的入出,只要人机界面好就可以了。而PLC则还要考虑信息入出的可靠性、实时性,以及信息的使用等问题。特别要考虑怎么适应于工业环境,如便于安装,抗干扰等问题。 2.1 PLC的构成 从结构上分,PLC分为固定式和组合式(模块式)两种。固定式PLC包括CPU板、I/O板、显示面板、内存块、电源等,这些元素组合成一个不可拆卸的整体。模块式PLC 41 包括CPU模块、I/O模块、内存、电源模块、底板或机架,这些模块可以按照一定规则组合配置。 2.1.1 CPU的构成 CPU是PLC的核心,起神经中枢的作用,每套PLC至少有一个CPU,它按PLC的系统程序赋予的功能接收并存贮用户程序和数据,用扫描的方式采集由现场输入装置送来的状态或数据,并存入规定的寄存器中,同时,诊断电源和PLC内部电路的工作状态和编程过程中的语法错误等。进入运行后,从用户程序存贮器中逐条读取指令,经分析后再按指令规定的任务产生相应的控制信号,去指挥有关的控制电路。 CPU主要由运算器、控制器、寄存器及实现它们之间联系的数据、控制及状态总线构成,CPU单元还包括外围芯片、总线接口及有关电路。内存主要用于存储程序及数据,是PLC不可缺少的组成单元。 2.1.2 I/O模块 PLC与电气回路的接口,是通过输入输出部分(I/O)完成的。I/O模块集成了PLC的I/O电路,其输入暂存器反映输入信号状态,输出点反映输出锁存器状态。输入模块将电信号变换成数字信号进入PLC系统,输出模块相反。I/O分为开关量输入(DI),开关量输出(DO),模拟量输入(AI),模拟量输出(AO)等模块。 2.1.3 电源模块 PLC电源用于为PLC各模块的集成电路提供工作电源。同时,有的还为输入电路提供24V的工作电源。电源输入类型有:交流电源(220VAC或110VAC),直流电源(常用的为24VAC)。 3 可编程控制器实现控制的要点 入出信息变换、可靠物理实现,可以说是PLC实现控制的两个基本要点。 入出信息变换靠运行存储于PLC内存中的程序实现。PLC程序既有生产厂家的系统程序(不可更改),又有用户自行开发的应用(用户)程序。系统程序提供运行平台,同时,还为PLC程序可靠运行及信号与信息转换进行必要的公共处理。用户程序由用户按控制要求设计。什么样的控制要求,就应有什么样的用户程序。 可靠物理实现主要靠输人(INPUT)及输出(OUTPUT)电路。PLC的I/O电路,都是专门设计的。输入电路要对输入信号进行滤波,以去掉高频干扰。而且与内部计算机电路在电上是隔离的,靠光耦元件建立联系。输出电路内外也是电隔离的,靠光耦元件或输 42 出继电器建立联系。输出电路还要进行功率放大,以足以带动一般的工业控制元器件,如电磁阀、接触器等等。 I/O电路是很多的,每一输入点或输出点都要有一个I或O电路。PLC有多I/O用点,一般也就有多少个I/O用电路。但由于它们都是由高度集成化的电路组成的,所以,所占体积并不大。 输入电路时刻监视着输入状况,并将其暂存于输入暂存器中。每一输入点都有一个对应的存储其信息的暂存器。 输出电路要把输出锁存器的信息传送给输出点。输出锁存器与输出点也是一一对应的。 这里的输入暂存器及输出锁存器实际就是PLC处理器I/O口的寄存器。它们与计算机内存交换信息通过计算机总线,并主要由运行系统程序实现。把输人暂存器的信息读到PLC的内存中,称输入刷新。PLC内存有专门开辟的存放输入信息的映射区。这个区的每一对应位(bit)称之为输入继电器,或称软接点。这些位置成1,表示接点通,置成0为接点断。由于它的状态是由输入刷新得到的,所以,它反映的就是输入状态。 输出锁存器与PLC内存中的输出映射区也是对应的。一个输出锁存器也有一个内存位(bit)与其对应,这个位称为输出继电器,或称输出线圈。靠运行系统程序,输出继电器的状态映射到输出锁存器。这个映射也称输出刷新。输出刷新主要也是靠运行系统程序实现的。这样,用户所要编的程序只是,内存中输入映射区到输出映射区的变换,特别是怎么按输入的时序变换成输出的时序。这是一个数据及逻辑处理问题。由于PLC有强大的指令系统,编写出满足这个要求的程序是完全可能的,而且也是较为容易的。 4 可编程控制器实现控制的过程 简单地说,PLC实现控制的过程一般是: 输入刷新--再运行用户程序--再输出刷新--再输入刷新--再运行用户程序--再输出刷新„„永不停止地循环反复地进行着。 有了上述过程,用PLC实现控制显然是可能的。因为:有了输入刷新,可把输入电路监控得到的输入信息存入PLC的输入映射区;经运行用户程序,输出映射区将得到变换后的信息;再经输出刷新,输出锁存器将反映输出映射区的状态,并通过输出电路产生相应的输出。又由于这个过程是永不停止地循环反复地进行着,所以,输出总是反映输入的变化的。只是响应的时间上,略有滞后。当然,这个滞后不宜太大,否则,所实现的控制不 43 那么及时,也就失去控制的意义。 为此,PLC的工作速度要快。速度快、执行指令时间短,是PLC实现控制的基础。事实上,它的速度是很快的,执行一条指令,多的几微秒、几十微秒,少的才零点几,或零点零几微秒。而且这个速度还在不断提高中。 除了 I/O刷新及运行用户程序,还要做些公共处理工作。 公共处理工作有:循环时间监控、外设服务及通讯处理等。 监控循环时间的目的是避免"死循环",避免程序不能反复不断地重复执行。办法是用"看门狗"(Watching dog)。只要循环超时,它可报警,或作相应处理。 外设服务是让PLC可接受编程器对它的操作,或通过接口向输出设备如打印机输出数据. 通讯处理是实现PLC与PLC,或PLC与计算机,或PLC与其它工业控制装置或智能部件间信息交换的。这也是增强PLC控制能力的需要。 也就是说,实际的PLC工作过程总是:公共处理--I/O刷新--运行用户程序--再公共处理--„„反复不停地重复着。 4.1 可编程控制器实现控制的方式 用这种不断地重复运行程序实现控制称扫描方式。是用计算机进行实时控制的一种方式。此外,计算机用于控制还有中断方式。在中断方式下,需处理的控制先申请中断,被响应后正运行的程序停止运行,转而去处理中断工作(运行有关中断服务程序)。待处理完中断,又返回运行原来程序。哪个控制需要处理,哪个就去申请中断。哪个不需处理,将不被理睬。显然,中断方式与扫描方式是不同的。 在中断方式下,计算机能得到充分利用,紧急的任务也能得到及时处理。但是,如果同时来了几个都要处理的任务该怎么办呢,优先级高的还好办,低的呢,可能会出现照顾不到之处。所以,中断方式不大适合于工作现场的日常使用。 但是,PLC在用扫描方式为主的情况下,也不排斥中断方式。即,大量控制都用扫描方式,个别急需的处理,允许中断这个扫描运行的程序,转而去处理它。这样,可做到所有的控制都能照顾到,个别应急的也能进行处理。 PLC的实际工作过程比这里讲的还要复杂一些,分析其基本原理,也还有一些理论问题。有关人员如果能把上面介绍的入出变换、物理实现--信息处理、I/O电路--空间、时间关系--扫描方式并辅以中断方式,作为一种思路加以研究,弄清了它,也就好理解PLC是怎样去实现控制的,也就好把握住PLC基本原理的要点了。至于更深入的问题,在进一步 44 学习中,将再作具体介绍。 5 可编程控制器基本特点 从讨论PLC的工作原理知,PLC的输入与输出在物理上是彼此隔开的,其间的联系是靠运行存储于它的内存中的程序实现。它的入出相关,不是靠物理过程,不是用线路;而是靠信息过程,用软逻辑联系。它的工作基础是用好信息。 信息不同于物质与能量,有自身的规律。信息便于处理,便于传递,便于存储;信息还可重用,等等。正是由于信息的这些特点,决定了PLC的基本特点。 下面介绍PLC的四个特点: 5.1 功能丰富 PLC的功能非常丰富。这主要与它具有丰富的处理信息的指令系统及存储信息的内部器件有关。它的指令多达几十条、几百条,可进行各式各样的逻辑问题的处理,还可进行各种类型数据的运算。凡普通计算机能做到的,它也都可作到。 它的内部器件,即内存中的数据存储区,种类繁多,容量宏大。I/O继电器,可以用以存储入、出点信息的,少的几十、几百,多的可达几千、几万,以至10几万。这意味着它可进行这么多I/O点的入出信息变换,进行这么大规模的控制。 它的内部种种继电器,相当于中间继电器,数量更多。内存中一个位就可作为一个中间继电器,怎么不多~ 它的计数器、定时器也很多,是继电电路所望尘莫及的。小小的箱体或模块,其内部定时器、计数器可达成百、成千。这也是因为只要用内存中的一个字,再加一些标志位,即可成为定时器、计数器,所以才那么多。 而且,这些内部器件还可设置成丢电保持的,或丢电不保持的,即上电后予以清零的。以满足不同的使用要求。这些也是继电器件所难以做到的。它的数据存储区还可用以存储大量数据,几百、几千、几万字的信息都可以存,而且,掉电后还不丢失。 PLC还有丰富的外部设备,可建立友好的人机界面,以进行信息交换。可送入程序,送入数据,可读出程序,读出数据。而且读、写时可在图文并茂的画面上进行。数据读出后,可转储,可打印。数据送入可键入,可以读卡入,等等。 PLC还具有通讯接口,可与计算机链接或联网,与计算机交换信息。自身也可联网,以形成单机所不能有的更大的、地域更广的控制系统。 PLC还有强大的自检功能,可进行自诊断。其结果可自动 记录 混凝土 养护记录下载土方回填监理旁站记录免费下载集备记录下载集备记录下载集备记录下载 。这为它的维修增加了 45 透明度,提供了方便。 丰富的功能为PLC的广泛应用提供了可能;同时,也为工业系统的自动化、远动化及其控制的智能化创造了条件。 像PLC这样集丰富功能于一身,是别的电控制器所没有的;更是传统的继电控制电路所无法比拟的。 5.2 使用方便 用PLC实现对系统的控制是非常方便的。这是因为:首先PLC控制逻辑的建立是程序, 用程序代替硬件接线。编程序比接线,更改程序比更改接线,当然要方便得多~ 其次PLC的硬件是高度集成化的,已集成为种种小型化的模块。而且,这些模块是配套的,已实现了系列化与规格化。种种控制系统所需的模块,PLC厂家多有现货供应,市场上即可购得。所以,硬件系统配置与建造也非常方便 正因如此,用可编程序控制器才有这个"可"字。对软件讲,它的程序可编,也不难编。对硬件讲,它的配置可变,而且也易于变 具体地讲,PLC有五个方面的方便: 5.2.1 配置方便 可接控制系统的需要确定要使用哪家的 PLC,那种类型的,用什么模块,要多少模块,确定后,到市场上定货购买即可。 5.2.2 安装方便 PLC硬件安装简单,组装容易。外部接线有接线器,接线简单,而且一次接好后,更换模块时,把接线器安装到新模块上即可,都不必再接线。内部什么线都不要接,只要作些必要的DIP开关设定或软件设定,以及编制好用户程序就可工作。 5.2.3 编程方便 PLC内部虽然没有什么实际的继电器、时间继电器、计数器,但它通过程序(软件)与系统内存,这些器件却实实在在地存在着。其数量之多是继电器控制系统难以想象的。即使是小型的PLC,内部继电器数都可以千计,时间继电器、计数也以百计。而且,这些继电器的接点可无限次地使用。PLC内部逻辑器件之多,用户用起来已不感到有什么限制。唯一考虑的只是入出点。而这个内部入出点即使用得再多,也无关紧要。大型PLC的控制点数可达万点以上,哪有那么大的现实系统,若实在不够,还可联网进行控制,不受什么限制。PLC的指令系统也非常丰富,可毫不困难地实现种种开关量,以及模拟量的控制。 46 PLC还有存储数据的内存区,可存储控制过程的所有要保存的信息。„„总之,由于PLC功能之强,发挥其在控制系统的作用,所受的限制已不是PLC本身,而是人们的想象力,或与其配套的其它硬件设施了。 PLC的外设很丰富,编程器种类很多,用起来都较方便,还有数据监控器,可监控PLC的工作。使用PLC的软件也很多,不仅可用类似于继电电路设计的梯形图语言,有的还可用BASIC语言、C语言,以至于自然语言。这些也为PLC编程提供了方便。 5.2.4 维修方便 这是因为: 1) PLC工作可靠,出现故障的情况不多,这大大减轻了维修的工作量。这在讲述PLC的第三个特点时,还将进一步介绍。 2) 即使PLC出现故障,维修也很方便。这是因为PLC都设有很多故障提示信号,如PLC支持内存保持数据的电池电压不足,相应的就有电压低信号指示。而且,PLC本身还可作故障情况记录。所以,PLC出了故障,很易诊断。同时,诊断出故障后排故也很简单。可按模块排故,而模块的备件市场可以买到,进行简单的更换就可以。至于软件,调试好后不会出故障,再多只要依据使用经验进行调整,使之完善就是了。 3)改用方便:PLC用于某设备,若这个设备不再使用了,其所用的PLC还可给别的设备使用,只要改编一下程序,就可办到。如果原设备与新设备差别较大,它的一些模块还可重用。 5.3 工作可靠 用PLC实现对系统的控制是非常可靠的。这是因为PLC在硬件与软件两个方面都采取了很多措施,确保它能可靠工作。事实上,如果PLC工作不可靠,就无法在工业环境下运用,也就不成其为PLC了。 5.3.1 在硬件方面 PLC的输入输出电路与内部CPU是电隔离。其信息靠光耦器件或电磁器件传递。而且,CPU板还有抗电磁干扰的屏蔽措施。故可确保PLC程序的运行不受外界的电与磁干扰,能正常地工作。 PLC使用的元器件多为无触点的,而且为高度集成的,数量并不太多,也为其可靠工作提供了物质基础。 在机械结构设计与制造工艺上,为使PLC能安全可靠地工作,也采取了很多措施,可 47 确保PLC耐振动、耐冲击。使用环境温度可高达摄氏50多度,有的PLC可高达80--90度。 有的PLC的模块可热备,一个主机工作,另一个主机也运转,但不参与控制,仅作备份。一旦工作主机出现故障,热备的可自动接替其工作。 还有更进一步冗余的,采用三取一的设计,CPU、I/O模块、电源模块都冗余或其中的部分冗余。三套同时工作,最终输出取决于三者中的多数决定的结果。这可使系统出故障的机率几乎为零,做到万无一失。当然,这样的系统成本是很高的,只用于特别重要的场合,如铁路车站的道叉控制系统。 5.3.2 在软件方面 PLC的工作方式为扫描加中断,这既可保证它能有序地工作,避免继电控制系统常出现的"冒险竞争",其控制结果总是确定的;而且又能应急处理急于处理的控制,保证了PLC对应急情况的及时响应,使PLC能可靠地工作。 为监控 PLC运行程序是否正常,PLC系统都设置了"看门狗"(Watching dog)监控程序。运行用户程序开始时,先清"看门狗"定时器,并开始计时。当用户程序一个循环运行完了,则查看定时器的计时值。若超时(一般不超过100ms),则报警。严重超时,还可使PLC停止工作。用户可依报警信号采取相应的应急措施。定时器的计时值若不超时,则重复起始的过程,PLC 将正常工作。显然,有了这个"看门狗"监控程序,可保证PLC用户程序的正常运行,可避免出现"死循环"而影响其工作的可靠性。 PLC还有很多防止及检测故障的指令,以产生各重要模块工作正常与否的提示信号。可通过编制相应的用户程序,对PLC的工作状况,以及PLC所控制的系统进行监控,以确保其可靠工作。 PLC每次上电后,还都要运行自检程序及对系统进行初始化。这是系统程序配置了的,用户可不干预。出现故障时有相应的出错信号提示。 正是PLC在软、硬件诸方面有强有力的可靠性措施,才确保了PLC具有可靠工作的特点。它的平均无故障时间可达几万小时以上;出了故障平均修复时间也很短,几小时以至于几分钟即可。 曾有人做过为什么要使用 PLC的问卷调查。在回答中,多数用户把PLC工作可靠作为选用它的主要原因,即把PLC能可靠工作,作为它的首选指标。 5.4 经济合算 尽管使用PLC首次投资要大些,但从全面及长远看,使用PLC还是经济的。这是因 48 为:使用PLC的投资虽大,但它的体积小、所占空间小,辅助设施的投入少;使用时省电,运行费少;工作可靠,停工损失少;维修简单,维修费少;还可再次使用以及能带来附加价值等等,从中可得更大的回报。所以,在多数情况下,它的效益是可观的。 6 可编程控制器基本应用 最初,PLC主要用于开关量的逻辑控制。随着PLC技术的进步,它的应用领域不断扩大。如今,PLC不仅用于开关量控制,还用于模拟量及数字量的控制,可采集与存储数据,还可对控制系统进行监控;还可联网、通讯,实现大范围、跨地域的控制与管理。PLC已日益成为工业控制装置家族中一个重要的角色。 6.1 用于开关量控制 PLC控制开关量的能力是很强的。所控制的入出点数,少的十几点、几十点,多的可到几百、几千,甚至几万点。由于它能联网,点数几乎不受限制,不管多少点都能控制。 所控制的逻辑问题可以是多种多样的:组合的、时序的;即时的、延时的;不需计数的,需要计数的;固定顺序的,随机工作的;等等,都可进行。 PLC的硬件结构是可变的,软件程序是可编的,用于控制时,非常灵活。必要时,可编写多套,或多组程序,依需要调用。它很适应于工业现场多工况、多状态变换的需要。 用PLC进行开关量控制实例是很多的,冶金、机械、轻工、化工、纺织等等,几乎所有工业行业都需要用到它。目前,PLC首用的目标,也是别的控制器无法与其比拟的,就是它能方便并可靠地用于开关量的控制。 6.2 用于模拟量控制 模拟量,如电流、电压、温度、压力等等,它的大小是连续变化的。工业生产,特别是连续型生产过程,常要对这些物理量进行控制。作为一种工业控制电子装置,PLC若不能对这些量进行控制,那是一大不足。为此,各PLC厂家都在这方面进行大量的开发。目前,不仅大型、中型机可以进行模拟量控制,就是小型机,也能进行这样的控制。 PLC进行模拟量控制,要配置有模拟量与数字量相互转换的A/D、D/A单元。它也是I/O单元,不过是特殊的 I/O单元。A/D单元是把外电路的模拟量,转换成数字量,然后 D/A单元,是把 PLC的数字量转换成模拟量,再送给外电路。 送入 PLC。 作为一种特殊的I/O单元,它仍具有I/O电路抗干扰、内外电路隔离,与输入输出继电器(或内部继电器,它也是PLC工作内存的一个区。可读写)交换信息等等特点。这里的A/D中的A,多为电流,或电压,也有为温度。D/A中的A,多为电压,或电流。电压、 49 电流变化范围多为0,5V,0,10V,4,20mA。有的还可处理正负值的。 这里的D,小型机多为8位二进制数,中、大型多为12位二进制数。 A/D、D/A有单路,也有多路。多路占的输入输出继电器多。 有了 A/D、D/A单元,余下的处理都是数字量,这对有信息处理能力的 PLC并不难。中、大型PLC处理能力更强,不仅可进行数字的加、减、乘、除,还可开方,插值,还可进行浮点运算。有的还有PID指令,可对偏差制量进行比例、微分、积分运算,进而产生相应的输出。计算机能算的它几乎都能算。 这样,用PLC实现模拟量控制是完全可能的。控制的单位值可小到212分之一的测量程值,多数也是足够的。 PLC进行模拟量控制,还有A/D、D/A组合在一起的单元,并可用 PID或模糊控制算法实现控制,可得到很高的控制质量。 用PLC进行模拟量控制的好处是,在进行模拟量控制的同时,开关量也可控制。这个优点是别的控制器所不具备的,或控制的实现不如PLC方便。 当然,若纯为模拟量的系统,用PLC可能在性能价格比上不如用调节器。这也是应当看到的 6.3 用于数字量控制 实际的物理量,除了开关量、模拟量,还有数字量。如机床部件的位移,常以数字量表示。数字量的控制,有效的办法是NC,即数字控制技术。这是50年代诞生于美国的基于计算机的控制技术。当今已很普及,并也很完善。目前,先进国家的金属切削机床,数控化的比率已超过40,,80,,有的甚至更高。PLC也是基于计算机的技术,并日益完善。故它也完全可以用于数字量控制。 PLC可接收计数脉冲,频率可高达几K到几十K赫兹。可用多种方式接收这脉冲,还可多路接收。有的PLC还有脉冲输出功能,脉冲频率也可达几十k。有了这两种功能,加上PLC有数据处理及运算能力,若再配备相应的传感器(如旋转编码器)或脉冲伺服装置(如环形分配器、功放、步进电机),则完全可以依NC的原理实现种种控制。 高、中档的PLC,还开发有NC单元,或运动单元,可实现点位控制。运动单元还可实现曲线插补,可控制曲线运动。所以,若PLC配置了这种单元,则完全可以用NC的办法,进行数字量的控制。新开发的运动单元,甚至还发行了NC技术的编程语言,为更好地用PLC进行数字控制提供了方便。 50 6.4 用于数据采集 随着PLC技术的发展,其数据存储区越来越大。如OMRON公司的PLC,前期产品C60P的DM区仅64个字,而后来的C60H达到1000个字;到了CQMI可多达6000个字。这样庞大的数据存储区,可以存储大量数据。 数据采集可以用计数器,累计记录采集到的脉冲数,并定时地转存到DM区中去。数据采集也可用A/D单元,当模拟量转换成数字量后,再定时地转存到DM区中去。PLC还可配置上小型打印机,定期把DM区的数据打出来。PLC也可与计算机通讯,由计算机把DM区的数据读出,并由计算机再对这些数据作处理。这时,PLC即成为计算机的数据终端。 电业部门曾这么使用PLC,用以实时记录用户用电情况,以实现不同用电时间、不同计价的收费办法,鼓励用户在用电低谷时多用电,达到合理用电与节约用电的目的。 6.5 用于进行监控 PLC自检信号很多,内部器件也很多,多数使用者未充分发挥其作用。其实,完全可利用它进行PLC自身工作的监控,或对控制对象进行监控。这里介绍一种用PLC定时器作看门狗,对控制对象工作情况进行监控的思路。如用PLC控制某运动部件动作,看施加控制后动作进行了没有,可用看门狗办法实现监控。具体作法是在施加控制的同时,令看门狗定时器计时。如在规定的时间内动作完成,即定时器未超过警戒值的情况下,已收到动作完成信号,则说明控制对象工作正常,无需报警。若超时,说明不正常,可作相应处理。如果控制对象的各重要控制环节,都用这样一些看门狗"看"着,那系统的工作将了如指掌,出现了问题,卡在什么环节上也很好查找。还有其它一些监控工作可做。对一个复杂的控制系统,特别是自动控制系统,监控以至进一步能自诊断是非常必要的。它可减少系统的故障,出了故障也好查找,可提高累计平均无故障运行时间,降低故障修复时间,提高系统的可靠性。 6.6 用于联网、通讯 PLC联网、通讯能力很强,不断有新的联网的结构推出。PLC可与个人计算机相连接进行通讯,可用计算机参与编程及对PLC进行控制的管理,使PLC用起来更方便。为了充分发挥计算机的作用,可实行一台计算机控制与管理多台PLC,多的可达32台。也可一台PLC与两台或更多的计算机通讯,交换信息,以实现多地对PLC控制系统的监控。PLC与PLC也可通讯。可一对一PLC通讯。可几个PLC通讯。可多到几十、几百。 PLC与智能仪表、智能执行装置(如变频器),也可联网通讯,交换数据,相互操作。 51 可联接成远程控制系统,系统范围面可大到10公里或更大。可组成局部网,不仅PLC,而且高档计算机、各种智能装置也都可进网。可用总线网,也可用环形网。网还可套网。网与网还可桥接。联网可把成千上万的PLC、计算机、智能装置组织在一个网中。网间的结点可直接或间接地通讯、交换信息。联网、通讯,正适应了当今计算机集成制造系统(CIMS)及智能化工厂发展的需要。它可使工业控制从点(Point)、到线(Line)再到面(Aero),使设备级的控制、生产线的控制、工厂管理层的控制连成一个整体,进而可创造更高的效益。这个无限美好的前景,已越来越清楚地展现在我们这一代人的面前。 以上几点应用是着重从质上讲的。从量上讲,PLC有大、有小。所以,它的控制范围也可大、可小。小的只控制一个设备,甚至一个部件,一个站点;大的可控制多台设备,一条生产线,以至于整个工厂。可以说,工业控制的大小场合,都离不开PLC。 一般讲,工业生产过程可分为两种类型;连续型生产过程(如化学工业)及非连续型,即离散型生产过程(如机械制造业)。前者生产对象是连续的,分不出件的;后者为离散的,一件件的。由于PLC有上述几个方面的应用,而且,控制的规模又可大、可小,所以,这两种类型的生产过程都有其用武之地。事实上,PLC已广泛应用于工业生产的各个领域。从行业看,冶金、机械、化工、轻工、食品、建材等等,几乎没有不用到它的。不仅工业生产用它,一些非工业过程,如楼宇自动化、电梯控制也用到它。 52 附录B 外文文献 PLC Theory And Applications Programmable controlling equipment, English said it is named in English of Programmable Logic Controller, in short PlC。 Definition is: a digital electronic computer operating system specifically designed for using in the industrial environment. It adopts a category programmable memory for its internal storage procedures, the implementation of the logical operations, sequence control, timing, counting and arithmetic operations such as user-oriented instructions, and through digital or analog input / output control various types of machinery or production processes. 1 PlC Development Course In industrial production processes, a large number of switches in order to control it in a logical sequence of moves conditions, and in accordance with the logic of relations chain protection movement’s control, and a large number of discrete volume data collection. Traditionally, these functions are achieved through pneumatic or electrical control system. 1968 U.S. GM (General Motors) company replaced following electrical control devices, the second year, the U.S. company has developed a number of integrated circuits and electronic technology-based control devices, the first use of the means of the procedures applied to the electrical control, and this is the first generation programmable controller said Programmable Controller (PC) Personal computer (PC for short) has been developed, in order to facilitate, but also to reflect the functional characteristics of programmable controllers, programmable controller is named Programmable Logic Controller (PLC), now PC is often called PLC. 2 Programmable Controller Basic Tenets PLC is based on computers, and applies to industrial motor controlling work site. It originated from relay control devices, but it does relay devices, the physical process of controlling through circuits, and mainly relies on the operation of PLC memory stored in the procedures for the realization of their information into and out of control. PLC-based computer, but can not be equated with ordinary computers. Information is transformed into a universal computer, and it is only considered by information itself. No matter information goes into and out of it; it can be a good human interface. And the PLC will also consider the reliability of information in and out, real-time, and the use of information and other 53 issues. Special consideration must be given to how to adapt to the industrial environment, such as the ease of installation, interference and other issues. 2.1 PLC Composition PLC are divided into two forms of fixed and modular (modular) in structure. Fixed PLC includes CPU boards, I/O boards, and panels shown, within blocks, electricity. All these elements into a portfolio as a whole are not detachable. Modular PLC includes CPU Modules, I/O module, memory, power supply module, or ill bed, these modules will be in accordance with the rules of portfolio allocation. 2.1.1 CPU Composition CPU is the core of PLC, and it plays a central role. At least one PLC has one CPU, the PLC system procedures is to receive and store the user's functional procedures and data collection methods used by the scanning of the device or sent to the state data, and in the execution, at the same time, diagnostic power and the internal circuits PLC programming process and the work of the grammatical mistakes. During operation, from memory, the article retrieval user procedures is directively analyzed later by a corresponding directive mandates control signals to the command control circuits CPU mainly by arithmetic unit, the controller, register and the links between them to achieve data, control and pose a challenge, CPU module also includes outlying chips, and the bus interface circuits. Procedures exist mainly for storage and data is an integral PLC modules. 2.1.2 I/O Module PLC interfaces with the electrical circuit, and that is achieved through the importation of export segment (I/O) completed. I/O module integration of the PLC I/O circuit, the input signal into Short-term stored equipment reflects state export points also reflects export flip-latch state. Import module will be converted into digital signals into electrical signal PLC system, and the output module opposite. I/O into switching to import (DI), the export volume of switches (do), the volume of simulation (AI), analog output volume (AO) module 2.1.3 Power Module PLC power provides power for the IC modules. At the same time, some of them also work for the importation of power circuit to provide 24V. Power input divided into types below: sharing power (220VAC or 110VAC), direct current power supply (commonly used to 24VAC) 3 Programmable Controller Achieving Control Points Transformation of information I/O can be achieved by physical, which is could be 54 considered to be two basic points. Information on their operations into and out of storage exists in the procedures of PLC. PLC procedures established manufacturers of the system procedures (irrevocable), and users develop their own applications (users) procedures. Operating system platforms provide procedures, and procedures for the PLC signal and reliable operation of the public with the information necessary conversion. Users control procedures designed by the users. What kind of control, due to what the user procedures. Reliable physical realization mainly relies on anyone else (input) and (output) circuit. PLC’s I/O circuits are specially designed. Of a filter circuit to input signal to eliminate high-frequency interference. But with the internal computer circuits, electricity is isolated and it also relies on photocoupling networking components. Guangou components export relays networking exports from electricity within and outside the circuit, or. A power output circuit also enlarged to be sufficient to general industrial control components, such as electromagnetic valves, contact devices, and so on. I/O circuits contains a lot of sorts, each entry points or export points to a circuit I or O. PLC with how I/O point, the general will use a number of I/O circuit. But because the highly integrated circuit provided them, so size is not large share. Constantly monitored the importation of circuit status and pending in the importation of Short-term storing equipment. Each entry point has a corresponding memory of their information Short-term storing equipment Export circuit to export flip-latch devices messaging to export points. Export flip-latch and the output is also gathers Import and export of flip-latch and Short-term storing equipment here are the actual device of PLC processors I/O the register. They exchange information through computers and computer memory bus, and primarily by the realization of operating system procedures. Short-term storing equipment is to lose people read the information within the PLC, it is said that the importation of regeneration. PLC is within the open storage of specialized information shine upon area. Each of the district counterpart spaces (bit) as input relays, or those soft contacts. These positions into one that includes links, home to multiple broken into 0. Because it is the state of renewable received, so that it is reflected in the imported state. Export flip-latch and the PLC memory areas are exported shine upon counterpart. 1-export flip-latch have a hard place (bit) with its counterpart, the place known as export relays, or that exporting coil. By operating system procedures, and the output relays shine upon the state to export flip-latch. Also known as the shine upon exporting renewable. Is the main operating system on renewable export procedures achieved? Thus, users only need to be procedures that 55 exist in the area of shine upon export shine upon their zone, especially in the importation of the time series is converted into the output time series. This is a logic and data processing. The PLC is a powerful command system, the procedures to prepare to meet this requirement is entirely possible, but also relatively easy. 4 Programmable Controller Achieve Control Of The Process Briefly, PLC controlling process is usually achieved: Of renewable -- to users operating procedures -- to export renewable -- further importation of renewable -- to users operating procedures -- to export renewable: never stop to the cycle of repeated carried out. With the above-mentioned process, the realization of a PLC control is clearly possible. Because: With the importation of renewable, can be imported by the import control circuit input shine upon information deposited PLC District; By users operating procedures, and the output will be used after the district shine upon information; After exporting renewable exporting flip-latch will be reflected shine upon export zone status, and a corresponding export through export circuit. Also as a result of this process is never ceasing to cycle repeatedly carried out, it is always reflect input from the changes. Response time is only slightly behind. Of course, this should not lag too much, otherwise achieved control less timely lose control of significance To this end, the PLC work faster. Speed, execution time is short, the realization is PLC controlled. In fact, it is the speed soon, the implementation of a directive, several more elsewhere, scores elsewhere, but only 0.1 of the few, or 0.0 few refinements. And the speed is constantly improving. In addition to operational users I/O renewable and procedures, but also do public address work Report processing: cycle time monitoring, and engineered services and communications processing. Control cycle time in order to avoid "dead cycle" in order to avoid duplication of procedures cannot be repeated continuously. Approach is the use of "man" (Watching dog). As long as the cycle of overtime, it can report or consequential. The external services is acceptable for PLC programming by its operation, or through interfaces to export equipment, such as printers output data Communications processing is a PLC or computer, or other industrial control devices or the exchange of information among intelligence components. This is also enhanced PLC control needs 56 In other words, the actual process always PLC: public address --I/O renewable -- users operating procedures -- to the public address --: repeated constantly. 4.1 Programmable Controller Means To Achieve Control This constant repetition of the operation procedures is used to achieve that control scanning. Is a computer-based real-time control? In addition, there are computers for control interruption. Interruption in the form of applications to be processed first interruption control, the procedure was to stop the operation after the operation is, in turn, to deal with the interruption of work (the interruption of services operating procedures). Pending End interruption, and return to the original operational procedures. Which control needs to be addressed, which went for the interruption? Which has no treatment, will not be ignored. Clearly, the interruption of ways and scanning mode is different. Interruption in the form of computer to be utilized to the full, urgent tasks are to be dealt with in a timely manner. However, if at the same time to deal with several tasks that must be done? Priority will also be much easier to high-level, low? Care less than it might appear. Therefore, the interruption of work is not suited to the daily use of the site. However, PLC scanning method is used mainly in cases of exclusion or suspension. Namely, a large number of controls by scanning all manner of dealing with individual needs, allowing the interruption of scanning operation procedures, turn to deal with it. This can be done taking into account all the control; the individual can carry out emergency treatment. Actually the process of PLC is more complex than we mentioned here, the analysis of its basic tenets, some theoretical issues. If the personnel on the above can enter a change, physical realization -- information processing, I/O call Cumming space, time -- scanning method supplemented by the interruption, as a way to study and understand it, and good understanding of PLC is how to achieve control and good grasp of the basic principles of PLC points. For more in-depth, in the further course of study, will make a specific presentation. 5 Programmable Controller Basic Characteristics The operating principles are those from the discussion of PLC, PLC’s input and output are mutually separated in physics, which is linked to its existing storage operation on the procedures to achieve. It into a relevant, and not rely on physics, not a line; But by the information process, using soft logic links. Its work is based on the use of good information. Information is material and energy with its own laws. Facilitate the processing of information, facilitate communication and facilitate storage; Information may also be trusted, 57 and so on. It is precisely because of these characteristics of information, decisions of the basic characteristics of the PLC. The examples of PLC’s four characteristics are as follow: 5.1 Functional Rich PLC functions are very rich. This was mainly related to the processing of information rich store of information systems and internal directives devices. Scores up its command; several hundred may be a logic problem for all types of data processing also. Where ordinary computer can do, it can be done. Its internal devices that exist in the data storage area is a wide range of capacity ambitious. I/O relays can be used to store input, a point of information, fewer scores, and more up to thousands and tens of thousands or even ten thousands. This means that it can carry out so many I/O points into and out of information used for such large-scale control. Its internal various relays, representing intermediate relays, the number more. A place can exist as an intermediate relays, how much! Its counter, timer and many are relay circuits are far behind. Minor modifications or modules, and its internal timer, and can reach 100 meters, thousands. This is because as long as the word that will be used exists, and some signs spaces become timer, counter, so it is that much. Furthermore, these internal device must be installed into electricity maintained, or not maintained we call that the call for the replacement of the. Use to meet different requirements. These pieces are also relays difficult to achieve. Its data can be used to store large data storage area, hundreds, thousands and tens of information can be kept, and not after the loss of electricity. PLC is rich external equipment may establish friendly computer interface for the exchange of information. Could into procedures into data readable by the procedures read? And reading and writing in the book, the screen. Data read out, it can dumps can print. Data entry into can to the card reading, and so on. PLC has communications interfaces with the computer link or networking, exchange of information and computers. Networking can do it itself to form a single aircraft that cannot have greater, broader geographical control system. PLC also includes powerful functions could be carried out since the diagnosis. The results can be automatically recorded. This increased transparency for its maintenance, facilitated. Rich functions for the PLC to provide a wide range of applications possible; At the same time, also for industrial automation systems, and control much of the intelligent move created 58 conditions. Collection rich in functions such as PLC who is not-call controls; More traditional relay control circuits are incomparable. 5.2 User-friendly PLC control system used to achieve it is very convenient. This is because: first PLC control logic established procedures, the procedures used to replace hardware wiring. Series of procedures than wiring change procedures than changes wiring of course easier! Secondly PLC hardware is highly integrated, has integrated modules for various miniaturization. Furthermore, these modules are complementary, have achieved mass production and standardization. Various control systems for modular PLC manufacturers have more cash supply, the market can be bought. Therefore, the hardware system configuration and construction are also very convenient. For this reason, using programmable controller is the word "may". For software stresses that its procedures may be also be incorporated. Stresses on hardware, its configuration variable, but also easy to change. Specifically, the PLC gains five convenient points: (1) Allocation for: access control system to determine the needs of the PLC using any, type, what module to the number of modules finalized, the market order to purchase it. (2) Facilitate the installation: PLC hardware installation simple, easy assembly. External wiring is wiring devices, wiring simple, but then a good, replacement modules, the new module, wiring devices to be installed are no longer wiring. What line did not receive internal, as long as necessary to make some set dipswitches or software set, and prepared user procedures can work? (3) Programming convenience: PLC internal Although no actual relays, timing relays, counters, but it through procedures (software) and the system memory, these devices are really exist. Its volume is relays control system unimaginable. Even small PLC, a few can be thousands of internal relays, time relays, counting also hundreds. Furthermore, these relays allow unlimited use of the Network. PLC internal logic devices as users are not used to have any restrictions on them. Only consider only into a point. It is to say that this internal use of a point is beside the point. Large PLC control points to 10,000 points, there is such a great reality system? It is not enough for networking control without any restrictions. PLC instructions system is also very rich may have difficulty in achieving various switches, and analog volume control. PLC data is stored within the zone and process control can be stored to preserve all the information. : : In short, because of PLC functions of strong, play its role in the control system, the constraints are no 59 PLC itself, but people's imagination, or other hardware and its supporting facilities. PLC's engineered rich, many types of programming devices, are more convenient to use, there are data monitoring devices, PLC can control the work. Many also use PLC software, available not only similar to relay circuit design ladder diagram language, and some also use basic language, C language, to the extent that natural language. These provide a convenient programming for. PLC PLC procedures also facilitate the storage, use and re-transplant. A stereotyped product is used in the PLC process improvement, where such products are used. Production one Taiwan, a copy will be. This compared relays circuit Taiwan and Taiwan must wiring equipment, debugging, and much simpler to save. (4) Maintenance convenient, which is because Firstly, PLC’s reliable work, failure of the small, which greatly reduces the maintenance workload. This in turn PLC's third characteristic, will be further introduced Second, even if the PLC failure, the maintenance is very convenient. This is because the PLC had many failures presentation signals, such as PLC maintain support within the cell voltage insufficient data, the corresponding signals are low voltage directives. Moreover, the PLC itself is also a record of failure. Therefore, PLC, a failure, it is very easy diagnosis. At the same time, it is also diagnosed rear failure is simple. Pai it may module, the module can buy spare parts market, the replacement would be simple. As for software debugging good will not malfunctioning, so long as no adjustments based on the use of experience to perfect indulges. (5) To facilitate: PLC for certain equipment, if the equipment is no longer used, it could be used in the PLC to use other equipment, as long as this adaptation process is fulfilled. If the original equipment with new equipment is from the larger one, the number of modules therefore can be trusted. 5.3 Reliable Work PLC control system used to achieve it is very reliable. This is because the PLC hardware and software in two aspects have taken many measures to ensure that it reliable. In fact, if PLC unreliable work cannot be used in industrial environments, will not make itself PLC 5.3.1 In terms of hardware: PLC input and output circuit internal CPU is electricity segregation. photocoupling information is on the device or the transmission of electromagnetic devices. Moreover, the CPU board is resisting electromagnetic interference shielding measures. It will ensure that PLC operating procedures and magnetic interference from the outside world -- too normal. 60 PLC -use components for many of the non-contact, but also for the highly integrated, the number is not too large, but also provide a material foundation for its reliable. Structural design and manufacturing processes in mechanical, for PLC to secure work, has also taken many measures to ensure that PLC vibration resistant, high impact. Use of environmental temperature can be as high as over 50 degrees Celsius; some PLC can be as high as 80--90 degrees. Some PLC module may heat up a server, another server is functioning, but not in control, only for backup. Once work mainframe failure, the heat for an automatic replacement of its work. There are even redundant, a three to one design, CPU, I/O modules, power modules are redundant or some of the redundancy. Three sets at the same time, exports depend on the final decision of the majority of three results. This allows virtually zero probability of system failures, and ensures that everything goes well. Of course, such a system is a high cost, only for the particularly important occasions; such as railway stations Road forks control systems. 5.3.2 On The Software Side: PLC's working methods for scanning plus interruption, which can guarantee it orderly, avoiding relay control systems often arise "adventure competition", the results are always determined by its control; But also to deal with contingency control of the PLC to ensure a timely response to emergency situations, so that PLC can reliably. Normal operating procedures for monitoring PLC, PLC systems are set up "watchdog" (Watching dog) monitoring procedures. Users begin operating procedures, first - "watchdog" timer, and started the clock. When users operating procedures after a cycle, the timing check timer value. If overtime (generally not exceeding 100ms), reported to the police. Serious overtime, but also to stop the PLC. Users may take warning signals corresponding contingency measures. Timer value if the timing of overtime, then repeats the process start-up, PLC will be normal. Clearly, with this "watchdog" to monitor the procedures to ensure the normal operation procedures PLC users can avoid the "cycle of death" and affect the reliability of its work. PLC many prevent and detect failures in the order to produce the modules work normal or not important reminder signal. Through the preparation of the corresponding user procedures, and to PLC status of the work, and PLC control system monitoring to ensure its reliability. PLC on each call, also must operate the system includes procedures and substantially. This is the procedure of the system, and users may intervene. Failure of a corresponding error signal presentation It is in the PLC software and hardware aspects of a strong reliability measures in order to 61 ensure that the features of the PLC have reliable. Its average time has up to tens of thousands of hours without failure. The average repair of a defect can be in a very short time, a few hours that a few minutes could. Why the use of PLC have been conducted survey. In response, most users of the PLC as a reliable work of the main reasons for its choice, namely to secure the, PLC as its preferred target 5.4. Economic The use of high technology will bring huge economic benefits and social benefits; it is the embodiment of science and technology are the primary productive forces, but also high-tech vitality lie. PLC is the case. For the first time, although the use of PLC costs a lot, but from a comprehensive and long-term perspective, the use of PLC is economic. This is because: Use PLC investment is great, but its small size, its small space, support facilities less input; Energy use, operation costs less; Working reliable work fewer losses; Maintenance simple, less maintenance; Can be used again and bring added value, etc., available to a greater return. Therefore, in most cases, its effectiveness is impressive 6 Programmable Controller Basic Applications Initially, the main use of PLC’s is the logic for switching volume control. With the PLC technology, its applications have expanded continuously Now, PLC not only for the volume control switch, the volume figures are also used for simulation and control volume, collection and storage of data, but also to control system monitoring; Also networking, communications, achieving large-scale, multi control and management. PLC’s industrial control devices have become an important family role. . 6.1 For the Volume Control Switches PLC control switches volume capacity is very strong. Control points into and out of, 10 points less, scores points, and more available in hundreds, thousands, even tens of thousands. Because it networking points virtually unrestricted, regardless of how many points can control. Control logic can be diverse: portfolio, timing; Immediate, lapse; Not counting the required number; Fixed sequence, random work; Etc., can be carried out PLC hardware structure is variable; the software program can be made to control, very flexible. If necessary, they can be more prepared sets, or more Group procedures, the need to deploy under. It is more adapted to the situation in the industrial scene, more of their needs. Use PLC for the volume control switches are examples of the many, metallurgy, machinery, light industry, chemical industry, textile, etc., used in almost all industries need it. Currently, the 62 PLC used in the first goal is not to match the other controls; it is convenient and reliable for the volume control switches. 6.2 For Simulation Volume Control Simulation volume, such as current, voltage, temperature, pressure, etc., it is the size of a change. Industrial productions, especially for type production process, are often under the physical units control. Industrial electronic devices as a control, PLC control the volume if not for these, it is a major deficiency. To this end, the PLC manufacturers have substantial development in this area. At present, not only large, medium machine can simulate volume control is wise, but also to engage in such control. For the control of the PLC’s simulation volume, it needs the distribution of a digital simulation of the conversion of mutual A/D, D/A modules. It is also I/O modules, but special I/O modules. A/D module is the volume of circuit simulation, digital conversion volume, and then into the. PLC. D/A modules, the PLC is converted into the digital simulation of the volume, and then sent to the circuit. As special I/O modules, it still has a I/O circuit interference, and outside circuit isolation, and import export relays (or internal relays, it is also hard work of a zone. PLC can read and write) the exchange of information etc. characteristics. An A/D here is mostly current or voltage, but also for temperature. In D/A, a is a mostly voltage, and also current. Voltage, current changes more scope for 0~5V, 0~10V, 4~20mA. Some may deal with is negative. Here D, nationwide number for the number eight binary system, China, and a large number of mostly 12 binary system .A/D, D/A a single road, and how road. Multiplexed output relays for the importation of more With A/D, D/A modules, the remaining figures are dealing with the volume of the information processing capabilities of the PLC has not difficult. China, large PLC throughput stronger, not only for the figures to increase, reduce, by, among other, and can also write out a prescription, interpolated, but also a floating point operation. Some have PID instructions for the volume ratio can be biased system, differential, scoring operations, and generate the corresponding output. Computers compute it can almost be. Thus, to achieve a PLC analog volume control is completely possible. The smallest control units can be 212 hours of the one-way measurement value, the majority is also sufficient. 63 PLC simulation volume control, there is A/D, D/A combining modules, and available PID control algorithms achieve or ambiguous control available high quality control. PLC simulation volume control, there is A/D, D/A combining modules, and available PID control algorithms achieve or ambiguous control available high quality control. Of course, if purely for simulation of the system, using PLC may be used in the performance of the regulator. It is also should be seen 6.3. Used For Digital Volume Control Actual physical volume, besides switching volume, there are also the volume of simulation, and digital volume. Machine tool components such as the displacement, often expressed in the volume figures Digital volume control, an effective approach is NC, digital control technology. This is the birth of the 1950s in the United States computer-based control technology. Are very popular today, and also very refined. Currently, metal cutting machine tools advanced countries, the ratio has exceeded 40%~80% digital technology, and some are even higher. PLC is also computer-based technology, and increasingly improved. So it is entirely possible for the volume control figures. PLC will be able to receive count pulse; the frequency can be as high as several tens of k-to-k Hz. This pulse can be used various ways to receive, but also multi-path reception. Some PLC also pulse output function, pulse frequency could reach tens k. With these two functions, and PLC data handling and processing capabilities, if equipped with appropriate sensors (such as rotary coding devices) or pulse servo devices (such as circular allotter, public player, electrical motors), then it could to achieve the principles of NC various control. High, moderate the, PLC has also developed a NC modules, or modules campaign, achievable control point spaces. Campaign module can achieve curve drain to control the curve campaign. Therefore, if PLC fixed this module, it can use NC approach, the number of control. New development campaign modules, and even issued NC technology programming language for better control of figures provided by PLC for convenience. 6.4 Flow For Data Collection With the development of PLC technology, its data storage area has also improved. If Omron Corporation PLC, the DM-zone products C60P only 64 characters, and later C60H reached 1,000 words; CQMI has up to 6,000 characters. This large data storage area can store large quantities of data. Data collection can be used rod, the collection of records to the pulse number, and timing is 64 banking forward to DM zone. Data acquisition modules are also available A/D, when converted to digital simulation of the volume before regularly are banking forward to DM zone. PLC also can be installed with of small printers, regularly hit by the DM zone data. PLC can computer communications, the DM zone by computer data read by the computer for further processing of these data. Then, PLC has become a computer data terminal. Electricity sector had so use PLC for real-time electricity consumption records users to achieve different electricity time, different valuation fees, and encourage users to use electricity more electricity bottom, reasonably electricity and energy savings. 6.5. Used For Surveillance PLC includes many signals that there are many internal devices; most users do not fully play its role. In fact, it can be used entirely for PLC control their own work, or to control the target for monitoring. PLC timer here used to introduce a man to control the control of the target work If using a PLC control movement components moves to exert control over the movement after no available means to control barking. Specific practices in the imposition of control while the man timer clock. If completed within the given time-frame movements, timer value not exceeding warning of moves to complete signal has been received, work on the control of the target normal without warning. If overtime on the abnormal, for the corresponding address If control of the important targets of control link with such criminals are "invisible" to that system will be familiar, there have been problems, in what areas is also very good card search. There are some other control works to do. Control of a complex system, especially automatic control system to control and even further from diagnosis is very necessary. It can reduce system failure, or a failure to locate, could increase the cumulative average operating time without failure, the failure to reduce repair time and improve system reliability 6.6 For The Networking, Communications PLC networking, communication competence and constant introduction of new networking structures PLC linked with personal computers for communications, computers available in the PLC programming and control management, and enable PLC to be more convenient To bring into full play the role of the computer can be a computer control and management of multi-Taiwan PLC, the number will reach 32 Taiwan. Can one Taiwan PLC and two or more 65 computer communications, exchange of information, in order to achieve more control of PLC control systems. PLC and the PLC can also communications. Can one PLC communications. Several PLC may communications. To be more than dozens, even hundreds. PLC can be connected with wisdom meters, and the implementation of smart devices (such as transducer), networking communications, data exchange, and mutual operation. Can link into remote control system, wide coverage to 10 km or greater may big. LAN can be formed; not only PLC, and high-grade computers, a variety of smart devices can also enter networks. Available bus network could also be used circular network. Network also sets network. Network also bridges with network. Networking can be thousands of PLC computers, intelligence devices in a network. Among network nodes can be directly or indirectly communication, the exchange of information. Networking, communications, and is adapted to today's computer integrated manufacturing systems (CIMS) and intelligent plant development. It will enable control from the industrial point (Point), the line ((Line) then face (NASA), to control the level of equipment, production line control, factory management control even as a whole, thereby creating a higher efficiency. This beautiful prospect is becoming clearer picture of our generation in the face. The above point’s focus on the application is qualitatively. From the volume speaking, a large PLC and small. Therefore, it may be the control of large, can be small. Only a small control equipment, or even a component, a website; Large number of Taiwan can control equipment, a production line that the whole factory. It can be said that the industrial control the size of occasions, is inseparable from the Generally speaking, industrial production process can be divided into PLC two types; Continuous-type production processes (such as the chemical industry) and non-continuous type that separated type of production processes (such as machinery manufacturing). The production target is continuous, provincial pieces; Separated for the latter, a disc. Because several aspects of the application of the above PLC, and can control the size of large, small can, therefore, the two types of production processes has its place. Indeed, PLC has been widely applied to various fields of industrial production. Judging from trades, metallurgy, machinery, chemical industry, light industry, food, building materials and so on, it almost does not have to. Not only with its industrial production, a number of non-industrial processes, such as building automation, elevator control and use it. Agriculture where environmental parameters control, irrigation also use it. 66
本文档为【自动加料机PLC控制系统】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_219945
暂无简介~
格式:doc
大小:461KB
软件:Word
页数:93
分类:工学
上传时间:2017-09-28
浏览量:50