第一范文网 - 专业文章范例文档资料分享平台

自动化制造系统与PLC论文中英文资料外文翻译文献

来源:用户分享 时间:2025/5/23 12:54:41 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

中英文资料外文翻译文献

外文原文

Automating Manufacturing Systems with PLCs

2.1 INTRODUCTION

Control engineering has evolved over time. In the past humans were 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 the1970s, and has become the most common choice for manufacturing controls.

PLCs 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.

2.1.1 Ladder logic

Ladder logic is the main programming method used for PLCs. As mentioned before, ladder logic has been developed to mimic relay logic. logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for

1

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).

Figure 2.1 Simple Relay Layouts and Schematics

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.

2

Figure 2.2 A Simple Relay Controller

The example in Figure 2.2 does not show the entire control system, but only the logic. When we consider a PLC there are inputs, outputs, and the logic. Figure 2.3 shows a more complete representation of the PLC. Here there are two inputs from push buttons.We can imagine the inputs as activating 24V DC relay coils in the PLC. This in turn drives an output relay that switches 115V AC, that will turn on a light. Note, in actual PLCs inputs are never relays, but outputs are often relays. The ladder logic in the PLC is actually a computer program that the user can enter and change. Notice that both of the input push buttons are normally open, but the ladder logic inside the PLC has one normally open contact, and one normally closed contact. Do not think that the ladder logic in the PLC need so match the inputs or outputs. Many beginners will get caught trying to make the ladder logic match the input types.

3

Figure 2.3 A PLC Illustrated With Relays

Many relays also have multiple outputs (throws) and this allows an output relay to also be an input simultaneously. The circuit shown in Figure 1.4 is an example of this, it is called a seal in circuit. In this circuit the current can flow through either branch of the circuit, through the contacts labelled A or B. The input B will only be on when the output B is on. If B is off, and A is energized, then B will turn on. If B turns on then the input B will turn on, and keep output B on even if input A goes off. After B is turned on the output B will not turn off.

Figure 2.4 A Seal-in Circuit

2.1.2 Programming

4

The first PLCs 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 PLCs today. An example of ladder logic can be seen in Figure 2.5. To interpret this diagram imagine 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.

Figure 2.5 A Simple Ladder Logic Diagram

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 PLCs. One of the earliest techniques involved mnemonic instructions. These instructions can be derived directly from the ladder

5

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 A. . 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 the 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.

Figure 2.6 An Example of a Mnemonic Program and Equivalent Ladder Logic

The ladder logic program in Figure 2.6, is equivalent to the mnemonic program. Even if

6

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 (SFCs) 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..

Figure 2.7 An Example of a Sequential Function Char

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 i. 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

7

value in location i, adds 1 to it and returns it to the same location. The next line checks to see if the loop should quit. If i 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 i will increase by 1 until the value reaches 10.

Figure 2.8 An Example of a Structured Text Program

2.1.3 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.

Figure 2.9 The Separation of Controller and Process

The control loop is a continuous cycle of the PLC reading inputs, solving the ladder logic, and then changing the outputs. Like any computer this does not happen instantly. Figure 2.10 shows the basic operation cycle of a PLC. When power is turned on initially the PLC does a quick sanity check to ensure that the hardware is working properly.If there is a problem the PLC will halt and indicate there is an error. For example, if the PLC power is dropping and

8

about to go off this will result in one type of fault. If the PLC passes the sanity check it will then scan (read) all the inputs. After the inputs values are stored in memory the ladder logic will be scanned (solved) using the stored values not the current values. This is done to prevent logic problems when inputs change during the ladder logic scan. When the ladder logic scan is complete the outputs will be scanned (the output values will be changed). After this the system goes back to do a sanity check, and the loop continues indefinitely. Unlike normal computers, the entire program will be run every scan. Typical times for each of the stages is in the order of milliseconds.

Figure 2.10 The Scan Cycle of a PLC

2.1.4 Ladder Logic Inputs

PLC inputs are easily represented in ladder logic. In Figure 2.11 there are three types of inputs shown. The first two are normally open and normally closed inputs, discussed previously. The IIT (Immediate InpuT) function allows inputs to be read after the input scan, while the ladder logic is being scanned. This allows ladder logic to examine input values more often than once every cycle.

