Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

A

Practical Training Report

On

“PLC-SCADA”
Submitted in partial fulfilment for the award of the degree of

BACHELOR OF TECHNOLOGY
In
ELECTRONICS & COMMUNICATION ENGINEERING

2010-2011

(Period of Training)

Submitted To: Submitted By:

Prof. D.K. Parihar Karan Bhasin

Head 07EAREC049

ECE Department B.Tech. IV Yr. VII


Sem.

DEPARTMENT OF ELECTRONICS & COMMUNICATION


ENGINEERING

ARYA COLLEGE OF ENGINEERING & I.T.

SP-42, RIICO INDUSTRIAL AREA, KUKAS, JAIPUR, RAJASTHAN

RAJASTHAN TECHNICAL UNIVERSITY, KOTA

1
2
Department of Electronics & Communication Engineering

CERTIFICATE

This is to certify that the practical training seminar report on “PLC-SCADA” at


“ Arya College Of Engg. & I.T.” from 14/04/2010 to 14/05/2010 is submitted
by “ Karan Bhasin” in partial fulfillment for the award of degree of Bachelor of
Technology in Electronics & Communication Engineering has been found
satisfactory and is approved for submission.

Er. ……………….. ER.

(Seminar Coordinator) (Seminar


Coordinate)

Assistant Professor Assistant Professor

ECE Deptt. ECE Deptt.

Prof. D.K. Parihar


(Head)
ECE Department

INDEX

3
Chapter No. Topics Page No.

Abstract 2

Training on PLC-SCADA 3

1 Automation 4

1.1 overview 5

1.2 main body of automation 7

1.3 components used in automation 7

2 History of PLC 8

2.1 Origin 8

2.2 Development 8

2.3 Programming 9

2.4 Benefits of programmable controllers 9

2.5 Programming languages 11

3 Introduction to PLC 13

3.1 Programmable logic controller 13

3.2 Basic PLC operation 13

3.3 Terms in PLC 14

3.4 Advantages of PLC 15

4 PLC Architecture 16

4.1 The parts of a Programmable controller 16

5 System Overview 21

6 Hardware configuration 23

4
6.1 Microcontroller 23

6.2 Memory 23

6.3 Programmable Peripheral Interface 24

6.4 Analog to Digital converter 25

6.5 Digital to Analog converter 26

6.6 Serial communication 26

6.7 Switches & Indicators 26

6.8 Digital input 27

6.9 Digital output 27

7 Addresses 29

7.1 AC output 29

7.2 DC output 29

7.3 AC input 30

7.4 DC input 30

7.5 Analog input 31

7.6 Counters/timers 32

3. System Overview. 12

4. Hardware Configuration 14

5. Addresses 19

6. Software Description. 22

5
1.1 Writing a Program.
1.2 Method of Representation.
1.3 Operand Areas
1.4 Statement List(STL) Programming
Language.

7. Syntax for Program 29

8. How to Use PLC. 30

9. Scope of Future Expansion. 34

10. Applications of PLC. 35

BIBLIOGRAPHY 38

APPENDIX A Automatic Mixing System. 39

APPENDIX B Assembly Language Program. 44

6
ABSTRACT

Automation is now often applied primarily to increase quality in the manufacturing


process, where it can increase quality substantially. The old focus on using automation
simply to increase productivity and reduce costs was seen to be short-sighted, because it is
also necessary to provide a skilled workforce who can make repairs and manage the
machinery. Moreover, the initial costs of automation were high and often could not be
recovered. By the time entirely new manufacturing processes replaced the old, SCADA
(Supervisory Control and Data Acquisition) systems are at the heart of the modern industrial
enterprise/automation systems ranging from mining plants, water and electrical utility
installations to oil and gas plants. SCADA systems are an extremely advantageous way to run
and monitor processes. They are great for small applications such as climate control or can be
effectively used in large applications such as monitoring and controlling a nuclear power
plant or mass transit system. . It also has sensors placed in proximity to where the action is. A
programmable logic controller (PLC) is a special data processor used as controller for
machines in industrial processes. As a part of process control, a programmable logic
controller is used to monitor input signals from a variety of input points which report events
and conditions occurring in a controlled process. During the execution of a stored control
program, they read inputs from the controlled process and, per the logic of the control
program, provide outputs to the controlled process.

7
TRAINING ON PLC SCADA

INTRODUCTION:-
Simplification of engineering and precise control of manufacturing process can result in
significant cost savings. The most cost-effective way, which can pay big dividends in the
long run, is flexible automation; a planned approach towards integrated control systems. It
requires a conscious effort on the part of plant managers to identify areas where automation
can result in better deployment/utilization of human resources and savings in man-hours,
down time. Automation need not be high ended and too sophisticated; it is the phased, step-
by-step effort to automate, employing control systems tailored to one’s specific requirements
that achieves the most attractive results. That is where Industrial electronics has been a break
through in the field of automation and control techniques

8
CHAPTER 1
AUTOMATION

(1.1) AUTOMATION : AN OVERVIEW


.
 Industrial automation or numerical control is the use of control systems such as
computers to control industrial machinery and processes, reducing the need for human
intervention. In the scope of industrialization, automation is a step beyond
mechanization. Whereas mechanization provided human operators with machinery to
assist them with the physical requirements of work, automation greatly reduces the
need for human sensory and mental requirements as well. Processes and systems can
also be automated.
.
 Automation plays an increasingly important role in the global economy and in daily
