Friday, January 28, 2011

PLC Automation Trainer


PLC Automation Trainer
This program compares some types normally PLC. My per pose is help someone who work in a plan and he hasn’t time to research. So he can change this program from this type PLC to another type.

Closed Loop and PID Control


Closed Loop and PID Control
Introduction
One of the greatest strengths of using a programmable machine control, such as a PLC, is in its capability to adapt to changing conditions. When properly designed and programmed, a machine control system is able to sense that a machine is not operating at the desired or optimum conditions and can automatically make adjustments to the machines operating parameters so that the desired performance is maintained, even when the surrounding conditions are less than ideal. In this chapter we will discuss various methods of controlling a closed loop system and the advantages and disadvantages of each
Simple Closed Loop Systems
When a control system is designed such that it receives operating information from the machine and makes adjustments to the machine sed on this operating information, the system is said to be a closed-loop system, as shown in Figure 10-1. The operating information that the controller receives from the machine is called the process variable (PV) or feedback, and the input from the operator that tells the controller the desired operating point is called the set point (SP). When operating, the controller determines whether the machine needs adjustment by comparing (by subtraction) the set point and the process variable to produce a difference (the difference is called the error), The error is amplified by a proportional gain1 factor kp in the proportional gain amplifier (sometimes called the error amplifier). The output of the proportional gain amplifier is the control variable (CV) which is connected to the controlling input of the machine. The controller takes appropriate action to modify the machines operating point until the control variable and the set point are very nearly equal. It is important to recognize that some closed loop systems do not need to be completely proportional (or analog). They can be partially discrete. For example, the thermostat that controls the heating system in a home is a discrete output device; that is, it provides an output that either switches the heater fully on or completely off. The set point for the system is the temperature dial that the homeowner can adjust, and the process variable is the room temperature. If the PV is lower than the SP, the thermostat switches on the CV, in this case a discrete on signal that switches on the heater. The system adapts to external conditions; that is on warm days when the house is comfortable, the thermostat keeps the heater off, and on very cold days, the thermostat operates the heater more often and for longer periods of time. The result is that, despite the changing outdoor temperature, the indoor temperature remains relatively constant. Some closed loop control systems are totally proportional. Consider, for example, the automobile cruise control. The operator programs the system by setting the desired vehicle speed (the SP). The controller then compares this value to the actual speed of the vehicle (the PV), and produces a CV. In this case, the CV results in the accelerator pedal being adjusted so that the vehicle speed is either increased or decreased as needed to maintain a nearly constant speed that is near the SP, even if the auto is climbing or descending hills. The CV signal that controls the accelerator pedal is not discrete, nor would we want it to be. In this application, having a discrete CV signal would result in some very abrupt speed corrections and an uncomfortable ride for the passengers. When a digital control device (such as a PLC) is used in a control system, the closed loop system may be partially or totally digital. In this case, it still functions as a proportional system, but instead of the signals being voltages or currents, they are digital bytes or words. The error signal is simply the result of digitally subtracting the SP value from the PV value, which is then multiplied by the proportional gain constant kp. Although the end result can be the same, there are some inherent advantages in using a totally digital system. First, since all numerical processing is done digitally by a microprocessor, the calibration of the fully digital control system will never drift with temperature or over time.
Second, since a microprocessor is present, it is relatively easy to have it perform more sophisticated mathematical functions on the signals such a digital filtering (called digital signal processing, discrete signal processing, or DSP), averaging, numerical integration, and numerical differentiation. As we will see in this chapter, performing advanced mathematical functions on the closed loop signals can vastly improve a systems response, accuracy and stability. Whenever the closed loop control is performed by a PLC, the actual control calculations are generally performed by a separate coprocessor so that the main processor can be freed to solve the ladder program at high speed. Otherwise, adding closed loop control to a working PLC would drastically slow the PLC scan rate.

Mnemonic Programming Code – Introduction


Mnemonic Programming Code – Introduction
Introduction
All discussions in previous sections have considered only the ladder diagram in all program example development. The next thing to be considered is how to get the ladder diagram into the programmable controller. In higher order controllers, this can be accomplished through the use of dedicated personal computer software that allows the programmer to enter the ladder diagram as drawn. The software then takes care of translating the ladder diagram into the code required by the controller. In the lower order, more basic controllers, this has to be performed by the programmer and entered by hand into the controller. It is this type of language and the procedure for translating the ladder diagram into the required code that will be discussed in this chapter.
This will be accomplished by retracing the examples and ladder diagrams developed in earlier chapters and translating them into the mnemonic code required to program a general controller.
This controller will be programmed in a somewhat generic type of code. As the code is learned, comparisons will be presented with similar types of statements found in controller use. The student will have only to adapt to the statements required by the type of controller being used to develop a program for that controller.