9

Figure 2.11 Ladder Logic Inputs

2.1.5 Ladder Logic Outputs

In ladder logic there are multiple types of outputs, but these are not consistently available on all PLCs. Some of the outputs will be externally connected to devices outside the PLC, but it is also possible to use internal memory locations in the PLC. Six types of outputs are shown in Figure 2.12. The first is a normal output, when energized the output will turn on, and energize an output. The circle with a diagonal line through is a normally on output. When energized the output will turn off. This type of output is not available on all PLC types. When initially energized the OSR (One Shot Relay) instruction will turn on for one scan, but then be off for all scans after, until it is turned off. The L (latch) and U (unlatch) instructions can be used to lock outputs on. When an L output is energized the output will turn on indefinitely, even when the output coil is deenergized. The output can only be turned off using a U output. The last instruction is the IOT (Immediate OutpuT) The last instruction is the IOT (Immediate OutpuT)that will allow outputs to be updated without having to wait for the ladder logic scan to be completed.

3.1 INPUTS AND OUTPUTS

Inputs to, and outputs from, a PLC are necessary to monitor and control a process. Both inputs and outputs can be categorized into two basic types: logical or continuous. Consider

10

the example of a light bulb. If it can only be turned on or off, it is logical control. If the light can be dimmed to different levels, it is continuous. Continuous values seem more intuitive, but logical values are preferred because they allow more certainty, and simplify control. As a result most controls applications (and PLCs) use logical inputs and outputs for most applications. Hence, we will discuss logical I/O and leave continuous I/O for later.

Outputs to actuators allow a PLC to cause something to happen in a process. A short list of popular actuators is given below in order of relative popularity.

Solenoid Valves - logical outputs that can switch a hydraulic or pneumatic flow. Lights - logical outputs that can often be powered directly from PLC output boards.

Motor Starters - motors often draw a large amount of current when started, so they require motor starters, which are basically large relays.

Servo Motors - a continuous output from the PLC can command a variable speed or position.

Outputs from PLCs are often relays, but they can also be solid state electronics such as transistors for DC outputs or Triacs for AC outputs. Continuous outputs require special output cards with digital to analog converters.

Inputs come from sensors that translate physical phenomena into electrical signals. Typical examples of sensors are listed below in relative order of popularity.

Proximity Switches - use inductance, capacitance or light to detect an object logically. Switches - mechanical mechanisms will open or close electrical contacts for a logical signal. Potentiometer - measures angular positions continuously, using resistance.

LVDT (linear variable differential transformer) - measures linear displacement continuously using magnetic coupling.

Inputs for a PLC come in a few basic varieties, the simplest are AC and DC inputs. Sourcing and sinking inputs are also popular. This output method dictates that a device does not supply any power. Instead, the device only switches current on or off, like a simple switch. Sinking - When active the output allows current to flow to a common ground. This is best selected when different voltages are supplied. Sourcing - When active, current flows from a

11

supply, through the output device and to ground. This method is best used when all devices use a single supply voltage. This is also referred to as NPN (sinking) and PNP (sourcing). PNP is more popular. This will be covered in detail in the chapter on sensors.

3.1.1 Inputs

In smaller PLCs the inputs are normally built in and are specified when purchasing the PLC. For larger PLCs the inputs are purchased as modules, or cards, with 8 or 16 inputs of the same type on each card. For discussion purposes we will discuss all inputs as if they have been purchased as cards. The list below shows typical ranges for input voltages, and is roughly in order of popularity. PLC input cards rarely supply power, this means that an external power supply is needed to supply power for the inputs and sensors. The example in Figure 3.1 shows how to connect an AC input card.

Figure 3.1 An AC Input Card and Ladder Logic

In the example there are two inputs, one is a normally open push button, and the second is a temperature switch, or thermal relay. (NOTE: These symbols are standard and will be discussed later in this chapter.) Both of the switches are powered by the positive/ hot output of

12

