You are on page 1of 6

1 |Page

INTRODUCTION TO PROGRAMMABLE
CONTROLLERS
Man is still the most extraordinary computer of all.
John F. Kennedy
21 May 1963
Muhammad Faisal
Department of Electrical Engineering, University of Gujrat
University of Gujrat, Hafiz Hayat Campus
07010622-072@uog.edu.pk

Abstract--Basically programmable logic controller was used to solve most recent revolution, the Programmable Logic Controller
our industrial problems. This is used to handle automation
industry. Due to low cost, that’s used widely in all places and (PLC). PLCs have been gaining popularity on the factory floor
industries. In this term paper we tell you about the programmable and will probably remain predominant for some time to come.
logic controller, what is this and where is used, types of PLC and
configuration of PLC. And a brief note on Historical Background
Most of this is because of the advantages they offer.
of PLC. In this paper, we describe the different languages of PLC.
Ladder Diagram is the basic idea, which told it, tells the format of • Cost effective for controlling complex systems.
Ladder diagram and elements of Ladder and the format of Ladder • Flexible and can be reapplied to control other
diagram with pictures. PLC have many advantages and systems quickly and easily.
disadvantages, but the advantages are more than its disadvantages, • Computational abilities allow more sophisticated
so here only describes the advantages and important of PLC. And control.
at the last of this term paper, we describe the conclusion. • Trouble shooting aids make programming easier
and reduce downtime.
Keywords—PLC-programmable logic controller, Automate- make • Reliable components make these likely to operate
routine, computerize, IEC- International Electrotechnical for years before failure.
Commission , NEMA- National Electrical Manufacturers
Association.
For example, let's assume that when a switch turns on
we want to turn a solenoid on for 5 seconds and then turn it off
INTRODUCTION
regardless of how long the switch is on for. We can do this with
A Programmable Logic Controller, PLC, or
a simple external timer. But what if the process included 10
Programmable Controller is a small computer used for
switches and solenoids? We would need 10 external timers.
automation of real-world processes, such as control of
What if the process also needed to count how many times the
machinery on factory assembly lines. The PLC usually uses a
switches individually turned on? We need a lot of external
microprocessor. The program can often control complex
counters.[2]
sequencing and is often written by engineers. The program is
DEFINITION
stored in battery-backed memory and/or EEPROMs. Unlike
Programmable logic controllers, also called
general-purpose computers, the PLC is packaged and designed
programmable controllers or PLCs, are solid-state members of
for extended temperature ranges, dirty or dusty conditions,
the computer family, using integrated circuits instead of
immunity to electrical noise, and is mechanically more rugged
electromechanical devices to implement control functions. They
and resistant to vibration and impact.[]
are capable of storing instructions, such as sequencing, timing,
A PLC is a device that was invented to replace the
counting, arithmetic, data manipulation, and communication, to
necessary sequential relay circuits for machine control. The PLC
control industrial machines and processes. Figure 1-1 illustrates
works by looking at its inputs and depending upon their state,
a conceptual diagram of a PLC application.[1][3]
turning on/off its outputs. The user enters a program, usually via
software, that gives the desired results.
Programmable Logic Controller (PLCs) is used in
many "real world" applications. If there is industry present,
chances are good that there is a PLC present. If you are involved
in machining, packaging, material handling, automated
assembly or countless other industries you are probably already
using them. If you are not, you are wasting money and time.
Almost any application that needs some type of electrical
control has a need for a plc.
The development of low cost computer has brought the
2 |Page

Process/
Machine 4. Work in difficult or hazardous environment
5. Increase productivity
6. Shorten the time to market
7. Lower the cost of quality, scrap and rework
8. Offer great product variety
Measu 9. Quickly change over from one product to another
Contr
10. Control inventory[3]

