You are on page 1of 90

1

CHAPTER 1
INTRODUCTION TO PRGAMMABLE LOGIC CONTROLLER (PLC)
1.1 INTRODUCTION
In general, a control system is a collection of electronic devices and equipment which are in
place to ensure the security, accuracy and smooth transition of process or a manufacturing
activity. It takes any form and varies in scale of implementation, from a power plant to a semiconductor machine.
As a result of rapid advancement of technology, complicated control task accomplished with a
highly automated control system which may be in the form of PLC and possibly a host computer
etc. Besides, signal interfacing to the field device (such as operator panel, motors, sensors,
switches, solenoid valves and etc) capabilities in network communication enable a big scale
implementation and process co-ordination besides providing greater flexibility in realizing
distributed control system. Every single component in a control system plays an important role
regardless of size. For instance, as shown in Fig.1.1.

Fig
.1.1: Control System Components

1.2 THE PROGRAMMABLE LOGIC CONTROLLER (PLC)


A PLC is a special form of microprocessor-based controller that uses a programmable memory to
store instructions and to implement functions such as logic, sequencing, timing, counting and
arithmetic in order to control machines and processes (Fig.1.2) and are designed to be operated
by engineers with perhaps a limited knowledge of computers and computing languages. They are
not designed so that only computer programmers can set up or change the programs. Thus, the
designers of the PLC have pre-programmed it so that the control program can be entered using a
simple, rather intuitive, form of language.
The term logic is used because programming is primarily concerned with implementing logic
and switching operations e.g. if A or B occurs switch on C, if A and B occurs switch on D. Input
devices, e.g. sensors such as switches, and output devices in the system being controlled, e.g.
motors, valves, etc., are connected to the PLC. The operator then enters a sequence of
instructions, i.e. a program, into the memory of the PLC. The controller then monitors the inputs
and outputs according to this program and carries out the control rules for which it has been
programmed.

Fig.1.2: Programmable Logic Controller


PLCs have the great advantage that the same basic controller can be used with a wide range of
control systems. To modify a control system and the rules that are to be used, all that is necessary
is for an operator to key in a different set of instructions. There is no need to rewire. The result is
a flexible, cost effective, system which can be used with control systems which vary quite widely
in their nature and complexity. PLCs are similar to computers but whereas computers are
optimized for calculation and display tasks, PLCs are optimized for control tasks and the
industrial environment

1.3 ROLE OF PLC


In an automated system PLC is regarded as the heart of the control system. With a control
application program (stored within the PLC memory) in execution, the PLC constantly monitors
the state of system through the field input devices feedback signal. It is then based on the
program logic to determine the course of action to be carried out at the field output devices.
The PLC may be used to control the simple and repetitive task, or a few of them may be
interconnected together with other host controllers or host computers through a sort of
communication network, in order to integrate the control of complex process.

1.4 NEED OF PLC


In the beginning of industrial revolution, especially in the 1960 and 1970, automated machines
were control by electromechanical relays. These relays were all hardwired together inside the
control panel. In some cases the control panel was so huge that it could cover the entire wall.
Every connection in the relay logic must be connected. Wiring is not always perfect; it takes time
to trouble shoot the system. This is a very time consuming affair. On the top of that the relays
have limited contact. If modification has to be required, the machine has to be stopped, space
may not available and wiring has to be traced to accommodate changes. It cannot be change
immediately to a new system. It has to be redone. In term of maintenance, an electrician must be
well trained and skillful in trouble shooting the control system. In short conventional relay
control panel are very inflexible. A typical example of the conventional control panel is shown in
Fig.1.3.

Fig.1.3: Conventional
Control Panel.

With the arrival of programmable logic controller the control design and concept improve
tremendously. A typical example of a PLC control panel is shown in Fig.1.4.

Fig.1.4: PLC Control Panel


There are many advantages of using Programmable Logic Controller.

The wiring of the system usually reduced by 80% compared to conventional relay control

system.
The power consumption is greatly reduced as PLC consumes much less power.
The PLC self diagnostic function enables easy and fast troubleshooting of the system.
Modification of control sequence or application can easily be done by programming
through the console or computer software without changing of I/O wiring, if no

additional input or output is required.


In PLC system spare parts for relays and hardware timers are greatly reduced as

compared to conventional control panel.


The machine cycle is improved tremendously due to the speed of PLC operation is a

matter of millisecond. Thus productivity increases.


When the number of I/O is very large and control factions are complex its cost much less

as compared to conventional system.


The reliability of PLC is much higher that relays and timers.
An immediately printout of a PLC program can be done in minutes. Therefore, hardcopy
of program can be easily maintained.

1.5 BRIEF HISTORY OF PLC

In 1968 GM Hydra-Matic (the automatic transmission division of General Motors) issued a


request for proposals for an electronic replacement for hard-wired relay systems based on a white
paper written by engineer Edward R. Clark. 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 Goul 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. Modicon used the 84 moniker at the end of its
product range until the 984 made its appearance.
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. 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. Many early
PLCs did not have accompanying programming terminals that were capable of graphical
representation of the logic, and so the logic was instead represented as a series of logic
expressions in some version of Boolean format, similar to Boolean algebra. As programming
terminals evolved, it became more common for ladder logic to be used, for the aforementioned
reasons and because it was a familiar format used for electromechanical control panels. Newer
formats such as State Logic and Function Block (which is similar to the way logic is depicted
when using digital integrated logic circuits) exist, but they are still not as popular as ladder logic.
Modern PLCs can be programmed in a variety of ways, from the relay-derived ladder logic to
programming languages such as specially adapted dialects of BASIC and C. Another method
is State Logic, a very high-level programming language designed to program PLCs based
on state transition diagrams.

1.6 PLC SYSTEM


Typically a PLC system has the basic functional components of processor unit, memory, power
supply unit, input/output interface section, communications interface and the programming
device. Fig.1.5 shows the basic arrangement.

Fig.1.5: The PLC System

1.6.1 Processor Unit


The processor unit or central processing unit (CPU) is the unit containing the microprocessor and
this interprets the input signals and carries out the control actions, according to the program
stored in its memory, communicating the decisions as action signals to the outputs.

1.6.2 Power Supply Unit


The power supply unit is needed to convert the mains a.c. voltage to the low d.c. voltage (5 V)
necessary for the processor and the circuits in the input and output interface modules.

1.6.3 Programming Device


The programming device is used to enter the required program into the memory of the
processor. The program is developed in the device and then transferred to the memory unit of the
PLC.

1.6.4 Memory Unit


The memory unit is where the program is stored that is to be used for the control actions to be
exercised by the microprocessor and data stored from the input for processing and for the output
for outputting. It include RAM and ROM.

1.6.5 Input And Output Section


The input and output sections are where the processor receives information from external devices
and communicates information to external devices. The inputs might thus be from switches, as
sensors such as photo-electric cells, as in the counter mechanism temperature sensors, or flow
sensors, etc. The outputs might be to motor starter coils, solenoid valves, etc. Input and output
devices can be classified as giving signals which are discrete, digital or analogue . Devices
giving discrete or digital signals are ones where the signals are either off or on. Analogue devices
give signals whose size is proportional to the size of the variable being monitored.

(a)

(b)
Fig .1.6: (a) Inputs (b) Outputs Of PLC

1.6.6

COMMUNICATION INTERFACE

The communications interface is used to receive and transmit data on communication networks
from or to other remote PLCs (Fig.1.7). It is concerned with such actions as device verification,
data acquisition, synchronization between user applications and connection management.

Fig.1.7: Communication Network

1.7 INTERNAL ARCHITECTURE OF PLC


Fig.1.8 shows the basic internal architecture of a PLC. It consists of a central processing unit
(CPU) containing the system microprocessor, memory, and input/output circuitry. The CPU
controls and processes all the operations within the PLC. It is supplied with a clock with a
frequency of typically between 1 and 8 MHz. This frequency determines the operating speed of
the PLC and provides the timing and synchronization for all elements in the system. The
information within the PLC is carried by means of digital signals. The internal paths along which
digital signals flow are called buses. In the physical sense, a bus is just a number of conductors
along which electrical signals can flow. It might be tracks on a printed circuit board or wires in a
ribbon cable. The CPU uses the data bus for sending data between the constituent elements, the
address bus to send the addresses of locations for accessing stored data and the control bus for
signals relating to internal control actions. The system bus is used for communications between
the input/output ports and the input/output unit.

Fig.1.8: Architecture of PLC


1.7.1 The CPU
The internal structure of the CPU depends on the microprocessor concerned. In general they
have:
1. An arithmetic and logic unit (ALU) which is responsible for data manipulation and carrying
out arithmetic operations of addition and subtraction and logic operations of AND, OR,and NOT.
2. Memory, termed registers, located within the microprocessor and used to store information
involved in program execution.

3. A control unit which is used to control the timing of operations.

1.7.2 The Buses


The buses are the paths used for communication within the PLC. The information is transmitted
in binary form, i.e. as a group of bits with a bit 6 Programmable Logic Controllers being a binary
digit of 1 or 0, i.e. on/off states. The term word is used for the group of bits constituting some
information. The system has four buses:
1.7.2.1

Data Bus

The data bus carries the data used in the processing carried out by the CPU. A microprocessor
termed as being 8-bit has an internal data bus which can handle 8-bit numbers. It can thus
perform operations between 8-bit numbers and deliver results as 8-bit values.
1.7.2.2 Address Bus
The address bus is used to carry the addresses of memory locations. So that each word can be
located in the memory, every memory location is given a unique address. Data stored at a
particular location can be accessed by the CPU either to read data located there or put, i.e. write,
data there
1.7.2.3

Control Bus

The control bus carries the signals used by the CPU for control, e.g. to inform memory devices
whether they are to receive data from an input or output data and to carry timing signals used to
synchronize actions.
1.7.2.4 System Bus
The system bus is used for communications between the input/output ports and the input/output
unit.

1.7.3 Memory
There are several memory elements in a PLC system:
1.7.3.1 Random Access Memory (RAM)
It consist of Random-access memory (RAM) for the users program and Random-access memory
(RAM) for data. This is where information is stored on the status of input and output devices and
the values of timers and counters and other internal devices. The data RAM is sometimes

10

referred to as a data table or register table. Part of this memory, i.e. a block of addresses, will be
set aside for input and output addresses and the states of those inputs and outputs. Part will be set
aside for preset data and part for storing counter values, timer values, etc.
1.7.3.2 Read Only Memory (ROM)
System read-only-memory (ROM) to give permanent storage for the operating system and fixed
data used by the CPU.
1.7.3.3 Erasable And Programmable Read-Only-Memory (EPROM)
Possibly, as a bolt-on extra module, erasable and programmable read-only-memory (EPROM)
for ROMs that can be programmed and then the program made permanent.
The programs and data in RAM can be changed by the user. All PLCs will have some amount of
RAM to store programs that have been developed by the user and program data. However, to
prevent the loss of programs when the power supply is switched off, a battery is used in the PLC
to maintain the RAM contents for a period of time. After a program has been developed in RAM
it may be loaded into an EPROM memory chip, often a bolt-on module to the PLC, and so made
permanent. In addition there are temporary buffer stores for the input/output channels.The
storage capacity of a memory unit is determined by the number of binary words that it can store.
Thus, if a memory size is 256 words then it can store 256 8 = 2048 bits.

1.7.4 INPUT/OUTPUT UNIT


The input/output unit provides the interface between the system and the outside world, allowing
for connections to be made through input/output channels to input devices such as sensors and
output devices such as motors and solenoids The input/output channels provide isolation and
signal conditioning functions so that sensors and actuators can often be directly connected to
them without the need for other circuitry. A range of inputs might be available with a larger PLC,
e.g. 5 V, 24 V, 110 V and 240 V digital/discrete, i.e. onoff, signals (Fig.1.9). A small PLC is
likely to have just one form of input, e.g. 24 V.