the 24Vac power supply - this is like the positive terminal on a DC supply. Power is supplied to the left side of both of the switches. When the switches are open there is no voltage passed to the input card. If either of the switches are closed power will be supplied to the input card. In this case inputs 1 and 3 are used - notice that the inputs start at 0. The input card compares these voltages to the common. If the input voltage is within a given tolerance range the inputs will switch on. Ladder logic is shown in the figure for the inputs. Here it uses Allen Bradley notation for PLC-5 racks. At the top is the location of the input card I:013 which indicates that the card is an Input card in rack 01 in slot 3. The input number on the card is shown below the contact as 01 and 03.

Many beginners become confused about where connections are needed in the circuit above. The key word to remember is circuit, which means that there is a full loop that the voltage must be able to follow. In Figure 3.1 we can start following the circuit (loop) at the power supply. The path goes through the switches, through the input card, and back to the power supply where it flows back through to the start. In a full PLC implementation there will be many circuits that must each be complete. A second important concept is the common. Here the neutral on the power supply is the common, or reference voltage. In effect we have chosen this to be our 0V reference, and all other voltages are measured relative to it. If we had a second power supply, we would also need to connect the neutral so that both neutrals would be connected to the same common. Often common and ground will be confused. The common is a reference, or datum voltage that is used for 0V, but the ground is used to prevent shocks and damage to equipment. The ground is connected under a building to a metal pipe or grid in the ground. This is connected to the electrical system of a building, to the power outlets, where the metal cases of electrical equipment are connected. When power flows through the ground it is bad. Unfortunately many engineers, and manufacturers mix up ground and common. It is very common to find a power supply with the ground and common mislabeled.

One final concept that tends to trap beginners is that each input card is isolated. This means that if you have connected a common to only one card, then the other cards are not connected. When this happens the other cards will not work properly. You must connect a

13

common for each of the output cards.

3.1.2.Output Modules

As with input modules, output modules rarely supply any power, but instead act as switches. External power supplies are connected to the output card and the card will switch the power on or off for each output. Typical output voltages are listed below, and roughly ordered by popularity. 120 Vac 24 Vdc 12-48 Vac 12-48 Vdc 5Vdc (TTL) 230 Vac

These cards typically have 8 to 16 outputs of the same type and can be purchased with different current ratings. A common choice when purchasing output cards is relays, transistors or triacs. Relays are the most flexible output devices. They are capable of switching both AC and DC outputs. But, they are slower (about 10ms switching is typical), they are bulkier, they cost more, and they will wear out after millions of cycles. Relay outputs are often called dry contacts. Transistors are limited to DC outputs, and Triacs are limited to AC outputs. Transistor and triac outputs are called switched outputs. Dry contacts - a separate relay is dedicated to each output.

This allows mixed voltages (AC or DC and voltage levels up to the maximum), as well as isolated outputs to protect other outputs and the PLC. Response times are often greater than 10ms. This method is the least sensitive to voltage variations and spikes. Switched outputs - a voltage is supplied to the PLC card, and the card switches it to different outputs using solid state circuitry (transistors, triacs, etc.) Triacs are well suited to AC devices requiring less than 1A. Transistor outputs use NPN or PNP transistors up to 1A typically. Their response time is well under 1ms.

14

中文翻译

自动化制造系统与PLC

2.1介绍

控制工程随着时间的推移在不断发展。过去的人们主要致力于控制系统方面的研究。而最近电力已被应用于控制,早期电气控制是基于继电器的。这些继电器使其可以在没有机械开关的情况下被开启和关闭。使用继电器进行简单逻辑控制的方法很普遍。低成本计算机的发展带来了新一次的革命,可编程逻辑控制器(PLC)出现于十九世纪70年代,如今它已成为制造控制的最普遍选择。

PLC已逐渐在工厂车间中得到普及并很可能在未来的一段时间内占据主导地位。这一切都缘于PLC这些的优点:

1.能高效地控制复杂系统

2.应用灵活并能简单迅速地循环控制其他系统 3.强大的计算能力使其可以控制极其复杂的系统 4.故障排除帮助使编程更加容易,并可减少停机时间 5.可靠地组件使其有更长的使用寿命

2.1.1梯形逻辑

梯形逻辑是用于PLC的主要编程方法。正如之前所说,梯形逻辑已被用来模仿继电器逻辑。使用继电器逻辑图进行编程的决定是一个战略决策。通过选择梯形逻辑作为主要的编程方法,使培训工程师和商人所需要的资金极大的减少。