experience. Engineers strive to combine automated devices with mathematical and
organizational tools to create complex systems for a rapidly expanding range of
applications and human activities. Many roles for humans in industrial processes
presently lie beyond the scope of automation. Human-level pattern recognition,
language recognition, and language production ability are well beyond the capabilities
of modern mechanical and computer systems. Tasks requiring subjective assessment
or synthesis of complex sensory data, such as scents and sounds, as well as high-level
tasks such as strategic planning, currently require human expertise. In many cases, the
use of humans is more cost-effective than mechanical approaches even where
automation of industrial tasks is possible.
.
 For the purpose of AUTOMATION specialised hardened computers, referred to as
programmable logic controllers (PLCs), are frequently used to synchronize the flow
of inputs from (physical) sensors and events with the flow of outputs to actuators and
events. This leads to precisely controlled actions that permit a tight control of almost
any industrial process. Human-machine interfaces (HMI) or computer human
interfaces (CHI), formerly known as man-machine interface, are usually employed to
communicate with PLCs and other computers, such as entering and monitoring
temperatures or pressures for further automated control or emergency response.

9
Service personnel who monitor and control these interfaces are often referred to as
stationary engineers.
.
 Automation has a notable impact in a wide range of highly visible industries beyond
manufacturing. Once-ubiquitous telephone operators have been replaced largely by
automated telephone switch boards and answering machines. Medical processes such
as primary screening in electrocardiography or radiography and laboratory analysis of
human genes, sera, cells, and tissues are carried out at much greater speed and
accuracy by automated systems. Automated teller machines have reduced the need for
bank visits to obtain cash and carry out transactions. In general, automation has been
responsible for the shift in the world economy from agrarian to industrial in the 19th
century and from industrial to services in the 20th century

 Currently, for manufacturing companies, the purpose of automation has shifted from
increasing productivity and reducing costs, to broader issues, such as increasing
quality and flexibility in the manufacturing process. The old focus on using
automation simply to increase productivity and reduce costs was seen to be short-
sighted, because it is also necessary to provide a skilled workforce who can make
repairs and manage the machinery. Moreover, the initial costs of automation were
high and often could not be recovered by the time entirely new manufacturing
processes replaced the old.

 Automation is now often applied primarily to increase quality in the manufacturing


process, where automation can increase quality substantially. For example,
automobile and truck pistons used to be installed into engines manually. This is
rapidly being transitioned to automated machine installation, because the error rate for
manual instalment was around 1-1.5%, but has been reduced to 0.00001%with
automation. Hazardous operations, such as oil refining, the manufacturing of
industrial chemicals, and all forms of metal working, were always early contenders
for automation.

10
(1.2) MAIN BODY OF AUTOMATION

(a) SCADA - Supervisory Control and Data Acquisition


(c) DRIVES - Variable Speed Drives
(d) SENSORS – Transducers, Feedback equipments.
(e) AUXILIARIES – Converters, Power Supplies, Different
(f) Communication mediums etc.

(1.3) COMPONENTS USED IN AUTOMATION

(a)Sensor for sensing input parameter like temperature, pressure, level.


(b) Transmitters for transmitting the raw signal in electrical form.
(c)Control system which includes PLC, DCS & PID controllers.
(d)Output devices/ actuators like drives, control valves.

11
CHAPTER 2

HISTORY OF PLC

(2.1) ORIGIN:-Automotive manufacturing industry. Programmable controllers were The


PLC was invented in response to the needs of the American initially adopted by the
automotive industry where software revision replaced the re-wiring of hard-wired control
panels when production models changed.
Before the PLC, control, sequencing, and safety interlock logic for manufacturing
automobiles was accomplished using hundreds or thousands of relays, cam timers, and drum
sequencers and dedicated closed-loop controllers. The process for updating such facilities for
the yearly model change-over was very time consuming and expensive, as the relay systems
needed to be rewired by skilled electricians.
In 1968 GM Hydramatic (the automatic transmission division of General Motors)
issued a request for proposal for an electronic replacement for hard-wired relay systems. The
winning proposal came from Bedford Associates of Bedford, Massachusetts. The first PLC,
designated the 084 because it was Bedford Associates' eighty-fourth project, was the result.
Bedford Associates started a new company dedicated to developing, manufacturing, selling,
and servicing this new product: Modicon, which stood for Modular Digital controller. One of
the people who worked on that project was Dick Morley, who is considered to be the "father"
of the PLC. The Modicon brand was sold in 1977 to Gould Electronics, and later acquired by
German Company AEG and then by French Schneider Electric, the current owner.
One of the very first 084 models built is now on display at Modicon's headquarters in
North Andover, Massachusetts. It was presented to Modicon by GM, when the unit was
retired after nearly twenty years of uninterrupted service.

The automotive industry is still one of the largest users of PLCs, and Modicon still
numbers some of its controller models such that they end with eighty-four.

(2.2) DEVELOPMENT:- Early PLCs were designed to replace relay logic systems. These
PLCs were programmed in "ladder logic", which strongly resembles a schematic diagram of
relay logic. Modern PLCs can be programmed in a variety of ways, from ladder logic to more

12
traditional programming languages such as BASIC and C. Another method is State Logic, a
Very High Level Programming Language designed to program PLCs based on State
Transition Diagrams Many of the earliest PLCs expressed all decision making logic in simple
ladder logic which appeared similar to electrical schematic diagrams. This program notation
was chosen to reduce training demands for the existing technicians. Other early PLCs used a
form of instruction list programming, based on a stack-based logic solver.

(2.3) PROGRAMMING:- Early PLCs, up to the mid-1980s, were programmed using