11

Fi
g.1.

9:

Input

levels

Fig.1.10: Output levels


The output from the input/output unit will be digital with a level of 5 V. However, after signal
conditioning with relays, transistors or triacs , the output from the output channel might be a 24
V, 100 mA switching signal, a d.c. voltage of 110 V, 1 A or perhaps 240 V, 1 A a.c., or 240 V, 2 A
a.c., from a triac output channel (Fig.1.10).

1.8 SOURCING AND SINKING


The terms sourcing and sinking are used to describe the way in which d.c. devices are connected
to a PLC. With sourcing, using the conventional current flow direction as from positive to
negative, an input device receives current from the input module, (Fig.1.11(a)). If the current
flows from the output module to an output load then the output module is referred to as sourcing
(Fig.1.11(b)). With sinking, using the conventional current flow direction as from positive to
negative, an input device supplies current to the input module, i.e. the input module is the sink
for the current (Fig.1.12(a)). If the current flows to the output module from an output load then
the output module is referred to as sinking (Fig.1.12(b))

Fi

g.

.1

Sourcing
Fig.1.12: Sinking

12

1.9 TYPES OF PLC


There are two common types of mechanical design for PLC systems; a single box, and the
modular/rack types.
1.9.1 Single Box / Bricks Type
The single box type (or, as sometimes termed, brick) is commonly used for small programmable
controllers and is supplied as an integral compact package complete with power supply,
processor, memory, and input/output units. Typically such a PLC might have 6, 8, 12 or 24 inputs
and 4, 8 or 16 outputs and a memory which can store some 300 to 1000 instructions. Fig.1.13
shows the Mitsubishi MELSEC FX3U compact, i.e. brick, PLC.

Fig.1.13: Single Box/ Bricks type PLC


Some brick systems have the capacity to be extended to cope with more inputs and outputs by
linking input/output boxes to them. The base input/output brick, depending on the model
concerned, has 10, 20, 30 or 40 inputs/outputs (I/O). The outputs can be relay or transistor
outputs.
1.9.2 Modular/Rack Type
Systems with larger numbers of inputs and outputs are likely to be modular and designed to fit in
racks. The modular type consists of separate modules for power supply, processor, etc., which
are often mounted on rails within a metal cabinet. The rack type can be used for all sizes of
programmable controllers and has the various functional units packaged in individual modules
which can be plugged into sockets in a base rack. Thus it is comparatively easy to expand the
number of input/output (I/O) connections by just adding more input/output modules or to expand

13

the memory by adding more memory units. An example of such a modular system is provided by
the Allen-Bradley PLC-5 PLC of Rockwell automation (Fig.1.14)

Fig.1.14 : Possible Arrangement Of Rack / Modular PLC

1.10 WORKING PRONCIPLE OF PLC

14

In contrast to conventional controllers with functions determined by their physical wiring the
functions of PLCs are defined by a program. PLCs also have to be connected to the outside
world with cables, but the contents of their program memory can be changed at any time to adapt
their programs to different control tasks.
PLC input data, process it and then output the results. This process is performed in three stages:

Input scan
Programming scan
Output scan

1.10.1 The Input Scan


The input scan passes control signals from switches, buttons or sensors on to the programming
scan. The signals from these components are generated as part of the control process and are fed
to the inputs as logical states. The input scan passes them on to the processing stage in a preprocessed format.
1.10.2 The Programming Scan
In the programming scan stage the pre-processed signals from the input scan are processed and
combined with the help of logical operations and other functions. The program memory of the
programming scan is fully programmable. The processing sequence can be changed at any time
by modifying or replacing the stored program.
1.10.3 The Output Scan
The results of the processing of the input scan by the program are fed to the output scan where
they control connected switchable elements such as contactors, signal lamps, solenoid valves and
so on.

15

Fig .1.15: PLC Working

1.11 PROCESSING OF PROGRAM IN PLC

16

A PLC performs its tasks by executing a program that is usually developed outside the controller
and then transferred to the controllers program memory. Before you start programming it is
useful to have a basic understanding of how PLCs process these programs.
The PLCs process program in four stages:

Process image processing


Input process image
Program execution
Output process image

1.11.1 Process Image Processing


The program in the PLC is not executed directly on the inputs and outputs, but on a process
image of the inputs and outputs:

Fig.1.16:

Program

Processing
1.11.2

Input

Process Image

At the beginning of each program cycle the system polls the signal states of the inputs and

17

stores them in a buffer, creating a process image of the inputs.

1.11.3 Program Execution


After this the program is executed, during which the PLC accesses the stored states of the inputs
in the process image. This means that any subsequent changes in the input states will not be
registered until the next program cycle.
The program is executed from top to bottom, in the order in which the instructions were
programmed. Results of individual programming steps are stored and can be used during the
current program cycle.

Program

Fig.1.17
Execution

1.11.4
Process

Output
Image

Results

of

operations

logical
that

are

relevant

for

the

outputs

are

stored

in

output

buffer

an
the

output process image.The output process image is stored in the output buffer until the buffer is
rewritten. After the values have been written to the outputs the program cycle is repeated.

1.12 PROGRAMMING OF PLC


Methods to write programs requires some skill in programming and PLCs are intended to be
used by engineers without any great knowledge of programming. As a consequence, ladder
programming was developed. This is a means of writing programs which can then be converted

18

into machine code by some software for use by the PLC microprocessor. This method of writing
programs became adopted by most PLC manufacturers, however each tended to have developed
their own versions and so an international standard has been adopted for ladder programming
and indeed all the methods used for programming PLCs. The standard, published in 1993, is IEC
1131-3 (International Electro technical Commission). The IEC 1131-3 programming languages
are ladder diagrams (LAD), instruction list (IL), sequential function charts (SFC), structured text
(ST), and function block diagrams (FBD). In this report only Ladder diagram is studied.
1.12.1 Ladder Diagram
As an introduction to ladder diagrams, consider the simple wiring diagram for an electrical
circuit in Fig.1.18(a). The diagram shows the circuit for switching on or off an electric motor. We
can redraw this diagram in a different way, using two vertical lines to represent the input power
rails and stringing the rest of the circuit between them. Fig.1.18(b) shows the result. Both circuits
have the switch in series with the motor and supplied with electrical power when the switch is
closed. The circuit shown in Fig.1.18(b) is termed a ladder diagram.

Fig.1.18: Way Of
Drawing

Same

Electrical

Circuit
With such a

diagram

power

supply

the
for

the

circuits is always shown as two vertical lines with the rest of the circuit as horizontal lines. The
power lines, or rails as they are often termed, are like the vertical sides of a ladder with the
horizontal circuit lines like the rungs of the ladder

19

1.12.2 PLC Ladder Programming


A very commonly used method of programming PLCs is based on the use of ladder diagrams.
Writing a program is then equivalent to drawing a switching circuit. The ladder diagram consists
of two vertical lines representing the power rails. Circuits are connected as horizontal lines, i.e.
the rungs of the ladder, between these two verticals.
In drawing a ladder diagram, certain conventions are adopted:
1. The vertical lines of the diagram represent the power rails between which circuits are
connected. The power flow is taken to be from the left-hand vertical across a rung.
2. Each rung on the ladder defines one operation in the control process.
3. A ladder diagram is read from left to right and from top to bottom, Fig.1.19 showing the
scanning motion employed by the PLC. This procedure of going through all the rungs of the
program is termed a cycle. The end rung might be indicated by a block with the word END or
RET for return, since the program promptly returns to its beginning.

Fig.1.19: Scanning In
Ladder Program
4. Each rung must start with an input or inputs and must end with at least one output.
5. Electrical devices are shown in their normal condition. Thus a switch which is normally open
until some object closes it, is shown as open on the ladder diagram. A switch that is normally
closed is shown closed.
6. A particular device can appear in more than one rung of a ladder. For example, we might have
a relay which switches on one or more devices
7. The inputs and outputs are all identified by their addresses. This inputs and outputs are the
address of input and output of PLC.

20

1.12.3 Basic Symbols Used In PLC Ladder Programming


Fig.1.20 shows standard IEC 1131-3 symbols that are used for input and output devices. Some
slight variations occur between the symbols when used in semi-graphic form and when in full
graphic. Note that inputs are represented by different symbols representing normally open or
normally closed contacts. The action of the input is equivalent to opening or closing a switch.
Output coils are represented by just one form of symbol.

Fig.1
.20: Basic Symbols
To illustrate the drawing of the rung of a ladder diagram, consider a situation where the
energizing of an output device, e.g. a motor, depends on a normally open start switch being
activated by being closed. The input is thus the switch and the output the motor. Fig.1.21 shows
the ladder.

Fig.1.21:A
Ladder Rung

21

Starting with the input, we have the normally open symbol | | for the input contacts. There are no
other input devices and the line terminates with the output, denoted by the symbol ( ). When the
switch is closed, i.e. there is an input, the output of the motor is activated. Only while there is an
input to the contacts is there an output. If there had been a normally closed switch |/| with the
output (Figure 1.21(b)), then there would have been an output until that switch was opened. Only
while there is no input to the contacts is there an output.
1.12.4
1.12.4.1

Logic Functions Used In Ladder Programming


AND Operations

An AND operation is logically the same as a serial connection of two or more switches in
an electrical circuit. Current will only flow if all the switches are closed. If one or more of the
switches are open no current flows the AND condition is false.
Example of an AND instruction.

Fi

g
1.22 : Example of And

Instruction
In the example Y0 is only switch on when both X0 and X1 are switch on:

Diagram Of AND
1.12.4.2 OR OPERATIONS

Fig.1.23: Timing
Instruction

22

An OR operation is logically the same as the parallel connection of multiple switches in an


electrical circuit. As soon as any of the switches is closed current will flow. Current will only
stop flowing when all the switches are open

Fig.1.24: Example Of
OR Instruction
In this example output Y0 is high when either X0 or X1 goes high.

Fig.1.25:
Diagram Of OR

Timing

Instruction

1.13 LADDER PROGRAMMING SPECIAL ELEMENTS


1.13.1

Relays

In your PLC programs you will often need to store intermediate binary results (a signal state of
0 or 1) temporarily for future reference. The PLC has special memory cells available for this
Purpose known as auxiliary relays, or relays for short (device identifier: "M").
You can store the binary result of an operation in a relay, for example with an OUT instruction,
and then use the result in future operations. Relays help to make programs easier to read and also
reduce the number of program steps: You can store the results of operations that need to be used
more than once in a relay and then poll it is often as you like in the rest of the program.

23

Fig.1.26: Relay Arrangement in Ladder

1.13.2 Special Relays


In addition to the relays that you can switch on and off with the PLC program there is also
another class of relays known as special or diagnostic relays. These relays use the address ranges
starting with M8000.Some contain information on system status and others can be used to
influence program execution.
1.13.3 Timers
When you are controlling processes you will often want to program a specific delay before
starting and stopping certain operations. In hard-wired controllers this is achieved with timer
relays. In PLCs this is achieved with programmable internal timers. Timers are really just
counters that count the PLCs internal clock signals (e.g. 0.1s pulses).When the counter value
reaches the set point value the timers output is switched on. All timers function as make delay
switches and are activated with a 1 signal. To start and reset timers you program them in the
same way as outputs. You can poll the outputs of timers as often as you like in your program.
Example of a program using Timer:

In the above example timer T200 is started when input X0 is switched on. The set point value is
123 x 10ms = 1.23 s, so T200 switches on output Y0 after a delay of 1.23 s.

