You are on page 1of 80

PROGRAMMABLE LOGIC

CONTROLLER

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Elements of a Control System

A control system consists of

input device(s)
a controller and
output device(s)

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Evolution of PLC
Control Engineering has evolved over time. In the past,
humans were the main method of controlling a system. Later
on, electricity has been used for controls and early control
systems were based on relays. It is common, even now, to
use relays to make simple logical control decisions.
The development of low cost computer has brought the most
recent revolution, the PLC.
The advent of the PLC begins in 1970s and has now become
the most common choice for control systems.
PLCs have been gaining popularity and will probably remain
predominant for some more time to come because of its
advantages

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Hard-wired Control System
Prior to PLCs, many of the control tasks were solved with
contactor or relay controls referred to as hard-wired control.
Inputs and outputs were directly wired to the controller.
Circuit diagrams had to be designed, wired, electrical
components specified, installed and wiring lists created.
Such a controller becomes a dedicated controller for a
particular system of control and is not flexible.
A change in function or system expansion required extensive
component changes and rewiring
Extensive use of hardwiring also increased the size of the
control systems and consequent space requirement.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


PLC in Brief
In brief terms, a PLC is a digital electronic device that contains
a programmable (changeable) memory in which a sequence
of instructions is stored.
Those instructions enable the PLC to perform various useful
control functions like relay logic, counting, timing,
sequencing, and arithmetic computation as required in
automation..
These functions usually are used to monitor and control
individual machines or complex processes via input and
output field devices connected to the PLC The PLC
continuously reads inputs, processes them through a
program, and generates outputs.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Advantages of using PLC
All requirements of a relay control system and even more complex tasks
can be done with a PLC.
Same basic controller can be used with a wide range of control systems
just by changing the programme.
Easier and faster modifications/correction can be effected without any
rewiring/change of components
High reliability
Smaller physical size than hard-wired solutions. Hard wiring at a less
intensive scale is required to connect field devices
Lower Power consumption
PLCs have integrated diagnostics and over-riding capabilities; easier
trouble-shooting
A overall cost reduction in control systems.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Digital & Analogue inputs
Physical quantities like temperature, pressure, flow or
level are changed into electrical signals by Sensors
which may give either Digital or Analogue signals.

Analogue devices give signals whose size is


proportional to the size of the variable being monitored.
e.g. a thermocouple ,a RTD, strain gauge etc.

Digital devices can give either discrete signals or


pulses.

Devices which give discrete signals are ones where


the signal is either on or off (either a voltage or no
voltagecondition). e.g. a switch, a P.B.

Devices which give pulses can be considered to be


essentially discrete devices which gives a sequence of
on-off signals.- e.g. Proximity switches., encoders

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Digital & Analogue Outputs
Output devices, also called
Acuators, may need either a
digital or analogue signal to
operate
For example a lamp or a
buzzer may just need a switch
or relay contact- a digital
signal - to operate.
A speed-controlled motor, a
diaphragm operated valve
may need a varying or an
analogue signal to operate.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Layout of a PLC system

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Constraints of a processor

Processor of a PLC can accept only


Digital inputs of normal size 0-5V.
Processor of a PLC can give only
Digital outputs of normal size 0-
5V

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Processing of input/output signals

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 5Volts.
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.
Thus there is a need to manipulate (modify)
1. the input signals from the sensors and
2. the output signals to the actuators
so that they are compatible with the input and output of the processor of PLC.
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.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Signal Conditioning

The digital signal that is generally compatible with


processor in the PLC is 0-5V DC. However, signal
conditioning in the input module, enables a wide range
of input signals to be connected to the processor.

The output from the processor will be digital 0-5V DC.


However, with signal conditioning in the output module,
processor can be connected to a range of output
devices

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Analogue to Digital Conversion
An Example

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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.

This can be achieved by mounting a suitable card


with an ADC in the rack

Instead of using one card for each analogue signal,


