材料分拣机控制系统设计【含CAD图纸、说明书】
收藏
资源目录
压缩包内文档预览:(预览前20页/共46页)
编号:27119012
类型:共享资源
大小:583.02KB
格式:RAR
上传时间:2019-11-27
上传人:机****料
认证信息
个人认证
高**(实名认证)
河南
IP属地:河南
30
积分
- 关 键 词:
-
含CAD图纸、说明书
材料
分拣
控制系统
设计
CAD
图纸
说明书
- 资源描述:
-





- 内容简介:
-
摘 要本论文介绍了樱桃西红柿分拣机的工作机理及其简单的工艺流程,主要针对其控制系统做详细说明。 本文对该分拣机进行了总体方案设计,采用PC与PLC相结合的技术实现了樱桃西红柿的自动分选。根据实际生产需求以及设计生产效率,合理选择各动力及控制元件。并且编制控制程序。关键词:自动分拣机;控制系统;可编程逻辑控制器;PC;继电器。AbstractWith the rapid development of the micro electric technique and computer technology, PLC (namely programmable controller) gets widely application very in the industry controlled field. PLC is one kind on the basis of technology of digital computer, electronic control device designed to use under the environment of industry specially, adopt it by memory that can programmer, it is last user order not to used for, through figure or introductions of simulation export, finish such functions confirmed as a series of logic, order, timing, counting, operation ,etc., to control all kinds of integrated equipment of electro mechanics and production process.Key words:Automatic sorting system;Control system; Programmable logicalcontroller;PC;Solid State Rely 目录1、前言52、总体功能介绍62.1排队部分72.1.1电机选择82.1.2 电子无级速度控制器选择82.2输送部分92.2.1 电机的选择92.2.2电机工作情况102.3视觉系统113、电控设计123.1输入部分123.2输出部分133.3控制面板133.3.1输送、排队继电器143.3.2按钮开关143.3.3信号灯154、系统PLC选择154.1PLC简介154.1.1PLC的起源与发展154.1.2 PLC控制系统与其他工业控制系统的比较164.1.3PLC控制系统的硬件组成184.1.4PLC控制系统的软件组成204.2PLC选择235、总结246、参考文献25 第一章 前言 樱桃西红柿又名葡萄番茄、圣女果、珍珠番茄,在国外又有“小金果”、“爱情果”之称。它既是蔬菜又是水果,色泽艳丽、形态优美,并且味道适口、营养丰富,除了含有番茄的所有营养成分之外,其维生素含量比普通番茄高。被联合国粮农组织列为优先推广的“四大水果”之一。 圣女果是一种热带作物,鲜红碧透,味清甜,无核,口感好,营养价值极高。伴随着人们生活水平的提高,其消费量逐渐增加 。 圣女果一般单重1020g,果实横径2厘米左右。在不断增长的市场需求刺激下,我国的樱桃西红柿产业正快速发展,目前已经形成一定规模。并且伴随着国际市场的需求增大,作为一种高档蔬菜的樱桃番茄将会有一个长足的发展。为了提高樱桃西红柿的出产效率,并且使樱桃番茄规格划分更加准确,效率更高,需要设计一种自动的等级分拣机。自动分拣机是将混在一起而去向不同的物品,按设定要求自动进行分发配送的设备,它主要由输送装置、分拣机构、控制装置等组成。当分拣物到达分拣口时,通过推拉机构、拨块、倾倒、输送等方式,使分拣物滑动或传输到分拣口,可实现多品种、小批量、多批次、短周期的物品分拣和配送作业。自动分拣机的种类很多,但较为先进的主要有三种:滑靴式分拣机、翻盘/翻板式分拣机、交叉带式分拣机。在该自动分拣机的帮助下,樱桃番茄的分级不再是单纯依靠采摘人员的大致分类,而是可以在更严格的分级标准下,快速准确的分出等级,对产品的质量有更明确的保证,增加劳动生产率,提高产品的市场竞争力。利用该自动分拣系统,可以省去专人进行樱桃番茄的等级划分,减少工人的劳动强度,节约劳动成本,并且可以实现连续的生产,很大程度的提高生产效率,取得更大的利益。第二章 总体功能介绍 对于自动分拣系统,首先必须实现以下基本条件:1、 分拣误差率极低。因此要求系统拥有很高的稳定性,以及对产品信息采集要有较高的准确性。2、 能够持续工作。同样要求控制系统有极高的稳定性。 3、自动化生产。建立自动分拣系统的目的之一就是为了减少人员的使用,减轻 人员的劳动强度,提高人员的使用效率,基本实现无人化作业。现将樱桃番茄按照其尺寸及色泽分为规格一和规格二两种。产品经送料系统送入排队系统,在此等待,并依次经过光耦。光耦在传送系统配合下,采集每个樱桃番茄的信息,并且将该信息送入PC机的采集卡。PC机将光耦采集的信息进行分析,并根据预装的程序判断该产品属于规格一或者规格二。判断完成后,根据结果向每种规格所对应的继电器发出信号。并转换成指令送入PLC。PLC根据程序设计,在收到产品的规格指令后,经过一定时间延迟,打开规格一或者规格二出料口的电磁阀,产品在空气压缩机的气压作用下出料,将不同规格的产品经不同出料口送出分拣机,分拣任务完成。考虑到产品的特殊性,产品在分拣机的各部分中不能有强烈的碰撞等,因此产品在进出料时由空气压缩机提供气压使产品移动。 以下是为实现自动分拣机的上述功能的各种控制要求。送料、出料部分,由一台空气压缩机提供气压,电磁阀控制,共需要三个电磁阀。产品的输送及依次排队由电机提供动力。这里需要两个继电器对电机进行控制。产品规格信息由视觉系统采集后送给PC进行分析,并将分级结果转换为指令送入控制系统。系统的主要控制功能将由PLC实现。系统设计4个控制开关:总行、送料、输送、手/自动转换。下面对分拣机各功能模块进行设计说明:2.1排队部分 产品经进料口送入分拣机后,需要使其可以依次经过光耦进入输送部分,而排队部分就是实现这一功能的。功能的具体实现如下图: 2.1.1电机选择排队输送机构采取电机带动。根据设计生产效率及小番茄重量,需要电机轴上功率P=0.06KW。并且要求电机效率高,运转平稳、振动小、质量轻,故选用90YYJT90型齿轮减速电子调速电动机,额定功率0.09kW,频率50Hz,电压200V,输出转速1-500r/min(任意选择)。选用浙江佳雪微特电机集团生产的 90YYJT90-3。该产品具有高精度、低噪声等优点,并且拥有良好的加工工艺,整体适应性良好,属于小功率齿轮减速、电子调速电机,具有较高的性价比。排队电机的安装线路图:2.1.2 电子无级速度控制器选择 在现代工业系统中,电动机是主要的驱动设备,目前在电动机拖动系统中已大量采用晶闸管(即可控硅)装置向电动机供电的KZD拖动系统,取代了笨重的发电动一电动机的FD系统,并且伴随着电子技术的发展,促使电机调速逐步从模拟化向数字化转变。 选择浙江微特电机生产的SC-A电子无级速度控制器。该产品采用PD比例调节器,电流负反馈技术,实现恒力矩无级调速,具有运转平稳,起动迅速,控制精度高等特点。 并且该产品结构简单,能与主电路同步,能平稳移相且有足够的移相范围,控制角调整量可达10000步,能够实现电机的无级平滑控制,脉冲前沿陡且有足够的幅值,脉宽可设定,稳定性与抗干扰性能好。 以下为其接线图:2.2输送部分 产品经过光耦后,经由输送系统送到出料口,由电机带动滚轮来实现。2.2.1 电机的选择 该电机的线路图如下所示: 根据传送带设计所需转速,以及生产效率,确定在输送部分所需电机功率P=0.65KW。选择由上海锐进电机公司生产的MBL07-Y0.75-C5(一级齿轮减速,减速比为1:5)。该电机主要由压紧的主动轮装置、摩檫传动机构、调速控制机构组成,并具有以下的特点。(1).高强度:在加冲击负栽或机器逆转时,本机性能可靠,能精确转动,无后坐力。(2).变速范围大:变速比均为1:5,即输出转速可在1:45至1:7.25之间任意变化。(3).调速精度高:调速精度为1-0.5转。(4).性能稳定:本机的传动部件都经过特殊的热处理,精密度加工摩檫部位,润滑良好,运行平稳、噪音低、寿命长。(5).同轴结构:输入轴、输出轴同向旋转,体积小、重量轻。(6).组合能力强:本机可与各种类型减速机组合,实现低转速,大扭矩的变速效果。(7).在允许负载的情况下,调定的转速恒定;(8).全机密封,可适用于潮湿、多尘、有轻度腐蚀性的工作环境。2.2.2电机工作情况工作温度:部件磨合(空机运转)开始时,温升可高于环境温度的40-50,当运转60-80小时后,温度逐渐降低,温度约高于环境温度25,并保持恒定。 工况系数表:K工作情况1均匀、匀速负载、单向旋转、无惯性1.3中等冲击、脉动负载、常反转、中惯性1.5中等冲击、脉动负载、常反转、大惯性1.75严重冲击、脉动负载、常反转、大惯性调速方式:手动调速(分快慢手轮、指针手轮两种)配直角器调速电动调速 2.3视觉系统 视觉系统主要包括光耦、采集卡、摄像灯、摄像头等,主要完成对产品信息的采集功能。下面是视觉系统安装线路: 视觉摄像头需要24V直流电源。视觉系统的摄像灯以及采集卡需要12V直流电源。作为产品等级划分的指令输出部分,采集卡及采集灯需要稳定的电源供应,以满足系统的稳定性要求,来保证产品规格划分的可靠性。考虑到控制系统的保护,所选交直流转换器要求很高的转换准确度。交直流转换有热电变换、电动系、静电系、电子系等方法。系统需要高稳定性,低误差,较高的灵敏度,因此选用热电变换。 由所需电压及考虑使用环境和成本,选用德力西公司生产的SA-350-24型号交直流转换器。 SA-350-24转换器采用了拥有专利的薄膜量程电阻器,能够提供非比寻常的转换准确度,其总不确定度低达2%,并且能够提供较宽的电压范围和宽频率范围。该转换器拥有良好的温度稳定性和快速的稳定时间,可以在更快的时间内进行测量。 并且该产品在保证良好的性能之外,拥有比同规格产品要低的价格。具有较高的性价比,适合在我们的番茄分拣机上使用。 以下为其功能参数: 温度稳定度 在使用环境中可达12个小时稳定时间 预热时间 上电15分钟,达到稳定 温度性能 工作: 11C 至 35C; 校准: 18C 至 28C; 储存: -40C 至 50C 第三章 电控设计 本设计主要针对自动分拣机控制系统的设计,以下就对该部分设计进行详细的说明。 3.1输入部分 产品信息由光耦采集,PC分析后,给出两种规格结果,并输入给PLC。由于采集卡给出信号为弱电输入,不足以作为指令信号输送给PLC,因此这里需要两个继电器进行调节。 右图为产品规格信息的输入线路图: 根据系统性能要求及成本考虑,可以选择固态继电器。作为固态继电器,其拥有以下特点:(1)高寿命,高可靠:SSR没有机械零部件,有固体器件完成触点功能,由于没有运动的零部件,因此能在高冲击,高振动的环境下工作,由于组成固态继电器的元器件的固有特性,决定了固态继电器的寿命长,可靠性高。(2)灵敏度高,控制功率小,电磁兼容性好:固态继电器的输入电压范围较宽,驱动功率低,可与大多数逻辑集成电路兼容不需加缓冲器或驱动器。(3)快速转换:固态继电器因为采用固体器件,所以切换速度可从几毫秒至几微妙。(4)电磁干扰小:固态继电器没有输入线圈,没有触点燃弧和回跳,因而减少了电磁干扰。大多数交流输出固态继电器是一个零电压开关,在零电压处导通,零电流处关断,减少了电流波形的突然中断,从而减少了开关瞬态效应。 需要直流控直流继电器作为PLC指令的输入,负载电流为5A左右,因此选用2个美格尔公司的JGX-1 D10型号固态继电器。 美格尔公司生产的JGX型固态继电器,是采用先进的技术和器件制造的一种性能优良的新型无触点电子开关。其输入端仅要求很小的控制电流,能与各集成电路较好地兼容;而输出回路则采用可控硅或大功率晶体管接通和断开负载电流。输入和输出之间采用光电耦合,通断没有可动接触部件,因此具有工作可靠、开关速度快、无噪音、寿命长、体积小、耐蚀防爆抗震等特点。3.2输出部分 系统的进料、出料部分由PLC发出指令,控制电磁阀完成。产品分两种规格,因此一共需要三个电磁阀。电磁阀安装在分拣机的进料、出料口,因此电磁阀的远距离控制,需要三个继电器实现。下面是电磁阀输出的线路图: 樱桃番茄的重量一般为10g-20g,因此流量 Cv : 0.18即可满足需要。选用MAC公司的MAC 35A ACA DDAA-1BA型号电磁阀,三个。MAC阀门公司是北美最大的电磁阀生产厂,专业生产气动电磁阀。MAC电磁阀因其独特的结构设计及卓越的性能品质,在北美有26%的市场占有率。 MAC的电磁阀结合了阀门高速运动所需的所有设计理念及60年的阀门制造经验,公司将阀门的性能发挥到极限,可以满足任何速度及精确度上的严格要求,是在高速、精确的应用中唯一的选择,最重要的是原厂18个月不限次数品质保证,寿命特长,价格合理。其主要特点: 1,平衡式阀门设计,反应时间不受压力变化影响; 2,阀芯防卡死保护设计,避免电线圈烧毁; 3,电线圈吸力大,确保动作快速,精确,每分钟精确作动速度最高可达14000次以上。 4,自动补偿磨损,增长阀门的使用寿命; 5,电线圈与空气隔离,增长线圈的寿命。电磁阀工作电压220V,电流10A左右,因此选用美格尔公司的JGX-1 DD220D10型号直流控直流继电器。3.3控制面板 系统共设置总行、送料、输送、手/自动转换四个控制按钮。 下图为这些控制按钮的信号输入图:3.3.1输送、排队继电器输送电机为三相交流电机,并且考虑到该电机功率要求,所需负载电压为24V,负载电流为40A。选用乐清市美格尔电子电器公司生产的JGX-3 380D40三相交流固态继电器。排队电机为单相电机,所需控制继电器的负载电压为24V,负载电流为10A,因此选用美格尔公司的JGX-1 D4810交流固态继电器。美格尔公司该系列的继电器,不仅能够良好的实现系统的功能需求,拥有较高的质量,并且方便继电器的维护等。3.3.2按钮开关设计系统供电电压为220,电流10A左右,选用江阴长江电器公司的LA38-11型号开关。 该开关适用于交流50Hz(或60Hz),电压380V及以下,直流电压220V及以下的电磁起动器、接触器、继电器及其它电气线路中作遥远控制之用;其中带灯式按钮(LED发光)还适用于需要灯光信号指示的场合。其技术指标为:带灯钮(LED)发光寿命:30000h信号灯额定工作电压:AC、DC:24V、220V颜色:红、绿、黄、白、蓝、黑(选红色)相比漏电起痕指数CTI100,阻燃寿命指标:按钮:机械寿命:100104次电寿命:50104次旋钮:机械寿命:20104次 电寿命:10104次电寿命:10104次 绝缘电阻50M接触电阻50m3.3.3信号灯 选择江阴长江电器公司的AD11-22/21(AC/DC24V)信号灯,该信号灯适用于电讯、电器等设备的线路中作指示信号、预告信号、事故信号及其它指示用信号,它采用LED作光源,具有寿命长、可靠性高、耐振动等优点,是原钨丝和氖泡信号灯的最佳更新换代产品。其性能指标为:连续工作寿命30000h光亮度:4060cd/m2允许瞬间电压波动20%(110V以上);相比漏电起痕指数CTI100,阻燃交流频率50Hz工频耐压:2.5kV发光颜色:红、绿、黄、白、蓝绝缘电阻:Ui60V为5M60VUi660V为50M第四章 系统PLC选择用PLC进行控制,外围设备少,占地空间小,是实现集控的良好设备。4.1PLC简介 4.1.1PLC的起源与发展在可编程控制器诞生之前,继电器控制系统已广泛的用于工业生产的各个领域,继电器控制系统通常可以看承由输入电路,控制电路,输出电路和生产现场这4个部分组成的。其中输入电路也是由按钮,行程开关,限位开关,传感器等构成。用已向系统送入控制信号。输出电路部分是由接触器,电磁阀等执行元件构成,用以控制各种被控制对象,如电动机,电炉,阀门等。继电器控制电路部分是控制系统的核心部分。它通过导线将各个分立的继电器,电子元器件连接起来对工业现场实施控制;生产现场是指被控制的对象(如电动机等)或生产过程。美国通用汽车公司(GM)于1968年提出了公开招标研制新型的工业控制器的设想,第二年,即1969年美国数字设备公司(DEC)就研制出了世界上第一台可编程序控制器。在这一时期,可编程序控制器虽然采用了计算机的设计思想,但实际上只能完成顺序控制,仅有逻辑运算,定时,计数等顺序控制功能。所以人们将可编程序控制器称之为PLC(Programmable Logical Controller),即可编程序逻辑控制器:20世纪70年代末80年代初,微处理器技术日趋成熟,使可编程序控制器的处理速度大大提高,增加了许多特殊,如浮点运算,函数运算,查表等。这样可编程序控制器不仅可以进行逻辑控制,还可以对模拟量进行控制。以16位和32位微处理器构成的微机化可编程序控制器得到了惊人的发展,使之在概念上,设计上,性能价格比等方面有了重大突破。可编程序具有了高速计数,中断技术,PID控制等功能,同时联网通信功能也得到了加强,这些都使得可编程序控制器的应用范围和领域不断扩大。为了使这一新型的工业控制装置的生产和发展规范化,国际电工委员会(IEC)制定了PLC的标准,并给出了它的定义。“可编程序控制器是一种数字运算操作的电子系统,专为工业环境下应用而设计,它采用可编程序的存储器,用来在其内部储存执行逻辑运算,顺序控制,定时,计数和算术运算等才操作,并通过数字式,模拟式的输入与输出,控制各类的机械或生产过程。可编程序控制器及其有关设备,都应按易于与工业控制系统联成一个整体,易于扩充功能的原则设计。”综上所述,PLC是以微处理器为基础,综合了计算机技术,自动控制技术和通信技术发展起来的一种通用工业自动控制装置。这种装置具有体积小,功能强,程序设计简单,灵活通用,维护方便等优点,特别是它的高可靠性和较强的适应恶劣工业环境的能力,得到了用户的公认和好评。他经过短短的几十年发展后,现在已成为现代工业控制的三大支柱(PLC,机器人和CAD/CAM)之一,被广泛地应用于机械,冶金,化工交通,电力等领域中。4.1.2 PLC控制系统与其他工业控制系统的比较1 PLC与继电器控制系统的比较 plc与继电器控制系统比较表比较项目继电器控制系统PLC控制系统控制功能的实现由许多继电器,采用接线的方式来完成控制功能各种控制功能是通过编制的程序来实现的对生产工艺过程变更的适应性适应性差。需要重新设计,改变继电器和接线适应性强,只需对程序进行修改控制速度低。靠机械动作实现极快。靠微处理器进行处理计数及其他特殊功能一般没有有安装,施工连线多,施工繁安装容易,施工方便可靠性差,触点多,故障多高,因元器件采用了筛选和老化等可靠性措施寿命短长可扩展性困难容易维护工作量大,故障不易查找有自诊能力,维护工作量小结论:由于PLC控制系统与继电器控制系统相比具有无法比拟的优点,因此,在今后的控制系统中,传统的继电器控制系统被PLC控制系统所代替是大势所趋。2 PLC控制系统与计算机系统的比较20世纪60年代,由于小型计算机的出现,有人曾试图用小型计算机来取代当时占统治地位的继电器控制系统,结果未获成功,代只的却是PLC的出现。通过计算机与PLC本身的工作目的,原理和方式上都存在着较大的差异,其结果比较见下表。 PLC与计算机系统比较表比较项目通用计算机系统PLC控制系统工作目的科学计算,数据管理等工业自动控制工作环境对工作环境要求比较高对环境要求低,可在恶劣的工业现场工作工作方式中断处理方式循环扫描方式系统软件需配备功能较强的系统的软件一般只需要简单的监控程序采用的特殊措施掉电保护等一般性措施采用多种抗干扰措施,自诊断,断电保护,可在线维修编程语言汇编语言,高级语言梯形图,助记符语言,SFC标准化语言对操纵人员的要求需专门培训,并具有一定的计算机基础一般技术人员,稍加培训即可操作使用对内存的要求容量大容量小价格价格高价格较低其他若用于控制,一般需自行设计机种多,模块种类多,易于集成系统结论:一般情况下,在工业自动化工程中采用PLC可靠,方便,易于维护。进入20世纪70年代,采用微处理器的工业控制计算机出现了。它与PLC共同推动着传统工业的技术改造。经过较长时间是实践,人们又发现,PLC与一般的工业控制计算机相比,PLC还是有着较强的优势,其原因是PLC专为在工业环境下的应用而设计,在PLC中采用了如下的硬件和软件措施:l 错误!未找到引用源。 光电耦合隔离和R-C滤波器,有效地防止了干扰信号的进入。l 内部采用电磁屏蔽,防止辐射干扰。l 采用优良的开关电源,防止电源线引入的干扰。l 具有良好的自诊断功能可对CPU等内部电路进行检测,一旦出错,立即报警。l 对程序及有关数据有电池供电进行后备,一旦断电或运行停止,有关状态及信息不会丢失。l 对采用的器件都进行了严格的筛选和简化,排除了因器件问题而造成的故障。l 采用了冗余技术进行一步增强了可靠性。对某些大型PLC还采用了双CPU构成冗余系统,或三CPU构成表决式系统。随着构成PLC的元器件性能的提高,PLC的可靠性也在相应的提高。一般PLC的平均无故障时间可达到几万小时以上。某些PLC的生产厂家甚至宣布,今后生产PLC不再标明可靠性这一指标,因为对PCL来讲这一指标已毫无意义了。经过大量时间人们发现PLC系统在使用中发生的故障大是是由于PLC的外部开关,传感器,执行机构引起的,而不是PLC本身发生的。另外,PLC程序设计简单,易学易懂易维护,更适合于工程技术人员。因此,PLC在工业控制方面获得了极大成功,成为工业控制中的主流。但是必须指出的是:计算机在信息处理方面还是优于PLC,所以在一些自动化控制系统中,常常将两者结合起来,PLC做下位机进行现在控制,计算机做上位机信息处理。计算机与PLC之间通过通信线路实现信息的转换和交换。这样相辅相成,构成一个功能较强的完整的控制系统。4.1.3PLC控制系统的硬件组成PLC控制系统的硬件是由PLC,输入/输出(I/O)电路及外围设备等组成的。系统规模可根据实际应用的需要而定,可大可小。下面对构成控制系统的主要部分简要介绍。PLC系统(1)主控模块 CPU:CPU是PLC的控制中枢,它由控制器和运算器组成。PLC在CPU的控制下使整个机器有条不紊的协调工作,以实现对现场各个设备的控制。 CPU的具体作用如下: 执行接受,存储用户程序的操作指令。 用以扫描方式来自输入单元的数据和状态信息,并存入相应的数据存储区。执行监控程序和用户程序。完成数据和信息的处理,产生相应的内部控制信号,完成用户指令规定的各种操作。响应外部设备(如编程器,打印机)的请求。存储器:PLC系统中的存储器主要用于存放系统程序,用户程序和工作状态数据。系统程序存储区:采用PROM或EPROM芯片存储器。它是由生产厂家直接存放的,永久存储的程序和指令,称为监控程序。监控程序和PLC的硬件组成与专用部件的特性有关,用户不能随意访问和修改这部分存储器的程序。存储器区:工作数据是PLC运行过程中经常变化的,需要随机存取的一些数据。这些数据一般不需要长久保存,因此采用随机存储器RAM。数据存储区包括输入,输出数据映象区,定时器/计数器预置和当前数值的数据。用户程序存储区:用于存放用户经编程器或计算机输入的应用程序。一般采用EPROM或EEPROM存储器,用户可檫写重新编程。用户程序存储器的容量一般就代表PLC的标称容量。通常,小型机小于8KB,中型机小于50KB,而大型机可以在50KB以上。 通信接口:主控模块通常有一个或一个以上的通信接口(简称通信口),用以与计算机,编程器相连,实现编程,调试,运行,监视等功能。(2)输入/输出模块 PLC的控制对象是工业生产过程,它与工业生产过程的联系是通过I/O模块实现的。生产过程有许多控制变量,如温度,压力,液位,速度,电压,开关量,继电器状态等,因此,需要有相应的I/O模块作为CPU与工业生产现场的桥梁。且这些模块应具有较好的抗干扰能力。目前,生产厂家已开发出各种型号的模块供用户选择。对于输入/输出模块有:数字量输入/输出模块,开关量输入/输出模块,模拟量输入/输出模块,交流新号输入/输出模块,220V交流输入/输出模块。还有智能模块,它本身带CPU,存储器和监控系统,可独立完成各种运算。智能模块的种类很多,如高速计数模块,PID调节的模拟量控制模块,阀门控制模块,智能存储模块和智能I/O模块。(3)电源模块该模块将交流电源转换成供CPU存储器所需的直流电源,是整个PLC系统的能源供给中心。它的好坏直接影响到PLC的功能和可靠性。目前,大多数PLC采用高质量的开关式稳压电源,与普通电源相比,PLC的电源工作稳定性好,抗干扰能力也强。有些机器的电源除了供内部电路使用外,还向外提供24VDC的稳压电源,用于外部传感器的需要,这样就避免了因外部电源不合格而引起的外部故障。I/O电路PLC的基本功能就是控制,它采集被控对象的各种信号。经过PLC处理后,通过执行装置实现控制。输入电路就是被控对象(需要进行控制的机器,设备和生产过程)进行检测,采集,转换和输入。另外,安装在控制台上的按钮,开关等也可以向PLC送控制指令。输出电路的功能就是接受PLC输出的控制信号,对被孔对象执行控制任务。4.1.4 PLC控制系统的软件组成PLC控制系统的软件主要是系统软件,应用软件,编程语言及编程支持工具软件几个部分组成。PLC系统软件与工作过程PLC系统软件是PLC工作所必须的软件。在系统软件的支持下,PLC对用户程序进行逐条的解释,并加以执行,直到用户程序结束,然后返回到程序的起始又开始新的一轮扫描。PLC的这种工作方式就称之为循环扫描。现以OMRONP型机为例来说明PLC扫描的工作过程:如下图在没有扫描之前,PLC首先应保证自身的完好性。接通电源之后,为消除各元件状态的随机性,进行清零或复位处理,检查I/O单元连接是否正确,再执行一段程序。它涉及到各种指令和内存单元,如果执行的时间不超过规定的时间范围,则证明自身完好,否则系统关闭。上述操作完成后,将时间监视定时复位,才允许扫描用户程序。公共操作是在每次扫描程序前又一次自检,若发现故障,除了报警显示灯亮之外,还判断故障性质。一般性故障,只报警不停机,等待处理;对于严重故障,则停止运行用户程序,此时PLC切断一切输出。上述操作完成后,将时间监视定时复位,才允许扫描用户程序。数据输入/输出操作有的称为I/O状态刷新。它包括两种操作:一是采样输入信号(即刷新输入状态的内容);二是送出处理结果(即按输出状态表的内容刷新输出电路)。PLC数据I/O示意图如下:v 输入映象存储器及刷新。由上图所示可知送入PLC端子上的输入信号,经过电隔离,电平转换,滤波处理后,进入缓冲器内CPU的采样。在PLC的存储器有一个专门存放I/O数据区,其中对应输入端子的数据区,称之为输入映象存储器。当CPU采样时,输入信号由缓冲区进入映象区。接着就是数据输入或输出状态刷新。只有在采样刷新的时刻,输入映象存储器中的内容才与输入信号(不考虑电路固有的惯性和滤波滞后影响)一致,其他时间范围输入信号变化是不会影响映象存储器的内容的。由于PLC扫描周期一般只有几十毫秒,所以两次采样时间很短,对一般开关量来说,可以认为没有因间断采样引起的误差。即认为输入信号一旦变化,就能立即进入输入映象的存储器内。v 输出映象存储器及输出状态刷新。同样道理,CPU不能直接驱动负载。按用户程序要求及当前输入状态,要保持到下次刷新为止。同样,对于变化较慢的控制过程来说,因为两次刷新的时间间隔和输出电路的惯性时间常数一般才几十毫秒,可以认为输出信号是及时的。应用软件PLC控制系统的应用软件是指为完成PLC实际控制任务而编制的各种软件。随着PLC应用领域范围的不断扩大,应用水平的提高,PLC应用软件也大大丰富起来了。PLC应用软件与一般计算机信息处理软件相比,有很大不同,PLC应用软件有以下几个特点:l 应用软件设计必须与生产工艺紧密结合。l 应用软件与硬件紧密相关。软件设计人员不能抛开硬件配置和系统孤立地考虑软件设计。设计必须根据硬件系统,接口的实际情况进行相应的程序设计。l PLC应用软件的设计需要计算机,自动控制技术甚至网络通信技术等多种知识。特别是PLC网络的出现,PLC控制系统不再是一个单独的装置。编程语言及编程支持工具软件PLC有多种编程语言:梯形图语言,助记符语言,逻辑功能图语言,布尔代数语言和某些高级语言(Basic,C语言等)。但使用广泛的还是梯形图语言和助记符语言。现在世界上各个PLC生产厂家都研制了自己的PLC编程支持工具软件和监控组态软件。用户可以根据自己的需要利用这些软件来改善软件的开发环境,提高编程效率。4.2 PLC选择 根据分拣机功能要求,并考虑到成本等,整体集中式小型的PLC就可以满足系统使用要求。因此选用西门子S7-200型号的PLC,CPU224. 该PLC适用于各行各业,各种场合中的检测、监测及控制的自动化。S7-200系列的强大功能使其无论在独立运行中,或相连成网络皆能实现复杂控制功能。因此S7-200系列具有极高的性能/价格比。 S7-200系列出色表现在以下几个方面: * 极高的可靠性 * 极丰富的指令集 * 易于掌握 * 便捷的操作 * 丰富的内置集成功能 * 实时特性 * 强劲的通讯能力 * 丰富的扩展模块 CPU224集成14输入/10输出共24个数字量I/O点。可连接7个扩展模块。6K字节程序和数据存储空间。4个独立的30kHz高速计数器,2路独立的20kHz高速脉冲输出。1个RS485通讯/编程口,具有PPI通讯协议、MPI通讯协议和自由方式通讯能力。非常适合于小点数控制的微型控制器。 以下为该PLC的性能参数: 存 储 器 用户存储器类型:EEPROM 程序:4096字 用户数据:2560字 本机I/O 14入10出,并有7个扩展模块。 通 讯 通讯口数量:1(RS-485) 支持协议: 0号口:PPI,DP/T,自由口总结 经过两个多月的学习、研究,以及在指导老师的悉心指导下,终于完成了本论文。在这里,首先要感谢刘老师,对于我的设计,刘老师不论是在总体方向还是具体的实施方面都给予了很大的帮助,并且在论文后期帮助我不断改善。正是在刘老师的耐心指导下,本论文才可以如此顺利的完成。 本自动分拣机实现了高可靠高效率的设计要求,并且具有一定的代表性,完全可以把本控制系统应用于其他的自动分拣系统中。 这次做论文的经历也会使我终身受益,我感受到做论文是要真真正正用心去做的一件事情,是真正的自己学习的过程和研究的过程,没有学习就不可能有研究的能力,没有自己的研究,就不会有所突破,那也就不叫论文了。希望这次的经历能让我在以后学习中激励我继续进步。不积跬步何以至千里,本设计能够顺利的完成,也归功于各位任课老师的认真负责,使我能够很好的掌握和运用专业知识,并在设计中得以体现。正是有了他们的悉心帮助和支持,才使我的毕业论文工作顺利完成,在此向江西农业大学工学院的全体老师表示由衷的谢意。感谢你们四年来的辛勤栽培。6、参考文献1 陈立定,吴玉香,苏开才编电气控制与可编程控制器华南理工大学 出版社200l 2 西门子公司.SIMATICs7200可编程序控制器系统手册.20003 西门子自动化设备公司. STEP7-MiertWIN32V31sPl编程帮助手册.20004 周万珍、高鸿斌PLC分析与设计应用北京:电子工业出版社,2004年5 张建军等. 自动化立体仓库控制系统设计与实现. 工业自动化仪表与装置,2001,第三期:P6-96 D.R.伍德利. 物料搬运,北京,机械工业出版社,1975,P21-29 7 黄亦公. 机械工业杂志,1993,12期:P206-216 8 赵利民. 微型计算机控制系统,北京,机械工业出版社,1994,P29-349 徐履冰. 非标准机械设计,北京,机械工业出版社,1995,P172-17610 秦曾煌主编.电工学(电子技术)(上)第六版。高等教育出版社。2004.111 施平主编。机械工程专业英语第八版。哈尔滨工业大学出版社。2007.812 邓星钟主编,朱承高主审。机电传动控制第三版。华中科技大学出版社。2001.313 张中夫主编。机电传动与控制。机械工业出版社。2004.114 周祖德 陈幼平主编机电一体化控制技术与系统。华中科技大学出版社15 杨叔子 杨克冲 等编著机械工程控制基础(第五版)。华中科技大学出版社附录一:外文文献原文Visualization of PLC Programs using XMLM. Bani Younis and G. FreyJuniorprofessorship Agentenbased AutomationUniversity of Kaiserslautem Abstract - Due to the growing complexity of PLC programs there is an increasing interest in the application of formal methods in this area. Formal methods allow rigid proving of system properties in verification and validation. One way to apply formal methods is to utilize a formal design approach in PLC programming. However, for existing software that has to be optimized, changed, or ported to new systems .There is the need for an approach that can start from a given PLC program. Therefore, formalization of PLC programs is a topic of current research. The paper outlines a re-engineering approach based on the formalization of PLC programs. The transformation into a vendor independent format and the visualization of the structure of PLC programs is identified as an important intermediate step in this process. It is shown how XML and corresponding technologies can be used for the formalization and visualization of an existing PLC program.I. INTRODUCTIONProgrammable Logic Controllers (PLCs) are a special type of computers that are used in industrial and safety critical applications. The purpose of a PLC is to control a particular process, or a collection of processes, by producing electrical control signals in response to electrical process- related inputs signals. The systems controlled by PLCs vary tremendously, with applications in manufacturing, chemical process control, machining, transportation, power distribution, and many other fields. Automation applications can range in complexity from a simple panel to operate the lights and motorized window shades in a conference room to completely automated manufacturing lines.With the widening of their application horizon, PLC programs are being subject to increased complexity and high quality demands especially for safety-critical applications. The growing complexity of the applications within the compliance of limited development time as well as the reusability of existing software or PLC modules requires a formal approach to be developed I. Ensuring the high quality demands requires verification and validation procedures as well as analysis and simulation of existing systems to be carried out 2. One of the important fields for the formalization of PLC programs that have been growing up in recent time is Reverse-engineering 3. Reverse Engineering is a process of evaluating something to understand how it works in order to duplicate or enhance it. While the reuse of PLC codes is being established as a tool for combating the complexity of PLC programs, Reverse Engineering is supposed to receive increased importance in the coming years especially if exiting hardware has to be replaced by new hardware with different programming environmentsVisualization of existing PLC programs is an important intermediate step of Reverse Engineering. The paper provides an approach towards the visualization of PLC programs using XML which is an important approach for the orientation and better understanding for engineers working with PLC programs. The paper is structured as follows. First, a short introduction to PLCs and the corresponding programming techniques according to the IEC 61131-3 standard is given. In Section an approach for Re-engineering based on formalization of PLC programs is introduced. The transformation of the PLC code into a vendor independent format is identified as an important first step in this process. XML and corresponding technologies such as XSL and XSLT that can be used in this transformation are presented in Section IV. Section V presents the application of XML for the visualization of PLC programs and illustrates the approach with an example. The final Section summarizes the results and gives an outlook on future work in this ongoing project. PLC AND IEC 61131Since its inception in the early 70s the PLC received increasing attention due to its success in fulfilling the objective of replacing hard-wired control equipments at machines. Eventually it grew up as a distinct field of application, research and development, mainly for Control Engineering. IEC 61 131 is the first real endeavour to standardize PLC programming languages for industrial automation. In I993 the International Electrotechnical Commission 4 published the IEC 61131 Intemational Standard for Programmable Controllers. Before the standardization PLC programming languages were being developed as proprietary programming languages usable to PLCs of a special vendor. But in order to enhance compatibility, openness and interoperability among different products as well as to promote the development of tools and methodologies with respect to a fixed set of notations the IEC 61131 standard evolved. The third part of this standard defines a suit of five programming languages:Instruction List (IL) is a low-level textual language with a structure similar to assembler. Originated in Europe IL is considered to be the PLC language in which all other IEC61 131-3 languages can be translated.Ladder Diagram (LO) is a graphical language that has its roots in the USA. LDs conform to a programming style borrowed from electronic and electrical circuits for implementing control logics.Structured Text (STJ is a very powerful high-level language. ST borrows its syntax from Pascal, augmenting it with some features from Ada. ST contains all the essential elements of a modem programming language.Function Block Diagram (FBD) is a graphical language and it is very common to the process industry. In this language controllers are modelled as signal and data flows through function blocks. FBD transforms textual programming into connecting function blocks and thus improves modularity and software reuse.Sequential Function Chart (SFC) is a graphical language. SFC elements are defined for structuring the organization of programmable controller programs.One problem with IEC 61 131-3 is that there is no standardized format for the project information in a PLC programming tool. At the moment there are only vendor specific formats. This is also one reason for the restriction of formalization approaches to single programs or algorithms. However, recently the PLC users organization PLCopen (see ) started a Technical Committee to define an XML based format for projects according to IEC 61131-3. This new format will ease the access of formalization tools to all relevant information of a PLC project. RE-ENGINEERING APPROACHThe presented approach towards re-engineering (cf. Fig.1) is based upon the conception that XML can be used as a medium in which PLC codes will be transformed.This transformation offers the advantage of obtaining avendor independent specification code. (Even if the PLCopen succeeds in defining a standardized format for PLC applications, there will remain a lot of existing programs that do not conform to this standard.) Based on this code a step-wise transformation to a formal model (automata) is planned. This model can then be used for analysis, simulation, formal verification and validation, and finally for the re-implementation of the optimized algorithm on the same or another PLC.Since re-engineering of complete programs will, in most cases, be only a semi-automatic process, intermediate visualization of the code is an important point. At different stages of the process different aspects of the code and/or formal model have to be visualized in a way that a designer can guide the further work. XML with its powerful visualization and transformation tools is an ideal tool for solving this task.IV. XML AS A TOOL FOR VISUALIZATIONXML (extensible Markup Language) is a simple and flexible meta-language, i.e, a language for describing other languages. Tailored by the World Wide Web Consortium (W3C) as a dialect of SGML S, XML removes two constraints which were holding back Web developments 6. The dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for on one side; and the complexity of full SGML, whose syntax allows many powerful but hard-to-program options on the other side.While HTML describes how data should be presented, XML describes the data itself. A number of industries and scientific disciplines-medical records and newspaper publishing among them-are already using XML to exchange information across platforms and applications. XML can be tailored to describe virtually any kind of information in a form that the recipient of the information can use in a variety of ways. It is specifically designed to support information exchange between systems that use fundamentally different forms of data representation, as for example between CAD and scheduling applications.Using XML with its powerful parsers and inherent robustness in terms of syntactic and semantic grammar is more advantageous than the conventional method of using a lexical analyzer and a validating parser (cf. Fig. 2, 7).The conventional method of analysis of program code requires a scanner (lexical analyser) which generates a set of terminal symbols (tokens) followed by a parser thatchecks the grammatical structure of the code and generates an object net. In the object net the internal structure of the program is represented by identified objects and the relations between them. Both the scanner and the parser to be used in this method are document oriented which implies that analysis of different types of documents requires rewriting the generated code for the scanner and the parser. An example of an application of this method can be found in 8.The most promising aspect of using XML instead is that XML and its complementary applications for transformations are standardized so as to provide maximum flexibility to its user.The XML based method is advantageous, since the lexical specification is an invariant component of XML; therefore the well-formedness is independent from the respective individual application.Hence, an XML-Parser also can transfer well-shaped XML documents in an abstract representation called Document Object Model (DOM) without using a grammar. DOM is an application programming interface (APII) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term document is used in a broad sense increasingly. XML is used as a way of representing many different kind of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM can be used to manage this data5.XSLT, the transformation language for XML is capable of transforming XML not only to another XML or HTML but to many other user-friendly formats. Before the advent of XSLT, the transformation of XML to any other format was only possible through custom applications developed in a procedural language such as C+, Visual Basic or, Java. This procedure lacked the generality with respect to the structural variation of XML documents. Capitalizing on the concept that the custom applications for the transformations are all very similar, XSLT evolved as a high-level declarative language 9. XSLT functions in two steps. In the first step, it performs a structural transformation so as to convert the XML into a structure that reflects the desired output. The second stage is formatting the new structure into the required format, such as HTML or PDF (cf. Fig. 3 ). The most important advantage of this transformation is that it allows a simple and easily-conceivable representation of the document or data structure embedded inside the well-structured but hard-to-understand XML to be produced. When HTML is chosen as the format of the transformed produce it is possible to use the extensive ability of HTML to produce an easily-conceivable and attractive visualization of a program.Every XML document has its own syntax and vocabulary. Therefore, in addition to being well-formed, the XML document needs to conform to a set of rules. According to W3C recommendations this set of rules has to be defined either through a Document Type Definition (DTD) or an XML Schema. The rules defined in a DTD or an XML Schema state the hierarchical and structural constraints of the XML document. The DTD is for defining the document grammars; more recently a number of alternative languages have been proposed. The W3C XML Schema language replicates the essential functionality of DTDs, and adds a number of features: the use of XML instance syntax rather than an ad hoc notation, clear relationships between schemas and namespaces, a systematic distinction between element types and data types, and a single-inheritance form of type derivation. In other words schemas offer a richer and more powerful way of describing information than what is possible with DTDs. Fig. 4 shows the XML technologies discussed above and the connection between them.V. AN APPROACH FOR THE VISUALIZATION OFPLC PROGRAMSA. Overview Since Instruction List (IL) is the most commonly used PLC language in Europe, the presented approach is based on this language. The proprietary IL dialect Siemens STEP 5 and the standardized version according to IEC 61131-3 are considered. The generation of XML documents showing different aspects of a PLC program is realized in the following three steps (cf. Fig. 5): 1.Transformation of the PLC program to an XML document 2.Validation of the XML against the XML Schema which sets the syntax of the XML 3.Identification of the Instruction elements of the transformed XML according to the instruction set of the source PLC These three steps are discussed in sub-sections B to D respectively. Sub-section E explains the visualization of the different XMLs obtained during the preceding steps.Throughout this Section an example is used to illustrate the presented concepts. Fig. 6 shows a PLC code written in Instruction List Siemens S5. The PLC code is written in atabular form where each row element is either a delimited list consisting of address, label, instruction, operand and description or a comment.Kommentar :AutorErstellt :15.07.2003 Geaendert am: B1B:ONETZWERK 1 EMPFANGEN SLAVE 3 VON MASTERNAME :EMPEMAST0005 :U M98.7 ABFRAGE OB EMPFANG MOEGLICH00060007 :SPB= MOOl00080009 :A DB140 EMPFANGSFACH IST DB 140OOOA :L KF+20 LAENGE DES DATENPAKETSoooc :T DLOOOOD :L KF+O ZIELNUMMER O=MASTEROOOF :T DRO00100011 :UNM98.7 FANGEN WIEDER ERLAUBEN0012 :S M98.70013 MOOl :NOP 000140015 :BE BAUSTEIN ENDEFig. 6 A PLC program written in Siemens S5 Instruction ListB. Conversion of a PLC Program inio a well-formed XML Given a PLC program in ASCII format and in a tabular structure with separate columns for addresses, labels, instructions, operands and descriptions delimited by whitespaces, XSLT can convert it into a well-formed XML document. The XML document obtained through this transformation is a hierarchically structured document. Fig. 7 shows the XML document obtained through the transformation of the PLC code of Fig. 6. The XML document is structured in a hierarchy in which the root element is the IL Code Block representing the whole PLC code. Each of the rows of the PLC code is contained within a corresponding ILRow element which is M e r smtctured into child elements. Note: The structure chosen for the XML representation of IL-Code is oriented at the working proposal of the PLCopen.C. XML Validation against the XML Schema The XML obtained as a result of the previous processing can be validated using a validating parser that confirms that the XML document in addition to being well-formed conforms to the set of syntactic rules defined in context of the PLC programming language.D. rdenhpcation of instructions This step in the process of visualization of PLC programs using XML ensures that the XML document to be used for visualization contains only valid instructions.XSLT can be used to transform the well-formed and valid Xh4L to another XML which as a result of identification on instructions has an additional attribute appended to the instruction tags. This attribute notifies whether the instruction is a valid instruction of the concerned instruction set. This transformation procedure is also capable of attaching attributes to the instruction tags that declares a classification of the instructions into predefined classes. The instruction identification of the transformed XML proofs the semantic of the XML in accordance with the operation types of the PLC programming language. In the example of this section, (cf. Fig. 8), the new XML contains additional attributes which classify the instructions according to the type of operation it represents. The STEPS instructions are categorized into eleven different types of operations e.g. logical, jump, load or transfer operation assignment, etc. (Instruction instructionId=Logical Operation)U-.SPB- BEFig. 8 A new transformed XML showing only the inslructions and thecorresponding instruction IDE. Visualization of XMLBoth of the XML documents generated above can be transformed into HTML or other readable documents with the help of XSL. An ingenious XSL can be designed so as to produce an HTML which can convey the logical and other features of the PLC program in an easily conceivable form. Moreover, the DOM structure embedded in the XML (cf. Fig. 9), also enables the user to navigate through the PLC programs in an easy way.For the example the visualization is done in HTML. This visualization is done for the transformed XML after the validation of its syntax as a table where the child elements of the ILRow are the columns of this table. The XML after the instruction identification is transformed using the XSL, where the instruction and the instruction Id, obtained after extracting the XML according to the type of operations are visualized in a table containing two columns (Instruction, Instruction Id) in HTML. The HTML structures suggested here are not the only possibilities, with which the XML can be visualized, but they give a very easy practical option for the users grasp of the PLC code. Fig. IO shows the same PLC code as shown in Fig. 4 as a HTML document converted &om the XML document shown in Fig. 7 using XSL. This visualization enables a better understanding of the PLC program. Fig. 11 shows the special visualization of instruction ids given in the XML of Fig. 6. VI. CONCLUSIONS AND OUTLOOK Re-engineering of PLC programs needs a formal approach to be developed. In this paper one way to solve this task is introduced. Based on a given PLC program written in Instruction List a step-wise transformation to a formal representation is proposed. Since this process will not be fully automatic, the need for flexible visualization of intermediate steps is derived. XML is presented as a flexible, standardized means to serve as data format for the description of the PLC code. The corresponding technology of XSL transformations and the Document Object Model are presented as tools for the variety of customized visualization tasks during the re-engineering process. Based on the XML description of PLC programs further transformations will be applied to finally derive a completely formalized description of the original PLC code. This will be in the form of a finite automaton. During this process it is planned to identify common IL structures and formalize them via a library. Gaining the Benefit of the XML Metadata Interchange (XMI) as an open industry standard that applies XML to abstract systems such as UML and referring to the classification of the instructions of IL into the eleven categories mentioned above. We can extract UML classes from this classification, as it resembles the action semantics of UML. VII. AKNOWLDGMENTWe would like to express gratitude to the “StiAung Rheinland-Pfalz fir Innovation” for sponsoring our work under project number 616.VIII. REFERENCES1. L. Baresi, M. Mauri, A. Monti, and M. Pezze, “PLCTools: Design, Formal Validation, and Code Generation for Programmable Controllers”, in. IEEEConference on Systems, Man, and Cybernefics (SMCZOOO), Nashville, USA, Oct. 2000, pp. 2437- 2442.2. G. Frey and L. Litz, “Formal methods in PLC programming”, in IEEE Con on Systems, Man and Cybernetics (SMCZOOO), Nashville, USA, Oct. 2000, pp.2431-2436.3. M. Bani Younis and G. Frey, “Formalization of Existing PLC Programs: A Survey.“, in CESA 2003, Lille (France), Paper No. S2-R-00-0239, July 2003.4. International Electrotechnical Commission, IEC International Standard 1131-3, Programmable Controllers, Part 3, Programming Languages, 1993.5. World Wide Web Consortium: htfp;/6. XML Home Page: h/7. R. Kliewer, Reverse Engineering von Steuerungssojiware.Ph.D. thesis, University of Kaiserslautern, Germany,Institute for Production-Automation, 1999.8. M. Kay, XSLT - Programmers Reference. ISBN1861005067, Wrox Press Ltd2001附录二: 翻译可视化的PLC程序使用XMLM. Bani Younis and G. Frey摘要:由于P LC程序日益复杂,在PLC应用方面有越来越多的兴趣爱好者。形式化方法,让僵化的证明系统属性被核查和验证。一个传统思路的方法就是在PLC编程中设立一个正式的设计方法。不过,现有的软件已被优化,改变,或移植到新系统.有需要找到从某一PLC程序开始的方法。因此,规范PLC程序是一个现在研究的热点。该文章概述了基于形式化的PLC程序基础上从新启动的方法。转型成为一个独立的格式和可视化的结构,在这个过程中,PLC程序的确定是作为这项措施的重要中间步骤。这表明如何XML和相应的技术可用于形式化和可视化现有的PLC程序。1、导言 可编程逻辑控制器(PLC )是一种特殊类型的计算机,它应用于工业和安全的关键地方。应用PLC的目的是控制某一特定的或可选择的过程,它是通过产生的电控制信号回应电器中相关的输出信号来实现的。应用在制造业和化工过程控制,机械加工,交通,电力分配,以及其他许多领域。PLC控制有着极大的不同,自动化应用范围的复杂性从一个简单的小组运作到控制一个会议室的的灯光和自动窗成为一个全自动化的生产线。 随着他们应用PLC知识的增加,他们把PLC应用到复杂性和品质要求高的地方,特别是对安全性要求特别严格的地方。由于在有限的时间里PLCD的发展应用日益复杂,现有的软件或PLC的模块也在迅速发展,以此,需要一个正式的办法加以规范 。为了确保高品质的要求,我们需要检查和验证程序,以及分析和模拟现有系统 2 。其中一个重要的领域就是已经在最近的时间成长在规范化的PLC程序是逆向工程 3 。逆向工程是通过评估达到了解它的运转过程,以达到重复或加强的目的。而重用的PLC守则正在建立,作为一种打击复杂PLC程序的工具,逆向工程在今后几年将得到越来越多关注,特别是如果现有的硬件被适用于各种不同程序环境的新硬件所取代的情况下。 现有的PLC程序的可视化是逆向工程一个重要的中间步骤。本文章提供了一个方法,使用XML使PLC程序可视化,让PLC程序工程师更容易把握方向和更好地了解。该文件的结构如下。首先,简单的介绍了PLC(根据国际电工委员会61131-3的标准是给予)和相应的编程技巧,。在第三部分,在现有基础上用形式化PLC程序重新设计方法的介绍。PLC代码转型成为一个独立的格式被确定为在这个过程中重要的第一步。XML和相应的技术,例如XSL和XSLT(第四节可以使用的这种转变)。第五部分提出了应用XML的使PLC程序可视化的方法并用一个例子做出说明。最后一节总结了结果,并就今后的工作在这方面正在进行的项目做了一个前景的展望。2、 PLC和IEC 61131 自从七十年代初期公布于世,由于它的成功的完成目的,取代了机器上的硬连线控制设备,PLC日益受到重视,。最终它作为一个独特的应用领域成长起来,它的研究和开发,主要是为控制工程。 IEC61131是为工业自动化第一次真正的努力来规范PLC的编程语言。在1993国际电工委员会4上公布了IEC 61131作为可编程控制器标准。在标准化PLC的编程语言之前,正在制定为了个别PLC实用的专有编程语言。为了提高不同产品的兼容性,开放性和互操作性以及为了促进工具和方法的发展,国际电工委员会61131标准设立固定的一套符号。第三部分,定义了一个适合5种编程语言标准: Originated (IL)语言是一种低层次的文本语言,其结构类似于汇编语言。Originated语言L被视为PLC的在所有其他IEC61 131-3语言都可以翻译语言。 梯形图(L0)是一种被认为起源于于美国的图形语言。LDS符合从电子及电器电路实施控制逻辑的编程风格。 结构化文本(ST)是一个非常强大的高层次的语言。圣借从帕斯卡尔那里借用了它的语法,充实它的一些特点。圣包含一个现在编程语言多要求的所有要素。 功能块图(FBD)是一种图形语言,在工业流程里是非常常见的。在这种语言中,控制器被认为是可在功能块之间流动的信号和数据。FBD把换文本编程转变为功能块编程,因而提高了模块化和软件重用性。 顺序功能图(SFC)是一个图形化的语言。SFC要素的定义是为了构建可编程序控制器程序的组织。其中在IEC 61 131-3中出现的一个问题就是在PLC的编程工具的工程信息中没有一个标准化的格式。目前,每个厂商都在运用他们各自的具体的不同格式。这亦是其中一个原因就是被限制了的形式化的做法,以单一的程序或算法。不过,最近的PLC用户组织PLCopen阻止了一个技术委员会,以确定一个基于格式accordingto的IEC 61131-3的XML项目 。这种新格式将缓解形式化的工具,使之成为 PLC项目的所有相关的信息。3、重新设计的方法 对于重新设计所提出的态度,(参见图1 )是基于认为XML可作为一种中间媒体语言用来改造PLC的代码。 这种转变提供了取得avendor独立规格代码优势,。 (即使PLCopen成功地确定了一种标准化的格式为PLC所应用,仍将有很多现有的程序不符合这个标准) 。 在此代码基础上的一个明智步骤转型到一个正式的模型(自动机)正在计划之中。这个模型可以用来进行分析,模拟仿真,正式的检查和验证,最终对同一PLC或其他产品重新执行该优化算法。一个很大的可能就是这个完成编程的逆向启动只能是一个半自动的过程,中间可视化的代码是最重要的一点。在过程中的不同阶段,代码或形式化模型不同方面的都必须是可视化的
- 温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。