Programmable Logic Controllers versus Personal Computers for Process Control
Industrial Engineering Department
Manages,
ABSTRACT
It is proposed that Personal Computers (PCs) can be used effectively for the same industrial applications as Programmable Logic Controllers (PLC). The basic concepts related to the operation of a PLC to emulate the behavior of a relay panel are explained. This is used to build a simple model for using standard PCs in the same applications as PLC. This is demonstrated using a simple example of an automated process, Sample code in a standard high level language is presented that can be used as a template for future developments. Finally, the potential advantages and enhancements that can result in using PCs for process control are presented.
Keywords: Programmable Logic Controller, Personal Computer, Automation, Ladder Logic, Relay Panels
INTRODUCTION
Personal Computers (PC) can be used effectively for the same applications as Programmable Logic Controllers (PLC). A modem PLC is a computer-based device designed to control a process. It relates information coming from sensors that monitor the state of a process, with the status of some actuators that are capable of changing it. This relationship is established in most cases in Boolean logic. Typical sensors used in industrial applications include limit switches, proximity sensors, and other binary sensors. Actuators may include solenoids, motor starters, and other similar devices. Figure 1shows a simplified model of an industrial application where a PLC might be used.
Fig. 1: Model of Simple Process
RELAY PANELS
PLC wore designed to replace relay panels. These are custom made controllers dedicated to a particular application. They can be expensive for complex systems, cannot be easily reconfigured, and are difficult to troubleshoot, consume lots of energy, have a relatively moderate speed of operation, and have low reliability. Relay panels are not the most suitable alternative for a moderate to complex industrial application where flexibility, ease of maintenance and troubleshooting are very important. On the other hand, they are relatively low-tech and are easy to understand by electricians and non-engineering personnel.
The electrical control circuits of relay panels are generally drawn using so-called electric ladder diagrams. They differ slightly from conventional wiring diagrams in that they do not show the physical arrangement of the components, but emphasize the function of each circuit. They are a set of parallel circuits that in essence represent a hardwired program that controls the sequence of operations in a given process. Being electrical circuits in parallel gives the advantage of solving all the control logic simultaneously and practically instantaneously. Figure 2 represents an electric ladder diagram for a relay panel that can be used to control the process presented in fig. 1.
Fig. 2: Electric Ladder Diagram
PLC are typically computer-based, solid-state, single-processor devices that emulate the behavior of an electric ladder diagram. Since they are sequential machines, to emulate the workings of parallel circuits that respond instantaneously, PLC use an input/output image table and a scanning cycle.
An input/output image table is a memory structure that stores all the relevant information about the current scanning cycle. It can be subdivided in three basic parts: the input table, the output table, and the internal relay table, The current state of the inputs (sensors) is kept in the input table; the desired state of the outputs (actuators) is kept in the output table; and the state of the virtual control relays is kept in the internal relay table.
When a program is being nm in a PLC it is continuously executing a scanning cycle (fig. 3). The scanning cycle has two major parts (in an actual PLC it has other parts but two are relevant here for the sake of the discussion): the input/output scan, and the program scan. In the input/output scan the current state of the inputs is read from the input points and stored in the input table, and the desired state of the
Fig. 3: PLC Scanning Cycle
Outputs (from the output table) are sent to the output points. The program scan solves the Boolean logic that relates the information in the input table, with that in the output and internal relay tables. Also, the information in the output and internal relay tables is updated during the program scan. In a PLC this Boolean logic is typically represented in a graphical language that looks very much like the electrical circuit that it emulates. This language is known as ladder logic. In fig. 4 there is a ladder logic program that can be used to control the process in fig. 1. Note the similarities with the electric ladder diagram in fig. 2. The advantage of the PLC scanning cycle scheme is that it allows multiple princesses to be controlled concurrently as in a relay panel.
若图片无法显示请联系QQ752018766
Fig, 4: PLC Ladder Logic
PLC overcome all of the relay panel shortcomings and currently are the most widely used industrial automation controllers. At the time of their introduction they were very successful because their language, ladder logic, was based tm electric ladder diagrams engineers and electricians of the time were already familiar with. Nevertheless, PLC have some shortcomings of their own that are evident when compared with other available technology. Some of the most limiting ones include: them is no industry-standard hardware or software platform, they may limit the programmer as to the control actions and manipulations that can be made, and offer relatively low computing power for the money.
PERSONAL COMPUTERS
Another technology that could be used for the same purpose is the standard personal computer (PC). The PC is becoming increasingly popular for process control. A PC-based controller model is proposed here which could replace PLC in any industrial control application and would open up a world of possibilities in software development, standard components, and connectivity in general. This medal includes an industry-standard PC running any modem operating system, a set of standard input/output modules equivalent to those found in a typical PLC, and an application developed in any high level programming language which will implement a PLC scanning cycle.
A SIMPLE EXAMPLE
The proposed model will be presented through a sample program coded in Turbo Pascal~ for the control of the process shown in fig. 1. Assume that sensors are connected to the PC through input port hex address 3BD, and that actuators are connected to output port hen address 3BC, as shown in figs. 5 and 6 respectively.
若图片无法显示请联系QQ752018766
Fig. 5: Input Connections
若图片无法显示请联系QQ752018766
Fig. 6: Output Connections
The sample Pascal program is shown in fig. 7. The image tables: input, output, and internal relays, are implemented using Pascal Boolean variables. When any of these variables is TRUE, that represents an ON state; and whoa they are FALSE that represents an OFF state. When exchanging signals with the input and output points an ON State is represented by a logical "0" and an OFF state with a logical "1".
The main program is an emulation of the PLC scanning cycle presented in fig. 3. In this simplified example it is assumed that the PLC will be running its program until a key is pressed on the PC keyboard. Other device can be used if it is desired to use the PC keyboard for other more productive purpose.
The input/output scan is emulated using subroutine
I_ Oscan. There, the 8 bit input port (fig. 5) is read and the status of the individual bits stored in the input table. Also the status of the output points from the output table is written to the 8 bit output port (see fig. 6). The Program _Scan subroutine is a direct translation of the ladder diagram in fig. 4. For every rung in the ladder logic there is an if-then-else statement. The Initialize and Finalize subroutines worn added to handle the state of the output points and internal relays during the startup and shutdown of the PLC program
. 若图片无法显示请联系QQ752018766
Fig.7: Sample Pascal Program
It should be noted that this is a very simplified example whose purpose is to provide a framework for control program development on a PC combining the programming paradigms of standard procedural high-level languages with the familiar PLC ladder logic. Although it cannot be fully demonstrated in this paper, it provides a simple way of simultaneous control of parallel processes without considering the intricacies of a particular operating system. It demonstrates that complex custom software does not have to be created to make this technology work.
The proposed model would be very easy to adapt and implement even in-house because it can still use ladder logic, so no new technological skills are necessary. Any typical PLC instructions can be added to the model very easily, including timers, counters, one-shots, and so on. Other custom PLC instructions suited to a particular application can be included that use the features of high level languages, making it more powerful than standard PLC ladder logic.
ADVANTAGES OF PERSONAL COMPUTERS
The PC is a standard hardware/software platform. PCs improve at a rapid pace, become cheaper, and have mom power than PLC. Pentium systems widely available today outperform even the fastest margins of 20:1 or more. A new generation of PCs becomes available every six to nine months. By contrast new generation of PLC hardware becomes available every two to three years. PCs with at least 16Mbytes are commonplace, while PLC still has memory in the order of Kbytes. The PC supports more standard peripherals available from many vendors such as CD ROM drives, sound cards, voles recognition, networking facilities, and so on. At a very affordable prices. The PC is available worldwide, on short notice, from many vendors;
It has been envisioned that the next generation industrial controls should provide an open architecture and a single software development environment. The trend will be to move away from closed, proprietary systems due to the advantages an open architecture provides. It gives more flexibility since users do have to "marry" to a particular supplier. There is easier access to the latest technology since numerous independent developers are continuously advancing the functionality and ease of use of PC-compatible hardware and software. Also, it provides cost effectiveness because its large market ensures a competitive environment and economies of scale that drive prices to their lowest level.
The PC can provide a totally integrated solution that incorporates the functions of the PLC, the man-machine interface, and the programming terminal. It can provide process simulation/emulation so that complete software development can be done independent of the hardware. Also, it can provide sophisticated troubleshooting and diagnostic tools, providing in-depth analysis of the state of the machine, possible causes for malfunction, and recommended remedies. You can even run off-the-shelf Windows software for data analysis while the control system is running. Standard Windows data exchange methods can be readily applied to move information between the control system and the rest of the enterprise.
PCs for industrial control might be successful today for reasons analogous to those for the PLC at the time of their introduction; engineers today are well versed in computer programming and technology. Many sites already have significant PC programming expertise on hand. Also, the typical PC language paradigms lend themselves more readily to flowcharting techniques and languages of recent development for control programming, such as Sequential Function Charts.
Commercial-grade PCs are not normally designed to tolerate the shock, vibration, temperature, and electrical noise frequently found on the manufacturing floor~:1. Even though hardware that meets these environmental conditions is readily available as both PLC and PCs, this may increase the cost of implementing PC-based control. PCs may not be cost effective for applications with few I/O points (90% of the market). Very cheap PLC are available for that market. PCs are visualized as solutions for more complex systems with many I/O points and complex control strategies. PC-based input/output interfacing may be as expensive, and more difficult to implement than that for PLCs141. PLC are faster to restart after a power failure. They also have better ability to retain data so they are easier to restart they left 14
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>