24

The signal sequence generated by the following program example is as follows:

Fig.1.27: Example of
Timer
The timer continues to count the internal 10ms pulses as long as X0 remains on. When the set
point value is reached the output of T200 is switched on.
If input X0 or the power supply of the PLC is switched off the timer is reset and its output is also
switched off.
1.13.4 Counters
The PLC also has internal counters that you can use for programming counting operations.
Counters count signal pulses that are applied to their inputs by the program. The counter output
is switched on when the current counter value reaches the set point value defined by the
program. Like timers, counter outputs can also be polled as often as you like in the program.
Example of a program using a counter:

Whenever input X1 is switched on the value of counter C0 is incremented by 1.Output Y0 is set


when X1 has been switched on and off ten times (the counter set point is K10).

25

The signal sequence generated by this program is as follows:

Fig.1.28: Example Of Counter


First the counter is reset with input X0 and a RST instruction. This resets the counter value to 0
and switches off the counter output.
Once the counter value has reached the set point value any additional pulses on input X1 no
longer have any effect on the counter
1.13.5 Registers
The PLCs relays are used to store the results of operations temporarily. However, relays can
only store values of On/Off or 1/0, which means that they are not suitable for storing
measurements or the results of calculations. Values like this can be stored in the registers of the
controllers. Registers are 16 bits or one word wide .You can create double word registers
capable of storing 32-bit values by combining two consecutive data registers. A normal register
can store values from 0000H FFFFH (-32,768 32,767).Double-word registers can store
values from 00000000H FFFFFFFFH (-2,147,483,648 2,147,483)

Fig.1.29: PLC Register

26

1.14 A SYSTEMATIC APROACH TO PROGRAMMABLE CONTROLLER


DESIGN

Fig.1.30: Programmable Controller Design

1.15 FLOW CHART

27

Flow diagrams (also called algorithms) are widely used to explain decision making processes
that arrive at a logical answer. They are particularly useful for computer programmers because
most programmes can be reduced to a series of YES or NO answers to each decision that must be
made. In PLC work they can be a useful tool to help produce a ladder logic diagram. The main
symbols for flow diagrams are shown here.

Fig.1.31: Symbols For Flow


Chart
Example Of Flow Chart : A machine has 2 actuators A and B that must perform the sequence
A+(on) B+ (on), B- (off) A- (off) .

Fig.1.32:Example Of Flow Chart

28

Solution:
Step 1 When we start we must make sure both actuators are off by switching them off.
Step 2 Start the cycle by switching A on.
Step 3 Check that A is on and if it is not, then keep looping back until it is.
Step 4 When A is on switch on B.
Step 4 Check that B is on and if it is not, then keep looping back until it is.
Step 5 When B is on, switch B off.
Step 6 Check if B is off and if it isnt keep looping back until it is.
Step 7 When B is off, switch A off.
Step 8 Check if A is off and if it isnt keep looping back until it is.
Step 9 Loop back to the start.

1.16 PLC PROGRAMMING DEVICE


Programming devices can be a hand-held device, a desktop console or a computer. Only when
the program has been designed on the programming device and is ready is it transferred to the
memory unit of the PLC.
1 Hand-held programming device will normally contain enough memory to allow the unit to
retain programs while being carried from one place to another.
2 Desktop consoles are likely to have a visual display unit with a full keyboard and screen
display.
3 Personal computers are widely configured as program development work-stations. Some
PLCs only require the computer to have appropriate software; others require special
communication cards to interface with the PLC. A major advantage of using a computer is that
the program can be stored on the hard disk or a CD and copies easily made.

1.17 APPLICATION OF PLC


PLCs are not just used in factory automation but in many other industries as well: The
applications of PLC are:

Manufacturing
Building / Environmental
Health and Medical
Leisure
Food Industry

29

Traffic
Agriculture / Fishery

Manufacturing
Auto assembly machines, Conveyor, Compressor tool, Robot arm, Component supply machine,
Cutting machine, Automatic test equipment.
Building Environment
Air conditioning system, Vertical lift for building construction, Automatic lighting system,
Automatic door, Steel welder, Steel cutter, Forklift, Window cleaner.
Health And Medical
Medical sterilizer, Pick and Place machine, Medical instrument washer, Automated bed machine,
Walking machine, Battery operated wheel chair, Bathing machine in a nursing home.
Leisure
Ski lift gate control, Artificial snow machine, Chair adjustment at a stadium, Neon light
advertisement, Illuminated fountain, Arcade games, Stage setting.
Food Industry
Vending machine, Pizza oven, Meat slicer, Dish washing, Bread making machine, Automatic
breaking oven.
Traffic
Car wash, Tire scrubber, Garbage truck, Train seat adjustment, Multi story car parking, Station
platform display, Car transport vehicle, Diesel engine control, Road construction lights.
Agriculture / Fishery
Packaging machine for lettuce, Begging machine for green peppers, Automated feeder, Egg
sorting machine, Fruits sorting machine, Oyster opening machine

30

CHAPTER 2

TRAFFIC LIGHT SYSTEM CONTROL BY USING PLC


2.1 INTRODUCTION
Traffic Control Systems are used at a point where there are more than two paths for passage of
vehicles or wherever passage is to be given to pedestrians to cross a road. It is also used
wherever two paths cross each other thus creating a four-way lane. These systems are also put in
place at points where there are by-lanes attached to the main road. The main aim of a traffic
control system is to control the flow of vehicles through a lane and prevent accidents or road
blockage. These systems are also used at points wherever a vehicle needs to be stopped for any
purpose.
In our country the traffic control system is mostly based on sequential logic. There are three
lights red for stop, yellow for get ready and green for go. Each light operates for a given period
one after the other. The programming is so done that two lanes wont have the green light at the
same time. The traffic control system at a certain places is even controlled manually by traffic
personnel but human error calls for automation to prevent undesirable incidents on road.

2.2 PROBLEM STATEMENT


The monitoring and control of city traffic light is becoming a major problem in many countries.
The increasing number of vehicles and the lower phase of highways developments have led to
traffic congestion problem especially in major cities such as Karachi, Hyderabad, Sukkur,
Multan and Lahore. Travel time, environment quality, life quality, and road safety are all
adversely affected as a result of traffic congestions. In addition, delays due to traffic congestions
also indirectly affect productivity, efficiency, and energy losses. There are many factors that lead
to traffic congestion such as the density of vehicles on the roads, human habits, social behavior,
and traffic light system. One major factor is due to the traffic lights system that controls the
traffic at junction. Traffic policeman are deployed at traffic intersection everyday in order to
overcome these congestion during peak hour, thus one of the roots of the problem is due to
ineffective traffic lights controllers. With effective control the intersection, it is believed that the
overall capacity and performance of urban traffic network could be resolve. There are several

31

types of conventional methods of traffic light control; however they fail to deal effectively with
complex and time varying traffic conditions. Currently, traffic light control which is commonly
installed in Pakistan and many parts of the world is the preset cycle time (PCT). Due the
deployment of a large number of traffic police in the city during peak hours, it is evident that
these types of traffic lights controllers are inadequate. There is a need to research on new types
of highly effective practical traffic light controllers.

2.3 ADVANTAGES OF A GOOD TRAFFIC CONTROL SYSTEM


A properly ordered traffic control system can:
1. Provide for orderly movement of traffic
2. Increase capacity at intersection
3. Reduce frequency and severity of certain kind of clashes
4. Provide continuous movement of traffic at a desired speed
5. Interrupt heavy traffic to allow pedestrians to pass
6. Effectively perform traffic management

2.4 GENERAL DESCRIPTION OF TRAFFIC LIGHT CONTRL SYSTEM:


The Traffic Signal Control module is an interactive mimic diagram of the traffic and pedestrian
control lamp signals at a crossroads with one pedestrian crossing. It is designed to be controlled
by a range of PLC's to monitor and control objects external to it.
The system can be divided into five main parts-:

Hardware Model.
PLC Interface module.
PLC
Programming software.
Ladder logic Programming.

2.4.1 Hardware Model

32

Hardware model comprises a screen-printed panel depicting a crossroads with a pedestrian


crossing, in which are set colored lamps (light-emitting diodes) representing normal traffic
control signals. Three lamps for the north-south and three for the east-west road, with two lamps
for the pedestrian crossing, make a total of eight lamps that are each controllable by the PLC.
Also mounted on the panel are five pushbuttons that may be pressed to simulate the detection of
a vehicle by any of four traffic sensors, or the request of a pedestrian for use of the crossing.
Each pushbutton is connected to a separate input line that the PLC can interrogate to detect the
pushbutton signals. The Traffic Signal Control module is an interactive mimic diagram of the
traffic and pedestrian control lamp signals at a crossroads with one pedestrian crossing. It is
designed to be controlled by a range of PLC to monitor and control objects external to itself.A
fiber glass panel with a mimic diagram of a crossroads with a pedestrian crossing and traffic
controls signals. This is shown in Fig.2.1

Fig.2.1: Layout Of Traffic Light Hardware Model

33

2.4.1.1 Hardware Components


Following are the Hardware components
IC 74HCT373 ,LEDs ,PUSH BUTTON, FUSE, CAPACITORS, RESISTORS,ADDRESS BUS,
ZENER DIODE
IC 74HCT373
74HCT373 is an octal D-type transparent latch featuring separate D-type inputs for each latch
and 3-state outputs for bus oriented applications. A latch enable (LE) input and an output enable
(OE) input are common to all latches. 74HCT373 consists of eight D-type transparent latches
with 3-state true outputs. When LE is HIGH, data at the Dn inputs enters the latches. In this
condition the latches are transparent, i.e. a latch output will change state each time its
corresponding D input changes. When LE is LOW the latches store the information that was
present at the D inputs a set-up time preceding the HIGH-to-LOW transition of LE. When OE is
LOW, the contents of the 8 latches are available at the outputs. When OE is HIGH, the outputs
go to the high impedance OFF-state. Operation of the OE input does not affect the state of the
latches.

Fig.2.2: Logic Symbol


Pin Description

Table.2.1 : Pin Description

Fig.2.3: IEC Logic Symbol

Fig.2.4: Pin Configuration

34

Light Emitting Diodes (LED)


A light-emitting diode (LED) is a two-lead semiconductor light source. It is a pn-junction diode,
which emits light when activated. When a suitable voltage is applied to the leads, electrons are
able to recombine with electron holes within the device, releasing energy in the form of photons.

Fig.2.5: Light Emitting Diode (LED)


Zener Diodes
The Zener diode is like a general-purpose signal diode. When biased in the forward direction it
behaves just like a normal signal diode, but when a reverse voltage is applied to it, the voltage
remains constant for a wide range of currents. The Zener Diode is used in its "reverse bias". The
I-V Characteristics curve shown below

(
a)

(b)

Fig.2.6: (a) VI- Characteristic Of Zener Diode, (b) Zener

35

Capacitor
A capacitor is passive two-terminal electrical component used to store energy electrostatically in
an electric field. The forms of practical capacitors vary widely, but all contain at least two
electrical conductors (plates) separated by a dielectric (i.e. insulator).

(a)

(b)

Fig.2.7 (a) Capacitors, (b) Capacitor Symbols.


Resistor
A resistor is a passive two-terminal electrical component that implements electrical resistance as
a circuit element. Resistors act to reduce current flow, and, at the same time, act to lower voltage
levels within circuits.

(a)

(b)

Fig.2.8 (a) Resistor, (b) Resistor Symbols.


Push Buttons
A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for
controlling some aspect of a machine or a process. Buttons are typically made out of hard
material, usually plastic or metal.

Fig.2.9: Push Button

36