现代控制系统仍然包括继电器,但它很少用于逻辑。继电器是一个使用磁场来控制开关的简单设备,如图2.1。当电压作用于输入线圈产生磁场,磁场吸引金属开关使触点接触,则开关闭合。通电时闭合的触点称为常开触点,不通电时闭合的触点称为常闭触点。继电器通常在示意图中使用一个圆圈代表输入线圈,输出触点用两个平行线表示。常开触点用两根线表示并在输入端不通电时是开启(不导电)的,常闭触点用两根线和

15

一个对角线穿过它们来表示,当输入线圈不通电时,常闭触点是闭合(导电)的。

输入线圈 或 常闭开关 常开开关 或

图2.1 简单的布局和继电器电路图

继电器用于是让一个电源控制关闭另一(通常是高电流)电源的开关,同时保持它们之间隔离。举一个用于简单控制的继电器的例子,如图2.2所示。在这个系统中,左边第一个继电器被用作常闭触点,并允许电流流过,直到输入端通电才断开。第二个继电器被用作常开触点,不允许电流通过,直到电压作用于输入端B。如果电流流过前两个继电器并通过继电器3中的线圈并闭合输出端C的开关。此电路通常被化成梯形图形式。这可以理解为如果A断开B闭合则C接通。

16

继电器逻辑 输入A(常闭) 输入B(常开) 输入C(常开) 梯形逻辑

图2.2一个简单的继电器控制器

图2.2中的例子没有显示整个控制系统,只有逻辑。当我们考虑一个PLC有输入,输出,和逻辑时,图1.3显示的更全面。这里有一组双输入按钮,我们可以想像将输入端接在24V直流电源上,用来驱动器是输出继电器的115V交流电开关,结果点亮了一盏灯。请注意,在实际情况下PLC的输入端从来不接继电器,而是在输出端。PLC梯形逻辑其实就是一种用户可以进入和更改的电脑程序。注意到两个输入的按钮都是常开的,但PLC梯形图逻辑有一个常开触点,和一个常闭触点。在PLC梯形逻辑图不需要匹配输入或输出。许多初学者会试图使梯形逻辑与它的输入端类型相匹配。

17

按钮 电源 输入 梯形逻辑 输出 交流电源 灯泡

图2.3一个PLC的继电器说明

许多继电器也有多个输出(输入),这允许输出继电器可以同时输入。图2.4所示的电路就是一个例子,它是在电路里称为保持电路。此电路的电流可流过两个电路分支中的任何一个,通过接触开关A或B,只有输出端B继电器通电,触点B才会闭合。如果B是断开的,而使A通电,那么B将闭合。如果输出端B继电器一直通电,即使A触点断开B触点也将一直保持闭合。当B触点闭合后,继电器B将一直通电。

图2.4一个保持电路

18

2.1.2编程

最初的PLC是基于继电器逻辑接线图技术进行编程。除了对教电工,技术员和工程师电脑编程的需求外,这种方法还是一直是被认可的,而且它现在已成为最普遍的的PLC的编程技术。图2.5是一个简单梯形逻辑的例子。解释一下这个梯形图,假象左侧的垂直线为电源,我们称之为热线。而最右断端的垂线称之为零线。中间有两个梯级,每个梯级有一组输入(2短垂直线)和一个输出(圆圈)。如果输入端以一个正确的组合断开或闭合,电流将从热线流出通过输入端,作用于输出端,最后到达零线。输入可来自于一个传感器,开关,或任何其他类型的传感器。输出端是PLC外一些被控制开关的设备,如灯泡或电机之类。在上面这个梯级,有一个动合触点和动断触点,即如果A通电B断电则电流将流过输出端X并驱动它工作,其他形式的组合将导致输出端X断开。

火线 零线 输入端 输出端 注意:电源电流需要输入端(A,B,C,D,E,F,G,H)的某些组合才能打开输出端(X,Y)

图2.5一个简单的梯形逻辑图

图2.5的第二个梯级更复杂,实际上输入端有多种开闭组合可使输出端Y工作。在梯级的左侧,如果C断电D通电,则有电流流过,而如果E,F通电,电流也可以从下面支路流过,只是这个梯级导通的一半条件,后面的G或H如果通电,电流将通过其中一个流向输出端Y,在后面的章节我们将讲解如何设计和绘制梯形图。