proprietary programming panels or special-purpose programming terminals, which often had
dedicated function keys representing the various logical elements of PLC programs.
Programs were stored on cassette tape cartridges. Facilities for printing and documentation
were very minimal due to lack of memory capacity. The very oldest PLCs used non-volatile
magnetic core memory.

(2.4) BENEFITS OF PROGRAMMABLE CONTROLLERS:-

(a)Programmable controllers are made of solid state components and hence provide high
reliability.

(b)They are flexible and changes in sequence of operation can easily be incorporated due to
programmability. They may be modular in nature and thus expandability and easy installation
is possible.

(c)Use of PLC results in appreciable savings in Hardware and wiring cost.

(d)They are compact and occupy less space.


(e)Eliminate hardware items like Timers, counters and Auxiliary relays. The presence for
timers and counters has easy accessibility.
(f)PLC can control a variety of devices and eliminates the need for customized controls.
(g)Easy diagnostic facilities are provided as a part of the system. Diagnosis of the external
systems also becomes very simple. Thus easy service / maintenance level of performance
with computers is possible.

13
(2.5) PROGRAMMING LANGUAGES:- IEC 1131-3 is the international standard for
programmable controller programming languages. The following is a list of programming
languages specified by this standard:
(a)Ladder Diagram (LD)
(b)Sequential Function Charts (SFC)
(c)Function Block Diagram (FBD)
(d)Structured Text (ST)
(e)Instruction List (IL)

One of the primary benefits of the standard is that it allows multiple languages to be
used within the same programmable controller. This allows the program developer to select
the language best suited to  each particular task.
LADDER LOGIC:- Ladder logic is the main programming method used for PLC's. 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 trades people was
greatly reduced.
The first PLC was 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 - so this programming method has stuck and it is the most common technique for
programming in today's PLC.
SEQUENTIAL FUNCTION CHARTS (SFC):- SFC has been developed to
accommodate the programming of more advanced systems. These are similar to flowcharts,
but much more powerful. This method is much different from flow charts because it does not
have to follow a single path through the flow chart.
FUNCTION BLOCK DIAGRAM (FBD):- FBD is another graphical programming
language. The main concept is the data flow that starts from inputs and passes in block(s)and
generates the output.
STRUCTURED TEXT (ST):- Structured Text has been developed as a much modern
programming language. It is quite similar to languages such as BASIC and Pascal. Structured

14
Text (ST) is a high level textual language that is a Pascal like language. It is very flexible and
intuitive for writing control algorithms.

INSTRUCTION LIST:- There are other methods to program PLCs. One of the earliest
techniques involved mnemonic instructions These instructions can be derived directly from
the ladder logic diagrams and entered into the PLC through a simple programming terminal.

15
CHAPTER 3
INTRODUCTION TO PLC

(3.1) PROGRAMMABLE LOGIC CONTROLLERS


A PLC is a solid state/computerized industrial computer that performs discrete or
sequential logic in a factory environment. It was originally developed to replace mechanical
relays, timers, counters. PLC’s are used successfully to execute complicated control
operations in plant. Its purpose is to monitor crucial process parameters and adjust process
operation accordingly. A sequence of instruction is programmed by the user to the PLC
memory and when the program is executed, the controller operates a system to the correct
operating specifications.
The first PLC system evolved from conventional computers in late 60s and early 70s. These
first PLC’s were installed primarily in automotive plants. Traditionally the auto plant had to
be shut down for up to a month at model changeover time. The early PLC’s were used with
other new automation techniques to shorten the changeover time. One of the majo r time
consuming change over procedures had been Field Equipments and Machineries Programmable
Logic Controller AC OR DC Drives SCADA System with HMI Screens Auxiliaries Sensors
wiring of new or revised relay & control panel full of wires, relays, timers, counters, & other
components. The PLC’s helped reduce the changeover time to a matter of few days.

(3.2) Basic PLC Operation

PLC consists of input modules or points, a Central Processing Unit (CPU), and output
modules or points. An input accepts a variety of digital or analog signals from various field
devices (sensors) and converts them into a logic signal that can be used by the CPU. The
CPU makes decisions and executes control instructions based on program instructions in
memory. Output modules convert control instructions from the CPU into a digital or analog
signal that can be used to control various field devices (actuators). A programming device is
used to input the desired instructions. These instructions determine what the PLC will do for

16
a specific input. An operator interface device allows process information to be displayed and
new control parameters to be entered. Pushbuttons (sensors), in this simple example,
connected to PLC inputs, can be used to start and stop a motor connected to a PLC through a
motor starter (actuator). Prior to PLCs, many of these control tasks were solved with
contactor or relay controls. This is often referred to as hardwired control. Circuit diagrams
had to be designed, electrical components specified and installed, and wiring lists created.
Electricians would then wire the components necessary to perform a specific task. If an error
was made, the wires had to be reconnected correctly. A change in function or system
expansion required extensive component changes and rewiring.

(3.3) TERMS OF PLC

SENSOR :- A sensor is a device that converts a physical condition into an electrical signal
for use by the PLC. Sensors are connected to the input of a PLC. A pushbutton is one
example of a sensor that is connected to the PLC input. An electrical signal is sent from the
pushbutton to the PLC indicating the condition (open/ closed) of the pushbutton contacts.
DISCRETE INPUT:- A discrete input also referred to as a digital input, is an input that is
either in an ON or OFF condition. Pushbuttons, toggle switches, limit switches, proximity
switches, and contact closures are examples of discrete sensors which are connected to the
PLC’s discrete or digital inputs. In the ON condition a discrete input may be referred to as
logic 1 or a logic high. In the OFF condition a discrete input may be referred to as a logic 0 or
a logic low.