Fuse
A fuse is a type of low resistance resistor that acts as a sacrificial device to provide over
current protection, of either the load or source circuit.

(a)

(b)

Fig.2.10: (a) Fuse (b) Fuse Symbol.


Address , Data And Control Bus
A bus means a set of lines (wires or tracks on a printed circuit board). The lines operate together
as a team for a particular purpose.
The address bus & the data bus allow the processor to communicate with the outside world. Most
importantly the main memory. The control buses are a series of lines that perform different
function that are used to control the system.
Together the three busses allow the processor to fetch instructions and data from memory and
send results back to memory.

Fig.2.11: Buses

37

2.4.1.2 Circuit Diagram Of Traffic Light/ Wiring Diagram Of Hardwares

Fig.2.12: Traffic Light Model Circuit

38

2.4.1.3 Ancillary Equipment


To carry out the suggested applications, the following ancillary equipment will be required:
1.PLC Interface module.
2.PLC At least 5 input and 8 output lines and a 24 V dc output are required.

2.4.2 PLC INTERFACE MODULE HARDWARE


The module comprises:
A multiway connector at the top of the module to receive the ribbon cable from the Feedback
PLC Interface module 34-403 which provides means for all the required connections to the PLC.
The PLC Interface 34-403 is a box with a connector to accept the ribbon cable from the module,
together with screw-in terminals to accept the connection lines from the chosen PLC. The 24V
dc line from the PLC is used to provide the +5V dc supply that the traffic signals module
requires. 4mm sockets are provided for this supply connection. A typical connection diagram for
the system is shown in Fig.2.13. The actual connections to the PLC will differ depending on the
manufacturer and model of the PLC used.
Fig.2.13: PLC Interfacing Hardware Module

2.4.2.1 PLC Interface Hardware Components


Following are the hardware components.

39

IC DM7407, IC L78M05CV, DECOUPLING CAPACITORS, DIODE IN4002, PORTS.


IC DM7407
This device contains six independent gates each of which performs a buffer function. The opencollector outputs require external pull-up resistors for proper logical operation.
Function Table.
A=Y

Pin Diagram Of

Fig.2.14:
DM7407

IC L78M05CV
The L78M05CV is a three-terminal positive regulator. These regulators can provide local on-card
regulation, eliminating the distribution problems associated with single point regulation. Each
type employs internal current limiting, thermal shut-down and safe area protection, making it
essentially indestructible. If adequate heat sinking is provided, they can deliver over 0.5A output
current. Although designed primarily as fixed voltage regulators.

Fig.2.15:
Diagram Of IC L78M05CV

Pin

Decoupling Capacitor
A decoupling capacitor is a capacitor used to decouple one part of an electrical network (circuit)
from another. Noise caused by other circuit elements is shunted through the capacitor, reducing
the effect it has on the rest of the circuit. An alternative name is bypass capacitor as it is used to
bypass the power supply or other high impedance component of a circuit.
Diode IN4002

40

The IN4002 series is a family of popular 1.0A general purpose silicon rectifier diodes commonly
used in AC adapters for common household appliances. Blocking voltage varies from 50 to 1000
volts. This diode is made in an axial-lead DO-41 plastic package.

Fig.2.16: Diode IN4002


Ports
In computer networking, a port is an application-specific or process-specific software construct
serving as a communications endpoint in a computer's host operating system. The purpose of
ports is to uniquely identify different applications or processes running on a single computer and
thereby enable them to share a single physical connection to a packet-switched network like
the Internet.

Fig.2.17: Ports

2.4.2.2 PLC Interfacing Circuit Diagram / Wiring Diagram Of Hardware

41

Fig.2.18: PLC Interfacing Circuit

2.4.3

PLC

42

It is designed for use in an industrial environment, which uses a programmable memory for the
integral storage of user-oriented instructions for implementing specific functions such as logic,
sequencing, timing, counting, and arithmetic to control through digital or analog inputs and
outputs, various types of machines or processes.

2.4.3.1

Connections For Mitsubishi FX0-30MR PLC

Connecting the PLC Whichever PLC is used with the equipment, it must be connected to the
PLC Interface 34-403 using normal, stranded, insulated equipment wire. The PLC for use in this
project is the Mitsubishi FX0-30MR (Feedback 34-351), although any PLC with similar
specification may be substituted. All of the connections to the PLC are to be found along the
edges of the PLC Interface, 34-403, board.
2.4.3.2 Connections Between 34-403 And FX0-30MR PLC (34-351)
A connection scheme that will correspond with the project program provided with the equipment
is given in table.2.2.
Inputs

Outputs

Table.2.
2: (a) Inputs And (b) Output Suggest Connection Scheme.

43

2.4.4

PROGRAMMING SOFTWARE

To be able to design a PLC program using a computer, it is essential for the software to have the
following facilities:
1. Ensure the Gx-Developer software has been installed in the computer.
2. From Windows desktop, select the Gx-Developer icon.
3. The display now becomes, as shown in Fig 2.19.
4. As can be seen from Fig.2.19 there are large number of icons and this can be confusing to the
first-time user. Hence, initially, only an essential minimum number of icons will be displayed.
5. From the main menu, select View and then Toolbar.
6. Delete the items, which no longer are identified by an X.
7. Select OK, to return to the Main Display.
2.4.4.1 GX-Developer Software
The Gx-Developer software is a PLC programming tool for the creation, testing and maintenance
of programs associated with task. It operates on IBM compatible personal computers with
Pentium or better central processors. It run in a Microsoft windows environment. It enables users
to produce ladder diagram projects for use with the Mitsubishi range of PLCs. It has been
produced by Mitsubishi Electric to replace the DOS-based package, MEDOC. The information
within a Gx-Developer project consists of ladder programs, operands, required PLC memory
content, I/O table, expansion instructions (if applicable) and symbols. Each Gx-Developer
project file is separate and is a single document.
2.4.4.2 GX-Developer Software Startup Procedure And Layout
1. Ensure the Gx-Developer software has been installed in the computer.
2. From Windows desktop, select the Gx-Developer icon
3. The display now becomes, as shown in Fig 2.19.
4. As can be seen from Fig.2.19 there are large number of icons and this can be confusing to the
first-time user. Hence, initially, only an essential minimum number of icons will be displayed.
5. From the main menu, select View and then Toolbar
6. Delete the items, which no longer are identified by an X.

44

7. Select OK, to return to the Main Display.

Fig.2.19: Layout of Gx-Developer

2.4.4.3 Opening A New Project


1. From the main menu, select Project.
2. Select New Project.
3. Enter the details as shown in Fig.2.20,
i.e.
(a) PLC Series FXCPU.
(b) PLC Type FX2N(C).
(c) Setup project name 3.
(d) Drive/Path c:\gxdevel\fxi.
(e) Project name flash1.
(f) Select Ok then Yes.
Fig.2.20: New Project Window

45

4. The display now becomes as shown in Fig. 2.21.

Fig.2.21: Work Place

2.4.4.4 Ladder Diagram Number


To enable Gx-Developer to have the same key press numbers as used with MEDOC,
carry out the following:
1. From the main menu, select Tools.
2. Select Customise keys.
3. Select MEDOC format.
4. Select OK.
This means that the ladder diagram can be constructed by:
1. Normally open contact
2. Normally closed contact
3. Normally open parallel contact
4. Normally closed parallel contact
5. Vertical line

46

6. Horizontal line
7. Output coil
1. Using the mouse and selecting the required device.
2. Using the keyboard to enter the number corresponding to the required device.

2.4.4.5 Project Data List


The project data list, which is displayed on the left-hand side of the ladder diagram as
shown in Fig.2.22, is used for a variety of purposes, i.e.

Fig.2.22: Data List Window


1. Rename the program name from MAIN to something more appropriate.
2. Enable comments to be saved in the PLC .
3. Enter numerical values and download them directly into Device Memory
2.5 HOW TO PRODUCE AND RUN A LADDER DIAGRAM IN GX-DEVELOPER ?
PLC program FLASH-1 enables a PLC output, i.e. Y0, to be turned ON/OFF at a controlled rate.
In this example, the Output Y0 will be ON for 1 sec and then OFF for 1 sec. It will be used to
describe how a PLC ladder can be produced, modified and tested. Then using a Mitsubishi
FX2NPLC, the program will be downloaded, run and monitored. PLC ladder diagram FLASH-1.

Fig
PLC Program Flash-1

.2.23:

47

2.5.1 Entering A Ladder Diagram


The ladder diagram of FLASH1, as shown on page 46, will now be entered.
1. Entering the first contact, normally open X0.
(a) Using the mouse select the normally open contact (Fig.2.24).

Fig.2.24: Symbol Window


(b) Enter the device name X0.
(c) Select OK.
2. Second contact normally closed T1.
Use the keyboard to enter the following:
(a) 2 for a normally closed contact.
(b) T1.
(c) Enter.
4. Output, timer T0. Enter the following
(a) 7 for a coil. (b) T0. (c) Space. (d) K10. (e) Enter.
6. The first line of the ladder diagram is now as shown in Fig.2.25.

Fig.2.25: Programs First line


7. Complete the remainder of the ladder diagram, as shown on page 53 by entering the
The desire elements.
8. End instruction will end the program. Ladder diagram Flash-1 will now become complete.
2.5.2 Conversion To An Instruction Program
1. Before the program can be saved, the ladder diagram must first of all be converted
into a set of instructions.

48

2. To execute the conversion process, carry out the following:


(a) From the main menu, select Convert.
(b) From the Convert menu, select Convert F4.
3. Note: (a) The grey unconverted background area becomes clear.
(b) Line numbers appear at the start of each line.
2.5.3 Saving The Project
To save the project on the hard drive, carry out the following:
1. From the main menu, select Project.
2. Select Save.
3. The project FLASH1, will now be saved in the folder c:\gxdevel\fxi\flash1.
4. Alternatively, from the main toolbar, select the save icon.
2.5.4 Program Error Check
After a ladder diagram has been produced, it is advisable to check that it does not
Contain any errors.
The types of errors, which are checked for are:
1. The correct instructions have been used for the PLC type.
2. The same output coil, i.e. Y0 has not been used more than once.
3. There is consistency concerning paired instructions, i.e. SET and RESET, MC and MCR.
1. From the Tools menu, select Check program Fig.2.26.
2. Select Execute.

Fig.2.26: Checking Window

49

2.5.5 Downloading A Project To A PLC Unit


The following notes describe how the project FLASH1 is downloaded to an FX2N PLC.
Connection diagram
Connect the computer to the FX2N PLC, as shown in Fig.2.27.

Fig.2.27: Connection Computer To The FX2N PLC


Download procedure
1. The SC 09 converter is used to convert the RS232 signals from the computer to the
RS 422 format required by the PLC.
2. Ensure the PLC is switched ON and that it is in Stop Mode.
3. Load the project FLASH1 and display the ladder diagram.

Fig.2.28: Write To PLC Window

Fig.2.29: Execution Window

4. Connect up the computer to the FX PLC, as shown in the circuit diagram

50

5. From the main menu, select Online.


6. Select Write to PLC.
7. The display now becomes as shown in Fig.2.28.
8. Select the Param+Prog button on the display in Fig.2.28 to enable the Program and Parameters
for the project FLASH1 to be downloaded.
9. Select Execute.
10. Select Yes, and the Parameters and Main program will be downloaded to the PLC Fig. 2.29
2.5.6 Executing The Project
To execute the project FLASH1, carry out the following.
1. On the FX2N PLC, switch to RUN.
2. Switch X0 ON.
3. The Y0 Output LED, will now continuously flash ON for 1 sec and then OFF for 1 sec.

2.8 TECHNICAL DATA