one card can be used with a multiplexer. Number of
ADCs required can thus be minimised

Many Analogue inputs are connected to a


multiplexer and each input can be selected in turn by
a channel selection signal.

Multiplexers which can take in 16 inputs are


available.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Digital to Analogue Converter
Analogue outputs are frequently required by
some of the actuators,

Analogue outputs can be provided by the


Digital-to-analogue converters at the output
channel.

The input to the converter is a sequence of bits


with each bit along the parallel line.

A bit in the 0 line gives a certain size output


pulse. A bit in line 1 gives double the size of
output pulse as for line 0. A bit in line 2 gives
an output pulse double the size of output pulse
as for line 1 and so on.

All the pulses add together to give the


analogue version of the digital input.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Digital to Analogue Conversion
An Example

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Optocoupler/Optoisolator

The input/output modules provide the interface between the


PLC system and the sensors and actuators which are
external to the system.

Electrical isolation of the processor in the CPU of PLC from the


external sensors and actuators is provided by the Optoisolators
in the input/output modules. While these allow the input signals
to be passed on to the processor, any electrical faults in the
external devices will not affect the processor.

When a digital pulse passes through the LED, a pulse of infra-


red radiation is produced and this pulse is detected by a photo-
transistor and gives rise to a voltage in that circuit.

The gap between the LED and the photo-transistor gives


the electrical isolation.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Function of input Modules
Input devices, also known as sensors are field devices and are connected to PLCs
via Input Modules.
Input devices give discrete, digital or analogue signals.
Input devices are connected to PLCs via optocouplers (also called optoisolators) in
Input Modules.Optocouplers give electrical isolation of the processor of PLC from
sensors.
Signal conditioning is used to size the input signals to a value acceptable to the
processor which can take in input only of 0-5V.
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 inputs of a certain magnitude.
Signal conversion is effected by Analogue-to-Digital converters(ADC) in input
modules
Optoisolator, Signal-conditioning Circuits and ADCs are incorporated in the input
modules.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Function of output Modules
Output devices, also known as actuators are field devices and are
connected to PLCs via Output Modules.
Output devices may need digital or analogue signals to operate.
output devices are connected to PLCs via optocouplers (also called
optoisolators) in Output Modules. Optocouplers give electrical isolation of
the processor of PLC from actuators.
Only Signal conditioning is required to size the output of the Processor to
a value as required for the actuators which need digital signals to operate.
Digital output from the processor has to be converted to analogue
signals and Signal conditioned for actuators which need an analogue
signal of a particular magnitude to operate.
Signal conversion is effected by Digital-to-Analogue converters(DAC) in
output modules.
Optoisolator, Signal-conditioning Circuits and DACs are incorporated in
the outputput modules.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input/Output interface
The input/output interface consists of the Input and Output Modules, to
which all of the field devices are connected. 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
An input module accepts a variety of digital or analogue signals of varying
magnitude from the sensors and converts them into a logic signal that
can be accepted by the processor.
Output modules converts control instructions from the processor into a
digital or analogue signal of varying magnitude that can be used to control
various field devices. (actuators).
Optocouplers/optocouplers are included in the input/output modules to
provide electrical isolation of the processor from the input and output
devices to prevent any damage to the processor due to external faults in
the field.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Operation of PLC Scanning
During its operation (when the PLC is switched to RUN) , the
CPU completes three processes:
(1) it reads, or accepts, the input data from the field
devices via the input interfaces (modules},
(2) it executes, or performs, the control program stored
in the memory system, and
(3) it writes, or updates, the output devices via the
output interfaces (modules}.

This process of sequentially reading the inputs, executing the


program in memory, and updating the outputs is known as
scanning.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


A Typical Shoe Box PLC

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Terminal Connections

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Typical Input/Output connections

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Shoe Box PLC connected to
a Programming Console

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Modular type PLCs

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Modular type PLCs

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