Handling Normally Closed Contacts


Handling Normally Closed Contacts
The complete command listing for this ladder rung including termination commands is:
LD IN1 ENTER
AND IN2 ENTER
STO OUT1 ENTER
The commands may be entered using a hand-held programmer, dedicated desktop programmer or a computer containing software that will allow it to operate as a programming device. Each controller command line contains (1) a command, (2) the object of the command and (3) a terminator (the ENTER key). In the case of the first line, LD is the command, IN1 is the object of the command and the ENTER key is the terminator.
Each line of code will typically consume one word of memory, although some of the more complicated commands will consume more than one word. Examples of commands that may consume more than one word of memory are math functions and timers, which will be discussed later.
To indicate a normally closed contact to the PLC, the term NOT is associated with the contact number. This may take different forms in different controllers depending on the program method used by the manufacturer. Using the same form as in the previous example, the command lines for this rung would appear as follows:
LD NOT IN1 ENTER
AND IN2 ENTER
STO OUT1 ENTER
As stated above, different PLC’s may use different commands to perform some functions. or instance, the Mitsubishi PLC uses the command LDI (LD INVERSE) instead of LD OT. This requires a single keystroke instead of two keystrokes to input the same command.
If the normally closed contact had been IN2 instead of IN1, the command lines would have to be modified as follows:
LD IN1 ENTER
AND NOT IN2 ENTER
STO OUT1 ENTER
If using the Mitsubishi PLC, the AND NOT command would be replaced with the ANI (AND INVERSE) command.

PLC Input cards

PLC Input cards
Internally a computer usually operates at 5 V DC. The external devices (solenoids, motor starters, limit switches, etc.) operate at voltages up to 110 V AC. The mixing of these two voltages will cause severe and possibly irreparable damage to the PLC electronics. Less obvious problems can occur from electrical noise introduced into the PLC from voltage spikes on signal lines, or from load currents flowing in AC neutral or DC return lines. Differences in earth potential between the
PLC cubicle and outside plant can also cause problems.
The question of noise is discussed, but there are obviously very good reasons for separating the plant supplies from the
PLC supplies with some form of electrical barrier. This ensures that the PLC cannot be adversely affected by anything happening on the plant. Even a cable fault putting 415 V AC onto a DC input would only damage the input card; the PLC itself (and the other cards in the system) would not suffer.
This is achieved by optical isolators, a light-emitting diode and photo-electric transistor linked together.
Protection of the PLC from outside faults. The PLC supply L1/N1 is separate from the plant supply L2/N2
switch on. Because there are no electrical connections between the diode
and the transistor, very good electrical isolation (typically 14kV) is achieved.
A DC input can be provided. When the push-button is pressed, current will flow through D1, causing TR1 to turn on,
passing the signal to the PLC internal logic. Diode D2 is a light-emitting diode used as a fault-finding aid to show when the input signal is present. Such indicators are present on almost all PLC input and output cards.
The resistor R sets the voltage range of the input. DC input cards are usually available for three voltage ranges: 5V (TTL), 1224V, 2450V.
A possible AC input circuit. The bridge rectifier is used to convert the AC to full wave rectified DC. Resistor R2 and capacitor C1 act as a filter (of about 50ms time constant) to give a clean signal to the PLC logic. As before, a neon LP1 acts as an input signal indicator for fault finding, and resistor R1 sets the voltage range. The isolation barrier and monitoring LEDs can be clearly seen. This card handles eight inputs and could be connected to the outside world.

PLC Output connections