The module should be set up with a ribbon cable connecting it to the PLC Interface 34-403 and
two 4 mm leads connecting the 5V supply The lead connections are: Orange +5V Black 0V On
the PLC Interface box 34-403, Y0 to Y7 must be connected to the output lines of the PLC and
are used to send lamp data to the board. There are 8 lamps, controlled by sending an appropriate
signal to the relevant output line from the PLC. The lines that control the lamps are listed in
Table.2.3.

51

Table.2.3: Lines for lamp control


Table.2.4: Switches input lines
On the PLC Interface box 34-403, X10 to X14 must be connected to the input lines and are used
to read switch status from the board. There are five switches on the panel. The allocation of lines
is shown in Table.2.4 Each switch signal is high (value 1) when the switch is not operated, and
goes low (value 0) when operated.

2.7 TRAFFIC SIGNAL CONTROL PROGRAMMING FLOW DIAGRAM

Fig.2.30: Traffic Light Control Program Flow Diagram

52

2.8 LADDER PROGRAMMING FOR TRAFFIC LIGHT CONTROL

53

Fig.2.31: Traffic Light

Control Ladder Logic Diagram (1,2 of 6)

54

Fig.2.32: Traffic Light Control Ladder Logic Diagram (3,4 of 6)

55

Fig.2.33: Traffic Light Control Ladder Logic Diagram (5,6 of 6)

56

2.9 TRAFFIC SIGNAL LADDER DESCRIPTION


The ladder diagram is given in figure:

Initially M10(normally closed) sets S2(Normally open).


When we press east switch (x0 , normally open) M0(Internal relay) set.
When we press west switch (x1, normally open) M1 sets.
When we press South switch (x2, normally open) M2 sets.
When we press North switch (x3, normally open) M3 sets.
When we press crossing switch (x4, normally open) M4 sets.
In start as S2 sets by M10, initially all the three red lights (South red Y0, West red Y3,

Crossing red Y6) sets. After time (T1) 1 second S23 sets.
As S23 sets South amber (Y1), M10 sets and S2 reset. S2 reset means only S2 goes low

other parallel coil with S2 remains high. After time (T2) 2 second S24 sets.
As S24 sets South green (Y2) sets and South red (Y0), South amber (Y1) and S23 reset.
After time (T3) 2 seconds if there is any request from either East switch (x0), West switch
(x1) or Crossing switch (x4) then either M0 , M1 or M2 set which set S25 and reset M2

and M3.
As S25 sets south amber(Y1) sets and south green (Y2) reset. After time (T3) 1 second

S24 sets and S26 reset.


As S26 sets South red (Y0) sets and South amber (Y1), S25 reset. After time (T4) 1

second S27 set.


As S27 sets West Amber (Y4) sets and S26 reset. After time (T5) 1 second S28 sets.
As S28 sets West green (Y5) sets and West red (Y3), West amber (Y4) reset. After time
(T6) 2 second S27 reset. Here when time (T6) is set, if either South switch (x2) or North
switch (x3) or both are set and crossing switch (x4) is not set then either M2 or M3 or
both internal relay set thus S29 will be set and M0, M1 will be reset. If both M2 and M3

are high or low and Crossing switch (x4) set then S51 will be set.
If previous both or either North and south switch (x2, x3) were high and crossing request
(x4) was absent then S29 was set which set West amber (Y4) and reset west green (Y5),

S28. After time (T7) 1 second S2 sets again and West amber (Y4), S20 reset.
If previous both or either North and south switch (x2, x3) were high crossing request (x4)
was present then S51 was set which sets West amber (Y4) and reset to West green (Y5),

S28 and M4.After time (T9) 1 second S52 sets.


As S52 sets West red ( Y3) sets and West amber (Y4), S51 reset. After time (T10) 1
second S53 sets.

57

As S53 sets Crossing green (Y7) and Crossing red (Y6) , S52 reset. After time (T11) 2
second when T1 high S2 again and crossing red (Y6) set and S53, Crossing green (Y7)

reset.
[END]

2.10 OPERATION OF TRAFFIC LIGHT CONTROL SYSTEM


The correct sequence of light patterns as outputs are given in Table.2.5 contains all the required
patterns, although some of them will be repeated in the full sequence.

Table.2.5:

Traffic

Light Sequence
It is required (in

the

pedestrians)

allow vehicles to

travel

to

alternately

along

absence
the

of

north-

south and east-west roads. However, if a pedestrian presses the request button by the crossing,
the normal sequence should proceed until the south road lights return to red, and then be
suspended, whilst the crossing lights turn to green and back to red before the sequence continues.
Therefore, the pedestrian crossing should be arranged to have the same number of steps in its
sub-sequence as in those for traffic on each of the two roads. For this reason, Table 2.5 shows
'dummy' entries in the sequence at lines 1 and 3, in order to make up the regular pattern of four
lines per sub-sequence. Each of the lines of Fig.2.5 will have associated with it two pieces of
data. One is the output pattern the other is the required time delay. It is not necessary to make
the times very accurate. It must be remembered however that a pedestrian may press the button
to request a green light on the crossing at any time; they will then expect the system to remember

58

their request until it has been fulfilled. Project algorithm is capable to take into account the fact
that a pedestrian may make a request even during the delay period. From the above table the
operation is now become easy to understand for any request. Initially lights of (East/West,
North/South and crossing) signals are red. Since any sequence operation can be set depending
upon the East/West, North/South and Crossing switch.
NORTH/SOUTH Switch pressed
When there is a car sensing by the North/South switch. The North/South signal amber light turn
on for 1 second with red light also on. After 1 second the amber and red lights turn off and green
light of North/South switch turn on for the 6 seconds. After 6 seconds green light turn off and
amber light turn on for 3 seconds. After 3 seconds amber light turn off and red light turn on ,
again initial state reached. At this time East/West and crossing signals light remain red.
EAST/WEST Switch pressed
When there is a car sensing by the East/West switch. The East/West signal amber light turn on
for 1 second with red light also on. After 1 second the amber and red lights turn off and green
light of North/South switch turn on for the 6 seconds. After 6 seconds green light turn off and
amber light turn on for 3 seconds. After 3 seconds amber light turn off and red light turn on ,
again initial state reached. At this time North\Switch and crossing signals light remain red.
PEDESTRIAN Request
When there is a request from pedestrian and the system is not in initial state means performing
operation in either North/South or East/West signals the request will then stored by the system
and will perform after some delay until the system attend the initial state. If system currently
working in East/West or North/South signals and when experiences a pedestrian request, system
thus altered by the pedestrian request and request is store. After performing the complete
sequence for the signals the system will attain the initial (i-e All signals lights red) state,
pedestrian signal red light turn off and green light for 6 seconds turn on.

CHAPTER 3

59

AUTOMATIC WASHING MACHINE CONTROL BY PLC


3.1 INTRODUCTION
A washing machine is designed to wash laundry, such as clothing, towels, and sheets. The term is
most applied only to machines that use water as a primary cleaning solution as oppose to dry
cleaning or ultra cleaners, washing entails immersing, dipping rubbing or scrubbing in water or
other liquids, usually accompanied by soap, detergent or bleach. The simplest machine can
simply agitate the clothes in water while switched on. Now referred to as an automatic washer
was at one time referred to as a "washer/extractor", which combines the features of two devices
into a single machine, plus the ability to fill and drain water by itself. It is possible to take this a
step further, and to also merge the automatic washer and clothes dryer into a single device, called
an automatic washing machine. An automatic washing machine may fill, empty, wash, spin and
heat in an automated complex cycle.
Advantages of Automatic Washing Machine are:

It is cost efficient.
Less space required.
No human efforts.
Fully automated.

3.2 GENERAL DESCRIPTION


The Automatic Washing Machine module is an interactive mimic diagram of a typical household
washing machine. It is designed to be controlled by a range of PLC's for the purpose of
providing exercises in the use of a PLC to monitor and control objects external to itself.
The system can be divided into five main parts:

Hardware model.
PLC Interfacing module. (Similar as used in traffic light).
PLC (Similar as used in traffic light).
Programming Software (Similar as used in Traffic light).
Ladder logic programming.

3.2.1 HARDWARE MODEL

60

The Automatic Washing Machine module comprises a screen-printed panel carrying lamps and
switches to simulate the actions of this typical household appliance. Associated electronics are
mounted on the open board and a connector for the interconnecting ribbon cable is mounted at
the top. There are nine controls on the panel. The four switches at the top of the panel represent
Various alternate functions that the user can choose for the machine to perform, and which are
selected before starting. A fiber glass panel with a mimic diagram of the basics of an automatic
washing machine with relevant controls. This is shown in Fig.3.1.
Fig.3.1: Hardware Model Of Automatic Washing Machine
The start button to the right represents the user control that starts the machine. All the other
controls represent sensors which, in a real washing machine, would respond to some condition
within the machine, but on the module are controlled by the user. The lamps on the panel are all

controlled by the PLC. The three lamps to the left of the motor represent three different running
conditions of the main motor, which might in a real machine be brought into operation by three
relays (electromechanical or solid-state) controlled precisely as you would control the lamps. The

61

'pump on' lamp likewise represents an auxiliary motor which drives the pump which empties the
machine. The 'hot on' and 'cold on' lamps represent solenoid-operated water valves, which admit
water to the machine when energized, and shut off the water supply otherwise. The 'locked' lamp
represents a further solenoid that locks the door so that the machine cannot inadvertently be
opened when the machine is full of water. The other lamps represent indicators on the washing
machine's control panel, to assure the user that the machine has started, and is filling with water
at an appropriate temperature (since unlike the motors, which can be heard operating, filling can
be quite quiet).

3.2.1.1

Hardware Components

PL1, IC 74HC240, LEDS, Zener Diode, Push Buttons, Resistors, Capacitors, fuse.
Programming Language 1 (PL1)
PL/I is a structured language to develop systems and applications programs (both business and
scientific).
Significant features :

Allows Free format


Regards a program as a continuous stream of data
Supports subprogram and functions
Uses defaults

Building blocks of PL/I :

Made up of a series of subprograms and called Procedure


Program is structured into a MAIN program and subprograms.

Subprograms include subroutine and functions.

IC 74HC240
The 74HC240; 74HCT240 is a high-speed Si-gate CMOS device and is pin compatible with
Low-Power Schottky TTL (LSTTL).The 74HC240; 74HCT240 is a dual octal inverting
buffer/line driver with 3-state outputs. The 3-state outputs are controlled by the output enable

62

inputs 1OE and 2OE. A HIGH on nOE causes the outputs to assume a high impedance OFFstate.

Logic Symbol
Diagram

Fig.3.2:
Fig.3.3:

74HC240
74HC240 Pin

RS- 232 Serial Port (Flexible Cable To Connect PC With Computer)


An RS-232 serial port is a standard feature of a personal computer, used for connections
to modems, printers, mice, data storage, uninterruptible power supplies, and other peripheral
devices. RS-232 is a standard for serial communication transmission of data. It formally defines
the signals connecting between a DTE (data terminal equipment) such as a computer terminal,
and a DCE (data circuit-terminating equipment, originally defined as data communication
equipment), such as a modem.The RS-232 standard is commonly used in computer serial ports.
RS-232 devices are widely used, especially in industrial machines, networking equipment and
scientific instruments.

Fig.3.4: RS-232 Serial Port

63

64

3.2.1.2 Circuit Diagram Of Automatic Washing Machine / Wiring Diagram


Of Hardware

Fig.3.5: Circuit Diagram Of Automatic Washing Machine

65

3.2.2.3 Ancillary Equipment


To carry out the suggested applications, the following ancillary equipment will be required:
1.PLC Interfacing module
2. PLC. At least 9 input and 14 output lines and a 24V dc output are required.