A Normally Open (NO) pushbutton is used in the following example. One side of the
pushbutton is connected to the first PLC input. The other side of the pushbutton is connected
to an internal 24VDC power supply. Many PLC’s require a separate power supply to power
the inputs. In the open state, no voltage is present at the PLC input. This is the OFF condition.
When the pushbutton is depressed, 24 V DC is applied to the PLC input.

ANALOG INPUTS:- An analog input is a continuous, variable signal. Typical analoginputs


may vary from 0 to 20 milliamps, 4 to 20 milliamps, or 0 to 10volts.In the following
example, a level transmitter monitors the levelof liquid in a tank. Depending on the level

17
transmitter, the signal to thePLC can either increase or decrease as the level increases or
decreases.

DISCRETE OUTPUTS:- A discrete output is an output that is either in an ON or OFF


condition. Solenoids, contactor coils, and lamps are examples of actuator devices connected
to discrete outputs. Discrete outputs may also be referred to as digital outputs. In the
following example, a lamp can be turned on or off by the PLC output it is connected to.
ANALOG OUTPUT:-An analog output is a continuous, variable signal. The output may be
as simple as a 0-10 VDC level that drives an analog meter. Examples of analog meter outputs
are speed, weight, and temperature. The output signal may also be used on more complex
applications such as a current-to-pneumatic transducer that controls an air-operated flow-
control valve.
CPU:-The central processor unit (CPU) is a microprocessor system that contains the system
memory and is the PLC decision making unit. The CPU monitors the inputs and makes
decisions based on instructions held in the program memory. The CPU performs relay,
counting, timing, data comparison, and sequential operations.

(3.4) ADVANTAGES OF PLC’S


The same, as well as more complex tasks can be done with a PLC. Wiring between
devices and relay contacts is done in the PLC program. Hard-wiring, though still required to
connect field devices, is less intensive. Modifying the application and correcting errors are
easier to handle. It is easier to create and change a program in a PLC than it is to wire and re-
wire a circuit.
Following are the advantages of PLC’s:
(a)Reliability in operation
(b)Flexibility in control techniques
(c)Flexibility in programming and reprogramming in the plant
(e)Large quantity of contacts
(f)Online/Offline modifications
(g)Cost effective for condition complex systems
(h)Small physical size, shorter project time

18
Chapter 4

PLC ARCHITECTURE

PLCs contain three basic sections:


1. Central processing unit (CPU).
2. Memory: EPROM, RAM, and so on.
3. Input/output section for communication with peripherals (ADC, DAC).

A PLC is basically a black box with a number of inputs from, and a number of outputs
to, the outside world. It can make decisions, store data, do timing cycles, do simple
arithmetic, convert codes, and so on. The basic difference between this black box and a
hardware logic system using IC chips or a relay controlled system, is that specific coded
messages are stored in areas called program memory, which are PROM or ROM and
RAM chips. It is, however, much easier to change a program when a different process is
required than to rewire the control system. For example, it may take electricians a couple
of weeks to require a pipe mill, whereas a programmer will spend only a fraction of this
time to reprogram a PLC since no wires will have to be changed. In addition, various
recipes can be stored in memory and accessed when required, making the program
extremely flexible.
The system operates through interaction with the processor and program memory.
When the power to the system is turned on, the processor reads the first instruction stored
in memory and acts on this instruction. When completed, it goes back to the memory for
the next instruction, and so on until task is complete. This operation is called the fetch-
execute cycle. The processor communicates with the outside world via input and output
modules.

(4.1) THE PARTS OF A PROGRAMMABLE CONTROLLER

Programmable logic controllers (PLC) can be considered to have three parts:

1. Input/output Section
The I/O section contains input modules and output modules. Functionally, the input modules
are equivalent to the signal converters (i.e. Analog to Digital or high power to low power).

19
All modern PLC input modules use optical devices to accomplish electrically isolated
coupling between the input circuit and the processor electronics.

Each input device is wired to a particular input terminal on the I/O section. Thus if the
switch is closed, 5v dc appears on input terminal, converts this dc voltage to a digital 1 and
sends it to the processor via programmable peripheral interface (PPI). Conversely, if the
switch is open, no dc voltage appears on input terminal. Input section will respond to this
condition by sending a digital 0 to the processor. The other input terminals behave
identically.

2. The Processor

The processor of a PLC holds and executes the user program. In order to carry out this
job, the processor must store the most up-to-date input and output conditions.

(a) Input image table:


The input conditions are stored in the input image table, which is a portion of the
processor’s memory. That is, every single input module in the I/O section has assigned to it a
particular location within the input image table. That particular location is dedicated solely to
the task of keeping track of the latest condition of its input terminal. As mentioned in earlier
section, if the input terminal has 5v dc power fed to it by its input device, the location within
the input image table contains a binary 1(HI); if the input terminal has no 5v dc power fed to
it, the location contains a binary 0(LO).

The processor needs to know the latest input conditions because the user program
instructions are contingent upon those conditions. In other words, an individual instruction
may have one outcome if a particular input is HI and a different outcome if that input is LO.

(b) Output image table:


The output conditions are stored in the output image table, which is another portion of the
processor’s memory. The output image table bears the same relation to the output interface
of the I/O section that while terminals are analog inputs. You can directly connect any
analog input to the processor via these terminals. Analog signal from these terminals is first
converted to digital value via programmable peripheral interface (PPI). The I/O section’s
output modules are functionally the same as the output amplifiers. They receive a low power
digital signal from the processor and convert it into a high power signal capable of driving an