PLC Output connections
Output cards again require some form of isolation barrier to limit damage from the inevitable plant faults and also to stop electrical noise corrupting the processor operations. Interference can be more of a problem on outputs because higher currents are being controlled by Computers and industrial
Computers and industrial control 25 the cards and the loads themselves are often inductive (e.g. solenoid and relay coils). There are two basic types of output card. Eight outputs are fed from a common supply, which originates local to the PLC cubicle (but separate from the supply to the PLC itself). This arrangement is the simplest and the cheapest to install. Each output has its own individual fuse protection on the card and a common circuit breaker. It is important to design the system so that a fault, say, on load 3 blows the fuse FS3 but does not trip the supply to the whole card, shutting down every output. This topic, called discrimination, is discussed further in Chapter 8. A PLC frequently has to drive outputs which have their own individual supplies.
A typical example is a motor control centre (MCC) where each starter has a separate internal 110-V supply derived from the 415-V bars. The card arrangement could not be used here without separate interposing relays (driven by the PLC with contacts into the MCC circuit). An isolated output card, has individual out-puts and protection and acts purely as a switch. This can be connected directly with any outside circuit. The disadvantage is that the card is more complicated (two connections per output) and safety becomes more involved. An eight-way isolated output card, for example, could have voltage on its terminals from eight different locations.
Relay outputs can be used (and do give the required isolation) but are not particularly common. A relay is an electromagnetic device with moving parts and hence a finite limited life. A purely electronic device will have greater reliability. Less obviously, though, a relay-driven inductive load can generate troublesome interference and lead to early contact failure. Optical isolation is again used to give the necessary separation between the plant and the PLC system. Diode D1 acts as a spike suppression diode to reduce the voltage spike encountered with inductive loads. The output state can be observed on LED1. If NPN transistors are used, a current sinking card can be made. AC output cards invariably use triacs, a typical circuit being. Triacs have the advantage that they turn off at zero current in the load, which eliminates the interference as an inductive load is turned off. If possible, all AC loads should be driven from triacs rather than relays
An output card will have a limit to the current it can supply, usually set by the printed circuit board tracks rather than the output devices. An individual output current will be set for each output and a total overall output. Usually the total allowed for the card current is lower than the sum of the allowed individual outputs.

PLC – Remote I/O


PLC – Remote I/O
So far we have assumed that a PLC consists of a processor unit an data collection of I/O cards mounted in local racks. Early PLCs did tend to be arranged like this, but in a large and scattered plant with this arrangement ,all signals have to be brought back to some central point inexpensive multi core cables. It will also make commissioning and faultfinding rather difficult, as signals can only be monitored effectively data point possibly some distance from the device being tested. In all bar the smallest and cheapest systems, PLC manufacturers therefore provide the ability to mount I/O racks remote from the processor, and link these racks with simple (and cheap) screened single pair or fiber optic cable. Racks can then be mounted up to several kilometers away from the processor.

There are many benefits from this. It obviously reduces cable costs as racks can be laid out local to the plant devices and only short multi core cable runs are needed. The long runs will only need the communication cables (which are cheap and only have a few cores to terminate at each end) and hardwire safety signals. Less obviously, remote I/O allows complete units to be built, wired to a built-in rack, and tested offsite prior to delivery and installation. The pulpit in Figure contains three remote racks, and connects to the controlling PLC mounted in a substation about 500m away, via a remote I/O cable, plus a few power supplies and hardwire safety signals.
This allowed the pulpit to be built and tested before it arrived on site. Similar ideas can be applied to any plant with I/O that needs to be connected to a PLC. If remote I/O is used, provision should be made for a program terminal to be connected local to each rack. It negates most of the benefits if the designer can only monitor the operation from a central control room several hundred meters from the plant. Fortunately, manufacturers have recognized this and most allow programming terminals to be connected to the processor via similar screened twin cable.

Thursday, January 27, 2011

The advantages of PLC control


The advantages of PLC control
Any control system goes through four stages from conception to a working plant. A PLC system brings advantages at each stage. The first stage is design; the required plant is studied and the control strategies decided. With conventional systems design must be complete before construction can start. With a PLC system all that is needed is a possibly vague idea of the size of the machine and the I/O requirements (how many inputs and outputs).
The input and output cards are cheap at this stage, so a healthy spare capacity can be built in to allow for the inevitable omissions and future developments. Next comes construction. With conventional schemes, every job is a one-off with inevitable delays and costs. A PLC system is simply bolted together from standard parts. During this time the writing of the PLC program is started (or at least the detailed program specification is written).The next stage is installation, a tedious and expensive business as sensors, actuators, limit switches and operator controls are cabled. A distributed PLC system (discussed in Chapter 5) using serial links and pre-built and tested desks can simplify installation and bring huge cost benefits. The majority of the PLC program is written at this stage.
Finally comes commissioning, and this is where the real advantages are found. No plant ever works first time. Human nature being what it is, there will be some oversights. Changes to conventional systems are time consuming and expensive. Provided the designer of the PLC system has built in spare memory capacity, spare I/O and a few spare cores in multi core cables, most changes can be made quickly and relatively cheaply. An added bonus is that all changes are recorded in the PLC program and commissioning modifications do not go unrecorded, as is often the case in conventional systems.
There is an additional fifth stage, maintenance, which starts once the plant is working and is handed over to production. All plants have faults, and most tend to spend the majority of their time in some form of failure mode. A PLC system provides a very powerful tool for assisting with fault diagnosis. A plant is also subject to many changes during its life to speed production, to ease breakdowns or because of changes in its requirements .A PLC system can be changed so easily that modifications are simple and the PLC program will automatically document the changes that have been made.

