版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、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 Blo
2、ck Diagram A Programmable Controller is a specialized computer.Since it is a computer, it has all the basic component parts that any other computer has; a Central Processing Unit,Memory, Input Interfacing and Output Interfacing.A typical programmable controller block diagram is shown in Figure 2.5.,
3、Figure 2.5,Programmable Controller Block Diagram,The Central Processing Unit (CPU) is the control portion of the PLC. It interprets the program commands retrieved from memory and acts on those commands.In present day PLCs this unit is a microprocessor based system.The CPU is housed in the processor
4、module of modularized systems. Memory in the system is generally of two types; ROM and RAM.The ROM memory contains the program information that allows the CPU to interpret and act on the Ladder Logic program stored in the RAM memory.RAM memory is generally kept alive with an on-board battery so,that
5、 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 with Electrically Erasable Programmable Read Only Memory (EEPROM) which does not require a battery.Memory is also housed in
6、 the processor module in modular systems. Input units can be any of several different types depending on input signals expected as described above.The input section can accept discrete or analog signals of various voltage and current levels.Present day controllers offer discrete signal inputs of bot
7、h AC and DC voltages from TTL to 250 VDC and from 5 to 250 VAC.Analog input units can accept input levels such as 10 VDC, 5 VDC and 4-20 ma. current loop values.Discrete input units present each input to the CPU as a single 1 or 0 while analog input units contain analog to digital conversion circuit
8、ry and present the input voltage to the CPU as binary number normalized to the maximum count available from the unit.The number of bits representing the input voltage or current depends 2,3,upon the resolution of the unit.This number generally contains a defined number of magnitude bits and a sign b
9、it.Register input units present the word input to the CPU as it is received (Binary or BCD).,Output units operate much the same as the input units with the exception that the unit is either sinking (supplying a ground) or sourcing (providing a voltage) discrete voltages or sourcing analog voltage or
10、 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 Triacs for AC voltage outputs. For higher current applications and situations where a physical contact closure is required, mechanical relay co
11、ntacts are available. These higher currents, however, are generally limited to about 2-3 amperes.The analog output units have internal circuitry which performs the digital to analog conversion and generates the variable voltage or current output.,2.6 Update - Solve the Ladder - Update,When power is
12、applied to a programmable logic controller, the PLCs operation consists of two steps: (1) update inputs and outputs and (2) solve the ladder.This may seem like a very simplistic approach to something that has to be more complicated but there truly are only these two steps.If these two steps are thor
13、oughly understood, writing and modifying programs and getting the most from the device is much easier to accomplish.With this understanding, the things 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
14、startup.The actual startup sequence includes some operations transparent to the user or programmer that occur before actual PLC operation on the user program begins.During this startup there may be extensive diagnostic checks performed by the processor on things like memory, I/O devices, communicati
15、on with other devices (if present) and program integrity.In sophisticated modular systems, the processor is able to identify the various module types, their location in the system and address.This type of system analysis and testing generally occurs during startup before actual program execution.,2.
16、7 Update,The first thing the PLC does when it begins to function is update I/O.This means that all discrete input states are recorded from the input unit and all discrete states to be output are transferred to the output unit.Register data generally has specific addresses associated with it for both
17、 input and output data referred to as input and output registers.These registers are available to 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 output informat
18、ion is accomplished with the use of input and output image registers set aside in the PLC memory.Each discrete input point has associated with it one bit of an input image register.Likewise, each discrete output point has one bit of an output image register associated with it.When I/O updating occur
19、s, each input point that is ON at that time will cause a 1 to be set at the bit address associated with that particular input.If the input is off, a 0 will be set into the bit address.Memory in todays PLCs is generally configured in 16 bit words.This means that one,word of memory can store the state
20、s 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, the status 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 t
21、o 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 have an Immediate I/O Update command.This command will force the PLC to update the I/O at other times although this would be a special case.,One major item of co
22、ncern 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 bodily harm to operators.In some sys
23、tems, all outputs may need to be initially set to their off state to insure the safety of the system.However, there may be systems that require outputs to initially be set up in a specific way, some on and some off.This could take the form of a predetermined setup or could be a requirement that the
24、outputs remain in the state immediately before power-down.More recent systems have provisions for both setup options and even a combination of the two.This is a prime concern of the engineer and programmer and must be defined as the system is being developed to insure the safety of personnel that op
25、erate and maintain the equipment.Safety as related to system and program development will be discussed in a later chapter. 2.8 Solve the Ladder After the I/O update has been accomplished, the PLC begins executing the commands programmed into it.These commands are typically referred to as the ladder
26、diagram.The ladder diagram 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 used fo
27、r 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 be necessary.The symbols at the right of the ladder diagram labeled CR1, CR2, CR3 an
28、d CR4 and are circular in shape are the software coils of the relays.The symbols at the left which look like capacitors, some with diagonal lines through them, are the contacts associated with the coils.The symbols that look like capacitors without the diagonal lines through them are normally open c
29、ontacts.These are analogous to a switch that is normally off.When the switch is turned on, the contact closes.The contact symbols at the left that look like capacitors with diagonal lines through them are normally closed contacts.A normally closed contact is equivalent to a switch that is normally t
30、urned 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 can see the reason for the term ladder diagram if the rungs of a stepladder are visualized.In fact, each complete line of the diagram is referred to as one r
31、ung of logic.The actual interpretation of the diagram will also be discussed later although some explanation is required here.The contact configuration on the left side of each rung can be visualized as switches and the coils on the right as lights.If the switches are turned on and off in the proper
32、 configuration, the light to the right will illuminate.The PLC executes this program from left to right and top to bottom, in that order.It first looks at the switch (contact) configuration to determine if current can be passed to the light (coil).The data for this decision comes from the output and
33、 input image registers.If current 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 t
34、hat particular rung. Once 5,the light (coil) has been either turned on or off it will remain in that state until the next time the PLC solves that particular rung.After solving a rung, the PLC moves on to solve the next rung in the same manner and so forth until the entire ladder has been executed a
35、nd solved.One rule that is different from general electrical operation is the direction of current flow in the rung.In a ladder logic, rung current can only flow from left to right and up and down; never from right to left. As an example, in the ladder shown in Figure 2.7, coil CR1 will energize if
36、any of the following 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 c
37、urrent flow in the circuit in each of the cases listed above is from left 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
38、 CR2 contact. This is not allowed in ladder logic even though current could flow in this direction if we were to build it with real relays.Remember, we are working in the software world not the hardware world. To review, after the I/O update, the PLC moves to the first rung of ladder logic.It solves
39、 the contact configuration to determine if the coil is to be energized or de-energized.It then energizes or 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,c
40、omplete with all rungs solved and all coils in the ladder set up according to the solution of each rung, 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 the output image register to the o
41、utput unit and the states of all inputs are transferred to the input image register.Note that any input changes that occur during the solution of the ladder are ignored because they are only recorded at I/O update time.The state of each coil is recorded to the output image register as each rung is s
42、olved. However, these states are not transferred to the output unit until I/O update time. Figure2.8 Scan Cycle This procedure of I/O update and solving the ladder diagram and I/O update is referred to as scanning and is represented in Figure 2.8. The period between one I/O update and the next is re
43、ferred to as one Scan.The amount of time it takes the PLC to get from one I/O update to the next 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
44、the longer the ladder diagram, the longer the scan time of the system.The speed at which a PLC scans memory is referred to as Scan Rate.Scan rate units are usually listed in msec/K of memory being utilized for the program.As an example, if a particular PLC has a rated scan rate of 8 msec/K and the p
45、rogram occupies 6K of memory, it will take the PLC 48 msec to complete 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,
46、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
47、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 st
48、udy 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,
49、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
50、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
51、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
52、 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 an
53、d,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
54、 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 a
55、nd 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 syste
56、ms, 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 debuggin
57、g 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,
58、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 th
59、eory 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 as discrete event system modeling, can advance future development in,engineering design.,Application in Logical Hardware Design,From a logical perspective, PLC software design is similar to the hardware design of,integrated cir
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 江苏省苏州工业园区星澄校2026年初三第六次月考化学试题含解析
- 2026届湖北省当阳市重点达标名校人教A版高中化学试题初三二轮平面向量测试含解析
- 福建省南平市剑津片区重点达标名校2026届初三生物试题第三次模拟考试试题含解析
- 重庆市北碚区西南大附属中学2026年中考化学试题原创模拟卷(四)含解析
- 2026届山东省聊城莘县联考初三2月开学模拟(网络考试)生物试题含解析
- 2026年安徽省宿州初三二诊模拟考试生物试题含解析
- 2026年包装二次利用设计:茶叶盒变身小灯的红点奖作品拆解
- 2026年地热回收系统应用:冷库余热用于生产生活热水循环案例
- 2025年临床执业《儿科学》冲刺卷
- 影视后期特效师面试宝典
- 《口腔设备学》课件-3-真空搅拌机
- 酒店客房服务与管理规范手册
- DB52T 1686-2022 高速公路服务区智慧化建设数据规范
- 计算机网络基础与应用中职完整全套教学课件
- 六年级20道说理题
- 厂房改造成宿舍楼方案
- 住房按揭借款合同
- 二手车交易合伙协议
- 2024年江苏信息职业技术学院高职单招(英语/数学/语文)笔试历年参考题库含答案解析
- 板材行业销售渠道分析
- 2024地面用晶体硅光伏组件环境适应性测试要求第1部分:一般气候条件
评论
0/150
提交评论