20
industrial load. A modern PLC output module is optically isolated, and uses a triac, power
transistor or relay as the series connected load controlling device. Terminal 1 to 8 are these
type of O/P terminals whereas terminal D/A is Analog output terminal from processor. Each
output device is wired to a particular output terminal on the I/O interface. Thus, for example,
if output module 1 receives a digital 1 by applying 5v dc to output terminal 1, thereby
illuminating LED is extinguished.

Besides 5v dc (TTL devices), I/O module are also for interfacing to other industrial levels,
including 12v dc.

The input image table bears to the input modules. That is, every single output module has
assigned to it a particular memory location is dedicated solely to the task of keeping track of
the latest condition of its output module.

Of course, the output situation differs from the input situation with regard to the direction of
information flow is from the output image table to the output modules, while in the input
situation the information flow is from the input modules to the input image table. The
locations within the input and output image tables are identified by addresses, which refers to
unique address of each terminal.

(c) Central processing unit:


The subsection of the processor that actually performs the program execution will be
called the central processing unit (CPU) with reference to input and output image table CPU
executes the user program and continuously updates the output image table.

The output image table has a dual nature; its first function is to receive immediate
information from the CPU and pass if on to the output modules of the I/O section; but
secondly, it also must be capable of passing output information “backward” to the CPU,
when the user program instruction that the CPU is working on calls for an item of output
information. The input image table does not have its dual nature. Its single mission is to
acquire information from the input modules and pass that information “forward” to the CPU
when the instruction that the CPU is working on calls for an item of input information.

(d) User program memory:


A particular portion of the processor’s memory is used for storing the user program
instructions. We will use the name user program memory to refer to this processor
subsection.

21
Before a PLC can begin controlling an industrial system, a human user must enter the
coded instructions that make up the user program. This procedure called programming the
PLC.

As the user enters instructions, they are automatically stored at sequential locations
within the user program memory. This sequential placement of program instructions is self-
regulated by the PLC, with no discretion needed by the human user.

The total number of instructions in the user program can range from a half dozen or so,
for controlling a simple machine, to several thousand, for controlling a complex machine or
process.

After the programming procedure is complete, the human user manually switches the
PLC out to PROGRAM mode into RUN mode, which causes the CPU to start executing the
program from beginning to end repeatedly.

(e) The complete scan cycle:


As long as the PLC is left in the RUN mode, the processor executes the user program
over and over again. Figure depicts the entire repetitive series of events. Beginning at the
top of the circle representing the scan cycle, the first operation is the input scan. During the
input scan, the current status of every input module is stored in the input image table,
bringing it up to date.

Following the input scan, the processor enters its user program execution. Sometimes
called “program scan”. The program executes with reference to input and output image
tables and updates output image table.

Throughout the user program execution, the processor continuously keeps its output
image table up to date, as stated earlier. However, the output modules themselves are not
kept continuously up to date. Instead, the entire output image table is transferred to the
output module during the output scan following the program execution.

(f) Data Memory:


A PLC is a computer, after all. Therefore, it can perform arithmetic, numeric
comparisons, counting, etc. Naturally the numbers and data can change from one scan cycle
to the next. Therefore the PLC must have a section of its memory set aside for keeping track

22
of variable data, or numbers, that are involved with the user program. This section of
memory we will call data memory.

When the CPU is executing an instruction for which a certain data value must be known,
that data value is brought in from data memory. When the CPU executes an instruction that
provides a numerical result, that result is put out into data memory. Thus, CPU can read from
or write to the data memory. Understand that this relationship is different from the
relationship between the CPU and the user program memory. When the user program is
executing, the CPU can only reads from the user program memory, never write to it.

(g) Operating System of PLC:


The function of the operating system is to present the user with the equivalent of an
extended machine or virtual machine that is easier to program than the underlying hardware.

Due to this operating system, PLC is very easy to program. It can be programmed
using electrical schemes with familiar relay symbols so that a plant electrician can easily
access the PLC. Even though he does not know the assembly language or even if he may not
have any familiarity with computers and electronics, he will be able to program the PLC.

The function of PLC Operating system is:

2. Loads the user program from programming device to program memory.


3. To read status of input devices.
4. To execute user program.
5. To form and update input image table.
6. As per the status of output image table controls the output devices.
7. To provide user-friendly functions.
This O.S. makes supervision over entire system, so O.S. programs are said to running
in supervisory mode.

When the user completely enters his program in user memory, he transfers control
from PROGRAM mode to RUN mode. In RUN mode the control of the whole system is
transferred to operating system. Now operating system takes care of the whole system such
that the whole system becomes automatic and appears as magic to users.

23
Chapter 5

SYSTEM OVERVIEW

This low cost PLC system was designed to satisfy hunger of Automation of Indian
Industry and also helps beginners as well as development engineers to get into Automation
field.

System consist of following main sections:

(1) The CPU:


The CPU uses the 89c51 microcontroller, which operates at 11.0592Mhz. It has 8k
RAM, which can be used as data memory, 8k RAM that can be used as program memory as
well as data memory, 8k EEPROM that can be used as program memory.

(2) Input/output Section:


This part of system is on separate board connected to processor via cable. It allows the
processor to communicate with the outside world. It is also called Data Acquisition System
(DAS).

