




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
毕业设计(论文)中英文资料 题目 可编程控制器 专 业 名 称 自动化班 级 学 号 108302131学 生 姓 名 朱加乐指 导 教 师 杨声云 填 表 日 期 2014 年 3 月 9 日1可编程逻辑控制器1.1简介 控制工程已经发展了时间。在过去的人类是一种用于控制系统的主要方法。更多最近的电力已经被用于控制和早期的电气控制是基于继电器。这些继电器使权力被打开和关闭开关没有机械开关。它是通常使用的继电器,使简单的逻辑控制决策。低成本计算机的发展带来了最新的革命,可编程逻辑控制器(PLC)。 PLC的出现始于20世纪70年代,并已成为生产控制最常见的选择。 PLC已获得在工厂车间普及,将可能继续主导一段时间的到来。大部分的这是因为它们提供的优点。成本有效控制复杂的系统。灵活的可以重新应用到快速,轻松地控制其他系统。计算能力允许更复杂的控制。故障排除辅助工具使编程更容易,并减少停机时间。可靠的组件,使这些可能发生故障前几年进行操作。1.2梯形图 梯形逻辑是用于PLC的主要编程方法。如前面提到的,梯形逻辑已经发展到模仿继电器逻辑。使用继电器逻辑图的决定是战略之一。通过选择梯形图作为主要编程方法,培训量所需的工程师和行业的人大大减少。现代控制系统还包括继电器,但这些很少使用的逻辑。继电器是一种利用磁场来控制开关,如下图图1.1一个简单的装置。当电压被施加到输入线圈,所产生的电流产生的磁场。磁场拉一个金属开关(或簧片)朝它和接触触摸,关闭开关。该时闭合线圈通电时的接触被称为常开。常闭触点接触时,输入线圈不通电。以示意图的形式用一个圆圈来代表输入继电器线圈通常绘制。输出触点,只显示两条平行线。常开触点被示为两行,并且将开放(不导通)时,输入不通电。常闭触点,只显示两行通过其对角线。当输入线圈不通电时,常闭触点将闭合(导通)。继电器是用来让一个电源关闭另一个(通常是大电流)电源开关,同时保持他们孤立。在一个简单的控制应用程序中的继电器的一个例子示于图2.2中。在这个系统中在左侧的第一继电器被用作常闭的,并且允许电流流动,直到电压被施加到输入端A的第二个继电器为常开,并且不允许电流流过,直到电压被施加到输入B,如果电流流过前两继电器则电流将流过线圈在第三继电器,并关闭输出C.开关该电路通常会在梯形逻辑形式绘制。这在逻辑上被读为C将是,果A是关闭的,B是上。图1.11.3编程第一个PLC进行编程与基于继电器逻辑线路原理图的技术。这消除了需要教电工,技术人员和工程师如何对计算机进行编程 - 但是,这种方法一直坚持,这是目前最常用的技术进行编程的PLC。梯形逻辑的例子可以看出,在图1.2要解释这个图想象的力量是在左侧的垂直线,我们称之为热轨。在右手侧是中性轨。在该图中有两个阶梯,并且在每个梯级有输入(两条垂直线)和输出(圆圈)的组合。如果输入是打开或关闭的正确组合的功率可以从热的钢轨流,通过输入端,以提供动力输出,最后到中立轨。的输入可以来自一个传感器,开关,或任何其它类型的传感器。输出将在PLC外部的一些设备被打开或关闭,如灯或电机。在顶部横档的触点是常开和常闭,这意味着如果输入A是和输入B是关闭的,那么电源将流过输出并激活它。任何其他组合输入值将导致输出X为关闭。图2.5的第二个梯级是比较复杂的,其实有投入,这将导致Y中打开输出的多种组合。在梯级的最左部分,电源可以流过顶,如果C是关闭和D是。电源也(同时)可以流过底部,如果两个E和F是真实的。这会得到一半功率的方式横跨梯级,然后如果G或H是真实的权力将被传递到输出Y。在后面的章节中,我们将研究如何解释和构造这些图。还有其他方法用于编程的PLC。其中最早的技术涉及助记符指令。这些指令可以直接从梯形逻辑图导出,并通过简单的编程终端输入到PLC中。助记符的一个例子示于图2.6中。在这个例子中,指令被读取的一行的时间从顶部到底部。第一线00000有指令LDN(输入负载和不)输入00001,这将检查输入到PLC,如果它是关闭它会记住一个1(或true),如果是它会记住一个0 (或假)。在下一行中使用LD(输入负载)语句来查看输入。如果输入是关闭它会记住一个0,如果输入的是它记住一个1(注:这是LD的反向)。 AND语句回忆记得的最后两个数字,如果他们都为真,结果是1;否则结果为0,这个结果现在替换被召回的两个数,并且只有一个号码记住。重复该过程为线00003和00004,但是当这些完成后,现在有想起三个数字。最古老的数目是从AND,较新的数字是从2 LD指令。的,并符合00005结合了最后LD指令的结果,现在有想起两个数字。 OR指令需要两个数现在余下并且如果任一个为1,则结果为1,否则结果为0,这个结果取代了两个数字,并且现在有一个单一的数字那里。的最后一条指令是ST(存储输出),将着眼于存储的最后一个值,如果它是1,则输出将被打开;如果它是0,输出将被关断。图1.2在图1.3梯形逻辑程序,相当于助记符程序。即使你已经编程的梯形图逻辑PLC时,它会被正在使用的PLC之前转换为助记符形式。在过去的助记符程序设计是最常见的,但现在是罕见用户甚至可以看到助记符程序。顺序功能图(SFC)已开发,以适应更先进的系统编程。这些类似于流程图,但更强大。看到图2.7的例子是做两个不同的东西。阅读图表,从顶部开始的地方是说开始。下面这个有双横线,上面写着遵循两个路径。因此,PLC将开始跟随在左侧和右侧边分别与同时的分支。在左边有两个功能,第一个是电源的功能。此功能将运行,直到它决定这样做,和电源关闭功能要跟从。在右手侧是闪光功能;这将运行,直到它完成。这些功能看起来无法解释的,但每个功能,如电将是一个小的梯形逻辑程序。这个方法是从流程图太大的不同,因为它不具有通过流程图遵循单一路径。图1.3图1.4结构化文本编程已发展为一个更现代的编程语言。这是很相似的语言,如BASIC。一个简单的例子如图1.4所示。此示例使用一个PLC存储器位置N7:0。此存储器位置是一个整数,如将在后面的书进行说明。程序的第一行设置的值设为0。下一行开始一个循环,并且将在环路返回。下一行回忆在位置N7:0的值,加1,并将其返回到同一位置。下一行检查循环是否应该退出。如果N7:0大于或等于10,则循环将退出,否则计算机将返回到REPEAT语句从那里继续。每次程序经过这个循环N7:0将增加1,直到值达到10增加。N7:0:= 0;重复N7:0:=N7:0+ 1;UNTILN7:0 =10END_REPEAT;2 PLC连接 当一个进程是由PLC控制,它使用来自传感器的输入作出决定和更新输出来驱动执行机构,如图2.1所示。这个过程是一个真正的过程,这将随着时间而改变。执行器将驱动系统的新状态(或操作模式)。这意味着,该控制器通过使用传感器的限制,如果输入不可用,则控制器将没有任何方法来检测一个条件。控制回路的PLC读取输入,解决了梯形逻辑,然后改变输出一个连续循环。像任何电脑,这并不立即发生。图2.2显示了PLC的基本操作周期。当电源开启时最初的PLC执行快速完整性检查,以确保硬件是否工作正常。如果有问题,PLC将停止,并指示出现错误。例如,如果PLC备用电池电量低,电源中断,内存会被损坏,这将导致一个错误。如果PLC通过了完整性检查会再扫描(读取)所有的投入。后的输入值存储在存储器中的梯形逻辑将被扫描(解决)使用所存储的值 - 而不是当前值。这样做是为了防止逻辑问题时,输入梯形逻辑扫描过程中改变。当梯形逻辑扫描完成输出将被扫描(输出值将被改变)。在此之后,系统恢复做完整性检查,并继续循环下去。不同于一般的电脑,整个程序将被运行一次扫描。典型的时间为每个阶段是在毫秒数量级。图2.1图2.23摘要常开和闭触点。 继电器及其与梯形逻辑关系。 PLC的输出可以是输入,如图中电路的密封。 编程时可以用梯形图逻辑,助记符,证监会和结构化文本来完成。 有多种方法来编写PLC程序。1.PROGRAMMABLE LOGIC CONTROLLERS1.1 INTRODUCTION Control engineering has evolved over time. In the past humans was the main method for controlling a system. More recently electricity has been used for control and early electrical control was based on relays. These relays allow power to be switched on and off without a mechanical switch. It is common to use relays to make simple logical control decisions. The development of low cost computer has brought the most recent revolution, the Programmable Logic Controller (PLC). The advent of the PLC began in the 1970s, and has become the most common choice for manufacturing controls. PLC have been gaining popularity on the factory floor and will probably remain predominant for some time to come. Most of this is because of the advantages they offer. Cost effective for controlling complex systems. Flexible and can be reapplied to control other systems quickly and easily. Computational abilities allow more sophisticated control. Trouble shooting aids make programming easier and reduce downtime. Reliable components make these likely to operate for years before failure. 1.2 Ladder Logic Ladder logic is the main programming method used for PLC. As mentioned before, ladder logic has been developed to mimic relay logic. The decision to use the relay logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for engineers and trades people was greatly reduced. Modern control systems still include relays, but these are rarely used for logic. A relay is a simple device that uses a magnetic field to control a switch, as pictured in Figure 2.1. When a voltage is applied to the input coil, the resulting current creates a magnetic field. The magnetic field pulls a metal switch (or reed) towards it and the contacts touch, closing the switch. The contact that closes when the coil is energized is called normally open. The normally closed contacts touch when the input coil is not energized. Relays are normally drawn in schematic form using a circle to represent the input coil. The output contacts are shown with two parallel lines. Normally open contacts are shown as two lines, and will be open (non-conducting) when the input is not energized. Normally closed contacts are shown with two lines with a diagonal line through them. When the input coil is not energized the normally closed contacts will be closed (conducting).Relays are used to let one power source close a switch for another (often high current) power source, while keeping them isolated. An example of a relay in a simple control application is shown in Figure 2.2. In this system the first relay on the left is used as normally closed, and will allow current to flow until a voltage is applied to the input A. The second relay is normally open and will not allow current to flow until a voltage is applied to the input B. If current is flowing through the first two relays then current will flow through the coil in the third relay, and close the switch for output C. This circuit would normally be drawn in the ladder logic form. This can be read logically as C will be on if A is off and B is on. 1.3 Programming The first PLC were programmed with a technique that was based on relay logic wiring schematics. This eliminated the need to teach the electricians, technicians and engineers how to program a computer - but, this method has stuck and it is the most common technique for programming PLC today. An example of ladder logic can be seen in Figure 2.5. To interpret this diagram imagines that the power is on the vertical line on the left hand side, we call this the hot rail. On the right hand side is the neutral rail. In the figure there are two rungs, and on each rung there are combinations of inputs (two vertical lines) and outputs (circles). If the inputs are opened or closed in the right combination the power can flow from the hot rail, through the inputs, to power the outputs, and finally to the neutral rail. An input can come from a sensor, switch, or any other type of sensor. An output will be some device outside the PLC that is switched on or off, such as lights or motors. In the top rung the contacts are normally open and normally closed, which means if input A is on and input B is off, then power will flow through the output and activate it. Any other combination of input values will result in the output X being off. The second rung of Figure 2.5 is more complex, there are actually multiple combinations of inputs that will result in the output Y turning on. On the left most part of the rung, power could flow through the top if C is off and D is on. Power could also (and simultaneously) flow through the bottom if both E and F are true. This would get power half way across the rung, and then if G or H is true the power will be delivered to output Y. In later chapters we will examine how to interpret and construct these diagrams. There are other methods for programming PLC. One of the earliest techniques involved mnemonic instructions. These instructions can be derived directly from the ladder logic diagrams and entered into the PLC through a simple programming terminal. An example of mnemonics is shown in Figure 2.6. In this example the instructions are read one line at a time from top to bottom. The first line 00000 has the instruction LDN (input load and not) for input 00001. This will examine the input to the PLC and if it is off it will remember a 1(or true), if it is on it will remember a 0 (or false). The next line uses an LD (input load) statement to look at the input. If the input is off it remembers a 0, if the input is on it remembers a 1(note: this is the reverse of the LD). The AND statement recalls the last two numbers remembered and if they are both true the result is a 1; otherwise the result is a 0. This result now replaces the two numbers that were recalled, and there is only one number remembered. The process is repeated for lines 00003 and 00004, but when these are done there are now three numbers remembered. The oldest number is from the AND, the newer numbers are from the two LD instructions. The AND in line 00005 combines the results from the last LD instructions and now there are two numbers remembered. The OR instruction takes the two numbers now remaining and if either one is a 1 the result is a 1, otherwise the result is a 0. This result replaces the two numbers, and there is now a single number there. The last instruction is the ST (store output) that will look at the last value stored and if it is 1, the output will be turned on; if it is 0 the output will be turned off. The ladder logic program in Figure 2.6, is equivalent to the mnemonic program. Even if you have programmed a PLC with ladder logic, it will be converted to mnemonic form before being used by the PLC. In the past mnemonic programming was the most common, but now it is uncommon for users to even see mnemonic programs. Sequential Function Charts (SFC) have been developed to accommodate the programming of more advanced systems. These are similar to flowcharts, but much more powerful. The example seen in Figure 2.7 is doing two different things. To read the chart, start at the top where is says start. Below this there is the double horizontal line that says follow both paths. As a result the PLC will start to follow the branch on the left and right hand sides separately and simultaneously. On the left there are two functions the first one is the power up function. This function will run until it decides it is done, and the power down function will come after. On the right hand side is the flash function; this will run until it is done. These functions look unexplained, but each function, such as power up will be a small ladder logic program. This method is much different from flowcharts because it does not have to follow a single path through the flowchart. Structured Text programming has been developed as a more modern programming language. It is quite similar to languages such as BASIC. A simple example is shown in Figure 2.8. This example uses a PLC memory location N7:0. This memory location is for an integer, as will be explained later in the book. The first line of the program sets the value to 0. The next line begins a loop, and will be where the loop returns to. The next line recalls the value in location N7:0, adds 1 to it and returns it to the same location. The next line checks to see if the loop should quit. If N7:0 is greater than or equal to 10, then the loop will quit, otherwise the computer will go back up to the REPEAT statement continue from there. Each time the program goes through this loop N7:0 will increase by 1 until the value reaches 10. N7:0 := 0; REPEAT N7:0 := N7:0 + 1; UNTIL N7:0 = 10 END_REPEAT;2.PLC Connections When a process is controlled by a PLC it uses inputs from sensors to make decisions and update outputs to drive actuators, as shown in Figure 2.9. The process is a real process that will change over time. Actuators will drive the system to new states (or modes of operation). This means that the controller is limited by the sensors available, if an input is not available, the controller will have no way to detect a condition. The control loop is a continuous cycle of the PLC reading
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 黄河上游建筑方案设计
- 实时自动化营销技术方案
- 知名咨询公司客服方案
- 咨询方案的构成
- 2025年秋季初级经济师考试 经济基础知识冲刺试题试卷
- 战略联盟协议的法律构架
- 麻醉药品处方权考试题库及答案
- 2024年高职单招预测复习必考题附答案详解
- 2025法院司法辅助人员能力提升B卷题库含完整答案详解【夺冠系列】
- 2024-2025学年计算机二级试卷及参考答案详解
- 2025年人教版八年级地理上册全册教案
- 软骨分化关键分子机制-洞察及研究
- 2025年涉台知识竞赛试题及答案
- 黑龙江省哈尔滨市哈尔滨市第一中学校2024-2025学年度上高一期中考试语文试题
- 2025年广西壮族自治区招聘警务辅助人员考试真题及答案
- (完整版)人教八年级下册期末物理测试真题经典及解析
- GJB3206B-2022技术状态管理
- 园林养护服务公司简介范文
- 储能项目竣工验收与交付方案
- 2025秋人教版(2024)二年级上册数学教学计划
- 2025至2030中国清真食品市场供需前景调查及发展动向分析报告
评论
0/150
提交评论