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

2.

0 HARDWARE, INTERNAL ARCHITECTURE and OPERATING PRINCIPLE

2.1 HARDWARE

A typical PLC can be divided into: the power supply, the central processing unit (CPU),
the input/output (I/O) interface section, communications interface, program data and
memory and the programming device. Figure 1.1 shows the basic arrangements.

Figure 1.1: the PLC system.

Power supply - supplies DC power to other modules that plug into a rack. For large PLC
systems, this power supply does not normally supply power to field devices.
Instead, field devices are supplied by external alternating current (AC) or direct
current (DC) supplies. For some small micro-PLC systems, the power supply may be
used to power field devices. Field devices are external input and output devices
hardwired to the input and output terminals of the PLC. The terms ‘field’ or ‘real
world’ are used to distinguish actual external devices that exist and must be
physically wired, from the internal user program that duplicates the function of
relays, timers, and counters. Input devices are elements such as pushbuttons, limit
switches, and sensors while output devices are motors, motor starters, solenoid
valves, and indicator lights.

Page 1 of 11
Processor (CPU) – The processor is the “brain” of the PLC. It consists of a
microprocessor which implements the logic, controls all PLC activity and
communications among the modules.

Memory- The memory stores the results of logical operations performed by the
microprocessor. Memory is also required for the program. It could be EPROM or
EEPROM plus RAM.

The I/O interface - This is a link between field devices and the CPU.

The purpose of the interface is to condition the various signals received from or sent to
external field devices and to electrically isolate the internal components from the input
and output terminals. PLCs commonly employ an optical isolator, which uses light to
couple the circuits together for this purpose.

There are two ways in which I/Os (Inputs/Outputs) are incorporated into the PLC: fixed
and modular. Fixed I/O is typical of small PLCs that come in one package with no
separate, removable units. The processor and I/O are packaged together, and the I/O
terminals will have a fixed number of connections built in for inputs and outputs. The
number of available I/O points varies and usually can be expanded by buying additional
units of fixed I/O. The main advantage of this type of packaging is lower cost. One
disadvantage of fixed I/O is its lack of flexibility; you are limited in what you can get in
the quantities and types dictated by the packaging. Also, for some models, if any part in
the unit fails, the whole unit has to be replaced.

Modular I/O is divided by compartments into which separate modules can be plugged.
The modules plug into a rack. When a module is slid into the rack, it makes an electrical
connection with a series of contacts called the backplane, located at the rear of the
rack. The PLC processor is also connected to the backplane and can communicate with
all the modules in the rack. This feature greatly increases options and the unit’s
flexibility. One can choose from the modules available from the manufacturer and mix
them any way desired.

Communications interface -This is used to receive and transmit data on communication


networks from or to other remote PLCs (Figure 1.2). It is concerned with such actions as

Page 2 of 11
device verification, data acquisition, synchronisation between user applications and
connection management.

Figure 1.2: Basic communications model

Programming device - This is used to enter the desired program into the memory of the
processor. They are also frequently used on the factory floor for troubleshooting
equipment, modifying programs, and transferring programs to multiple machines.
Programming devices can be hand-held devices or personal computers. Hand-held
devices are inexpensive and easy to use.

A personal computer (PC) is the most commonly used programming device. Most
brands of PLCs have software available so that a PC can be used as the
programming device. This software allows users to create, edit, document, store,
and troubleshoot programs. The computer monitor is able to display more logic on
the screen than can hand-held types, thus simplifying the interpretation of the
program.

2.2 INTERNAL ARCHITECTURE

Figure 1.3 shows the basic internal architecture of a PLC. It consists of a central
processing unit (CPU) made up of the microprocessor, memory, and input/output
circuitry.

2.2.1 The CPU – 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

Page 3 of 11
synchronisation for all elements in the system. The information within the PLC is
carried by means of digital signals.

The internal structure of the CPU depends on the microprocessor concerned. In


general, they have:

 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, NOT and EXCLUSIVE-OR.

 Memory, termed registers, located within the microprocessor and used to


store information involved in program execution.
 A control unit which is used to control the timing of operations.
2.2.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 being a
binary digit of 1 or 0, i.e. on/off states. Each of the bits is communicated
simultaneously along its own parallel wire. The system has four buses:
i) 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

Page 4 of 11
handle 8-bit numbers. It can thus perform operations between 8-bit
numbers and deliver results as 8-bit values.
ii) 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. Therefore, 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.
iii) 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.
iv) The system bus is used for communications between the input/output ports
and the input/output unit.
2.2.3 Memory - There are several memory elements in a PLC system:
i) System read-only-memory (ROM) to give permanent storage for the
operating system and fixed data used by the CPU.
ii) Random-access memory (RAM) for the user’s program.
iii) 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
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 pre-set data and part
for storing counter values, timer values, etc.
iv) 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

Page 5 of 11
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.

