23-05-2012, 01:49 PM
PROGRAMMABLE LOGIC CONTROLLERS
PROGRAMMABLE LOGIC CONTROLLERS.pdf (Size: 220.83 KB / Downloads: 103)
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 the 1970s, 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.
Ladder Logic
Ladder logic is the main programming method used for PLCs. 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 tradespeople 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. When a voltage is
Topics:
Objectives:
• Know general PLC issues
• To be able to write simple ladder logic programs
• Understand the operation of a PLC
• PLC History
• Ladder Logic and Relays
• PLC Programming
• PLC Operation
• An Example
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).
Programming
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 6. 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.
Ladder Logic Inputs
PLC inputs are easily represented in ladder logic. In Figure 12 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.
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 13. 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.