还有一些其他的PLC编程方法。其中最早的一个技术涉及助记符指令。这些指令可直接由梯形逻辑图生成,并通过简单的编程终端输入到PLC中。图2.6是一个助记符指令的例子。在这个例子中,一次一行地从上到下读取指令。第一行00000有对输入端0001的指令LDN(是否输入加载),这将检查PLC的输入端,如果是断点状态将被记为1(或

19

真),如果处于通电状态将被记为0(或假)。下一行使用一个LD(输入加载)语句查看输入。如果输入端是断电状态记为0,通电记为1(注意:这是相反的)。AND指令调用之前存储的最后两位数,如果都是真则结果为1,否则结果为0。这一结果取代了那两个被调用的数,只有一个数字被寄存。这个过程在00003和00004行中重复,当执行完毕后有三个数被寄存。第一个数来自AND指令,后两个数来自两个LD指令。0005行中的AND指令与前面的LD指令结果结合,使现在只有两个数字被存储。OR指令采用现在剩下的两个数字,任意一个是1则结果是1,否则结果是0。这一结果覆盖了前面两个数,而现在有一个数。最后一个指令是ST(存储输出),将看最后一个数进行存储,如果是1,输出将通电,如果是0输出将断开。

助记码与下面的梯形逻辑等同

图2.6一个助记符编程和对应的梯形逻辑实例

图2.6梯形逻辑程序,相当于助记符程序。即使你已为PLC梯形编好程,在PLC使用前它还是将转化为助记符形式。在过去助记符编程是最普遍的,但现在这种方法不常用了,甚至连助记符程序都很少见。

顺序功能图(SFCs)编程已经发展成为适用于更先进系统的编程方式。它类似于流

20

程图,但更强大。在图2.7中看到的例子是在实现两个不同功能。阅读图表,在顶部写开始的地方开始启动。下面的双水平线表示有两条路径。而PLC将反别同时执行这两个分支,左侧有两个功能,第一个是增大电源功能。这个功能一直执行到决定被完成,随后power down将随后执行。右侧是闪光功能,这将运行直到它完成。这些功能看起来不易解释,但其中每一个功能,如增大电源,都是一个小梯形逻辑程序。这种方法与流程图有很大不同因为它没有按照流程图通过一个单一的路径。

开始 增大电压 执行以下多路径 闪灯 减小电压 结束

图2.7一个顺序功能图的例子

结构化文本编程已经发展成为一个更现代化的编程语言。它与BASIC语言很相似。图2.8是一个简单例子。这个例子使用一个PLC的内存位置N7:0,这个内存位置为整数,具体将在这本书后面解释。程序的第一行将初值设为0。下一行开始一个循环,并将在循环处返回。下一行调用N7:0位置处的参数值,加1,并返回到相同的位置。下一行检查是否应该退出循环。当N7:0大于或等于10,那么循环将退出,否则计算机将返回到循环指令继续执行。每次程序通过这个循环时,N7:0将增加1至值达到10。

图2.8一个结构化文本程序范例

21

2.1.3 PLC的连接

当一个进程由PLC控制,它使用传感器的输入作出决定并更新输出,以驱动执行器,如图2.9所示。这个过程是一个真正的将随时间改变的过程。执行器将驱动系统到新状态(或运行模式)。这意味着,该控制器是由传感器能力所限制,如果输入无法获得,控制器也将无法执行操作。

进程 从传感器或开关反馈 连接执行器

图2.9控制器和进程分离

控制回路是一个连续的循环,这个循环包括PLC读取输入,求解梯形逻辑,进而更新输出。就像任何一台计算机一样,这不会发生在一瞬间。图2.10显示了一个PLC的基本操作循环。打开电源的最初阶段,PLC将做一个完整性检查以确保硬件工作正常。如果有问题,PLC将停止工作并显示有错误。例如,如果PLC的备用电池低电量低,电力即将中断,内存将被破坏,这会导致一个故障。如果PLC通过一个完整性检查,它会扫描(读)所有输入。在输入值存储在内存中后,梯形逻辑将被扫描(解决)使用存储值而不是当前值。这样做是为了防止在梯形逻辑扫描时输入值发生变化导致逻辑问题。当梯形逻辑扫描完成后,输出将被扫描(输出值会改变)。之后系统将返回做完整性检查,这样循环继续下去。不同于普通电脑,整个计划程序在每次扫描时将被执行。典型的时间为每个阶段按顺序执行几毫秒。

