已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1,The Programmable Logic Controller,John R. Hackworth, Frederick D. Hackworth, Jr.,Programmable Logic Controllers:Programming Methods and,Applications. 2.52.8,The Programmable Logic Controller,John R. Hackworth, Frederick D. Hackworth, Jr.,First Edition.London: Prentice Hall,2003.3550,2.5 System Block DiagramA Programmable Controller is a specialized computer.Since it is a computer, it has all thebasic component parts that any other computer has; a Central Processing Unit,Memory, InputInterfacing and Output Interfacing.A typical programmable controller block diagram is shown inFigure 2.5.,Figure 2.5,Programmable Controller Block Diagram,The Central Processing Unit (CPU) is the control portion of the PLC. It interprets theprogram commands retrieved from memory and acts on those commands.In present day PLCsthis unit is a microprocessor based system.The CPU is housed in the processor module ofmodularized systems.Memory in the system is generally of two types; ROM and RAM.The ROM memory containsthe program information that allows the CPU to interpret and act on the Ladder Logic programstored in the RAM memory.RAM memory is generally kept alive with an on-board battery so,that ladder programming is not lost when the system power is removed.,This battery can be a,standard dry cell or rechargeable nickel-cadmium type. Newer PLC units are now available withElectrically Erasable Programmable Read Only Memory (EEPROM) which does not require abattery.Memory is also housed in the processor module in modular systems.Input units can be any of several different types depending on input signals expected asdescribed above.The input section can accept discrete or analog signals of various voltage andcurrent levels.Present day controllers offer discrete signal inputs of both AC and DC voltagesfrom TTL to 250 VDC and from 5 to 250 VAC.Analog input units can accept input levels suchas 10 VDC, 5 VDC and 4-20 ma. current loop values.Discrete input units present each input tothe CPU as a single 1 or 0 while analog input units contain analog to digital conversion circuitryand present the input voltage to the CPU as binary number normalized to the maximum countavailable from the unit.The number of bits representing the input voltage or current depends2,3,upon the resolution of the unit.This number generally contains a defined number of magnitudebits and a sign bit.Register input units present the word input to the CPU as it is received (Binaryor BCD).,Output units operate much the same as the input units with the exception that the unit iseither sinking (supplying a ground) or sourcing (providing a voltage) discrete voltages orsourcing analog voltage or current.These output signals are presented as directed by the CPU.The output circuit of discrete units can be transistors for TTL and higher DC voltage or Triacsfor AC voltage outputs. For higher current applications and situations where a physical contactclosure is required, mechanical relay contacts are available. These higher currents, however, aregenerally limited to about 2-3 amperes.The analog output units have internal circuitry whichperforms the digital to analog conversion and generates the variable voltage or current output.,2.6 Update - Solve the Ladder - Update,When power is applied to a programmable logic controller, the PLCs operation consists oftwo steps: (1) update inputs and outputs and (2) solve the ladder.This may seem like a verysimplistic approach to something that has to be more complicated but there truly are only thesetwo steps.If these two steps are thoroughly understood, writing and modifying programs andgetting the most from the device is much easier to accomplish.With this understanding, thethings that can be undertaken are then up to the imagination of the programmer.,You will notice that the “update - solve the ladder” sequence begins after startup.The actualstartup sequence includes some operations transparent to the user or programmer that occurbefore actual PLC operation on the user program begins.During this startup there may beextensive diagnostic checks performed by the processor on things like memory, I/O devices,communication with other devices (if present) and program integrity.In sophisticated modularsystems, the processor is able to identify the various module types, their location in the systemand address.This type of system analysis and testing generally occurs during startup beforeactual program execution.,2.7 Update,The first thing the PLC does when it begins to function is update I/O.This means that alldiscrete input states are recorded from the input unit and all discrete states to be output aretransferred to the output unit.Register data generally has specific addresses associated with it forboth input and output data referred to as input and output registers.These registers are availableto the input and output modules requiring them and are updated with the discrete data.Since this,is input/output updating, it is referred to as I/O Update.The updating of discrete input and outputinformation is accomplished with the use of input and output image registers set aside in the PLCmemory.Each discrete input point has associated with it one bit of an input imageregister.Likewise, each discrete output point has one bit of an output image register associatedwith it.When I/O updating occurs, each input point that is ON at that time will cause a 1 to be setat the bit address associated with that particular input.If the input is off, a 0 will be set into the bitaddress.Memory in todays PLCs is generally configured in 16 bit words.This means that one,word of memory can store the states of 16 discrete input points.,Therefore, there may be a,number of words of memory set aside as the input and output image registers.At I/O update, thestatus of the input image register is set according to the state of all discrete inputs and the status,of the output image register is transferred to the output unit.,This transfer of information,typically only occurs at I/O update.It may be forced to occur at other times in PLCs which havean Immediate I/O Update command.This command will force the PLC to update the I/O at othertimes although this would be a special case.,One major item of concern about the first output update is the initial state of outputs.,This,is a concern because their may be outputs that if initially turned on could create a safety hazard,particularly in a system which is controlling heavy mechanical devices capable of causing bodilyharm to operators.In some systems, all outputs may need to be initially set to their off state toinsure the safety of the system.However, there may be systems that require outputs to initially beset up in a specific way, some on and some off.This could take the form of a predetermined setupor could be a requirement that the outputs remain in the state immediately beforepower-down.More recent systems have provisions for both setup options and even a combinationof the two.This is a prime concern of the engineer and programmer and must be defined as thesystem is being developed to insure the safety of personnel that operate and maintain theequipment.Safety as related to system and program development will be discussed in a laterchapter.2.8 Solve the LadderAfter the I/O update has been accomplished, the PLC begins executing the commandsprogrammed into it.These commands are typically referred to as the ladder diagram.The ladderdiagram is basically a representation of the program steps using relay contacts and coils.The,ladder is drawn with contacts to the left side of the sheet and coils to the right.,This is a,holdover from the time when control systems were relay based.This type of diagram was usedfor the electrical schematic of those systems.A sample ladder diagram is shown in Figure 2-6.4,Figure 2.6,Sample Ladder Diagram,The symbols used in Figure 2.6 may be foreign at this point, so a short explanation will benecessary.The symbols at the right of the ladder diagram labeled CR1, CR2, CR3 and CR4 andare circular in shape are the software coils of the relays.The symbols at the left which look likecapacitors, some with diagonal lines through them, are the contacts associated with the coils.Thesymbols that look like capacitors without the diagonal lines through them are normally opencontacts.These are analogous to a switch that is normally off.When the switch is turned on, thecontact closes.The contact symbols at the left that look like capacitors with diagonal linesthrough them are normally closed contacts.A normally closed contact is equivalent to a switchthat is normally turned on.It will turn off when the switch is actuated.As can be seen in Figure 2.6, contact and coil position is as described above.Also, one cansee the reason for the term ladder diagram if the rungs of a stepladder are visualized.In fact, eachcomplete line of the diagram is referred to as one rung of logic.The actual interpretation of thediagram will also be discussed later although some explanation is required here.The contactconfiguration on the left side of each rung can be visualized as switches and the coils on the rightas lights.If the switches are turned on and off in the proper configuration, the light to the rightwill illuminate.The PLC executes this program from left to right and top to bottom, in thatorder.It first looks at the switch (contact) configuration to determine if current can be passed tothe light (coil).The data for this decision comes from the output and input image registers.Ifcurrent can be passed, the light (coil) will then be turned on.If not, the light (coil) will be turned,off.This is recorded in the output image register.,Once the PLC has looked at the left side of,therung it ignores the left side of the rung until the next time it solves that particular rung. Once5,the light (coil) has been either turned on or off it will remain in that state until the next time thePLC solves that particular rung.After solving a rung, the PLC moves on to solve the next rung inthe same manner and so forth until the entire ladder has been executed and solved.One rule thatis different from general electrical operation is the direction of current flow in the rung.In aladder logic, rung current can only flow from left to right and up and down; never from right toleft.As an example, in the ladder shown in Figure 2.7, coil CR1 will energize if any of thefollowing conditions exist:,Figure 2.7,Illustration of allowed current flow in ladder rung,1. CR7 is off, CR6 is on.2. CR7 is off, CR2 is on, CR5 is on.3. CR7 is off, CR2 is on, CR3 is on.4. CR1 is on, CR4 is on, CR3 is on.5. CR1 is on, CR4 is on, CR5 is on.You will notice that the current flow in the circuit in each of the cases listed above is fromleft to right and up and down. CR1 will not energize in the case listed below:CR1 is on, CR4 is on, CR2 is on, CR6 is on, CR5 is off, CR3 is off, CR7 is on.This is because current would have to flow from right to left through the CR2 contact.This is not allowed in ladder logic even though current could flow in this direction if we were tobuild it with real relays.Remember, we are working in the software world not the hardwareworld.To review, after the I/O update, the PLC moves to the first rung of ladder logic.It solves thecontact configuration to determine if the coil is to be energized or de-energized.It then energizesor de-energizes the coil.After this is accomplished, it moves to the left side of the next rung and,repeats the procedure.This continues until all rungs have been solved.,When this procedure is,complete with all rungs solved and all coils in the ladder set up according to the solution of eachrung, the PLC proceeds to the next step of its sequence, the I/O update.6,At I/O update, the states of all coils which are designated as outputs are transferred from theoutput image register to the output unit and the states of all inputs are transferred to the inputimage register.Note that any input changes that occur during the solution of the ladder areignored because they are only recorded at I/O update time.The state of each coil is recorded tothe output image register as each rung is solved. However, these states are not transferred to theoutput unit until I/O update time.Figure2.8 Scan CycleThis procedure of I/O update and solving the ladder diagram and I/O update is referred to asscanning and is represented in Figure 2.8. The period between one I/O update and the next isreferred to as one Scan.The amount of time it takes the PLC to get from one I/O update to thenext is referred to as Scan Time.Scan time is typically measured in milliseconds and is related to,the speed of the CPU and the length of the ladder diagram that has to be solved.,The slower the,processor or the longer the ladder diagram, the longer the scan time of the system.The speed atwhich a PLC scans memory is referred to as Scan Rate.Scan rate units are usually listed inmsec/K of memory being utilized for the program.As an example, if a particular PLC has a ratedscan rate of 8 msec/K and the program occupies 6K of memory, it will take the PLC 48 msec tocomplete one scan of the program.7,1.1 Motivation,Programmable Logic Controllers (PLC), a computing device invented by Richard E. Morley,in 1968, have been widely used in industry including manufacturing systems, transportation,systems, chemical process facilities, and many others. At that time, the PLC replaced the,hardwired logic with soft-wired logic or so-called relay ladder logic (RLL), a programming,language visually resembling the hardwired logic, and reduced thereby the configuration time,from 6 months down to 6 days Moody and Morley, 1999.,Although PC based control has started to come into place, PLC based control will remain,the technique to which the majority of industrial applications will adhere due to its higher,performance, lower price, and superior reliability in harsh environments. Moreover, according to,a study on the PLC market of Frost and Sullivan 1995, an increase of the annual sales volume,to 15 million PLCs per year with the hardware value of more than 8 billion US dollars has been,predicted, though the prices of computing hardware is steadily dropping. The inventor of the,PLC, Richard E Morley, fairly considers the PLC market as a 5-billion industry at the present,time.,Though PLCs are widely used in industrial practice, the programming of PLC based control,systems is still very much relying on trial-and-error. Alike software engineering, PLC software,design is facing the software dilemma or crisis in a similar way. Morley himself emphasized this,aspect most forcefully by indicating Moody and Morley, 1999, p. 110:,If houses were built like software projects, a single woodpecker could destroy civilization.”,Particularly, practical problems in PLC programming are to eliminate software bugs and to,reduce the maintenance costs of old ladder logic programs. Though the hardware costs of PLCs,are dropping continuously, reducing the scan time of the ladder logic is still an issue in industry,so that low-cost PLCs can be used.,In general, the productivity in generating PLC is far behind compared to other domains, for,instance, VLSI design, where efficient computer aided design tools are in practice. Existent,software engineering methodologies are not necessarily applicable to the PLC based software,design because PLC-programming requires a simultaneous consideration of hardware and,software. The software design becomes, thereby, more and more the major cost driver. In many,industrial design projects, more than SO0/a of the manpower allocated for the control system,design and installation is scheduled for testing and debugging PLC programs Rockwell, 1999.,In addition, current PLC based control systems are not properly designed to support the,growing demand for flexibility and reconfigurability of manufacturing systems. A further,problem, impelling the need for a systematic design methodology, is the increasing software,complexity in large-scale projects.,1.2 Objective and Significance of the Thesis,The objective of this thesis is to develop a systematic software design methodology for PLC,operated automation systems. The design methodology involves high-level description based on,state transition models that treat automation control systems as discrete event systems, a stepwise,design process, and set of design rules providing guidance and measurements to achieve a,successful design. The tangible outcome of this research is to find a way to reduce the,uncertainty in managing the control software development process, that is, reducing,programming and debugging time and their variation, increasing flexibility of the automation,systems, and enabling software reusability through modularity. The goal is to overcome,shortcomings of current programming strategies that are based on the experience of the,individual software developer.,Design Theory Development,Today, the primary focus of most design research is based on mechanical or electrical,products. One of the by-products of this proposed research is to enhance our fundamental,understanding of design theory and methodology by extending it to the field of engineering,systems design. A system design theory for large-scale and complex system is not yet fully,developed. Particularly, the question of how to simplify a complicated or complex design task,has not been tackled in a scientific way. Furthermore, building a bridge between design theory,and the latest epistemological outcomes of formal representations in computer sciences and,operations research, such
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 威海热电招聘面试技巧实战分享
- 放射医学影像检测技术要点解析
- 幼儿园教师培训如何通过面试
- 未来五年助晶罐企业制定与实施新质生产力战略分析研究报告
- 未来五年工模奇兵行业直播电商战略分析研究报告
- 南通单招专业选择与就业前景分析
- 培训师企业内训课程开发及实施
- 2023年安阳市遴选公务员笔试真题汇编附答案解析(夺冠)
- 2023年濮阳市遴选公务员笔试真题汇编附答案解析
- 影视演员面试实战案例分享
- 第十章 问题解决与创造性
- 表主要施工机械
- 药物外渗和渗出的预防和处理肖
- 主板规格书-薄板itx-m19ver1.1说明书
- 招标答疑回复函模板
- 中国口腔CBCT简介、CBCT应用领域及市场规模分析
- 二战英文介绍
- T-CABEE 003-2019 近零能耗建筑测评标准
- BB∕T 0049-2021 包装用干燥剂
- 统编版九年级语文上册写作《议论要言之有据》优质课件
- 幼儿园《开展三浴锻练的基本理论与操作细则》课件
评论
0/150
提交评论