This part of system provides 4 digital inputs consisting of 2 dc and 2 ac, 4 digital outputs
consisting of 2 dc and 2 ac each. It also provides 8 analog inputs with following ranges:

1. –5v to +5v (one channel).


2. 0v to 10v (one channel).
3. 4mA to 20mA (one channel).
4. 0v to 5v (five channel).

(3) Timer/Counter:
The system has 2 timers or 2 counters or 1 timer and 1 counter. The timer provides
maximum of 255sec delay and the counter provides maximum of 255 counts.

(4) Serial Communication:


The system uses RS-232 serial data standard. Chip ICL232 is used as communication
interface between RS-232 standard and TTL logic.

24
(5) Programming Device:

This system uses personal computer (PC) as programming device. The user can write
program in user friendly language. The programming devices (PC) converts this user
friendly language program into machine understandable language and transmit it to the PLC
board via serial communication.

(6) Power Supply Unit:


This system provides +12v and -12v with maximum 2amps and +5v with maximum of
1amps.

25
Chapter 6

HARDWARE CONFIGURATION

(6.1) Microcontroller:

Here we are using 89c51 microcontroller, which has one full duplex serial data
receiver/transmitter, which is used for serial communication having interface with ICL232 chip.
It has also two 16 bits timer/counter namely T0 and T1 which are used for timer and counter
applications. Timer T1 is used to set baud rate for serial communication in program mode.

(6.2) Memory:

The system consist of four types of memory:

a. 4k of EEPROM which is internal to 89c51 microcontroller. This memory is used


to store the operating system. It has address from 0000h to 0fffh. It can only be
accessed when the external access pin of controller is connected to +5v. In our
system this pin is permanently connected with +5v so external program memory is
accessed only when the address is beyond 0fffh.

b. 8k of RAM which is used as data memory. The CPU can read data from and write
data into this memory. This memory has address from 0000h to 1fffh.

c. 8k of RAM which is used as data memory as well as program memory. The CPU
can write program codes in and read program codes from this memory. This
memory has address from 2000h to 3fffh.

d. 8k of EEPROM, which is used as, program memory. The subroutines, which are
helpful in executing the main program, are stored here. This memory has location
from 4000h to 5fffh.

26
(6.3) Programmable Peripheral Interface(PPI):
Here two 8255 are used as PPI. One is used to control the ADC and DAC, while other is
used for Input/output interface. The addresses for the 8255 used to control ADC and DAC
are:

Port A: 6000h

Port B: 6001h

Port C: 6002h

Control Word: 6003h

The addresses for the 8255 used for Input/output interfaces are:

Port A: 8000h

Port B: 8001h

Port C: 8002h

Control Word: 8003h

(6.4) Analog to Digital Converter(ADC):

27
Here ADC0809 is used as an 8 bit ADC. 8255 whose addresses are 6xxxh is used to
give control signals to this ADC. The port pins of 8255 are connected with the control pins
of ADC as shown below:

8255 Pins ADC Pins

PB0 ADD0 (A)

PB1 ADD1 (B)

PB2 ADD2 (C)

PB3 STC (Start of Conversion)

PB4 OE (Output Enable)

PC7 EOC (End of Conversion)

Note: Here PB4 is connected to OE pin of ADC through NOT Gate. So we have to give
negative pulse by pin PB4 to pin OE to give Output Enable.

This ADC is used to convert the real world analog data into digital form.

(6.5) Digital to Analog Converter (DAC):

28
Here the only control signal is “Start of Conversion”, which is connected with PC0 of
8255 having address 6xxxh. For converting the digital data to analog form first make PC0
low and then put digital data on port0 of 89c51. Now make PC0 high.

This particular part of the system is idle in our application, but it is kept for future
expansion.

(6.6) Serial Communication:


Here in-built transmitter/receiver of 89c51 is used for serial communication in
conjunction with chip ICL232. Here the transmitter/receiver is of asynchronous type
(UART). So the data is communicated byte by byte. The UART is working in serial
communication mode 1. So the timer T1 is used to set the baud rate. The baud rate is set to
2400.

(6.7) Switches and Indicators:

Switches:

a. Power ON/OFF switch.


b. Reset Switch.
c. Program/Run mode Switch.

Indicators:

a. Power ON/OFF LED(red)


b. Reset LED(red)
c. Program mode LED(orange)
d. Run mode LED(green)
e. Fault LED(red, green, orange, yellow)

29
(6.8) Digital Input:

DC Input:

We have two digital DC inputs with following specifications:

1. 0v to 5v – LOW
2. 20v to 25v- HIGH
3. Optocoupler Isolation.

AC Input:

We have two digital AC inputs with following specifications:

1. 0v to 10v-LOW
2. 20v to 25v-HIGH
3. 47hz to 63hz frequency.
4. Optocoupler Isolation.

(6.9) Digital Outputs:

DC outputs:

We here have two DC outputs with following specification:

1. 0v t0 3v-0v
2. 3.5v to 5v-24v
3. 0.5amp output current.
4. Optocoupler Isolation.

AC outputs:

We have two relays as AC outputs with following specification:

1. 0v to 3v- relay OFF


2. 3.5v to 5v- relay ON
3. Optocoupler Isolation.
4. Relay with12v, 4ohm.

30
Chapter 7

31
ADDRESSES

(7.1) AC Output:

Output Address

Relay 1(Normally Open) 00

Relay 2(Normally Open) 01

Relay 1(Normally Close) 20

Relay 2(Normally Close) 21

(7.2) DC Output:

Output Address

Out 1(Normally Open) 02