A HISTORICAL BACKGROUND
Programmable Early machines were controlled by mechanical means
Controller using cams, gears, levers and other basic mechanical devices. As
the complexity grew, so did the need for a more sophisticated
Field Fields control system. This system contained wired relay and switch
control elements. These elements were wired as required to
provide the control logic necessary for the particular type of
machine operation. This was acceptable for a machine that never
Figure 1-1. PLC conceptual application diagram
needed to be changed or modified, but as manufacturing
Programmable controllers have many definitions. However,
techniques improved and plant changeover to new products
PLCs can be thought of in simple terms as industrial computers
became more desirable and necessary, a more versatile means of
with specially designed architecture in both their central units
controlling this equipment had to be developed. The time period
(the PLC itself) and their interfacing circuitry to field devices
was the late 1960's and early 1970's and the result was the
(input/output connections to the real world).[1]
programmable logic controller, or PLC.[5]
In the 1960s and 1970s, electromechanical relays,
WHAT IS PROGRAMMABLE LOGIC CONTROLLERS timers, counters and sequencers are standard. Many control
(PLC)? panels contained hundreds of these electromechanical devices
Programmable Logic Controller is universally called, is and, in some cases, a mile or more of wire.[3]
the ‘work horse’ of industrial automation. A programmable The Hydromantic division of General motor was the
controller is an industrial computer in which control devices first to see the need for a device that would become what we
such as limit switches, push button, proximity or photoelectric know as the programmable logic controller. These devices must
sensors, float switches and pressure switches or to name a few, also be able to withstand the harsh industrial environment. Keep
provide incoming control signals into the unit. An incoming in mind that the first PLCs were little more than relay replacers.
control signal is called an input.[7] Automotive plants were confronted with a change in
Incoming Control Signals or inputs interact with manufacturing techniques every time a model changed and, in
instructions specified in the user program, which tells the PLC some cases, for changes on the same model if improvements had
how to react the incoming signals. The user program also directs to be made during the model year. The PLC provided an easy
the PLC on how to control filed devices like motor stator, pilot way to reprogram the wiring rather than actually rewiring the
lights and solenoids. A signals going out of the PLC to control a control system.[5.],[3],[1]
field device is called output.
A formal definition of PLC comes from the national
PLC CONFIGURATIONS
electrical manufacturers Association (NEMA): [A
Programmable controllers are much like personal
programmable controller is] a digitally operated electronic
computers in that the user can be overwhelmed by the vast array
system, design for use in industrial environment, which uses a
of options and configurations available. Also, like personal
programmable memory for internal storage of user oriented
computers, the best teacher of which one to select is experience.
instructions for implementing specific function such as logic
As one gains experience with the various options and
sequence, timing, counting and arithmetic to control, through
configurations available, it becomes less confusing to be able to
digital or analog inputs and outputs various types of machines or
select the unit that will best perform in a particular application.
processes. Both PLC and its associated peripherals are designed
Basic PLCs are available on a single printed circuit board as
so that they can be easily integrated into an industrial control
shown in Figure 2-1[5]
system and easily used in all their intended functions.[3],[5],[7]
They are sometimes called single board PLCs or open
frame PLCs. These are totally self contained (with the
WHY USE A PLC?
exception of a power supply) and, when installed in a system,
The question, “Why Use a PLC?” really should rephrased
they are simply mounted inside a controls cabinet on threaded
to, “Why Automate?” The PLC is the tools that allow us to
standoffs. Screw terminals on the printed circuit board allow for
control an automated process. What will automating a process
the connection of the input, output, and power supply wires.
do for a company? Automation will help a manufacturing
These units are generally not expandable, meaning that extra
facility to:[3]
inputs, outputs, and memory cannot be added to the basic unit.
1. Gain complete control of a manufacturing process
However, some of the more sophisticated models can be linked
2. Achieve consistency in manufacturing
by cable to expansion boards that can provide extra I/O.
3. Improve quality and accuracy
3 |Page

Therefore, with few exceptions, when using this type of PLC,


the system designer must take care to specify a unit that has
enough inputs, outputs, and programming capability to handle
both the present need of the system and any future modifications
that may be required. Single board PLCs are very inexpensive
(some less than $100), easy to program, small, and consume
little power, but, generally speaking, they do not have a large
number of inputs and outputs, and have a somewhat limited
instruction set. They are best suited to small, relatively simple
control applications.[5] Figure 9-1. PLC Ladder Circuit

The ladder languages available in PLCs can be divided into two


groups:
• Basic ladder language
• Enhanced ladder language
Sometimes, basic ladder instructions are referred to as
low-level language, while enhanced ladder functions are
referred to as high-level language.[1]
EXAMPLE
This Example consists of one input device and one
output device linked to the PLC controller output. Key is an
input device, and a bell is an output supplied through a relay 00
contact at the PLC controller output. Input 000.00 represents a
condition in executing an instruction over 010.00 bit. Pushing
Figure 2-1 - Open Frame PLC the key sets off a 000.00 bit and satisfies a condition for
(Triangle Research Inc., Pte. Ltd.)
activation of a 010.00 bit which in turn activates the bell. For
INTRODUCTION TO PROGRAMMING LANGUAGES correct program function another line of program is needed with
As PLCs have developed and expanded, programming END instruction, and this ends the program.
languages have developed with them. Programming languages
allow the user to enter a control program into a PLC using an BOOLEAN
established syntax. Today’s advanced languages have new,
more versatile instructions, which initiate control program
actions. For instance, PLCs can now transfer blocks of data from
one memory location to another while, at the same time,
performing a logic or arithmetic operation on another block. As
a result of these new, expanded instructions, control programs
can now handle data more easily.[1]