INPUTS & OUTPUTS

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Mechanical Switches

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Proximity Switches

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Photoelectric sensors & Encoders

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Temperature & Displacement Sensors

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Strain Gauges

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Input Devices
Pressure, Level & Flow sensors

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Types of Outputs
Three types of outputs are possible from the
processor

-Electrical isolation of CPU from the field devices is


provided by optoisolators .

Relay type are slow in operation and are suitable


for ac and dc switching. They can withstand high
surge currents and voltage.They also provide
isolation of CPU from field devices.

Transistor type gives a faster switching action.It is


strictly for dc switching.They can be destroyed by
overcurrent and high reverse voltage. A fuse or built-
in electronic protection is provided. Optoisolators are
provided for electrical isolation of CPU from output
field devices.

Triac outputs can be used to control external loads


which are connected strictly for ac switching. Can
be easily destroyed by overcurrent and are protected
by fuses. Optocouplers are also provided for
electricall isolation of CPU from field devices.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


PROGRAMMING

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Programming of PLC
Programming means feeding a set of instructions to the PLC and directing its control operations to be as
instructed.

Programmes for PLC have to be written in a language and converted into a machine code, this being a
sequence of binary code numbers to represent the program instructions.

A software is used to translate the program into machine code for use by the processor.

Programming can be made much easier by use of high level languages like
C,BASIC,PASCAL,FORTRAN,COBOL but writing programs with these languages requires skill in
programming

IEC 61131-3 currently defines five programming languages for programmable control systems: FBD
(Function block diagram), LD (Ladder diagram), ST (Structured text, similar to the Pascal programming
language), IL (Instruction list, similar to assembly language) and SFC (Sequential function chart). These
techniques emphasize logical organization of operations

The most common format for programming are Ladder Diagram and Instruction List. FBD and SFC can
also be brought down to Ladder diagram and Instruction list formats to be fed to PLC

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Evolution of Programming

Writing programs with high level languages need


special skills in programming.
PLCs are also intended to be used by engineers
without any great knowledge in programming
As a consequence, a simpler Ladder programming
was developed. This is a simpler means of writing
programs which can then be converted into machine
code by some software for use by the PLC
microprocessor

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


A Ladder Diagram

Fig.1 is a schematic which shows a control circuit of a


motor which is switched ON by closing the Switch
contacts. Hard wired controllers have a schematic
drawn to depict the mode of control

Fig. 2 is an equivalent Ladder Diagram which


represents the schematic in a horizontal form as a
RUNG of a ladder. The supply lines are replaced by
thick vertical lines and are referred as RAILS of the
ladder.

The switch is replaced by a NO contact and the motor


is replaced by a circle marked as OUTPUT.

Conversion of the schematic into an equivalent


Ladder Diagram is the prelude in programming.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