Out 2(Normally Open) 03

Out 1 (Normally Close) 22

32
Out 2 (Normally Close) 23

(7.3) AC Input:

Input Address

In 1(Normally Open) 04

In 2(Normally Open) 05

In 1(Normally Close) 24

In 2(Normally Close) 25

(7.4) DC Input:

Input Address

In 1(Normally Open) 06

In 2(Normally Open) 07

In 1(Normally Close) 26

In 2(Normally close) 27

33
(7.5) Analog Input:

Input Address

In 1(Normally Open) 08

In 2(Normally Open) 09

In 3(Normally Open) 0a

In 4(Normally Open) 0b

In 5(Normally Open) 0c

In 6(Normally Open) 0d

In 7(Normally Open) 0e

In 8(Normally Open) 0f

In 1(Normally Close) 28

In 2(Normally Close) 29

In 3(Normally Close) 2a

34
In 4(Normally Close) 2b

In 5(Normally Close) 2c

In 6(Normally Close) 2d

In 7(Normally Close) 2e

In 8(Normally Close) 2f

(7.6) Counter/Timer:

Counter/Timer Address

Counter 0/Timer 0 00

(Normally OFF)

Counter 1/Timer 1 01

(Normally OFF)

Counter 0/Timer 0 02

(Normally ON)

Counter 1/Timer 1 03

(Normally ON)

CHAPTER 8

35
SOFTWARE DESCRIPTION

(8.1) PROGRAMMING LANGUAGES

IEC 1131-3 is the international standard for programmable controller programming


languages. The following is a list of programming languages specified by this standard:
(a)Ladder Diagram (LD)
(b)Sequential Function Charts (SFC)
(c)Function Block Diagram (FBD)
(d)Structured Text (ST)
(e)Instruction List (IL)

One of the primary benefits of the standard is that it allowsmultiple languages to be used
within the same programmablecontroller. This allows the program developer to select the
languagebest suited to each particular task.

LADDER LOGIC
Ladder logic is the main programming method used for PLC's. 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 trades people was greatly reduced.
The first PLC was 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 - so this programming method has stuck and it is the most common technique for
programming in today's PLC.
SEQUENTIAL FUNCTION CHARTS (SFC)
SFC has been developed to accommodate the programming of more advanced
systems. These are similar to flowcharts, but much more powerful. This method is much
different from flowcharts because it does not have to follow a single path through the
flowchart.
FUNCTION BLOCK DIAGRAM (FBD)
FBD is another graphical programming language. The main concept is the data flow
that starts from inputs and passes in block(s)and generates the output.
STRUCTURED TEXT (ST)
Structured Text has been developed as a much modern programming language. It is quite
similar to languages such as BASIC and Pascal. Structured Text (ST) is a high level textual
language that is a Pascal like language. Structured Text (ST) is a high level textual language
that is a Pascal like language. It is very flexible and intuitive for writing control algorithms.

36
INSTRUCTION LIST
There are other methods to program PLCs. One of the earliest techniques involved
mnemonic instructions These instructions can be derived directly from the ladder logic
diagrams and entered into the PLC through a simple programming terminal.

(8.2) EXAMPLES OF VARIOUS OPERATIONS:-

AND Operation:

The AND operation scans to see if various conditions are satisfied simultaneously.

I 04 I 05 U 01

FIG-8.1 REPRESENTATION IN LADDER DIAGRAM.

OR Operation
The OR operation scans to see if one of two conditions has been satisfied.

I 04

U 01
I 05

FIG 8.2-REPRESENTATION OF OR IN LADDER DIAGRAM

CHAPTER 9

37
APPLICATIONS OF PLC

In the present industrial world, a flexible system that can be controlled by user at site
is preferred. Systems, whose logic can be modified but still, used without disturbing its
connection to external world, is achieved by PLC. Utilizing the industrial sensors such as
limit switches, ON-OFF switches, timer contact, counter contact etc., PLC controls the total
system. The drive to the solenoid valves, motors, indicators, enunciators, etc are controlled
by the PLCs.

The above said controlling elements (normally called as inputs of PLCs) and
controlled elements (called as outputs of PLCs) exist abundantly in any industry. These
inputs, outputs, timers, counters, auxiliary contacts are integral parts of all industries. As
such, it is difficult to define where a PLC cannot be used.

Proper application of a PLC begins with conversion of information into convenient


parameters to save money, time and effort and hence easy operation in plants and
laboratories.

The areas where PLC is used maximum are as follows:

1. The batch processes in chemical, cement, food and paper industries which are
sequential in nature, requiring time of event based decisions is controlled by
PLCs.

2. In large process plants PLCs are being increasingly used for automatic start up
and shut down of critical equipment. A PLC ensures that equipment cannot be
started unless all the permissive conditions for safe start have seen established. It
also monitors the conditions necessary for safe running of the equipment and trips
the equipment whenever any abnormality in the system is detected.

38
3. The PLC can be programmed to function as an energy management system for
boiler control for maximum efficiency and safety.

4. In automation of blender reclaimers

5. In automation of bulk material handling system at ports.

6. In automation for a ship unloader.

7. Automation for wagon loaders.

8. For blast furnace charging controls in steel plants.

9. In automation of brick moulding press in refractories.

10. In automation for galvanizing unit.

11. For chemical plants process control automation.

12. In automation of a rock phosphate drying and grinding system.

13. Modernization of boiler and turbogenerator set.

14. Process visualization for mining application.

15. Criteria display system for power station.

16. As stored programmed automation unit for the operation of diesel generator sets.

