Chapter 5
Chapter 5
Chapter 5
control decisions
❖ The development of low cost computer has brought the most
❖ The advent of the PLC begins in 1970s and has now become the
most common choice for control systems
❖ In brief terms, a PLC is a digital electronic device that contains a
programmable (changeable) memory in which a sequence of
instructions is stored
❖ Devices which give discrete signals are ones where the signal
is either “on” or “off ” (either a “voltage” or “no voltage
"condition). e.g. Switch, Push button
• .
Layout of a PLC system
Processing of input/output
❖ CPU of the PLC are digital devices and must have an input of digital signals
of a particular size, normally “0” to “5” volts. The output from CPU will be
digital normally “0” to “5”Volts.
❖ Input devices(sensors) may give either digital or analogue signals of
varying magnitude.
❖ Output devices(actuators) may need either an analogue or digital signal of
varying magnitude to operate.
There is a need to manipulate
1. the input signals from the sensors
2. the output to the actuator , so that they are compatible with the input
and output of the processor of PLC
Cont.
• Signal conditioning (sizing) for “analog” and “digital”
signals from sensors and signal conversion for only
“analog” signals from sensors are done in input
modules
• Signal conditioning (sizing) for “analog” and
“digital” output signals required for actuators and
signal conversion of “digital” PLC output into analog”
signals required for actuators are done in output
modules
Signal Conditioning
✓ Digital signal that is generally
compatible with processor in the
PLC is 0-5V DC
✓ Signal conditioning in the
input module, enables a wide
range of input signals to be
connected to the processor
✓ Output from the processor will
be digital 0-5V DC
✓ Signal conditioning in the
output module, processor can
be connected to a range of
output devices
Analogue to Digital Conversion An Example
ADC & Multiplexer
• Analogue signals can be fed to PLC if the
input channel is able to convert the signal to
a Digital signal using a Analogue-to-Digital
converter.
Input Modules
• Input devices are connected to PLCs via Optocouplers (Optoisolator) in Input Modules
• Signal conditioning is used to size the input signals to a value acceptable to the processor
• Digital/discrete signals are signal conditioned before connecting them to the Processor.
• Analogue signal from Sensors have to be converted to digital signals and Signal
conditioned before feeding them to the processor since it can only accept only digital
modules
Function of “output” Modules
• Output devices, also known as “actuators” are field devices and are connected
to PLCs via Output Modules
• If the CPU can be thought of as the “brains” of the PLC, the I/O modules can
be thought of as the “arms and legs” of the PLC
⚫ INPUT SCAN – Reads input values from the chips in the input cards, and copies their
present values to memory by using an input image table. The time taken for the input scan
depends on the number of inputs, the clock speed of the CPU etc
⚫ LOGIC SOLVE/PROGRAM SCAN – Based on the input table in memory, the program is
executed, as per instructions in the memory, one step at a time and updates out put and
stores them in an output image table in the memory. The program execution time depends on
the length of the program. A 20-30 rungs program may take an execution time of few
milliseconds
⚫ OUTPUT SCAN – The output image table is copied from the memory to the output chips,
These chips then drive the output devices
⚫ During program scan, the inputs are taken from the memory and not from their physical
states. If the input has a short time, there is a possibility of it being missed out during the
scanning process.
Instruction List
• Programming by using “Ladder Diagram” is
Graphical programming, programming by
“Instruction List” is Textural Programming.
• Instruction List is prepared using the elements of
a Ladder Diagram and converting them into
“Mnemonics”.
• Different manufacturers of PLCs use different set
of mnemonics
Mnemonics followed by 3 different PLC Makers
Preparing “Instruction List” from a Ladder Diagram
Mitsubishi PLC
Instruction is made for each
element in a rung of a ladder
diagram.
An instruction list is a
compilation of instructions for
each element in a rung of a
ladder programme.
Each instruction consists of the
instruction code (Mnemonic code)
and the address of the element.
Picture shows one rung of a
ladder programme and the
instruction list using Mitsubishi
PLC.
An END instruction to be added
after the end of a complete
programme which may have one
or several rungs
Instruction List – 1 (Omron PLCs assumed)
Instruction List – 2 (Omron PLCs assumed)
Instruction List – 3 (Omron PLCs assumed)
Instruction List – 4 (Omron PLCs assumed)
Instruction List – 5 (Omron PLC assumed)
Instruction List – 6 (Omron PLC assumed)
Instruction List – 7 (Omron PLC assumed)
Steps in Programming
• List out inputs and outputs
• Assign addresses for inputs and outputs
• Draw an equivalent ladder diagram from schematic.
• Prepare instruction list for the elements of the ladder
diagram
• Feed the ladder diagram into the PLC for Graphical
Programming
• Feed the instruction list into the PLC for Textural
Programming
Programming a DOL Starter
DOL with indicator lights
Example (Sequential operation)
Write a ladder program that will switch on two
motors when the start switch is operated, then
switch off one motor after 200 s and the other
motor after a further 100 s. When both motors
have been switched off, a third motor is to be
switched on for 50 s. The cycle is then to repeat
itself unless a stop switch has been activated
“Entering Programmes in memory”
Entering programs into memory of the
Microprocessor in CPU can be by
a. Keypad of a Programming console
b. Desktop/Laptop Computer
Entering by drawing Ladder Diagram is known a
graphical method whereas Keying in Instruction
Lists is considered as Textural method of
programming.
Entering Program by using
Handheld Programming Console
• In order for the PLC to operate, you must first put a
program into the Central Processing Unit. The
program is made by sequentially inputting commands
using the Programming Console.
• PROGRAM mode is used for preparing programs or
for making modifications or corrections to existing
programs.
• MONITOR MODE is used when changing the setting
value of the counter and timer while the PLC is
actually in operation.
• RUN mode is used when it is time to execute the
program that has been entered into the PLC
• The console has a keypad having keys with symbols
depicting the various elements of the ladder diagram
and keying them in so that the ladder Instruction list
appears on the display screen
• A software in the console converts the keyed
instruction into a machine code which can be fed to
the PLC by a connecting cable.
Drawing Ladder Program by using a Desktop/Laptop Computer
• This involves loading the computer with the relevant software and
then selecting items from menus on the screen..
accordingly.
Sequencing
Cont.
• timing relays are used to delay the opening or
closing of contacts for circuit control
• On-delay timers (TON) come on after a particular
time delay
• As the input goes from 0 to 1, the elapsed time
starts to increase, and when it reaches the time
specified by the input , the output goes to 1
• Off-delay timer (TOF) is on for a fixed period of time
before turning off
• The timer starts when the input signal changes from
1 to 0
• ON-delay operation is the operating mode most
often used for automated machines
Counter
Counter allows a number of
occurrences of input signals to be
• counted.
A. This might be in a situation
where items pass along a conveyor
B. It might be counting the
number of revolutions of a shaft or
C. It might be number of people
passing through a door.
Counters for such applications are
provided as in-built elements in
PLCs. A counter is set to some
preset value and when this value
of input pulses has been received,
it will operate its contacts. Two
types of counters, Down counters
and Up counters count from preset
value to zero and from zero to
preset value
respectively.Fig.1(a) shows a basic
counting circuit. When there
Is a pulse input to input 1 (‘0000’). The
counter is reset. When there is an input to
input 2 (‘00001’), the counter starts
counting. If the counter is set for, say, 10
pulses, then when 10 pulses are received
at ‘00001’, the counter contact will be
closed and there will be an output 1.
Fig 1(b) shows how the above program and
its program instruction list would appear
with a Mitsubishi PLC
Fault finding
• Once you get over the "black box" syndrome, PLCs are
actually easier to troubleshoot than traditional hard-
wired control systems.
• Generally, greater percentage of faults( 80-90%) in PLC
controlled systems are likely to be with sensors,
actuators and wiring than within the PLC itself.
• Of the faults within the PLC, most faults are likely to be
in the input/output channels and the power supply than
in the Processor.
• Many PLCs provide built-in fault analysis procedures
which carry out self-testing and display fault codes with a
brief message which can be decoded in a trouble-shooting
guide
PLC Power Supply
• Supply of power to the Processor and the
input/output modules at all times is a prime
necessity in the operation of a PLC system
• The POWER LED on the power supply unit
indicates that DC power is ON. This LED could
be OFF if
1.Fuse is blown
2. Voltage drops below the normal value
Testing of inputs/outputs
Input devices ,e.g. Limit switches can be manipulated to
give the open and closed contact conditions and the
corresponding LED on the input module is observed. It
should be illuminated when the input is closed and
extinguished when open.