PLC 6
PLC 6
Logic Controllers
Third Edition
Frank D. Petruzella
McGraw-Hill
Chapter 6
Developing
Fundamental PLC
Wiring Diagrams
And Ladder Logic
Programs
Electromagnetic Control Relays
The PLC's original purpose was the replacement of
electromagnetic relays with a solid-state switching
system that could be programmed.
The programmable controller was designed
to replace physically small control relays
that make logic decisions but are not
designed to handle heavy current or high
voltage.
Coil
CR1
CR1-1 CR1-2
L1 L2
S
CR1
With switch S open:
CR1-1 ⮚ coil CR1 is de-energized
OFF ⮚ contacts CR1-1 are open
R ⮚ light R is off
⮚ contacts CR1-2 are
closed
G ⮚ light G is on
CR1-2 ON
Relay Circuit Operation
L1 L2
S
CR1
Contactor Pump
power contacts
L2
High-current
wiring
L1
Programmable controllers
Coil have I/O capable of operating
terminals the contactor but they do not
have the capacity to operate
Low-current
wiring heavy loads directly.
L2 L1
The M the
contacts, in series
Low-current When
The OL start
contact button
opens is
with the motor, close to
control circuit pressed, coil
automatically M energizes
when an
complete the high-current
to close allcondition
overload M contacts.
path to the motor. is
sensed, to de-energize
the M coil
Control and stop
contact the
M also
motor.to seal-in the coil
closes
circuit when the START
button is released.
High-current
power circuit
PLC Control Of A Large Motor Load
When a PLC needs to
control a large motor, it
must work in conjunction
with a starter.
PRESSED
ON
NOT PRESSED
OFF
R
R
L1 L2
L1 L2
G
G
OFF
ON
Selector Switch
Selector switch
Contacts
positions may have
Off Position A B two or more selector
Hand Auto positions with either
Hand X maintained contact
position or spring
A Off return to give
momentary contact
B Auto X operation.
Selector Switch Motor Reversing
Symbols
NO Contact
Limit switches take
the place of a human
NC Contact
operator.
L1 Stop Forward L2
FWD Limit
F
F R
OLs
Limit switches
Reverse
R
F REV Limit
Responds to changes in
temperature by opening or
closing an electric circuit.
Symbols
NO Contact NC Contact
Temperature Switch Control of a Motor
Closing ON
Rising
temperature
Motor
Pressure Switch
Pressure switches are used to control the pressure of
liquids and gases and are activated when a specific
pressure is reached.
Opens or closes an Bellows
electric circuit in Switch
response to a
change in pressure.
Symbols
NO Contact NC Contact
Starter Operated By A Pressure Switch
Closing ON
Rising
pressure
Level Switch
Level or float switches are used to sense the height of
a liquid.
Switch
Opens or closes an electric
circuit in response to a
change in liquid level.
Symbols
Float
NO Contact NC Contact
Amplifier
Photoelectric
sensor
Sensors
Sensors provide the equivalent of eyes, ears, nose,
and tongue to the microprocessor brain.
Microprocessor
Optical
sensor
Gas
sensor
Microphone
Probe
Proximity Sensor
Barrel type
Block diagram
As the target
moves into the
sensing area,
the sensor
switches
the output ON
Proximity Sensor Connections
The method of connecting and exciting a proximity
sensor varies with the type of sensor and its
application.
Target
L1 L2
Load
Control
output
Sensor
Current-sinking output (NPN)
Load is connected
Load between the positive
supply and sensor
Control
output
Proximity Sensor Connection To Input Module
A proximity sensor should
L1 be powered continuously L2
Input
module
The use of a bleeder
resistor allows
Proximity enough current for
sensor the sensor to operate
but not enough to
turn on the input of
the PLC
Bleeder resistor
Capacitive Proximity Sensor
A capacitive proximity sensor can be actuated by both
conductive and nonconductive material such as wood,
plastics, liquids, sugar flour and wheat.
Magnet
N S
NO The switch is
NC actuated by a
Common
magnet.
Reed Switch Activation
Reed switch
Proximity motion – movement
of the switch or magnet will
activate the switch
Magnet
Solar cell
Ohms
20 Ohms Light resistance
5,000 Ohms Dark resistance
Photoelectric Sensor Operation
Most industrial photoelectric sensors use a light-
emitting diode (LED) for the light source and a
phototransistor to sense the presence or absence of light.
Diffused-reflective
Retro-reflective typetype
Operating
Operating
Emitter/receiver range
range
Target
Reflector
Through-Beam Type Photoelectric Sensor
A through-beam photoelectric
sensor is used to measure the
change in light quantity caused
by the target's crossing the
optical axis.
Operating
Emitter Receiver
range
Target
Bar Code Systems
Hopper
Wire type Force Controller
The force applied to the gauge causes the
The load cell provides ON/OFF
gauge to bend. This bending action also
Chute
sensor input to the distorts the physical size
Control of the gauge,
controller, which which in turn changes its resistance.
displays the weight
and controls the
hopper chute.
Load cell
Temperature Sensors
Temperature sensors convert heat into an electric
signal. There are four basic types used: thermocouple,
resistance temperature detector (RTD), thermistor,
and IC sensor.
RTD
Temperature Sensors
Temperature sensors convert heat into an electric
signal. There are four basic types used: thermocouple,
resistance temperature detector (RTD), thermistor,
and IC sensor.
The thermocouple consists of a pair
of dissimilar conductors fused
together at one end to form the
"hot" or measuring junction, with
the free ends available for
connection to the "cold" reference
junction. A temperature difference
between the measuring and
reference junction generates a small
DC signal voltage.
Flow Measurement
The usual approach used in
measuring fluid flow is to
convert the kinetic energy that
the fluid has into some other
measurable form.
Turbine Flow Meter
Coil
The turbine blades turn at
Flow a rate proportional to the
Magnet fluid velocity and are
Turbine magnetized to induce
voltage pulses coil.
Flow Measurement
The usual approach used in
measuring fluid flow is to
convert the kinetic energy that
the fluid has into some other
measurable form.
Electronic Magnetic Can be used with electrically
Flow Meter conducting fluids and offers no
restriction to flow. A coil in the
unit sets up a magnetic field. If
a conductive liquid flows
through this magnetic field, a
voltage is induced and sensed
by two electrodes.
Velocity/RPM Sensors
A tachometer is a small permanent
magnet DC generator which when
rotated produces a voltage that is
directly proportional to the speed
at which it is driven.
Tachometers coupled
Controller
to motors are
commonly used in
M motor speed control
Motor applications to provide
a feedback voltage to
Tach the controller that is
proportional to motor
speed.
Velocity/RPM Sensors
The rotating speed of a
shaft is often measured
using a magnetic
(inductive) pickup sensor.
Solenoid Solenoid
Control Alarm
Pilot light relay valve
AIR
Coil
Solenoid Valve
A solenoid valve is a combination of:
⮚ a solenoid with its core or plunger
⮚ a valve body containing an orifice
in which a disc or plug is positioned
to restrict or allow flow
Forward motion of piston When SOL A is energized, the
valve spool is shifted to redirect
Directional the fluid and move the cylinder
forward
solenoid
valve
CR
FWD
SOL A
SOL A
CR
Stepper Motor
A stepper motor converts electrical
pulses applied to it into discrete
rotor movements called steps. They
are used to provide precise position
control of movement.
Stepper motor control system
Stepper-motor Step
Module translator motor
Communicates
with the PLC and Enables control
responds with of the stepper motor The motor will move
pulse trains one step for each pulse
received
11. Sensors convert mechanical, magnetic,
thermal, optical, and chemical variations into:
(a) electric voltages and currents.
(b) sound
(c) movement
(d) all of these
M
M
The seal-in auxiliary contact of the
starter is connected in parallel with
Seal-in contact the Start button to keep the starter
coil energized when the Start button is
released.
Programmed Seal-In Circuit
OFF OFF
Unlatch rung
Output rung
01
When the ON button is momentarily actuated, the latch rung
becomes true and the latch status bit (10) is set to 1, and so the
output is switched on. This status bit will remain on (1) when logic continuity of the latch rung
is lost.
When the unlatch rung becomes true (OFF button actuated),
the status bit (10) is reset back to 0 and so the output is switched
off.
PLC Water Level Program
OFF /Man
Positions ( water
at a low level)
PLC Water Level Program
Manual Mode
( water between
high and low
levels)
PLC Water Level Program
Automatic Mode
( water at high
level)
Sequential Control Process
Sequential controls are required for processes that
demand certain operations to be performed in
specific order.
Filling operation Capping operation
Bottle movement
Label
solenoid 2
Limit switch
(LS1) START
Emergency
STOP
Summary of the control task:
Hardwired Sequential Process • Start button is actuated.
• CR1-1 closes to seal in CR1
• CR1-2 opens, switching the
Emergency red stop pilot light off
Start Stop • CR1-3 closes, switching the
PB1 PB2 CR1 green run pilot light on
1 • CR1-4 closes to energize the
motor starter and motor
LS1 • The package moves to the
CR1-1 limit switch to actuate it and
STOP de-energize coil CR1
2 R • CR1-1 opens to open the
CR1-2 seal-in contact
RUN
• CR1-2 closes, switching the
3 G
red pilot light on
CR1-3 • CR1-3 opens, switching the
4 M green pilot light off
• CR1-4 opens to de-energize
CR1-4 OL the starter coil, stop the
motor, and end the sequence
Programmed Sequential Process
Arranging Instructions for Optimum Performance
There is more than one way to correctly implement
the ladder logic. In some cases one arrangement may
be more efficient in terms of the amount of memory
used and the time required to scan the program.
Sequence series instructions from the most likely to be FALSE (far left) to
least likely to be FALSE (far right)
Instruction LEAST
Instruction MOST
likely to be FALSE
likely to be FALSE
LESS likely
LEAST likely
Writing a Program from a Narrative Description
Description :
A simple drilling operation requires the drill press to turn on only if there is a
part present and the operator has one hand on each of the start switches. This
precaution will ensure that the operator's hands are not in the way of the drill.
PB1 PB2
Drill
motor
Switches
Part sensor
Writing a Program from a Narrative Description
Description :
A simple drilling operation requires the drill press to turn on only if there is a
part present and the operator has one hand on each of the start switches. This
precaution will ensure that the operator's hands are not in the way of the drill.
PL Standby
Solenoid
Level PL Full
switch
Photo
Motor
switch
START
STOP
Continuous Filling Operation Program
21. A _____ circuit is a method of maintaining
current flow after a momentary switch has been
pressed and released.
(a) power (b) control
(c) seal-in (d) OL