The inputs are read into an input mimic area at the start of the scan, and the outputs updated from the output mimic area at the end of the scan. There will be an area of memory reserved for internal signals which are used by the program but are not connected directly to the outside world (timers, counters, storage bits, e.g. fault signals, and so on). These three areas are often referred to as the data table (Allen Bradley) or the database (ASEA/ABB).
This data area is smaller than may be at first thought. A medium-size PLC system will have around 1000 inputs and outputs. Stored as individual bits this corresponds to just over 60 storage locations in a PLC with a 16-bit word. An analog value read from the plant or written to the plant will take one word. Timers and counters take two words (one for the value, and one for the preset) and 16 internal storage bits take just one word. The majority of the store, therefore, is taken up by the fourth area, the program itself.

The PLC program scan


The PLC program scan
A PLC program can be considered to behave as a permanent running loop similar to that in Figure (a). The users instructions are obeyed sequentially, and when the last instruction has been obeyed the operation starts again at the first instruction. A PLC does not, therefore, communicate continuously with the outside world, but acts, rather, by taking ˜snapshots.
The action of Figure (a) is called a program scan, and the period of the loop is called the program scan time. This depends on the size of the PLC program and the speed of the processor, but is typically 2“5ms per K of program. Average scan times are usually around 10“50 ms. Figure (a) can be expanded to Figure (b). The PLC does not read inputs as needed (as implied by Figure (a)) as this would be wasteful of time. At the start of the scan it reads the state of all the connected inputs and stores their state in the PLC memory. When the PLC program accesses an input, it reads the input state as it was at the start of the current program scan. As the PLC program is obeyed through the scan, it again does not change outputs instantly. An area of the PLCs memory corresponding to the outputs is changed by the program, then all the outputs are updated simultaneously at the end of the scan. The action is thus: read inputs, scan program, update outputs. The PLC memory can be considered to consist of four areas as shown in Figure (c).

PLC Racks, cards and signals


PLC Racks, cards and signals
The PLC program is concerned with connections to the outside plant, and the input and output devices need to be identified inside the program. Before we can examine how the program is written we will first discuss how various manufacturers treat the I/O.
A medium-sized PLC system consists of several racks, each containing cards, with each card interfacing generally to 8, 16or 32 devices. I/O addressing is usually based on this rack/card/bit idea.

Allen Bradley PLC-5
The Allen Bradley PLC-5 can have up to eight racks in its 5/25 version. The rack containing the processor is automatically defined as rack 0,but the designer can allocate addresses of the other racks (in the range1“7) by set-up switches. The racks other than rack 0 connect to the processor via a remote I/O serial communications cable. There are three different ways in which an Allen Bradley rack can be configured, but we shall discuss the simplest (and possibly the most logical)method.
Each rack contains 16 card positions which are grouped in pairs called a ˜slot” A rack thus contains eight slots, numbered 0“7. A slot can contain one 16-way input card and one 16-way output card or two eight way cards usually (but not necessarily) of the same type. For example, slot 1 contains a 16-way input card and 16-way output card, and slot 2 contains two eight-way output cards.
The addressing for inputs is
I:Rack Slot/Bit with Bit being two digits. Allen Bradley use octal addressing for bits, so allowable numbers are 00“07 and 10“17. The address I:27/14is input 14 on slot 7 in rack 2. Outputs are addressed in a similar manner:
O:Rack Slot/Bits O:35/06 is output 6 in slot 5 of rack 2. Note that if 16-way cards are used, an input and an output can have the same rack/slot/bit address, being distinguished only by the I: or the O:. With eight-way cards there can be no sharing of rack/slot/bit addressing. Figure 1.12 earlier showed the addressing of several signals.