The Ladder Diagram
A schematic diagram is converted into a Ladder Diagram which serves as
means of feeding a set of instructions or a programme into the memory
of the PLC.
The Ladder Diagram is a symbolic and schematic way of representing both
the system hardware (sensors and actuators) and the process controller.
It is called a ladder diagram because the various circuit devices connected
in parallel across the a.c. line form something that looks like a ladder, with
each parallel connection a rung on the ladder.
Each rung of the ladder is composed of a number of conditions or input
states and a single command output. The nature of the input states
determine whether the output is to be energised or not energised.
Many symbols that are used to represent the various circuit elements in a
schematic are reduced to just few symbols like NO/NC contacts to
represent inputs and a circle, parenthesis or rectangle to represent
outputs in ladder diagrams

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Conversion of a Schematic
into a Ladder Diagram

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Addressing inputs/outputs
Addresses are identifications of inputs and output signals for
storing in and retrieving from memory.
Each manufacturer may have his own method of addressing.
With a small PLC, it may be just a number, prefixed by a letter
to indicate whether it is input or output. e.g. X401,X402
inputs and Y430,Y431 outputs, X indicating inputs and Y
indicating outputs in a Mitsubishi/Toshiba make PLC.
Before programming a PLC, the make of the PLC is
ascertained and the form of addressing as given by the
manufacturer of the PLC is to be used.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Addressing in different makes
of PLC An example

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Rules governing Ladder Diagrams
1.Vertical lines of the diagram represent the Power.
2. Each rung of the ladder defines one operation in the control
process.
3. Each rung must start with input or inputs and must end with an
output.
4. Electrical devices are shown in their normal condition. A switch
which is shown normally open until some object closes it, is shown as
open.
5. Contacts made by one output can appear in more than one rung.
6. The inputs and outputs are all identified by their addresses, the
notation used depending on the manufacturer.
7. END indicates the end of the program. If you forget to include
the END, the programme will not execute and the error message
NO END INST will be displayed.
8. A ladder diagram is read from left to right and top to bottom.
9. When the PLC is in its PROGRAM mode, the ladder diagram is fed
to the PLC and a software will convert the ladder diagram into a
machine code which then becomes a program to be stored in the
memory of PLC.
10. When the PLC is in its RUN mode, it goes through the entire
ladder program from start to the end and promptly resumes
from the start, the process termed as a Scan Cycle

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Execution of Ladder Programme
Scanning
The PLC operating system execute a ladder program
by scanning the logic states of inputs and outputs
stored in the image memory.

Scanning is a continuous and sequential process


of reading the status of inputs, evaluating the control
logic and updating the outputs whenever the PLC is
put in RUN or MONITOR mode.

scan time refers to the time taken by the CPU to


complete one cycle of the process of reading the
inputs, executing the program and updating the
outputs

Scan time specifications indicates how fast the


controller can react to field inputs and correctly solve
the control logic, The faster the scan pattern, the most
efficient the system becomes to high speed
processing.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


What takes place during
a Scan Cycle?

SELF TEST(SANITY SCAN) Checks to see if all the cards are error free, reset watch-dog
timers. A watchdog timer will energise and initiate an alarm and shut down the PLC in the event
of a fault in the system.
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.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Programming by using
an Instruction List
If 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.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Mnemonics followed by
3 different PLC Makers

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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.
.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List - 1
Omron PLCs assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List - 2
Omron PLCs assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List - 3
Omron PLCs assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List 4
Omron PLCs assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List 5
Omron PLC assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List 6
Omron PLC assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Instruction List 7
Omron PLC assumed

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Programming a DOL Starter

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Programming with
Hand-held Programming console

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Drawing Ladder Program by using a
Desktop/Laptop Computer
Computers can be used to draw up a Ladder programme.
This involves loading the computer with the relevant software and then
selecting items from menus on the screen..
If Ladder is selected, a blank ladder diagram consisting of just two parallel
rails appears initially on the screen.
At the bottom of the screen, a series of ladder symbols appear. By
selecting the relevant symbol and entering it in the appropriate place, a
ladder diagram can be drawn on the screen.
The Computer is connected to the PLC by a cable which feeds the ladder
diagram into the PLC for conversion into a machine code.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Graphical Programming 1
Drawing the Ladder Diagram

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Graphical Programming 2
Entering the Ladder Diagram

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


BUILT-IN DEVICES

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Internal Relays
In PLCs there are elements that are used to hold data, i.e.bits
and behave like relays, being able to be switched on or off and
switch other devices on or off. These are called internal relays.
Such internal relays do not exist as real world switching devices
but are bits in the storage memory and behave in the same way
as relays.

Internal relays are also called Markers, Flags, Coils, Relays


and Bit storages and addressed accordingly.

For programming, they can be treated in the same way as an


external relay output and input.

To distinguish internal relay outputs from external relay outputs,


they are given different types of addresses as per the make

Siemens call them as Flags and address them as F----


