2. What is Automation?
“The technique of making an apparatus, a
process, or a system operate
automatically.”
“The creation and application of
technology to monitor and control the
production and delivery of products and
services.”
4. Electromechanical Relays:
The relay is an electromechanical switch
used as a protecting device and also as a
controlling device for various circuits,
equipment and electrical networks in a
power system.
The electromechanical relay can be
defined as an electrically operated switch
that completes or interrupts a circuit by
physical movement of electrical contacts.
8. History and Origin of PLC
Developed to replace relays in the late 1960s
PLC began in the 1970s, and has become the
most common choice for manufacturing
controls.
The PLC was invented in response to the
needs of the American automotive
manufacturing industry(primarily General
motors)
Costs dropped and became popular by 1980s
Now used in many industrial designs
9. Definition of PLC
A PLC is a special form of microprocessor-
based controller that uses programmable
memory to store instructions and to
implement functions such as logic, sequencing,
timing,counting and arithmetic in order to
control machines and processes.
10. PLCs are similar to computers, but
whereas computers are optimized for
calculation and display tasks, PLCs are
optimized for control tasks in the
industrial environment.
13. Output Devices
• Valves
• Motor Starters
• Solenoids
• Actuators
• Horns and Alarms
• Stack lights
• Control Relays
• Counter/Totalizer
• Pumps
• Printers
• Fans
14. 14
Leading Brands Of PLC
AMERICAN 1. Allen Bradley
2. Gould Modicon
3. Texas Instruments
4. General Electric
5. Westinghouse
6. Cutter Hammer
7. Square D
EUROPEAN 1. Siemens
2. Klockner & Mouller
3. Festo
4. Telemechanique
16. Sr.
No.
Advantage Description
1 Flexibility Universal Controller
Can replace various independent/
standalone controller.
Provide Multiple programming abilities.
2 Implementing changes and
correcting errors
Relay type systems require complete
rewiring
In PLC, rewiring is not necessary. Only
ladder logic is changed.
3 Large quantities of contacts In relay the number of contacts for
each coil are limited
In PLC, the contacts for a coil are
dependent on program.
4 Lower cost More functions in smaller and less
expensive packages
5 Pilot running
(Simulation Capability)
Relay systems have to be tested on
factory floor
PLC program can be pre-run and
evaluated in lab
PLC Advantages
17. 6 Visual observation Fault detection and Error handling
is easy in PLC systems
Error messages can be easily be
displayed on CRT screen
7 Speed of operation Number of bits of processor
Operating frequency (Scan time)
8 Ladder or Boolean
programming method
PLC programmer who works in Digital or
Boolean control system can also perform
PLC programming.
9 Reliability and
maintainability
Solid state devices(semiconductors)-very
reliable
More reliable than relays which have
mechanical wear and tear
10 Simplicity of ordering
control system components
Counter, Relays,Timers etc. in single PLC
18. 11 Documentation Printout of ladder logic can be
printed easily
No wire tracing is needed for
verification
12 Ease of changes by
reprogramming
Ability to program and
reprogram, loading and down
loading
13 Security Software lock on a program
(Password)
Relay systems tend to
undergo undocumented
changes
14 Capable of task not possible
with relays before as
indicated by the following:
Calculation, information
exchange, text and graphic
display, data processing,
networking
19. PLC Disadvantages
Sr. No. Disadvantage Description
1 Newer technology Change from ladder and relay to PLC
concept
2 Fixed program
applications
PLC systems may be costlier for single
function applications
Not economical where multiple
programming capabilities are not
required
3 Environmental
considerations
Not adapted for very high temperature,
high humidity level, high vibration, etc.
4 Fail-safe operation Relay systems provide direct electrical
isolation on pressing stop button
PLCs have to be additionally
programmed for fail safe operations
5 Fixed-circuit
operation
In the circuits where alterations are hardly
required, PLCs turn out to be ineffective
22. Selecting a PLC
Criteria
• Electrical requirements
• Number of logical inputs and outputs.
• Memory
• Operator interface(Types of I/Os)
• Speed of operation.
• Communication requirements
• Software
• Physical environments
26. The processor unit or central processing unit (CPU) is the
unit containing the microprocessor. This unit interprets
the input signals and carries out the control actions
according to the program stored in its memory,
communicating the decisions as action signals to the
outputs.
The power supply unit is needed to convert the mains AC
voltage to the low DC voltage (5 V) necessary for the
processor and the circuits in the input and output
interface modules.
27. The programming device is used to enter the
required program into the memory of the
processor. The program is developed in the
device and then transferred to the memory unit
of the PLC.
The memory unit is where the program
containing the control actions to be exercised
by the microprocessor is stored and where the
data is stored from the input for processing and
for the output.
28. The input and output sections are where the
processor receives information from
external devices and communicates
information to external devices.
The communications interface is used to
receive and transmit data on
communication networks from or to other
remote PLCs
29. PLC Input Module:
Input module senses the presence or absence of an input
signal at each of its input terminal.The input signal tells what
switch, sensor, or other signal is on or off in the process
being controlled. It converts the input signal for high, or on,
to a DC level usable by the modules electronic circuit.
For a low or off input signal, no signal is converted indicating
off. Input module carries out electronic isolation by
electronically isolating the input module output from its
input. Finally, output logic produces output signal, to be
sensed by PLC CPU.
31. A typical input module has 4,6,8,12,16 or 32
terminals, plus common and safety ground terminals.
All terminals in a given module have identical circuits.
The first block receives input signal from switch,
sensor and so on. For AC voltage input, DC
converter consists of rectifiers and means to step
down the voltage to usable level, usually with zener
diode. For DC input voltage DC to DC converters
are used.
32. The optoisolator protects CPU from input surges
or circuit malfunctions.
Each module is assigned with coded series of
numbers by its SIP switch settings.The on off status
is checked on each sweep of input scan. Finally,
output logic produces output signal, to be sensed
by PLC CPU
34. A DC signal from CPU is converted through each module
section to a usable output voltage, either AC or DC.
A typical output module has 4,6,8,12,16 or 32 terminals or
sections. The signal then passes through isolation stage.
Isolation is necessary so that any erratic voltage from output
device does not get back into the CPU and cause damage.
The isolator output is transmitted to switching circuitry or
output relay.AC switching is accomplished by triac.The output
of a module section may be through a relay or ac or dc output.
All terminals of a single module have the same output system.
35. 35
PLC Operation
Basic Function of a Typical PLC
Read all field input devices via the input interfaces,
execute the user program stored in application memory,
then, based on whatever control scheme has been
programmed by the user, turn the field output devices
on or off, or perform whatever control is necessary for
the process application.
This process of sequentially reading the inputs,
executing the program in memory, and updating the
outputs is known as scanning.
36. 36
While the PLC is running, the scanning process
includes the following four phases, which are repeated
continuously as individual cycles of operation:
PHASE 2
Program
Execution
PHASE 3
Diagnostics
PHASE 4
Output
Scan
PHASE 1
Read Inputs
Scan
37. 37
As soon as Phase 4 are completed, the entire cycle
begins again with Phase 1 input scan.
The time it takes to implement a scan cycle is called
SCAN TIME.
The scan time composed of the program scan time,
which is the time required for solving the control
program, and the I/O update time, or time required to
read inputs and update outputs.
The program scan time generally depends on the
amount of memory taken by the control program and
type of instructions used in the program.
38. PLC Ladder Programming
Conventions in drawing a ladder diagram-
The vertical lines of the diagram represent the power rails between
which circuits are connected.The power flow is taken to be from the
left-hand vertical across a rung.
Each rung on the ladder defines one operation in the control process.
A ladder diagram is read from left to right and from top to bottom.
When the PLC is in its run mode, it goes through the entire ladder
program to the end, the end rung of the program being clearly
denoted, and then promptly resumes at the start. This procedure of
going through all the rungs of the program is termed a cycle
41. The end rung might be indicated by a block with the word END
or RET, for return, since the program promptly returns to its
beginning.The scan time depends on the number of rungs in the
program, taking about 1 ms per 1000 bytes of program and so
typically ranging from about 10 ms up to 50 ms.
Each rung must start with an input or inputs and must end with
at least one output.
Electrical devices are shown in their normal condition. Thus a
switch that is normally open until some object closes it is
shown as open on the ladder diagram.A switch that is normally
closed is shown closed.
42. A particular device can appear in more than one rung
of a ladder. For example, we might have a relay that
switches on one or more devices. The same letters
and/or numbers are used to label the device in each
situation.
The inputs and outputs are all identified by their
addresses; the notation used depends on the PLC
manufacturer. This is the address of the input or
output in the memory of the PLC.
51. Latching
There are often situations in which it is necessary to hold an
output energized, even when the input ceases.
A simple example of such a situation is a motor that is started
by pressing a push-button switch.Though the switch contacts do
not remain closed, the motor is required to continue running
until a stop push-button switch is pressed.
The term latch circuit is used for the circuit that carries out
such an operation. It is a self-maintaining circuit, that after being
energized, maintains the state until another input is received.
54. PLCTimers
All PLC’s have timer instructions.Timers are output instructions that are internal
to the programmable logic controller.Timers provide timed control of the devices
that they activate or de-activate.The basic functions of timer are:
Timers are used to delay an action.
Timers are used to run an operation for a predetermined period of time.
Timers are also used to record the total accumulated time of continuous or
intermediate events.
The types of Timers are :
1. On-Delay timer (TON)
2. Off-Delay timer (TOF)
3. Pulse timer (TP)
56. On-DelayTimer
The TON instruction is used to turn an output on or off
after the timer has been on for preset time interval.The
TON instruction begins to count time base intervals
when the rung makes a FALSE-to-TRUE transition. As
long as rung conditions remain true, the timer adjusts its
accumulated value (ACC) each evaluation until it reaches
the preset value (PRE).
The accumulated value is reset when rung conditions go
FALSE, regardless of whether the timer has timed out.
57. Allen Bradley Timer Instruction
Timer :-T4:X
T = Identifies this as a timer file.
4 = Represents the default timer file 4.
X = This is timer in file 4. Viz.T4:0,T4:1 likewise.
Time Base :- The time base indicates the increments by which the
timer moves to the preset value, such as 0.001 s, 0.01 s, 0.1 s or 1 s.
Accumulator (ACC) Bit :- The accumulated value specifies the
number of milliseconds/seconds that have elapsed since the TON
instruction was enabled.
Preset (PRE) Bit : - The preset value specifies the value which the
accumulated value must reach before the instruction sets the DN bit.
58. The instruction mainly includes three status bits namely
EN,TT, DN.
Enable (EN) Bit :- The enable bit indicates the TON
instruction is enabled
Timer-Timing (TT) Bit :- The timing bit indicates
that a timing operation is in process and it remains on
until the accumulator reaches the preset value.
Done (DN) Bit :- The done bit changes state
whenever the accumulated value reaches the preset
value.
59. PLC Counters
A counter is a simple device intended to do one simple
thing-count. Every PLC has counter instructions.
Using counters sometimes be little challenging because
many manufacturers seem to use them different way. In
other words, the instruction symbol used and method
of programming will change for different
manufacturers.
61. Working of a counter
A counter instruction is always an output instruction. The counter
instruction counts each time the input logic changes the rung state
from false to true. This input logic can be signal from an external
device, for e.g. limit switch or sensor, or a signal from internal logic.
Every time the counter instruction sees a false-to-true rung
transition, a count-up counters accumulated value is incremented by
one.The working of down-counter is little different. Each time when
count-down counter sees a false-to-true rung transition, its
accumulated value is decremented by one, so the accumulated value
must be chosen as the starting point of the count.
62. Counter addressing
In Allen-bradley counter, the default counter
file is file 5. The counter data is stored in
counter file.
To address the counter as a unit the addressing
format used is C5:4
C= C identifies this as a counter file and counter
4 in counter file 5.
64. The preset value (PRE) is the count value that the counter must accumulate
before the counter output is 1.
The accumulated value (ACC) is the accumulated number of 0 to 1
transitions of the counter rung.
The count-up (CU) enable bit is 1 when the input logic makes the up counter
rung 1 and 0 when the rung is 0.
The count-down (CD) enable bit is 1 when the input logic makes the down-
counter rung 1 and 0 when the rung is 0.
The done (DN) bit is 1 for both counters when the ACC value is equal to or
greater than the PRE value and 0 when it is less.
Reset (RES) returns counter accumulator values to zero. As long as RES is 1,
ACC and all output bits are held at 0.When RES is 0, the counter is able to
start counting.