TYPES OF PLC LANGUAGES


The three types of programming languages used in PLCs are:
• Ladder
• Boolean
• Grafcet Some PLC manufacturers use Boolean language, also
called Boolean mnemonics, to program a controller. The
LADDER LANGUAGE Boolean language uses Boolean algebra syntax (see Chapter 3)
The programmable controller was developed for ease to enter and explain the control logic. That is, it uses the AND,
of programming using existing relay ladder symbols and OR, and NOT logic functions to implement the control circuits
expressions to represent the program logic needed to control the in the control program.[1]
machine or process. The resulting programming language, EXAMPLE
which used these original basic relay ladder symbols, was given
the name ladder language. Figure 9-1 illustrates a relay ladder AND OR and OR AND
logic circuit and the PLC ladder language representation of the Let us now complicate the circuitry somewhat.
same circuit.[1] Suppose that we add two more switches to the previous circuits
and configure the original switch, battery and light circuit as in
Figure 1-26.[5]
4 |Page

• It is possible to simultaneous activate-deactivate


several steps (AND divergence-convergence). Also it is
possible to select a step sequence in the case of the
processes with alternative execution (OR divergence-
convergence).[8]

Fig. 1-26 AND-OR LAMP Circuit

Notice that two switches have been added, SWITCH 3


and SWITCH 4. For this system to operate properly, the LAMP
needs to light if SWITCH 1 AND SWITCH 2 are both on, OR if
SWITCH 3 AND SWITCH 4 are both on. This circuit is called
an AND-OR circuit. The Boolean expression for this is
illustrated in Equation 1-3.[5]

Lamp3= (Switch1*Switch2) + (Switch3*Switch4) (1-3)

GRAFCET Fig. 1 Grafcet Flowchart


Grafcet (Graphe Fonctionnel de Commande Étape
Transition) is a symbolic, graphic language, which originated in LADDER DIAGRAM FORMAT
France that represents the control program as steps or stages in The ladder diagram language is a symbolic instruction set that is
the machine or process. In fact, the English translation of used to create PLC programs. The ladder instruction symbols
Grafcet means “step transition function charts.” As we will can be formatted to obtain the desired control logic, which is
discuss in Chapter 10, Grafcet is the foundation for the IEC
1131 standard’s sequential function charts (SFCs), which allow
several PLC languages to be used in one control program.[1]

The Basic Principle of GRAFCET


1. Sequences are subdivided into alternating
• Steps and
• Transitions. then entered into memory. Since this type of instruction set
2. Only one step is active at any given time. consists of contact symbols, it is also referred to as contact
3. Any desired number of actions can be linked to the symbology.[1]
steps. A thorough understanding of ladder diagram
4. Sequences can be branched out and merged back programming, including functional blocks, is extremely
together as beneficial, even when using a PLC with IEC 1131 programming
language capabilities. Because ladder diagrams are easy to use
• Alternative Branching and implement, they provide a powerful programming tool
• Parallel Branching. when used in the IEC 1131 environment.[1]
Step one must be observed in this case! The main functions of a ladder diagram program are to
EXAMPLE control outputs and perform functional operations based on
The basic elements of a Grafcet diagram are: input conditions. Ladder diagrams use rungs to accomplish this
• Initial steps -symbolize the initial active steps at the control. Figure 9-6 shows the basic structure of a ladder rung. In
beginning of the cycle after initialization or cold restart. general, a rung consists of a set of input conditions (represented
• Simple steps – represents a state represents a state of by contact instructions) and an output instruction at the end of
operation. A state often has an associated action. The the rung (represented by a coil symbol). The contact instructions
associated actions are performed when the steps is for a rung may be referred to as input conditions, rung
active. conditions, or the control logic.[1]
• Macro step - a collection of steps.
• Transition-allow the transfer from one step to another. ELEMENTS OF LADDER DIAGRAM
A transition conditions associated with this condition is The basic components in a ladder logic program are the
used to define the logic conditions necessary to cross contact and the coil. The contact is the main given to a general
this transition. input device-in can set by an external switch, an internally set
5 |Page