Mitsubishi, as Markers and address them as M-----
Toshiba, as Relays and address them as R-----
Sprecher+Schuh, as Coils and address them as C---- etc.

Some internal relays have battery back-up so that they can be


used in circuits to ensure a safe shutdown of plant in the event
of a power failure and so enable it to restart in an appropriate
manner.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Timers
In many control tasks, there is a need to control time e.g.

a. A motor might need to be controlled to operate for a


particular interval of time or
b. A motor to be switched on after some time interval.

PLCs have timers as built-in devices.

Timers count fractions of seconds or seconds using the


internal CPU clock.

For programming, a common approach is to consider timers


to behave like relays with coils which when energised result
in the closure or opening of the contacts after a preset time.

All PLCs generally have on-delay timers. Small PLCs have


only on-delay timers. However, on-delay timers can be used
to produce Off-delay and On-off cycle timers

Fig.1(a) shows a basic timer circuit.

Fig. 1(b) shows the ladder programming and instruction list


for PLCs of Mitsubishi make.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Counters
A 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

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


TROUBLE SHOOTING

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Safety Considerations
Actively thinking about the safety of yourself and others, as well as the condition of your
equipment, is of primary importance.
When troubleshooting, pay careful attention to these general warnings:
Cold checks
Remove all electrical power at the main power disconnect switches before checking
electrical connections or inputs/outputs causing machine motion
Hot checks
Have all personnel, not connected with testing, remain clear of the controller and
equipment when power is applied.
The problem may be intermittent and sudden unexpected machine motion could result in
injury.
Have someone ready to operate an emergency-stop switch in case it becomes necessary to
shut off power to the controller equipment.
Never reach into a machine to actuate a switch since unexpected machine motion can occur
and cause injury.
Never alter safety circuits to defeat their functions. Serious injury or machine damage could
result.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Documentation
The documentation is the main guide used by the users for
troubleshooting and fault finding with PLCs.

The documentation for a PLC installation should include:


A description of the plant.
Specification of the control requirements.
Details of the programmable logic controller.
Operating manual, including details of all start up and shut down
procedures and alarms
Electrical installation diagrams.
Lists of all inputs and outputs connections.
Application program with full commentary on what it is
achieving.
Software back-ups.
.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Fault finding - General
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

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Problems due to Power Supply

Check the integrity of the PLC's power and ground. The integrity of the ground can be
electrically checked by measuring the voltage between the PLC ground terminal and a known
ground. Using a digital meter set on the lowest scale, both the AC and DC voltages should be
zero.
The power supply also can be tested electrically. If the PLC processor has an AC power
source, check the input voltage; it should be within the manufacturer's recommended range.
PLC processors actually operate on DC power, so that also must be checked. Measure each
of the outputs of the DC power supply and check if the voltages are within the
recommended ranges.
Also check the DC supplies for AC ripple. This can be done using a digital meter set on a low
AC range, and the value measured should be well below the manufacturer's specifications.
Excess ripple has drastic effects on the operation of the microprocessors and memory
devices typically found in PLC processors.
The final power check is to measure the voltage of any batteries in the system. Battery
power is often used to prevent a PLC from losing its program during power outages, and
battery voltages should be within recommended values.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Problems due to Interferences
Erratic processor behavior of processor can be caused by electro-magnetic
interference (EMI) or radio frequency interference (RFI). Try to correlate the
erratic behavior with an external EMI or RFI event like a large motor starting, arc
welding in the area, lightning strikes, or even the use of handheld radio
transmitters. Although they may seem harmless, handheld radios commonly used
by maintenance personnel emit powerful RF radiation and can seriously disrupt
the operation of unprotected electronic equipment.
Long-term solutions to EMI and RFI problems usually involve improvements in
power conditioning, grounding, and shielding.
Power, grounding, and interference problems all can cause the corruption of the
PLC memory, so the next step is to verify that the program is still correct. All PLCs
have some method for doing this, most of which involve comparing the program
in the PLC with a backup copy on tape or disk..
Keep the program backups up-to-date and safely away from temperature
extremes, high humidity, and EMI and RFI exposure to ensure they will always be
usable

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


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.
Failure of an LED to illuminate could be because of
a. The input device is not correctly operating
b. There are incorrect wiring to the input module
c. The input device is not correctly powered
d. LED or input module is defective
For Output devices that can be safely started, PBs might have been installed so
that each output can be checked.
Alternative method to test inputs and outputs is by FORCING. Forcing involves
software and used with keying in the instructions from the programme console to
turn on/off inputs/outputs instead of mechanically manipulating them.Forcing
means inputs and outputs are turned on/off regardless of the physical inputs or
the program results. Forcing can make programs perform erratically and is to be
discouraged and used only in extreme conditions. This method is used when PLCs
are put in MONITOR or TEST mode..

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Trouble shooting Digital input modules

