EI401:Programmable Logic Array
Unit-1
(a) (b)
Fig 1:Relay and PLC control panel Fig 2 (a-b):Programmable Logic Array
Introduction
• A programmable logic controller (PLC) is an industrial grade computer
that is capable of being programmed to perform control functions.
• The programmable controller has eliminated much of the hardwiring
associated with conventional relay control circuits.
• Benefits of PLC are: fast response, easy programming and installation, high
control speed, network compatibility, troubleshooting and testing
convenience, and high reliability.
• The PLC is designed for multiple input and output arrangements, extended
temperature ranges, immunity to electrical noise, and resistance to vibration
and impact.
• Programs for the control and operation of manufacturing process equipment
and machinery are typically stored in battery-backed or nonvolatile
memory.
• A PLC is an example of a real-time system since the output of the system
controlled by the PLC depends on the input conditions. The PLC is, then,
basically a digital computer designed for use in machine control.
• Unlike a personal computer, it has been designed to operate in the
industrial environment and is equipped with a special input/output interface
and a control programming language.
• The common abbreviation used in industry for these devices, PC, can be
confusing because it is also the abbreviation for “personal computer.”
Therefore, most manufacturers refer to their programmable controller as a
PLC, which stands for “programmable logic controller.”
• The PLC is designed for multiple input and output arrangements, extended
temperature ranges, immunity to electrical noise, and resistance to
vibration and impact.
• Programs for the control and operation of manufacturing process
equipment and machinery are typically stored in battery-backed or
nonvolatile memory.
• A PLC is an example of a real-time system since the output of the system
controlled by the PLC depends on the input conditions. The PLC is, then,
basically a digital computer designed for use in machine control. Unlike a
personal computer, it has been designed to operate in the industrial
environment and is equipped with special input/output interface and a
control programming language.
• The common abbreviation used in industry for these devices, PC, can be
confusing because it is also the abbreviation for “personal computer.”
Therefore, most manufacturers refer to their programmable controller as a
PLC, which stands for “programmable logic controller.”
Parts of a PLC
• A typical PLC can be divided into parts, as illustrated in Figure 1-8. These are the
central processing unit (CPU), the input/output (I/O) section, the power supply,
and the programming device. The term architecture can refer to PLC hardware, to
PLC software, or to a combination of both.
• An open architecture design allows the system to be connected easily to devices
and programs made by other manufacturers. Open architectures use off-the-shelf
components that conform to approved standards. A system with a closed
architecture is one whose design is proprietary, making it more difficult to connect
to other systems.
• Most PLC systems are in fact, proprietary, so you must be sure that any generic
hardware or software you may use is compatible with your particular PLC.
Additionally, although the principal concepts are the same across all programming
methods, there may be slight differences in addressing, memory allocation,
retrieval, and data handling for different models. Consequently, PLC programs
cannot be interchanged among different PLC manufacturers.
• There are two ways in which I/Os (Inputs/Outputs) are incorporated into the PLC:
1)Fixed and 2)Modular.
• Fixed I/O (Figure 3) 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 main advantage of this type of packaging is lower cost. The number
of available I/O points varies and usually, can be expanded by buying additional
units of fixed I/O. 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.
Fig. 3(a)
• Modular I/O: Modular I/O in(Figure 4) is divided by compartments into which
separate modules can be plugged. This feature greatly increases your options and
the unit’s flexibility. You can choose from the modules available from the
manufacturer and mix them any way you desire. The basic modular controller
consists of a rack, power supply, processor module (CPU), input/output (I/O
modules), and an operator interface for programming and monitoring. 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.
• The I/O system forms the interface by which field devices are connected to the
controller (Figure 4). The purpose of this interface is to condition the various
signals received from or sent to external field devices. Input devices such as
pushbuttons, limit switches, and sensors.
Types of PLC
(b) PLC hardware
Fig. 4.
• Power Supply: It supplies DC power to other modules that plug into the rack.
For large PLC systems, this power supply does not normally supply power to the
field devices. With larger systems, power to field devices is provided 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.
• The processor (CPU) : It is the “brain” of the PLC. A typical processor (Figure
5(b)) usually consists of a microprocessor for implementing the logic and
controlling the communications among the modules. The processor requires
memory for storing user program instructions, numerical values, and I/O devices
status.
• The CPU controls all PLC activity and is designed so that the user can enter the
desired program in relay ladder logic. The PLC program is executed as part of a
repetitive process referred to as a scan (Figure 5(a)). A typical PLC scan starts
with the CPU reading the status of inputs. Then, the application program is
executed. Once the program execution is completed, the status of all outputs is
updated. Next, the CPU performs internal diagnostics and communication tasks.
This process is repeated continuously as long as the PLC is in the run mode.
Fig. 5(a) (b)
• In programmable logic controllers (PLCs), the CPU performs internal diagnostic
and communication tasks as a crucial part of the scan cycle to ensure reliable
operation and system health. Here’s why these functions are essential:
• Internal diagnostics: This involves checking the integrity and functionality of the
PLC hardware (such as memory, processor, input/output modules, and
communication ports). Diagnostics help detect faults, errors, or potential failures
early, enabling timely alerts and reducing the risk of costly downtime or unsafe
conditions.
• Communication tasks: The PLC often needs to exchange data with other
controllers, HMIs (human-machine interfaces), supervisory systems, or remote
devices. Communication tasks ensure data is correctly transferred and received,
support synchronization with other systems, and update control or monitoring
software with real-time information.
Principle Of Operation
• PLC uses Relays and sensors in different configurations to achieve the desired function and
control.
• It uses ladder logic program for its software
• A Ladder Logic program is a graphical programming language used to control Programmable
Logic Controllers (PLCs)—especially in industrial automation. It’s designed to resemble
electrical relay circuits, making it intuitive for engineers familiar with wiring diagrams.
• Visual format: It looks like a ladder, with two vertical lines (called rails) and horizontal lines
(rungs) that represent logic operations.
• Each rung is a logic statement: if certain conditions are met (like switches being ON), an output
(like a motor or light) is activated.
• Execution order: PLCs scan ladder logic from left to right, top to bottom, continuously.
• Contacts represent inputs((e.g., switches, sensors). Can be Normally Open (NO) or Closed (NC)
• .Coils Represent outputs (e.g., motors, lights). Energized when rung conditions are met.
• Timers/counters Used for time-based or count-based control logic.
(a) (b)
Fig.6 (a,b)Ladder Logic Programme
• To get an idea of how a PLC operates, consider the simple process control
problem illustrated in Figure 6(a,b). Here a mixer motor is to be used to
automatically stir the liquid in a vat when the temperature and pressure reach
preset 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 preset values. This control problem can be solved using the relay
method for motor control shown in the relay ladder diagram of Figure 1-17. The
motor starter coil (M) is energized when both the pressure and temperature
switches are closed or when the manual pushbutton is pressed.
Fig.7(a) (b)
PLC hardware components
• The I/O Section:The input/output (I/O) section of a PLC is the section to which
all field devices are connected and provides the interface between them and the
CPU. Input/output arrangements are built into a fixed PLC while modular types
use external I/O modules that plug into the PLC.
• The I/O system provides an interface between the hardwired components in the
field and the CPU. The input interface allows status information regarding
processes to be communicated to the CPU, and thus allows the CPU to
communicate operating signals through the output interface to the process devices
under its control.
• One benefit of a PLC system is the ability to locate the I/O modules near the field
devices, as illustrated in Figure 8(a,b), in order to minimize the amount of wiring
required. The processor receives signals from the remote input modules and sends
signals back to their output modules via the communication module.
• A rack is referred to as a remote rack when it is located away from the processor
module in which the communication between the processor is done by a special
communications networks.
Fig.8(a)Rack-based I/O section (b)Remote I/O section
• The remote racksare linked to the local rack through communications
module.
• If fiber optic cable is used between the CPU and I/O rack, it is possible to
operate I/O points from distances greater than 20 miles with no voltage
drop. Coaxial cable will allow remote I/O to be installed at distances greater
than two miles. Fiber optic cable will not pick up noise caused by adjacent
high-power lines or equipment normally found in an industrial environment.
Coaxial cable is more susceptible to this type of noise.
• The PLC’s memory system stores information about the status of all the
inputs and outputs. To keep track of all this information, it uses a system
called addressing. An address is a label or number that indicates where a
certain piece of information is located in a PLC’s memory.
• In general, rack/slot-based addressing elements include for Allen Bradley
ControlLogix controllers:
• Type—The type determines if an input or output is being addressed. It Defines
whether the address is for an input or an output device for
• example, I:1/0 ->input module, rack/slot position 1, bit 0 and O:2/3 -output
module, rack/slot position 2, bit 3.
• Slot—The slot number is the physical location of the I/O module. This may be a
combination of the rack number and the slot number when using expansion racks.
• Word and Slot—The word and slot are used to identify the actual terminal
connection in a particular I/O module. A discrete module usually uses only one
word, and each connection corresponds to a different bit that makes up the word.
eg I:2/0 means I → Input module
2 → Slot number where the module is installed
/0 → Bit 0 of that module’s word, Meaning: Terminal 1 of slot 2 input module
• Every input and output device connected to a discrete I/O module is addressed to a
specific bit in the PLC’s memory. A bit is a binary digit that can be either 1 or 0.
Analog I/O modules use a word addressing format, which allows the entire words
to be addressed. The bit part of the address is usually not used; however, bits of
the digital representation of the analog value can be addressed by the programmer
if necessary
Fig 9. Allen-Bradley SLC 500 rack/slot-based addressing format.
Source: Image Courtesy of Rockwell Automation, Inc.
• Tag-based memory structures are the newest type of PLC memory addressing.
Figure 11 illustrates the Allen-Bradley ControlLogix and CompactLogix tag-based
addressing format. Memory locations are defined by using base and alias tags. A
base tag defines a memory location where data are stored. An alias tag is used to
create an alternate name (alias) for a tag. The alias tag is often used to create a tag
name to represent a real world input or output.
eg. Local:2:[Link].5(output coil)->Motor_Run, if Motor_Run=1,ON.
• Combination I/O modules can have both input and output connections in the
same physical module as illustrated. A module is made up of a printed circuit
board and a terminal assembly. The printed circuit board contains the electronic
circuitry used to interface the circuit of the processor with that of the input or
outputdevice.
• Modules are designed to plug into a slot or connector in the I/O rack or directly
into the processor.
Fig 10. Allen-Bradley ControlLogix tag-based addressing format.
Source: Image Courtesy of Rockwell Automation, Inc..
Fig 11. Rack/slot-based versus tag-based addressing.
• The most common type of I/O interface module is the discrete type (Figure 2-11).
This type of interface connects field input devices of the ON/OFF nature such as
selector switches, pushbuttons, and limit switches. Likewise, output control is
limited to devices such as lights, relays, solenoids, and motor starters that require
simple ON/OFF switching.
• The classification of discrete I/O covers bit-oriented inputs and outputs. In this
type of input or output, each bit represents a complete information element in
itself and provides the status of some external contact or advises of the presence or
absence of power in a process circuit.
• Each discrete I/O module is powered by some field supplied voltage source. Since
these voltages can be of different magnitude or type, I/O modules are available at
various AC and DC voltage ratings, as listed in Table 2-1.
Fig 12. Discrete input and output devices. Fig 13. Common Ratings for Discrete I/O Interface Modules
• Backplane power is provided by the PLC module power supply and is used to power the
electronics that reside on the I/O module circuit board.
• Analog I/O Modules:Earlier PLCs were limited to discrete or digital I/O interfaces,
which allowed only on/off-type devices to be connected. This limitation meant that the
PLC could have only partial control of many process applications. Today, however, a
complete range of both discrete and analog interfaces are available that will allow
controllers to be applied to practically any type of control process.
• Discrete devices are inputs and outputs that have only two states: on and off. In
comparison, analog devices represent physical quantities that can have an infinite number
of values. Typical analog inputs and outputs vary from 0 to 20 mA, 4 to 20 mA, or 0 to 10
V.
• Figure 2-21 illustrates how PLC analog input and output modules are used in measuring
and displaying the level of fluid in a tank.
Fig 13. Analog input and output to a PLC.
• Analog input modules normally have multiple input channels that allow 4, 8, or
16 devices to be interface to the PLC. The two basic types of analog input
modules are voltage sensing and current sensing.
• Analog sensors measure a varying physical quantity over a specific range and
generate a corresponding voltage or current signal.
• Common physical quantities measured by a PLC analog module include
temperature, speed, level, flow, weight, pressure, and position. For example, a
sensor may measure temperature over a range of 0 to 500°C, and output a
corresponding voltage signal that varies between 0 and 50 mV.
• The transition of an analog signal to digital values is accomplished by an analog-
to-digital (A/D) converter, the main element of the analog input module
• Analog voltage input modules are available in two types: unipolar and bipolar.
Unipolar modules can accept an input signal that varies in the positive direction
only. For example, if the field device outputs 0 to +10 V, then the unipolar
modules would be used. Bipolar signals swing between a maximum negative
value and a maximum positive value. For example, if the field device outputs −10
to +10 V a bipolar module would be used.
Fig 14. Analog input module circuit. Fig 15. Typical analog I/O control system.
• A bipolar analog input module is an electronic device used to measure and digitize
analog signals that swing both positive and negative relative to a reference point,
typically zero volts. Unlike unipolar inputs, which measure only positive voltages,
bipolar inputs can handle signals that range from negative to positive voltages or
currents.
• Input Signal Range: They can accept input signals that range above and below
zero, e.g., -10 V to +10 V, or current inputs such as -20 mA to +20 mA.
The Central Processing Unit(CPU):
• A processor module can be divided into two sections: the CPU section
• and the memory section.
• The CPU section executes the program and makes the decisions needed by the
PLC to operate and communicate with other modules. The memory section
electronically stores the PLC program along with other retrievable digital
information.
• The PLC power supply provides the necessary power (typically, 5 VDC) to the
processor and I/O modules plugged into the backplane of the rack
Fig 16. PLC power supply
Fig 17. Sections of a PLC processor module.
Source: Courtesy Mitsubishi Automation.
• The CPU contains the similar type of microprocessor found in a personal
computer. The difference is that the program used with the microprocessor is
designed to facilitate industrial control rather than provide general-purpose
computing. The CPU executes the operating system, manages memory, monitors
inputs, evaluates the user logic (ladder program), and turns on the appropriate
outputs.
• The CPU of a PLC system may contain more than one processor. One advantage
of using multiprocessing is that the overall operating speed is improved. Each
processor has its own memory and programs, which operate simultaneously and
independently. In such configurations the scan of each processor is parallel and
independent thus reducing the total response time. Fault-tolerant PLC systems
support dual processors for critical processes. These systems allow the user to
configure the system with redundant (two) processors, which allows transfer of
control to the second processor in the event of a processor fault.
• Three mode of operation is allowed : RUN, PROG, and REM.
• RUN Position
• Places the processor in the Run mode
• Executes the ladder program and energizes output
devices
• Prevents you from performing online program editing in this position
• Prevents you from using a programmer/operator interface device to change the
processor mode
• PROG Position
• Places the processor in the Program mode
• Prevents the processor from scanning or executing the ladder program, and the
controller outputs are de-energized
• Allows you to perform program entry and editing
• Prevents you from using a programmer/operator interface device to change the
processor mode\or REMote Test mode
.
• REM Position
• Places the processor in the Remote mode: either the REMote Run, REMote
Program, or REMote Test mode
• Allows you to change the processor mode from a programmer/operator interface
device
• Allows you to perform online program editing.
Memory Design
• Memory is the element that stores information, programs, and data in a PLC. The
user memory of a PLC includes space for the user program as well as addressable
memory locations for storage of data. Data are stored in memory locations by a
process called writing. Data are retrieved from memory by what is referred to as
reading.
Fig 18. Typical PLC memory sizes.
Memory types
• Memory can be placed into two general categories: volatile and nonvolatile.
Volatile memory will lose its stored information if all operating power is lost or
removed. Volatile memory is easily altered and is quite suitable for most
applications when supported by battery backup.
• Nonvolatile memory has the ability to retain stored information when power is
removed accidentally or intentionally.
• Read Only Memory (ROM) stores programs, and data cannot be changed after
the memory chip has been manufactured. ROM is normally used to store the
programs and data that define the capabilities of the PLC.
• Random Access Memory (RAM), sometimes referred to as read-write (R/W)
memory, is designed so that information can be written into or read from the
memory. RAM is used as a temporary storage area of data that may need to be
quickly changed. RAM is volatile, meaning that the data stored in RAM will be
lost if power is lost. A battery backup is required to avoid losing data in the event
of a power loss (Figure 19).
• Erasable Programmable Read-Only Memory (EPROM) provides some level
of security against unauthorized or unwanted changes in a program. EPROMs are
designed so that data stored in them can be read, but not easily altered without
special equipment
• Electrically erasable programmable read-only (EEPROM) is a nonvolatile
memory that offers the same programming flexibility as does RAM. The
EEPROM can be electrically overwritten with new data instead of being erased
with ultraviolet light. Because the EEPROM is nonvolatile memory, it does not
require battery backup. It provides permanent storage of the program and can be
changed easily using standard programming devices. Typically, an EEPROM
memory module is used to store, back up, or transfer PLC programs (Figure 20).
Fig 19. Battery used to back up processor RAM. Fig 20. EEPROM memory module is used to store,back up, or
transfer PLC programs.
Programming Terminal Devices
• A programming terminal device is needed to enter, modify, and troubleshoot the PLC program.
PLC manufacturers use various types of programming devices. The simplest type is the hand-held
type programmer shown in Figure 2-47. This proprietary programming device has a connecting
cable so that it can be plugged into a PLC’s programming port. Certain controllers use a plug-in
panel rather than a hand-held device.
• Hand-held programmers are compact, inexpensive, and easy to use. These units contain
multifunction keys and a liquid-crystal display (LCD) or light-emitting diode (LED) window.
There are usually keys for instruction entering and editing, and navigation keys for moving around
the program. Hand-held programmers have limited display capabilities. Some units will display
only the last instruction that has been programmed, whereas other units will display from two to
four rungs of ladder logic.
Fig 21. Personal computer used as the programming
• Human Machine Interfaces (HMIs):
• Human machine interfaces give the ability to the operator and to management to
view the operation in real time. Through personal computer–based setup software,
you can configure display screens to:
• Replace hardwired pushbuttons and pilot lights with realistic-looking icons. The
machine operator need only touch the display panel to activate the pushbuttons.
• Show operations in graphic format for easier viewing.
• Allow the operator to change timer and counter presets by touching the numeric
keypad graphic on the touch screen. • Show alarms, complete with time of
occurrence and location.
• Display variables as they change over time.
Fig 22. Human Machine Interface (HMI). Fig 23. General structure of a HMI package.
HMI MONITOR AND ENCLOSURE
• HMI operator panels typically contain monochrome or 256 color display screens.
These systems often communicate directly with the PLC to read or write memory
locations.
• Color displays enable clearer process representation and in general brighten up
their systems. The color convention for status and alarms should follow the same
convention as their hardwired equivalents,
• namely:
• Red—for alarm, danger, and stop
• Yellow—for caution and risk of danger
• Green—for ready, running, and safe condition
GRAPHICS LIBRARY
• The graphics library contained within an HMI development package provides
buttons, lights, switches, sliders, meters, fills, and other graphic objects (Figure 2-
56). It saves design time by providing graphics and faceplates for numerous
industrial control devices that would otherwise have to be created manually.
Librarian applications may include easy-to-use features for resizing, changing
color scheme, and orientation of objects, as well as building your own graphics
into the library.
Fig 22. Typical motor control graphics.
1. What is bit level and word address levelling?
2. List four tasks performed by a discrete inputmodule. List five common physical
quantities measured by a PLC analog input module.
3. Explain the difference between a unipolar and bipolar analog input module.
4. List three field devices that are commonly controlled by a PLC analog output
module.
5. What information is normally stored in the ROM memory of a PLC?
6. Give one advantage and one limitation to the use of hand-held programming
devices.
7. Explain the purpose of a redundant PLC processor.
8. A personal computer is to be used to program several different PLCs from
different manufacturers. What would be required?