logic or timer function. The coil is the name given to a general unit can be easily replaced with a unit having greater memory
output device- and is used to drive motors, normally open and and I/O capacity, and the old hardware can be reused for a
normally closed.[7 smaller application. A PLC system provides many benefits to
CONTACTS control solutions, from reliability and repeatability to
Contacts are the input devices in a ladder logic programmability. The benefits achieved with programmable
diagram. They are open and closed by an externally applied controllers will grow with the individual using them—the more
signal (usually represented by X), internal timer (labeled T), you learn about PLCs, the more you will be able to solve other
counter (labeled C), or internal logical flag (M and S). As shown control problems.
in the table contacts are available in two forms- normally open Without question, the “programmable” feature provides
and normally closed.[7] the single greatest benefit for the use and installation of
programmable controllers. Eliminating hardwired control in
favor of programmable control is the first step towards
achieving a flexible control system. Once installed, the control
plan can be manually or automatically altered to meet day-to-
day control requirements without changing the field wiring. This
easy alteration is possible since there are no physical
connections between the field input devices and output devices
(see Figure 1-18), as in hardwired systems. The only connection
COILS is through the control program, which can be easily altered.
Coils are the output devices in a ladder diagram. They The hardware features of programmable controllers
are used to operate external devices, and internal timers, provide similar flexibility and cost savings. An intelligent CPU
counters and flags. Some manufactures include coils that allow is capable of communicating with other intelligent devices. This
special operations to be performed which extend the capability capability allows the controller to be integrated into local or
of the PLC beyond that which can be obtained with simple coils plantwide control schemes. With such a control configuration,
and contacts. The following instructions are a selection of the PLC can send useful English messages regarding the controlled
extra features that can be operated using the special coil feature system to an intelligent display.[5],[4]
from one manufacturer (Mitsubusi).[7]
CONCLUSIONS

Master Control (MC) and Master Reset (MCR) • A computer is optimized for calculation and
A master control block is a set of ladder program that display tasks.
are executed when an input device is activated. The end of a • A computer is programmed by specialists
master control block is marked by the master reset instructions. • A PLC is designed for (logic) control and
It is the ladder logic equivalent of a subroutine or procedure is a regulation tasks.
conventional programming language.[7]
• A PLC is programmed by non-specialists.
Set (SET) and Reset (RST) Devices • A PLC is well adapted to industrial environment.
These instructions are used to permanently set or reset • They are cost-effective.
an output device when a designated input is set. The output • They are flexible, reliable and compact.
device holds the given value even of the input value changed.[7] • They have significant advantages over traditional
control systems based on relay or pneumatics.
Reset (RST) Timer AND OR Counter • PLC’s are widely available and used in several, in
This instruction resets a designated counter or timer. fact almost all automated processes.
Any output device set by the timer will also be reset.[7] – Aerospace
– Automotive Industry
– Entertainment
Pulse Rising Edge (PLS) and Pulse Falling Edge (PEE) – Petroleum Industry
This instructions sets a designated output device for – Food, Beverage, and Packaging
one cycle when either a rising (PLS) or falling edge (PEE) is
detected from an input device.[7] • The logic control tasks such as interlocking,
Using the basic elements described here it is possible to build sequencing, timing and counting (previously
very complex logical sequences. [7] undertaken with relays or pneumatics) etc…
• In addition, PLCs can perform a variety of
ADVANTAGES OF PLCs
calculation, communication and monitoring tasks
In general, PLC architecture is modular and flexible,
etc…
allowing hardware and software elements to expand as the
application requirements change. In the event that an application • Programmable logic controller and their unique
outgrows the limitations of the programmable controller, the language.
6 |Page

• The ability to communicate with other controllers


or the main computer facilitates its roll in the large
automation systems using discrete, small size
controllers. [2],[3],[1]

REFERENCES

[1]”Programmable Controllers Theory and Implementation (Second


Edition) Written By L.A. Bryan”
[2]Automating Manufacturing Systems with PLCs (Version 5.0, May 4,
2007) Written By Hugh Jack
[3]Introduction To Programmable Logic Controllers (Second Edition)
written By Gary Dunning
[4]Programmable Controllers An engineer’s guide written by E.A. Parr,
MSc, CEng, MIEE, MInstMC
[5]Programmable Logic Controllers: Programming Methods and
Applications by John R. Hackworth And Frederick D. Hackworth, Jr.
[6]Kelvin Erickson. Programmable logic controllers term papaer
[7]Programmable Logic Control written by James Vernon: control
systems principles.co.uk
[8]Graphic Programming of Programmable Logic Controller Case Study
for a Punching Machine written by Vasile MARINESCU
[9] A Graphical Interface Based On Grafcet For
Programming Industrial Robots Off-Line written by GUSTAVO V.
ARNOLD_, PEDRO R. HENRIQUES

You might also like