3.3 TECHNICAL DATA


The module should be set up with a ribbon cable connecting it to the PLC Interface 34-403. The
module should then be connected to the power supply outputs from the 34-403. The lead
connections are: Orange +5V, Black 0V.
Output and input lines should be connected from the Interface to the chosen PLC. On the PLC
Interface box 34-403, Y0 to Y13 must be connected to the output lines of the PLC and are used
to send lamp data to the board. There are fourteen lamps, controlled by sending an appropriate
signal to the relevant output line from the PLC.
The lines that control the lamps are listed in Table.3.1. On the PLC Interface box 34-403, X10 to
X18 must be connected to the input lines and are used to read switch status from the board. There
are

nine switches on the panel. The allocation of lines is


shown in Table.3.2.

Table.3.1: Output Lines

Table.3.2: Input Lines

66

Each switch signal is high (value 1) when the switch is not operated, and goes low (value 0)
when operated.

3.4

AUTOMATIC WASHING MACHINE FLOW DIAGRAM

67

Fig
3.6(a): Automatic Washing Machine Flow Diagram (1 of 3)

68

Fig
.3
(b): Automatic Washing Machine Flow Diagram (2 of 3)

.6

69

Fig.3.6(c): Automatic Washing Machine Flow Diagram (3 of 3)

3.5 LADDER LOGIC PROGRAMMING


The Ladder logic diagram from 1-27 is given in the appendix.

3.6 AUTOMATIC WASHING MACHINE LADDER DESCRIPTION

When we press start switch (x7) and push the door close switch (x4) then start output
(Y14), door locked (Y2) and internal relay M1 set. For M1 to be set it is necessary that

M3 must be high.
After pressing the start switch and door close switch if we dont push/select inputs cool
wash (x2), hot wash (x3) and Spin( x1) also the internal relay M5 is high then by

releasing of start switch, outputs start (Y14) and door locked (Y2) become reset.
When M1 sets high, hot wash (x3) press and cool wash (x2) is not press then S1 (Hot fill)

will be set otherwise this ladder will not run.


When M1 sets high, cool wash (x2) press and hot wash (x3) is not press then S11 (Cool

fill) will be set otherwise this ladder will not run.


When M1 sets high, spin (x1) press and cool wash (x2), hot wash (x3) not press then M4
will be set. If cool wash (x2) and hot wash (x3) set along with M1 and spin (x1) then M4,

S52 (Spin cycle distribute load) set.


When M1 sets high, half load (x0) press internal relay M2 will be set. After time (T0) 10

second M3 sets.
If hot wash (x3) initially selected, then S1(Hot fill) is set, which will set tub filling (Y3),

Hot on (Y12), and M5.After time (T1) 0.5 second S2 sets.


As S2 sets Hot on (Y11) sets and Hot fill (S1) reset. After time (T2) 4 seconds, During

time T2 if Tub half full (x5) is pressed it will set S3 (Half or Full ?)
As S3 sets, Tub half full (Y5) sets and S2 reset. Here M2 is the internal relay which was
set high by half load switch (x0).If M2 was set high by half load (x0) then S20 (Start
wash cycle) will be set and S3, Tub filling (Y3) and Hot on (Y12) will be reset. If M2

was not set by Half load (x0) then S4 (Fill full) sets. After time (T3) 4 seconds.
As S4 sets, if during time T3 Tub full (x6) push then Tub full (Y4), S20 (Start wash
cycle) set and S3, Hot on (Y12), Tub filling (Y3) and S4 reset.

70

Now consider If Cool wash (x2) initially selected then S11(Cool fill) is set, which will set
tub filling (Y3), Hot on (Y12),Cold on (Y13) and M5.After time (T4) 0.5 second S12

sets.
As S12 sets, Tepid (Y10) sets and cool fill (S11) reset. After time (T5) 4 seconds, During

time T5 if Tub half full (x5) is pressed it will set S13 (Half or Full ?)
As S13 sets, Tub half full (Y5) sets and S12 reset. Here M2 is the internal relay which
was set high by half load switch (x0).If M2 was set high by half load (x0) then S20 (Start
wash cycle) will be set and S13, Tub filling (Y3), Cold on (Y13) and Hot on (Y12) will
be reset. If M2 was not set by half load (x0) then S14 (Fill full) sets. After time (T6) 4

seconds.
As S14 sets, if during time T6, Tub full (x6) push then Tub full (Y4), S20 (Start wash

cycle) set and S13, Hot on (Y12),Cold on (Y13), Tub filling (Y3) and S14 reset.
As S20 (Start wash cycle set), then slow forward (Y6) set. After time (T10) 3 seconds,

S21 sets.
As S21 sets, S20 (Start wash cycle) and slow forward (Y6) reset. After time (T11) 0.5

second, S22 set.


As S22 sets, slow reverse (Y15) sets and S21 reset. After time (T12) 3 seconds S23 sets.
As S23 sets, slow reverse (Y15) and S22 become reset. After time (T13) 0.5 second S24

(Repeat wash cycle 2 times) sets.


As S24 sets, a counter (C1) for 3 times set and S23 reset. During 3 counts C1 will be low
then it will set S20 and reset S24. As S24 will set same ladder sequence from S20 to S24
will be run until counter completes. When C1 counts complete 3 times C1 will then be

high and will set S25 (Empty tub).


As S25 (Empty tub) sets, then Pump on (Y1) sets and S24 become reset. After time (T14)

0.5 seconds, S26 sets.


As S26 sets, Tub full (Y4) and S25 (Empty tub) become reset. After time (T15) 4 seconds

S27 sets.
As S27 sets, Hot (Y11), Tepid (Y10), Pump on (Y1) and S27 become reset, and S29

(Short spin cycle distributed load) sets.


As S29 sets, then Pump on (Y1) and slow reverse (Y15) again become set and S28 reset.
After time (T17) 5 seconds, S30 (Spin and detect vibration) sets and slow reverse (Y15)
reset.

71

As S30 sets, S29 become reset. Here if vibrations (x10) occur/press during the fast spin
then S31 (Vibration detected distribution load 3 attempts) sets. If no vibration occur/press

during fast spin, then after time (T18) 5 seconds, S32 (End spin) sets.
As S31 sets, slow reverse (Y15) and counter (C2) for 3 times become set; Fast forward
spin (Y0) reset. During the 3 counts C2 will be low, and then it will reset S31 and slow
reverse (Y15), after a delay time (T19) 4.5 seconds. This result is S31 become low, and
since vibration is not present the control will go back to S30 which is already set. If again
during the fast spin vibration occur/press then S31 will set again and counter status will
increment by 1, same ladder sequence for the occurrence of vibration during the fast spin
will perform for 3 times then this process become abandonee. C2 now become high
which then set S32 (End spin) and S30 (Spin and detect vibration),timer (T19) and slow

reverse (Y15) become reset


As S32 sets, then S30 (Spin and detect vibration), S31 (Vibration detect distribution load

3 attempts) and pump on (Y1) become reset, and S33 (Rinse cycle tub fill with cold) sets.
As S33 sets, then Tub filling (Y3) and clod on (Y13) become set. After time (T20) 0.5

second S34 sets.


As S34 sets, then cold (Y7) sets and S23 (Rinse cycle tub filling with cold) become reset.
Now same sequence of ladder (i-e Tub Half or full fill, Wash cycle/Rotational cycle,
Empty tub, Short spin cycle distributed load, spin and detect vibration, Vibration detected
distribution load 3 attempts and End spin) with different internal and auxiliary relays

names will perform as previously has been performed for Hot or Tepid wash.
Here Rotational cycle will repeat for one more cycle, repetition will be performing by

counter (C3) for 1 time.


After S48 (Vibration detected distribution load 3 attempts), the ladder control will reach
to S49 (End spin), where S48 (Vibration detected distribution load 3 attempts), Pump on
(Y1), S47(Spin and detect vibration) and fast forward spin (Y0) become reset and S50

(Repeat rinse cycle for 2 times) sets.


As S50 sets, then counter C5 with 2 time status perform the complete ladder of rinse
cycle (i-e Rinse cycle tub filling with cold, Tub Half or full fill, Wash cycle/Rotational
cycle, Empty tub, Short spin cycle distributed load, spin and detect vibration, Vibration
detected distribution load 3 attempts and End spin). After C5 incremented 2 times, C5
become high which then set S51 (Long spin detected).

72

As S51 sets, then S50 (Repeat rinse cycle 2 times reset. If spin (x0) was not selected
initially then S56 (Reset all variables) will be set. If spin (x0) was selected initially then

S52 (Spin cycle distributed load) and pump on (Y1) sets.


As S52 (Spin cycle distributed load) sets, then same ladder sequence as performing
before for (spin and detect vibration and Vibration detected distribution load 3 attempts)

of Hot Cold or Tepid wash will perform with sufficiently greater delay times.
After S52 (Spin cycle distributed load), S53 (Long spin and detect vibration) and S54
(Vibration detected distribution load 3 attempts) the control will reach to S55 (End spin),
where , S53 (Long spin and detect vibration), S54 (Vibration detected distribution load 3
attempts ), pump on (Y1), and Fast forward spin (Y0) become reset and S56 (Reset all

variables) become set.


As S56 (Reset all variables) sets, then Door locked (Y2), start (Y14), S51 (Long spin
selected),

S55

(End

spin),Internal

relays(i-e

M2,

M3,M4,M5),Counters

(i-e

C1,C2,C3,C4,C5 and C6) become reset. After time (T36) 0.2 seconds, S56 (Reset All

Variables) also goes reset.


[END]

3.7 OPERATION OF AUTOMATIC WASHING MACHINE


3.7.1 Start Sequence
a) If START is pressed and DOOR is open, there is no response.

73

b) If START is pressed and DOOR is closed, START and LOCKED lamps light. If no wash or
spin program has been selected, these lamps are extinguished on release of START
3.7.2 Hot Wash Program With Half Load Not Selected
a) On starting with door closed HOT ON and TUB FILLING lamps light.
b) About one second later, HOT lamp lights to show tub water temperature. As filling continues
an indication is given by the TUB HALF FULL lamp when the associated button (representing a
liquid level sensor) is pressed. Thereafter filling is completed when the TUB FULL button is
pressed, and is indicated by the corresponding lamp. In the event of either liquid level sensor
failing to operate, a time-out should occur to stop filling and light the lamp. When filling is
complete the HOT ON and TUB FILLING lamps are extinguished.
c) Three wash cycles next take place. Each cycle consists of two seconds of SLOW FORWARD,
half a second pause and then two seconds SLOW REVERSE.
d) At the end of the wash the tub is emptied. The PUMP is switched on and after successive
delays the TUB FULL and TUB HALF FULL lamps are extinguished, followed after a further
delay by the HOT lamp and the PUMP.
e) A short spin cycle follows. During this the PUMP is on. The cycle starts with a five second
period of SLOW REVERSE intended to distribute the load evenly within the tub. Five seconds
of FAST FORWARD SPIN follow, during which the VIBRATION SENSOR is monitored. If this
detects excessive vibration (i.e. the button is pressed), the spin is interrupted by a period of
SLOW REVERSE in a further attempt to distribute the load. If three attempts fail to remove the
vibration the spin cycle is abandoned; otherwise it ends when the required total spin time has
been achieved. The PUMP is then switched off.
f) The tub is now filled in the same manner as before, except that cold water is used, so that
COLD ON and COLD lamps are lit instead of HOT ON and HOT.
g) Next a rinse follows. This is like a wash, except that only two cycles are required of SLOW
FORWARD followed by SLOW REVERSE.
h) Empty, short spin, fill and rinse follow in sequence until three rinses have been completed and
the tub is empty. If SPIN has been selected at the start a final long spin now occurs. This is
exactly as described at step (e) except that the spin duration is longer.
i) The machine finally stops with all lamps extinguished.

