1.1.2 The Programmable Logic Controller
1.1.2 The Programmable Logic Controller
1.1.2 The Programmable Logic Controller
a switch to detect the level of the water. On the basis of these inputs the
microprocessor is programmed to give outputs which switch on the drum
motor and control its speed, open or close cold and hot water valves,
switch on the drain pump, control the water heater and control the door
lock so that the machine cannot be opened until the washing cycle is
completed.
Inputs Outputs
PLC
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 optimised for
calculation and display tasks, PLCs are optimised for control tasks and the
industrial environment. Thus PLCs are:
The first PLC was developed in 1969. They are now widely used and
extend from small self-contained units for use with perhaps 20 digital
inputs/outputs to modular systems which can be used for large numbers of
inputs/outputs, handle digital or analogue inputs/outputs, and also carry
out proportional-integral-derivative control modes.
1.2 Hardware 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. Figure 1.4 shows
the basic arrangement.
Programming
device Program & data Communications
memory interface
Input Output
inter- Processor inter-
face face
Power supply
Voltage
Voltage
(a) (b)
Time Time
Voltage
(c) Time
Supervisory
system
Communications
network
PLC 1 PLC 2
Machine/ Machine/
plant plant
1.3 Internal architecture Figure 1.7 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 synchronisation
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
6 Programmable Logic Controllers
Address bus
Control bus
Program panel
Clock
Data bus
Buffer Latch
Opto- Driver
coupler interface
Output channels
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. Thus an 8-bit word might
be the binary number 00100110. Each of the bits is communicated
simultaneously along its own parallel wire. The system has four buses:
1 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.
2 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. Just like houses in a town are each
given a distinct address so that they can be located, so each word
location is given an address so that 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. It is the address bus which carries the
information indicating which address is to be accessed. If the address
bus consists of 8 lines, the number of 8-bit words, and hence number
of distinct addresses, is 28 = 256. With 16 address lines, 65 536
addresses are possible.
3 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 synchronise
actions.
4 The system bus is used for communications between the input/output
ports and the input/output unit.
1.3.3 Memory
There are several memory elements in a PLC system:
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
8 Programmable Logic Controllers
Infrared radiation
Light-
Photo-
emitting
transistor
diode
5V To input/
output unit
Inputs: 24 V 5V
digital signal levels Input
110 V
channel
Digital
240 V
signal level
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 (Figure 1.10). With a small PLC, all the
outputs might be of one type, e.g. 240 V a.c., 1 A. With modular PLCs,
however, a range of outputs can be accommodated by selection of the
modules to be used.
24 V, 100 mA
From 110 V, 1 A, d.c. Outputs
input/ Output
240 V, 1 A, a.c.
output 5V channel Switching
unit digital 240 V, 2 A, a.c.
Outputs are specified as being of relay type, transistor type or triac type
(see Chapter 3 for more details):
1 With the relay type, the signal from the PLC output is used to operate
a relay and is able to switch currents of the order of a few amperes in
an external circuit. The relay not only allows small currents to switch
much larger currents but also isolates the PLC from the external
circuit. Relays are, however, relatively slow to operate. Relay outputs
are suitable for a.c. and d.c. switching. They can withstand high surge
currents and voltage transients.
2 The transistor type of output uses a transistor to switch current
through the external circuit. This gives a considerably faster
switching action. It is, however, strictly for d.c. switching and is
destroyed by overcurrent and high reverse voltage. As a protection,
either a fuse or built-in electronic protection are used. Optoisolators
are used to provide isolation.