2.2.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. It is also
through the input/output unit that programs are entered from a program panel. Every
input/output point has a unique address which can be used by the CPU.

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. Electrical isolation from the external world is usually by means of opto-
isolators (the term opto-coupler is also often used). The digital signal that is generally
compatible with the microprocessor in the PLC is 5 V d.c. However, signal conditioning
in the input channel, with isolation, enables a wide range of input signals to be
supplied to it. 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 allows a wide range of output signals to be used.

Outputs are specified as being of relay type, transistor type or triac type

i) 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.
ii) 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

Page 6 of 11
reverse voltage. As a protection, either a fuse or built-in electronic protection
are used. Optoisolators are used to provide isolation.
iii) Triac outputs, with optoisolators for isolation, can be used to control external
loads which are connected to the a.c. power supply. It is strictly for a.c.
operation and is very easily destroyed by overcurrent. Fuses are virtually
always included to protect such outputs.

2.3 Principles of Operation


To get an idea of how a PLC operates, consider the simple process control problem in
which a mixer motor is to be used to automatically stir the liquid in a vessel when the
temperature and pressure reach pre-set values. In addition, direct manual operation
of the motor is provided by means of a separate pushbutton station. The process is
monitored with temperature and pressure sensor switches that close their respective
contacts when conditions reach their pre-set values.

This control problem can be solved using the relay method for motor control shown in
figure 1.4. The motor starter coil (M) is energized when both the pressure and
temperature switches are closed or when the manual pushbutton is pressed.

To implement the same using a programmable logic controller, the same input field
devices (pressure switch, temperature switch, and pushbutton) are used. These
devices would be hardwired to an appropriate input module according to the
manufacturer’s addressing location scheme. Typical wiring connections for a 120 VAC
modular configured input module is shown in Figure 1.5(a). The same output field
device (motor starter coil) would also be used. This device would be hardwired to an
appropriate output module according to the manufacturer’s addressing location
scheme. Typical wiring connections for a 120 VAC modular configured output module
is shown in Figure 1.5(b).

Page 7 of 11
Figure 1.4: Process control relay ladder diagram.

(a) (b)
Figure 1.5: Typical wiring connections for a 120 VAC modular configured (a) input
module. (b) output module.

Next, the PLC ladder logic program would be constructed and entered into the
memory of the CPU. A typical ladder logic program for this process is shown in figure
1.6. The format used is similar to the layout of the hardwired relay ladder circuit. The
individual symbols represent instructions, whereas the numbers represent the

instruction location addresses. Each symbol can be thought of as a set of normally

open contacts. The symbol is considered to represent a coil that, when


energized, will close a set of contacts. In the ladder logic program of figure 1.6, the coil

Page 8 of 11
O/1 is energized when contacts I/1 and I/2 are closed or when contact I/3 is closed.
Either of these conditions provides a continuous logic path from left to right across the
rung that includes the coil.

To program the controller, you enter these instructions one by one into the processor
memory from the programming device. Each input and output device is given an
address, which lets the PLC know where it is physically connected. Note that the I/O
address format will differ, depending on the PLC model and manufacturer. Instructions
are stored in the user program portion of the processor memory. During the program
scan the controller monitors the inputs, executes the control program, and changes
the output accordingly.

Figure 16: Process control PLC ladder logic program with typical addressing scheme.

For the program to operate, the controller is placed in the RUN mode, or operating
cycle. During each operating cycle, the controller examines the status of input devices,
executes the user program, and changes outputs accordingly.

Page 9 of 11
A programmable logic controller operates in real time in that an event taking place in
the field will result in an operation or output taking place. The RUN operation for the
process control scheme can be described by the following sequence of events:

 First, the pressure switch, temperature switch, and pushbutton inputs are examined
and their status is recorded in the controller’s memory.
 A closed contact is recorded in memory as logic 1 and an open contact as logic 0.
 Next the ladder diagram is evaluated, with each internal contact given an OPEN or
CLOSED status according to its recorded 1 or 0 state.
 When the states of the input contacts provide logic continuity from left to right across
the rung, the output coil memory location is given a logic 1 value and the output
module interface contacts will close.
 When there is no logic continuity of the program rung, the output coil memory
location is set to logic 0 and the output module interface contacts will be open.
 The completion of one cycle of this sequence by the controller is called a scan. The
scan time, the time required for one full cycle, provides a measure of the speed of
response of the PLC.
 Generally, the output memory location is updated during the scan but the actual
output is not updated until the end of the program scan during the I/O scan.

Figure 1.7 shows the typical wiring required to implement the process control scheme using
a fixed PLC controller. In this example the Allen-Bradley Pico controller equipped with 8
inputs and 4 outputs is used to control and monitor the process. Installation can be
summarized as follows:

 Fused power lines, of the specified voltage type and level, are connected to the
controller’s L1 and L2 terminals.
 The pressure switch, temperature switch, and pushbutton field input devices are
hardwired between L1 and controller input terminals I1, I2, and I3, respectively.
 The motor starter coil connects directly to L2 and in series with Q1 relay output
contacts to L1.
 The ladder logic program is entered using the front keypad and LCD display.

Page 10 of 11
Figure 1.7: Typical wiring required to implement the process control scheme using a fixed
PLC controller.

Page 11 of 11

You might also like