Check the power supply to the module


If input power is present, connect a voltmeter across the input and
actuate the input device in the field, and measure the voltage at the PLC
input to determine if it changes adequately when the field device changes
state.
If it does not, the field device or wiring are most likely at fault. If a proper
voltage change is observed, the power and/or logic indicators on the
module should change when the voltage changes. If the indicators do not
properly reflect the state of the input, replace the input module.
If the input module is working properly but the PLC still is not registering
the input internally, the problem lies in the system used to communicate
input information from the module to the processor.
Consult the manufacturer's documentation to determine how to
troubleshoot this equipment, which may include an I/O rack, back plane,
communication module, and cabling.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Trouble shooting Digital output modules

Check the power supply to the module


The power to drive PLC outputs, like inputs, is usually not supplied by the
module, so it's important to find out where that power comes from. Again, the
first step in troubleshooting is to determine if the power for the output in
question is present and to restore that power if it is not.
There is a further complication to troubleshooting most output modules, because
they typically contain a fuse to protect the output switching device
Faults in field wiring and devices can blow that fuse, so its condition must be
verified before proceeding. Many modules are equipped with a "fuse blown"
indicator that shows which channel or module has a blown fuse. These fuses may
be accessible from the front of the module, or the module may have to be
removed or even disassembled in order to gain access to them.
Once power has been verified and the fuses checked, the procedure for
troubleshooting digital outputs is somewhat the reverse of that for digital inputs.

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


In-built Fault techniques

a. Timing checks A watchdog is used for a timing check that is carried out by the
PLC to check that some function has been carried out within the normal time. If
the function is not carried out within the normal time, then a fault is assumed to
have occurred and the watchdog timer trips setting off an alarm or closing down
the PLC. Alarm is set off if the function is not carried out in the normal time.
b. Last output check involves the use of status lamps to indicate each output as
it occurs. The program is designed to turn off the previous status lamps and turn
on a new status lamp as each new output is turned on. The program indicates at
which point in the sequence the fault has occurred.
c. Replication- The system repeats every operation twice and if it gets the same
result, it is assumed that there is no fault.
d. Expected value checks Software errors can be detected by checking whether
an expected value is obtained when a specific input occurs. If the expected value is
not obtained, then a fault is assumed to be occuring

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -


Few common faults
Fault 1 - An output device failing to turn ON though the output LED is on.

A. Check output voltage of PLC. If OK,


B. Check wiring between PLC and the output
device. If OK,
C. Check the output device
Fault 2 All the inputs are failing
A. Maybe the result of a short circuit. Check wiring for possible
shorts
B. May be the result of a ground fault. Isolate inputs one by one to
find the defective input device/circuit and rectify.
Fault 3 Entire system stops
A. Maybe a power failure
B. Someone e switching off inadvertently
C. A circuit breaker tripping
D. Reset system and restart

ETHIOPIA MARITIME TRAINING INSTITUTE CHAPTER -

You might also like