17. In Dairy automation and food processing.

18. For a highly modernized pulp paper factory.

39
19. In automation system for the printing industry.

20. In automation of container transfer crane.

21. In automation of High-speed elevators.

22. In plastic moulding process.

23. In automation of machine tools and transfer lines.

24. In Mixing operations and automation of packaging plants.

25. In compressed air plants and gas handling plants.

26. In fuel oil processing plants and water classification plants.

27. To control the conveyor/classifying system.

Thus PLC is ideal for application where plant machine interlock requirements are
finalized at a later stage and need changes during engineering trial runs, commissioning or
normal use. It can be used extensively to replace conventional relay controls in power
stations, refineries, cement, steel, fertilizer, petrochemical, chemical industries etc.

Applications can thus be extended from monitoring to supervision, control and management.

FUTURE OF PLCs

40
The PLC offers a compromise between advance control techniques and present day
technology. It is extremely difficult to forecast the rate and form of progress of PLCs, but
there is strong evidence that development is both rapid and cumulative. Though a PLC is not
designed to replace a computer, it is useful and cost effective for medium sized control
systems. With the capability of functioning as local controllers in distributed control
systems. PLCs will retain their application in large process plants.

A further development of PLCs leads to the development of programmable function


controller (PFC) is compatible to PCs and directly controls the desired functions.

In India every process industry is replacing relay control systems by PLCs and will go for
PFCs in near future. In the near future every flats and offices may possess PFCs to control
room temperature, as elevator controller, maintain water tank levels, as small telephone
exchange etc.

41
BIBLIOGRAPHY

(1) PROGRAMMABLE LOGIC CONTROLLERS, OPERATION, INTERFACING


AND PROGRAMMING.
 JOB DEN OTTER.

(2) IBM PC AND CLONES


 GOVINDRAJALU.

(3) MICROPROCESSORS AND INTERFACING PROGRAMMING AND


HARDWARE.
 DOUGLAS HALL.

(4) THE 8051 MICROCONTROLLER ARCHITECTURE, PROGRAMMING AND


APPLICATIONS.
 KENNETH AYALA.

(5) MICROPROCESSOR ARCHITECTURE, PROGRAMMING AND


APPLICATIONS.
 RAMESH GAONKAR.

(6) MICROPROCESSORS AND MICROCOMPUTERS.


 B. RAM.

(7) PROGRAMMING IN ANSI C.


 E. BALAGURUSAMY.

(8) SIEMENS SIMATIC S5 PROGRAMMABLE CONTROLLER.


 SYSTEM MANUAL.

42
(9) DIGITAL ELECTRONICS.
 WIILIAM GOTHMAN.

(10) INTEGRATED CIRCUITS.

 K R BOTKAR.

(11) DATA SHEETS FROM

NATIONAL SEMICONDUCTOR CORPORATION, INTEL, PHILLIPS, FAIRCHILD


SEMICONDUCTOR CORPORATION, MOTOROLA CORPORATION.

(12) MAGAZINES – ELECTRONICS FOR YOU (EFY).

(13) OLD PROJECT REPORTS AND SEMINARS ON PLCS.

43
SAMPLE PROBLEM

Automatic mixing system

Valve A Agitator

Float switch 1

Float switch 2

Valve B

Problem:

In figure when START button is pressed, solenoid valve A is energized and a batch
of liquid is entered in tank. Float switch 1 detects the upper limit of liquid of liquid level and
Float switch 2 detects the lower limit of liquid. As, tank begins to fill, Switch 2 closes. When
the tank is full, switch 1 shuts off the solenoid valve A and start agitator to mix the liquid.
The Agitator mixes the liquid for 30 seconds and shuts off. When the Agitator turn off,

44
solenoid valve B is energized to drain the liquid. After the tank has been emptied, float switch
2 opens and solenoid B shuts off.

The Addresses of I/P and O/P are given below:-

DEVICE ADDRESS

NO NC

Stop Switch I 04 I 24

Start Switch I 05 I 25

Float Switch 1 I 06 I 26

Float Switch 2 I 07 I 27

Valve A U 00 U 20

Valve B U 01 U 21

45
Agitator Motor U 02 U 22

Control Relay U 03 U 23

The ladder diagram of this system is given below.

I 04 I 05

O 03

O 03

O00
I 06 O 03 I 07 000

O00 EN

T 00
30
sec

DN

DN I 06 O 02

I 07 DN O 01

O 01
46
In first rung the stop switch is connected in series with start switch to activate the
control relay. The stop switch is normally close type where as start switch is normally open
type. So when the start switch is pressed control relay is activated. The start switch is push to
on type so normally on contact of control relay is used to latch.

In second rung the NC contact of float switch 1 and NO contact of control relay is in
series with valve A. When start switch is pressed and the liquid level is below float switch 1
the valve A is opened and it is closed when level touches the float switch 1.The NC contact
of float switch 2 is latched by the NO contact of valve A so valve A does not opened as soon
as the level falls below the float switch 1 level and remain close till the tank is fully emptied.

In third rung the normally open contact of float switch 1is connected in series with
timer so when liquid level reaches to float switch 1, the timer is started.

In fourth rung the NC contact of timer DN bit is connected in series with NO contact
of float switch 1 to Agitator motor. When liquid level is at float switch 1and the timer is
running the motor is turned on.

In fifth rung The NO contact of float switch 2 is connected in series with NO DN bit
of timer. So when the liquid level is above the float switch 2 and timer turned off the valve B
is opened.

47
48
49
50

You might also like