Siemens SIMATIC S5
The digital I/O in Siemens PLCs is arranged into groups of 8 bits, called a byte . A signal is identified by its bit number (0“7) and its byte number (127). Inputs are denoted I. and outputs by Q. . I9.4 is thus an input with bit address 4 in byte 9, and Q63.6 is an output with bit address 6 in byte 63.Like Allen Bradley, Siemens use card slots in one or more racks. The cards are available in 16-bit (2-byte) or 32-bit (4-byte) form.
 A system can be built with local racks connected via a parallel bus cable or as remote racks with a serial link. Local racks are faster and overcome some of the scan problems associated with serially connected remote racks in high-speed applications, but are, literally, local. They can be no more than a few meters from the processor. The simplest form of addressing is fixed slot. Four bytes are assigned sequentially to each slot; 3 to the first slot,4“7 to the next slot and so on. Input 12.4 is thus input bit 4 on the first byte of the card in slot 3 of the first rack. If 16-bit (2-byte) cards are used with fixed (4-byte) addressing, the upper 2 bytes in each slot are lost. In all bar the simplest system the user has the ability to assign byte addresses. This is known as variable slot addressing.
The first byte address and the range (2 byte for 16-bit cards or 4 byte for 32-bit cards) can be set independently for each slot by switches in the adaptor module in each rack. Although any legitimate combination can be set up, it is recommended that a logical order is used similar. Siemens use different notations in different countries with multilingual programming terminals. A common European standard is German, where E (for Eingang or input) is used for inputs (e.g. E4.7) and A (for Ausgang) is used for outputs (e.g. A3.5).
www.plctraininginchennai.com

PLC Tutorial

PLC - Programmable Logic Controller

The automation of many different processes, such as controlling machines or factory assembly lines, is done through the use of small computers called a programmable logic controllers (PLCs). This is actually a control device that consists of a programmable microprocessor, and is programmed using a specialized computer language. A modern programmable logic controller is usually programmed in any one of several languages, ranging from ladder logic to Basic or C. Typically, the program is written in a development environment on a computer, and then is downloaded onto the programmable logic controller directly through a cable connection. The program is stored in the programmable logic controller in non-volatile memory
Programmable logic controllers typically contain a variable number of input/output (I/O) ports, and are usually Reduced Instruction Set Computer (RISC) based. They are designed for real-time use, and often must withstand harsh environments on the shop floor. The programmable logic controller circuitry monitors the status of multiple sensor inputs, which control output actuators, which may be things like motor starters, solenoids, lights and displays, or valves.

This controller has made a significant contribution to factory automation. Earlier automation systems had to use thousands of individual relays and cam timers. In many cases, a PLC allows all of the relays and timers within a factory system to be replaced with a single controller. Today, programmable logic controllers deliver a wide range of functionality, including basic relay control, motion control, process control, and complex networking, as well as being used in distributed control systems (DCS).

Digital signals yield an on or off signal, which the programmable logic controller sees as Boolean values, those with only two states: true or false. Analog signals may also be used, such as those from devices like volume controls, and these analog signals can be seen by the programmable logic controller as floating point values. This is one way in which a computer can represent a rational number, but can be imprecise
There are several different types of interfaces that are used when people need to interact with the programmable logic controller to configure it or work with it. It might be configured with simple lights or switches, or a text display. More complex systems might use a web interface on a computer running a supervisory control and data acquisition (SCADA) system.




Examples of plc programming applications that have been successfully completed and are in use today.
• Manufacturing Industry
- Lead acid battery plant, complete manufacturing system
- Extruder factory, silo feeding control system
• Travel Industry
- Escalator operation, monitored safety control system
- Lift operation, monitored safety control system
• Aerospace
- Water tank quenching system
• Printing Industry
- Offset web press print register control system
- Multi stage screen washing system
• Food Industry
- Filling machine control system
- Main factory feed water pump duty changeover system
• Textile Industry
- Industrial batch washing machine control system
- Closed loop textile shrinkage system
• Hospitals
- Coal fired boiler fan change-over system
• Film Industry
- Servo axis controlled camera positioning system
• Corrugating
- Main corrugators machine control system
- BOBST platten press drive and control system
• Plastics Industry
- Extruder factory, silo feeding control system
- Injection moulding control system
• Agriculture
- Glasshouse heating, ventilation & watering system
• Foundry
- Overhead transportation system from casting process to shot blasting machine
• Leisure
- Roller coaster ride and effects control system
- Greyhound track 'Rabbit' drive system