74

3.7.3 Hot Wash Program With Half Load Selected


This is exactly as Sequence 2 except that tub filling ceases when the tub is half full.
3.7.4 Cool Wash Selected
This is similar to Sequences 2 and 3 except that both COLD ON and HOT ON lamps light during
step 2(a). Also the TEPID lamp lights instead of the HOT lamp.
3.7.5 Spin without Wash Selected
If at the start SPIN is selected, but neither HOT WASH nor COOL WASH is selected, then only
the final spin indicated at 2(i) takes place; no other actions are required.

CHAPTER 4

RESULT
4.1 INTRODUCTION

75

This chapter shows the results of hardware model specified in previous chapter, both models are
control by Mitsubishi PLC through Gx-Developer ladder programming software. A
programmable logic controller (PLC) enables the user to control machines and processes. GxDeveloper programming software enables the user to construct the ladder diagrams for machine
or process control, run a ladder either through Gx-simulator or PLC, analyze the results, manage
and control the complete integrated data, ladder programming environment. Online write to PLC,
Check Ladder parameters, Write mode, Monitor mode, Run mode, Operation stop and run mode,
etc, enabling the user to alter system parameters after the run of ladder program and thereby view
the effects while the hardware model is in progress. In this chapter we will see the results of
following hardware models that were studied in previous chapters.
1. Traffic Light Control by PLC.
2. Automatic Washing Machine Control by PLC.

Fig.4.1: Hardware Model of Automatic Washing Machine and Traffic Light

4.2 ARRANGEMENT FOR TRAFFIC LIGHT CONTROL BY PLC

76

Fig.4.2 shows the arrangement for Traffic Light Control by PLC. It includes a personal computer
(PC) for programming, a flexible cable that connect PC with the PLC, Hardware model, PLC and
Interfacing box that provides interfacing between PLC and hardware model.

Fig.4.2: Arrangement For Traffic Light Control


All the input signals will be used. Let us call them 'requests' (whether from vehicles or
pedestrians).It is required to control the traffic lights according to the following rules:
Every change in the lights must follow one of the sub-sequences 0 to 3, 4 to 7, or 8 to 11 as listed
in table, subject to control by the requests received as follows.
A light, once it is at green, will remain so at least for the normal period stated in Table.4.4.
Thereafter it will remain green unless or until a request has been received for some other light. If
requests are received for both of the other lights, then they will be served according to the
sequence of Table.4.4. Every request must be stored until it is cancelled. Cancellation takes place
when the corresponding light goes green. Further requests for a light that is already green are
ignored. East and West requests are treated as equivalent, as are North and South. The decision
about which is to be the next sub-sequence has to be made in the middle of the present subsequence. It will therefore be necessary to remember the decision until the end of the present
sub-sequence, and then to implement the decision. Since implementation is associated with line 0

77

or line 4 or line 8 in the table 4.4. We may find it convenient to set a variable to 0 or 4 or 8 as the
case may be.

4.3 RESULT FOR TRAFFIC LIGHT CONTROL


1. When South/North switch press
Line

South/North

East/West

Pedestrian

Time ( sec)

Red
Red
Red
Red

Red
Red
Red
Red

1
6
3
1

1
Red/Amber
2
Green
3
Amber
4
Red
Total Time = 11 sec

SEQUENC
E
South/ North

Table.4.1: South/North switch press


2. When East/West switch press
Line

South/North

1
2
3
4
Total Time = 11 sec

Red
Red
Red
Red

East/West

Pedestrian

Time ( sec)

Red/Amber
Green
Amber
Red

Red
Red
Red
Red

1
6
3
1

SEQUENC
E
East/West

Table.4.2: East/West switch press


3. When Pedestrian switch press
Line

South/North

1
2
3
4
Total Time = 7 sec

Red
Red
Red
Red

East/West

Pedestrian

Time ( sec)

Red
Red
Red
Red

Red
Green
Red
Red

0
6
0
1

Table.4.3: Pedestrian switch press

SEQUENC
E
Pedestrian

78

4.3.1 Integrated Result Table For Traffic Light Control

Line
South/North
0
Red
1
Red
2
Red
3
Red
4
Red
5
Red
6
Red
7
Red
8
Red/Amber
9
Green
10
Amber
11
Red
Total Time = 29 sec

East/West
Red
Red
Red
Red
Red/Amber
Green
Amber
Red
Red
Red
Red
Red

Pedestrian
Red
Green
Red
Red
Red
Red
Red
Red
Red
Red
Red
Red

Table.4.4: Integrated Result Table

Time
0
6
0
1
1
6
3
1
1
6
3
1

Sub Sequence

Pedestrian

East/West

South/ North

79

4.4 ARRANGEMENT FOR AUTOMATIC WASHING MACHINE CONTROL BY PLC


Fig.4.3: shows the arrangement for Automatic Washing Machine Control by PLC. It includes a

personal computer (PC) for programming, a flexible cable that connect PC with the PLC,
Hardware model, PLC and Interfacing box that provides interfacing between PLC and hardware
model.

Fig.4.3: Arrangement For Automatic Washing Machine Operation

80

The model has all the necessary programming buttons/switches (9 inputs) to simulate the
operation of a domestic washing machine. The aim of this is to program the simulator in ladder
logic to carry out a washing cycle set by the inputs and activate the corresponding LEDs to
indicate that the washing cycle is active. This requires the use of internal Relays (for Start, Tub
Full, and Tub Half Full) and a sequencer to carry out the washing cycle. The Vibration sensor
Button and/or the Door Lock switch can be used to terminate the cycle or simulate the Vibration
that may occur if a machine is over-loaded.
4.4.1 Hot Wash Selected
It requires the activation of Hot Wash Input. The Tub Should be filled by pressing the Tub Full
Button to latch the condition. Once the Door is locked, and the Start button is pressed the Cycle
should start by:
1.
2.
3.
4.
5.
6.
7.

Door Locked indicator ON


Start Light ON
Indicate Hot Water Valve ON
Tub Filling ON
After some delay set by the Tub Full Button, Tub Full Indicator ON, Tub Filling OFF.
HOT Temperature Indicator ON
The Machine Indicates the Slow Reverse/Forward lights Turning ON/OFF in sequence

separated by reasonable delays.


8. After the Cycle is finished the Machine empties the Tub, i.e Pump ON and goes into Fast
Spin if the Spin button is pressed. A short spin cycle follows. During this the PUMP is
on. The cycle starts with a five second period of SLOW REVERSE intended to distribute
the load evenly within the tub. Five seconds of FAST FORWARD SPIN follow, during
which the VIBRATION SENSOR is monitored. If this detects excessive vibration (i.e.
the button is pressed), the spin is interrupted by a period of SLOW REVERSE in a
further attempt to distribute the load. If three attempts fail to remove the vibration the
spin cycle is abandoned; otherwise it ends when the required total spin time has been
achieved. The PUMP is then switched off.
9. All indicators are then switched OFF.

4.4.2 Cool Wash Selected


This is similar to above Sequences except that both COLD ON and HOT ON lamps light during
step 3.Also the TEPID lamp lights instead of the HOT lamp.

81

START
Line
1
2
3
4
Start
1
1
1
1
Door Locked
1
1
1
1
Hot Wash
1
1
1
1
Cold Wash
0
0
0
0
Spin
1
1
1
1
Half Load
1
1
1
1
Hot on
1
1
0
0
Cold on
0
0
0
0
Hot
0
1
1
1
Tepid
0
0
0
0
Cold
0
0
0
0
Tub Feeling
1
1
0
0
Tub Half Fill
0
0
1
1
Tub Full Fill
0
0
0
0
Slow Forward 0
0
1
0
Slow Reverse 0
0
0
0
Fast Forward
0
0
0
0
Vibration
0
0
0
0
Pump on
0
0
0
0
Time (sec)
0.5 4.0 3.0 0.5
4.4.3 Spin Without Wash Selected

WASH CYCLE
5
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
1
0
0
0
3.0

6
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0.5

7
1
1
1
0
1
1
0
0
1
0
0
0
1
0
1
0
0
0
0
3.0

8
9
1
1
1
1
1
1
0
0
1
1
1
1
0
0
0
0
1
1
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0.5 3.0

10
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0.5

11
1
1
1
0
1
1
0
0
1
0
0
0
1
0
1
0
0
0
0
3.0

12
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0.5

13
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
1
0
0
0
3.0

14
1
1
1
0
1
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0.5

If at the start SPIN is selected, but neither HOT WASH nor COOL WASH is selected, then
only the final spin indicated at step 8 takes place; no other actions are required.
The machine should indicate the sequence with reasonable delays so that the cycle is not too long
and also not too short so that the sequence can be observed easily. Similarly, by pressing or
latching the various switches and buttons a different washing cycle can be performed.

4.5 RESULTS FOR AUTOMATIC WASHING MACHINE CONTROL


4.5.1 Hot Wash And Spin With Half Load Selected
Here LED ON =1 and LED OFF=0 and assume vibration appears only 1 time.

82

WASH CYCLE
Line
Start
Door Locked
Hot Wash
Cold Wash
Spin
Half Load
Hot on
Cold on
Hot
Tepid
Cold
Tub Feeling
Tub Half Fill
Tub Full Fill
Slow Forward
Slow Reverse
Fast Forward
Vibration
Pump on
Time (sec)

RINSE CYCLE

15 16 17 18 19 20 21 22 23 24 25 26
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
1
1
0
0
0
1
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0.5 4.0 4.0 5.0 5 4.5 5.0 0.5 4.0 3.0 0.5 3.0
Table.4.5 (1 of 5) Hot Wash And Spin With Half Load Selected

27
1
1
1
0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0.5

28
1
1
1
0
1
1
0
0
0
0
1
0
1
0
1
0
0
0
0
3.0

41
1
1
1

42
1
1
1

Table.4.5 (2 of 5) Hot Wash And Spin With Half Load Selected

RINSE CYCLE
Line
Start
Door Locked
Hot Wash

29
1
1
1

30
1
1
1

31
1
1
1

32
1
1
1

ROTATIONAL CYCLE
33 34 35 36 37
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

38
1
1
1

39
1
1
1

40
1
1
1

83

Cold Wash
Spin
Half Load
Hot on
Cold on
Hot
Tepid
Cold
Tub Feeling
Tub Half Fill
Tub Full Fill
Slow Forward
Slow Reverse
Fast Forward
Vibration
Pump on
Time (sec)

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0.5

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
3.0

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0.5

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
1
0.5

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
1
4.0

0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
4.0

0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
5.0 5 4.5

0
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0.5

0
1
1
0
1
0
0
1
1
0
0
0
0
0
0
0
4.0

0
1
1
0
0
0
0
1
0
1
0
1
0
0
0
0
3.0

0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0.5

0
1
1
0
0
0
0
1
0
1
0
0
1
0
0
0
3.0

55
1
1
1
0
1
1
0
1
0
0
1
1
0
0

56
1
1
1
0
1
1
0
0
0
0
1
0
0
0

Table .4.5 (3 of 5) Hot Wash And Spin With Half Load Selected

RINSE CYCLE
Line
Start
Door Locked
Hot Wash
Cold Wash
Spin
Half Load
Hot on
Cold on
Hot
Tepid
Cold
Tub Feeling
Tub Half Fill
Tub Full Fill

43
1
1
1
0
1
1
0
0
0
0
1
0
1
0

44
1
1
1
0
1
1
0
0
0
0
1
0
1
0