22

PLC程序通过检查输入改变输出 设置新输出 控制循环 接通电源 当检测到自己的操作时进程改变PLC暂停 读取输入 图2.10 PLC的扫描周期

2.1.4梯形逻辑输入

PLC的输入很容易用梯形逻辑表示。在图2.11有三种输入类型。前两个是常开和常闭输入,之前讨论过。IIL(直接输入)功能在梯形逻辑被扫描时允许输入在扫描后被

读取。这允许梯形逻辑检查时输入值通常多于一次循环。

图2.11梯形逻辑图输入

2.1.5梯形逻辑输出

梯形逻辑有多种类型的输出,但这并不是在所有的PLC上都完全可行。一些输出用于连接PLC外部设备,但也可以使用PLC内部的内存位置。图2.12显示了六种类型的输出。第一个是常闭输出,当通电时输出将被打开,并开始工作。一个斜线通过圆圈是常开输出。当通电输出将关闭。这种类型的输出是并非在所有的PLC类型中出现。当电流刚通过OSR(一次点击继电器),指令将开始一次扫描,但在之后的扫描中将关闭,直到扫描结束。L(锁)和U(解锁)指令可以用来锁定输出。当一个L在通电时被使用

23

则输出将一直通电,即使输出线圈不再有电流。输出只能被U指令关闭。最后一个指令是IOT(立即输出),这个指令将允许输出随时更新,而不必等待梯形逻辑扫描完成。

3.1输入和输出

对输入和输出的状态检测是PLC必要的监测和控制过程。输入和输出都可以分为两类:逻辑或连续控制。举一个灯泡的例子,如果它只能打开或关闭,那么这是逻辑控制。如果灯的光线可以变暗到不同级别,那么它是连续控制。连续值似乎更直观,但逻辑值是首选,因为它们允许有更多的确定性,而且可以简化控制。

因此,大多数控制应用程序(和PLC)使用逻辑输入和输出。因此,我们将讨论逻辑输入/输出,而把连续输入/输出留在后面讲解。输出执行器允许PLC在进程中导致一些情况发生。一下是一些比较受欢迎的执行器,按受欢迎程度由高到低排序。电磁阀-逻辑输出,可以切换液压或气流。灯–逻辑输出,这个经常由PLC输出板直接控制。电动机起动器-电机在启动时往往需要很大的电流,因此它们需要一个电机启动器,它是基于大型的继电器。伺服电机-一个PLC的连续控制可以提供可变速度和位置控制。PLC的输出端通常是继电器,但它们也可以是固态电子产品,如晶体管或晶闸管直流输出的交流输出。连续输出需要特殊的输出卡与数模转换器。来自传感器的输入转换成电子信号的物理现象。

典型的传感器的例子按普及程度的高低顺序在下面列出:接近开关-使用电感,电容或光检测对象的逻辑。开关-机械地将打开或关闭电气接触的一个逻辑信号。电位-利用电阻连续的控制角位置。差动变压器(线性可变差动变压器)测量直线位移连续使用磁耦合。输入一个有几种基本类型,最简单的是交流和直流输入。源极和漏极输入也很受欢迎。这个输出方法决定了一个设备不提供任何电力。相反,该设备只控制电流接通或断开,就像一个简单的开关。漏极-输出被激活时允许电流流向同一个地方,这是在不同电压供电时最好的选择。源极-当被激活时,电流从电源流出,通过输出设备和地,这种方法最适合用于所有设备都使用单电源电压供电时。这也被称为NPN型和PNP型。PNP型更受欢迎。这将在传感器章节详细介绍。

3.1.1 PLC的输入

24

在小型PLC中,输入部分通常是内嵌的并在采购PLC时特别指定。对于较大的PLC,输入部分是以模块或卡的形式采购,每张卡有同型的8或16位输出。为了便于讨论,我们将讨论所有的输入部分都是用卡。下面的列表显示了典型的输入电压范围,大约是为了普及,PLC的输入卡很少供电,这意味着需要一个外部电源对输入元件和传感器供电。图3.1中的例子显示了如何连接到一个AC输入卡。

PLC24V交流常开按钮 输入卡 24V交流电源 常开温控开关 按钮 温控开关 注意:输入通常是高电阻的,这意味着他们将需要很小的电流

图3.1 AC输入卡和梯形逻辑

在这个例子中有两个输入,一个是常开按钮,第二个是一个温控开关,或热继电器。(注意:这些符号标准将稍后在这一章讨论。)这两个开关都由正极输出的24VAC电源供电 - 就像在一个直流电源正端。电力提供给这两个开关的左侧。当开关打开就没有电压传递到输入卡。如果任何一方的开关闭合,电源将供电给输入卡。在这种情况下输入1和3被使用——注意,输入从0开始。如果任一电源开关,将关闭提供给输入卡。

25

在这种情况下投入1和3是使用 - 通知,开始投入在0。输入卡比较这些电压的共同点。如果输入电压范围在给定的容差范围内,输入端开关将打开。梯形逻辑图中显示为输入。这里使用的艾伦布拉德利符号PLC-5。在输入卡位置的顶部:I:013表明,输入卡在01架第三个槽中。卡上的输入号码是显示在触点下面的01和03。

许多初学者会感到困惑,哪不知道在上述电路中里哪里需要连接。关键是要记住这是一个回路,这意味着有一个电压必须能够跟随的完整循环。在图3.2中我们可以开始研究电源供电的这个循环。这条路径通过开关,通过输入卡,并回到电源,回流到始点。在一个PLC的完整实现中将有许多回路,这些回路必须是完整独立的。

第二个重要的概念是公共端。在这里,零线的电源供应是就是公共端,或参考电压。实际上,我们选择了这个作为我们的0V参考电压,所有其他电压的测量都是相对于它。如果我们有第二个电源供电,我们还需要连接零线,使这两个零线连接在同一公共端。通常公共端和地容易被弄混。公共端是一个参考,或作为0V的基准电压,但地线是用于防止冲击和损害到设备的。地线连接到建筑物下的金属管道或大地。这是连接到建筑物中的电气系统,对电源插座,与电气设备的金属部分相连接。当电流通过大地时将电流消除。不幸的是,许多工程师,制造商混淆地线和公共端。经常可以看到一个供电装置的公共端和底线标识被表错。

最后一个使初学者陷入陷阱的概念是,每个输入卡是孤立的。这意味着,如果你将公共端连接到一个卡上,那么其他卡没有被连接。当发生这种情况时,其他卡将无法正常工作,您必须连接每个输出卡到公共端。

3.1.2 输出模块

正如输入模块,输出模块很少提供任何电力,而只是作为开关。外部电源连接到输出卡,而卡为每个输出控制电源的开关。典型的输出电压在下面列出,并按照普及程度的高低排序。 120 V交流 24 V直流 12-48 V交流 12-48 V直流

5V(TTL)直流TTL电路

26

230 V交流

这些卡通常有8至16个相同类型的输出,而且可以选择不同额定电流。在选购输出卡时的一个普遍选择是继电器,晶体管或晶闸管。继电器是最灵活的输出设备。它们有能力开关交流和直流输出。但是,他们会更慢(一般约10ms的切换时间),它们是笨重的,花费更多,而且在百万次循环后将损害。继电器输出通常被称为干触点。晶体管只能控制直流输出,而晶闸管仅限于交流输出。晶体管和晶闸管输出称为开关量输出。

干触点— 每个输出都分配一个独立的继电器。这允许电压混合(AC或DC的电压级别增大到最大值),同时可以隔离输出以保护其他输出和PLC。响应时间往往大于10毫秒。这种方法对电压变化最不敏感。

开关量输出 - 电压提供给PLC中的控制卡,控制卡使用固态电路(晶体管,晶闸管等)将其切换到不同输出,晶闸管适用于电流需求小于1A的交流设备。晶体管输出使用NPN型或PNP型通常电流高于1A。它们的响应时间大大低于1毫秒。

27

自动化制造系统与PLC论文中英文资料外文翻译文献.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c06dzc4scnb92i2p9mdig_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top