45
1
1
1
0
1
1
0
0
0
0
1
0
1
0

SPIN CYCLE
46
1
1
1
0
1
1
0
0
0
0
1
0
0
0

47
1
1
1
0
1
1
0
0
0
0
0
0
1
0

48
1
1
1
0
1
1
0
0
0
0
0
0
0
0

49
1
1
1
0
1
1
0
0
0
0
0
0
0
0

50
1
1
1
0
1
1
0
1
0
0
0
1
0
0

51
1
1
1
0
1
1
0
1
0
0
0
1
0
0

52
1
1
1
0
1
1
0
0
0
0
0
0
0
0

53
1
1
1
0
1
1
0
0
0
0
0
0
0
0

54
1
1
1
0
1
1
0
1
0
0
0
1
0
0

84

STOP
Slow Forward
SlowLine
Reverse
Start
Fast Forward
Door
Locked
Vibration
Hot
Wash
Pump
on
Cold
Time Wash
(sec)
Spin
Half Load
Hot on
Cold on
Hot
Tepid
Cold
Tub Feeling
Tub Half Fill
Tub Full Fill
Slow Forward
Slow Reverse
Fast Forward
Vibration
Pump on
Time (sec)

0
57
0
0
0
0
0
0.5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.2

0
0
0
0
1
0.5

0
0
0
0
1
4.0

0
0
0
0
1
4.0

0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
5.0 5 4.5

0
0
0
0
1
0
0
0
1
0
0
1
0
1
1
0.5 5.0 8

0
1
0
0
1
4.5

0
0
0
0
0
0.5

0
0
0
0
0
4.0

0
0
0
0
0
3.0

Table.4.5 (4 of 5) Hot Wash And Spin With Half Load Selected

Total Time = Start + Washing cycle + Rinse Cycle+ Spin Cycle +Stop
= 4.05+49+76.5+2.5+0.2
= 132.5 sec
= 2 mint, 12.5 seconds.

85

START

WASH CYCLE

Line
1
2
3
4
5
6
7
8
9
10 11 12 13
Start
1
1
1
1
1
1
1
1
1
1
1
1
1
Door Locked
1
1
1
1
1
1
1
1
1
1
1
1
1
Hot Wash
0
0
0
0
0
0
0
0
0
0
0
0
0
Cold Wash
1
1
1
1
1
1
1
1
1
1
1
1
1
Spin
0
0
0
0
0
0
0
0
0
0
0
0
0
Half Load
0
0
0
0
0
0
0
0
0
0
0
0
0
Hot on
1
1
0
0
0
0
0
0
0
0
0
0
0
Cold on
1
1
0
0
0
0
0
0
0
0
0
0
0
Hot
0
0
0
0
0
0
0
0
0
0
0
0
0
Tepid
0
1
1
1
1
1
1
1
1
1
1
1
1
Cold
0
0
0
0
0
0
0
0
0
0
0
0
0
Tub Feeling
1
1
0
0
0
0
0
0
0
0
0
0
0
Tub Half Fill
0
1
1
1
1
1
1
1
1
1
1
1
1
Tub Full Fill
0
0
1
1
1
1
1
1
1
1
1
1
1
Slow Forward 0
0
1
0
0
0
1
0
0
0
1
0
0
Slow Reverse 0
0
0
0
1
0
0
0
1
0
0
0
1
Fast Forward
0
0
0
0
0
0
0
0
0
0
0
0
0
Vibration
0
0
0
0
0
0
0
0
0
0
0
0
0
Pump on
0
0
0
0
0
0
0
0
0
0
0
0
0
Time (sec)
0.5 4.0 3.0 0.5 3.0 0.5 3.0 0.5 3.0 0.5 3.0 0.5 3.0
Table.4.5 (5 of 5) Hot Wash And Spin With Half Load Selected

4.5.2

Cold Wash With Full Load And Spin Not Selected

Here LED ON =1 and LED OFF=0 and assume vibration appears only 1 time.

Table.4.6 (1 of 4) Cold Wash With Full Load And Spin Not Selected

14
1
1
0
1
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0.5

86

WASH CYCLE

RINSE CYCLE

RINSE CYCLE
Line
15 16 17 18 19 20 21 22 23 24 25 26 27 28
Start
1
1
1
1ROTATIONAL
1
1
1CYCLE
1
1
1
1
1
1
1
Door Locked
Line 1 291 301 311 321 331 341 351 361 371 381 391 401 411
Hot Wash
Start 0 10 10 10 10 10 10 10 10 10 10 10 10 10
ColdDoor
Wash
Locked1 11 11 11 11 11 11 11 11 11 11 11 11 11
Spin
Hot Wash 0 00 00 00 00 00 00 00 00 00 00 00 00 00
HalfCold
LoadWash 0 10 10 10 10 10 10 10 10 10 10 10 10 10
Hot onSpin 0 00 00 00 00 00 00 00 00 00 00 00 00 00
ColdHalf
on Load 0 00 00 00 00 00 00 01 01 00 00 00 00 00
HotHot on 0 00 00 00 00 00 00 00 00 00 00 00 00 00
Tepid
Cold on 1 01 01 00 00 00 00 00 00 10 10 00 00 00
Cold Hot
0 00 00 00 00 00 00 00 01 01 01 01 01 01
Tub Feeling
Tepid 0 00 00 00 00 00 00 01 01 00 00 00 00 00
Tub HalfCold
Fill
1 11 10 10 10 00 00 00 01 01 11 11 11 11
Tub Full
Tub Fill
Feeling1 00 00 00 00 00 00 00 00 11 11 01 01 01
Slow Tub
Forward
Half Fill0 10 10 10 10 00 00 00 00 01 00 10 10 11
Slow Tub
Reverse
Full Fill0 10 10 11 00 01 00 00 00 00 00 01 00 10
Fast Slow
Forward
Forward0 00 00 00 01 00 01 00 00 00 00 10 00 00
Vibration
Slow Reverse0 00 00 00 01 00 10 00 10 00 00 00 00 10
Pump
Faston
Forward1 01 01 01 01 01 01 10 00 00 00 00 00 00
Time Vibration
(sec)
0.5 4.0
4.0
5.0
0 5 4.5
5.0
0.5
4.0
3.0
0.5
3.0
0.5
3.0
0
0
0
0
0
1
0
0
0
0
0
0
Pump on
0
0
0
1
1
1
1
1
0
0
0
0
0
Time (sec)
0.5 3.0 0.5 6.0 4.0 5.0 5 4.5 0.5 4.0 3.0 0.5 3.0
Table.4.6 (2 of 4) Cold Wash With Full Load And Spin Not Selected

Table.4.6 (3 of 4) Cold Wash With Full Load And Spin Not Selected

87

RINSE CYCLE
Line
Start
Door Locked
Hot Wash
Cold Wash
Spin
Half Load
Hot on
Cold on
Hot
Tepid
Cold
Tub Feeling
Tub Half Fill
Tub Full Fill
Slow Forward
Slow Reverse
Fast Forward
Vibration
Pump on
Time (sec)

42
1
1
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0.5

43
1
1
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0.5

43
1
1
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
4.0

STOP
44
1
1
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
4.0

45 46 47
1
1
1
1
1
1
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
5.0 5 4.5

48
1
1
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0.5

49
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.2

Table.4.6: (4 of 4) Cold Wash With Full Load And Spin Not Selected

Total Time = Start + Washing cycle + Rinse Cycle +Stop


= 4.05+49+76.5+0.2
= 130 sec = 2 mint, 10 seconds.
CHAPTER 5

CONCLUSION AND FUTURE WORK

88

5.1 CONCLUSION
In general, a control system is a collection of electronic devices and equipment which are in
place to ensure the security, accuracy and smooth transition of process or a manufacturing
activity. It takes any form and varies in scale of implementation, from a power plant to a semiconductor machine. As a result of rapid advancement of technology, complicated control task
accomplished with a highly automated control system which may be in the form of
Programmable Logic Controller and possibly a host computer etc.
This thesis presents the application of Programmable Logic Controller (PLC) by using GXDeveloper ladder programming software. In this work the studies of PLC have been focused,
regarding their important and fundamental concepts and also their programming technique for
control process and machine. This thesis presents the application of PLC in Traffic Light Control
(TLC) and Automatic Washing Machine Control (AWMC) on experimental basis.
The basic programming logic and ladder programming is studied and implemented. The TLC is
one which would be able to allow the vehicle in a lane at a 4-way crossing and a Pedestrian
crossing then decide the priority automatically using a ladder program burned in programming
software. In practical situations sensors are used to detect presence of vehicles or Pedestrian
request in a lane and send an interrupt signal to the control unit.
The AWMC is one which would be able to allow operation of domestic washing machine
automatically using a ladder program burned in programming software. In practical situation all
the controls represent sensors which, in a real washing machine, would respond to some
condition within the machine. It requires the use of internal relays (for Start, Tub Full, Tub Half
Full) and a sequencer to carry out the washing cycle, rinse cycle and spin cycle. The Vibration
sensor Button and/or the Door Lock switch can be used to terminate the cycle or simulate the
vibration that may occur if a machine is over-loaded. In PLC the status of the sensors are
checked and certain logical operations are performed to decide the necessary operations.

5.2 FUTURE WORK


In future work our interest is in to develop more complex control process such as :

89
1. Smart Traffic Control Signal:

The intelligent or Smart Traffic Control is one which would be able to calculate the
vehicle density in a lane at a 4-way crossing and then decide the priority automatically
using a program burned in Gx-Developer.

2. Dual Conveyor Parts Selection PLC Workcell With Assembly Task:

The Dual Conveyor Workcell is a complete system which can be used to develop the
parts selection task into a simple assembly process. Plastic and metal components are
selected by size and are fed onto the chutes for dispensing into a final assembly task
where they are combined with a 2nd component. The finished product can then be sorted
by material, assembly or type.

BIBLIOGRAPHY
[1] Programmable.Logic.Controllers.4th.Edition by W.Bolton.

90

[2] Mitsubishi Fx Programmable Logic Controllers, 2nd Edition by John Ridley.


[3]

Programmable Logic Controller 4th Edition by Frank D.Pertuzella.

[4]

PLC Programming Methods And Applications By John R.Hackworth And D. Hackworth.

[5]

Electric Power / Controls Programmable Logic Controller By The Staff Of Lab-Volt Ltd.

[6]

Basic-Ladder-Logic-Programming-Chapter 2 by G.S Gupta.

[7]

How to Program a PLC (Programmable Logic Controller) By Neal Babcock.

[8]

PLC Beginner Guide.

[9]

FX1S FX1N FX2N(C) FX3U Beginner's.Pdf.

[10] PLC Application 34-400.Pdf


[11] http://www.plcopen.org/
[12] http://automationnotebook.com/
[13] http://www.plcdev.com/book/export/html/9
[14] http:// en.wikipedia.org/wiki/Programmable_logic_controller
[15] http://www.engineer-and-technician.com/beginners-guide-to-plc-programming/
[16] http://program-plc.blogspot.com/2011/.../plc-simulator-using-fx-mitsubishi trainer.
[17] Research And Application Of Paper Machine Frequency Conversion Driving System Based
On PLC. Author (Wen Bo Liu, De Yu Xu)*. Edit by (Helen Zhang, Gang Shen and David Jin)**.
Date April 2011. Research (Volumes 225 - 226)
[18] Project Review on Water Level Sensing Using PLC Osama Mahfouz*, Mujtaba Memon**
and Asim Iftikhar*** Received on: Oct 3, 2012. Accepted on: Nov 30, 2012.
Research (Volume 2, No 2, 2012, 160-170)
APPENDIX

You might also like