Professional Documents
Culture Documents
process control
instrumentation
Prepared By:
Dessie Fentaw
Lecturer(Electronics Engineering.)
Bishoftu (Ethiopia)
Parameter
Sensing Transduction Electrical
Eg. Pressure, Temperature,
element element signal
force, e.t.c.
True value
measurement
• Passive Transducers :
I. These transducers need external source
of power for their operation. So they are
not self generating type transducers.
II. A DC power supply or an audio
frequency generator is used as an
external power source.
III. These transducers produce the output
signal in the form of variation in
resistance, capacitance, inductance or
some other electrical parameter in
response to the quantity to be measured.
4/2/2018 Dessie Fentaw 17
CLASSIFICATION OF PASSIVE TRANSDUCERS
INDUCTIVE TRANSDUCER
n-type
semiconductor
+ + + + + + + + + + + + + + + Depletion Zone
- - - - - - - - - - - - - - - - - -
p-type
semiconductor
TRANSDUCER:
INVERSE TRANSDUCER:
1. Potentiometers (POT)
2. Strain gauge
3. Thermistors
4. Resistance thermometer
The inductive transducers are of the self generating or the passive type. The self
generating inductive transducers use the basic generator principle i.e. the
motion between a conductor and magnetic field induces a voltage in the
conductor.
The variable inductance transducers work on the following principles.
Variation in self inductance
Variation in mutual inductance
Ferromagnetic
former
displacement coil
Static pressure
From a phenomenological point of view, pressure, p, as a
macroscopic parameter is defined starting with element of force
dF exerted perpendicularly on an element of surface dA of the
wall, by the fluid contained in the container:
p = dF / dA
4/2/2018
Condenser Microphone construction
Dessie Fentaw 61
Types of high pressure sensors
Bourdon-tube Gauge
Schrader Gauge
Bourdon-Tube gauge
Invented by Eugene Bourdon in 1849
Can be used to measure pressures up
to 100,000 psi
Uses an elastic tube as its primary
element
The tube straightens out with increasing
pressure, moving the pointer via
mechanical links
Measures static pressure Commercial bourdon tube gauge
4/2/2018 Dessie Fentaw 62
Types of high pressure sensors
The Bourdon tube is a hollow tube with an elliptical cross section.
When a pressure difference exists between the inside and outside, the
tube tends to straighten out and the end moves.
The movement is usually coupled to a needle on a dial to make a
complete gauge.
It can also be connected to a secondary device such as an air nozzle to
control air pressure or to a suitable transducer to convert it into an
electric signal.
This type can be used for measuring pressure difference.
gauges
Performs better than bourdon-tube under
dynamic loads
F = PA
kx=F
x = (A/k)P
Pressurized gauge
Limits the expansion of the unit and prolongs the bellows life.
Resulting deflection is the force acting on the bellows and the
opposing spring force.
different pressures.
The deformation of the diaphragm is dependent on the difference in
pressure between the two faces.
Can be used to measure gauge, differential, vacuum or absolute.
Can be measured using mechanical, electrical, piezo-resistive and
capacitive means.
Follows a linear variation with Δp when the deflection is less than 1/3 the
diaphragm thickness.
Good Dynamic sensor.
LVDT-DIAPHRAGM
The motion of a diaphragm sensed by a Linear
Variable Differential Transformer or (LVDT).
Potentiometer
The wiper of a potentiometer is
connected to a diaphragm, a Bourdon
tube or cell so that the deformation of
this sensing element causes a
displacement of the wiper
Vm = Vs.R(x)/Rn
where
R(x): resistance between the wiper and the end of the potentiometer
Rn: total resistance
Vs: supply voltage
Vm: voltage between the wiper and one of its ends
If there is proportionality between:
– pressure p to be measured and deformation of the sensing element;
– deformation of the sensing element and displacement x of the wiper;
– displacement of the wiper and the resistance R(x);
Then we may write:
Vm = k. Vs .p
where k is a characteristic constant of the device.
4/2/2018 Dessie Fentaw 74
The materials most often used for the production of sensing elements
include the following:
Stainless steel
Titanium
Ni Span C
Quartz
Silicon
Sapphire
The following is a list of commonly used flow devices in the Oil &
Gas Industry. A corporate standard in many cases provides guidance
on the evaluation criteria for flow meter selection.
There are many types of flow meters available and each has its own
application and advantages & limitations, but should always follow
project specifications first and be aware that information can vary
for the same type of flow meter between different manufacturers.
Bernoulli’s Equation
P+½ ρv2+ρgh=constant
P=pressure of the fluid along the streamline
v=velocity of the fluid along the streamline
g=acceleration due to gravity
h=height
ρ=fluid density
Elbow Magnetic
The working principle for all these is that something makes the velocity of the
fluid change and this produces a change in the pressure so that a difference Dp =
p2 - p1 is created. It can be shown for all these meters that the volume flow rate Q
is related to dp by the following formula.
Q = K(dp)0.5
K is the meter constant.
Flow
Buoyancy
Gravity
Buoyancy Gravity
Flow
4/2/2018 Dessie Fentaw 91
Ultrasonic Meter
Transit time ultrasonic meters employ two transducers located upstream
and downstream of each other.
Each transmits a sound wave to the other, and the time difference between
the receipt of the two signals indicates the fluid velocity.
Transit time meters usually require clean fluids and are used where high
range ability is required. Accuracy is within 1% for ideal applications.
Methods of measuring liquid levels, using (a) a simple float with level
indicator on the outside
4/2/2018 Dessie of the tank, and (b) an angular arm float.
Fentaw 98
Direct Level Sensing
Ultrasonic or sonic devices can be used for single point or continuous level
measurement of a liquid or a solid. A setup for continuous measurement is
shown in Figure
Use of ultrasonic devices for continuous liquid level measurements made by timing
reflections from the surface of the liquid.
4/2/2018 Dessie Fentaw 99
Indirect Level Sensing
A commonly used method of indirectly measuring a liquid level is to measure the
hydrostatic pressure at the bottom of the container.
The level can be extrapolated from the pressure and the specific weight of the liquid.
The level of liquid can be measured using , capacitive probes, resistive tapes, or by
weight measurements.
Pressure is often used as an indirect method of measuring liquid levels.
Pressure increases as the depth increases in a fluid.
The pressure is given by:
p = γd
where p is the pressure,γ is the specific weight, and d is the depth.
a b
Pressure sensors positioned (a) below tank bottom, and (b) above
tank bottom.
4/2/2018 Dessie Fentaw 101
Indirect Level Sensing
Capacitive probes can be used in liquids and free-flowing solids for
continuous level measurement .
Materials placed between the plates of a capacitor increase the
capacitance by a factor (μ ), known as the dielectric constant of the
material.
For instance, air has a dielectric constant of 1, and water has a dielectric
constant of 80.
When two capacitor plates are partially immersed in a nonconductive
liquid, the capacitance (Cd) is given by
Temperature Transducer
Prepared By: Dessie Fentaw
Lecturer(Electronics Engineering.)
Bishoftu (Ethiopia)
LM-335 series
LM-35 series
LM=34 series
AD-592 series
INTRODUCTION
Visible light is a small portion of this spectrum. This is the only part of
this energy range that our eyes can detect. What we see is a rainbow of
colors.
RedOrangeYellowGreenBlueIndigoViolet
ROY G BIV
Frequency Ranges
Wavelengths
Violet light, at the other end of the visible range, has nearly double the
frequency—7.5 × 1014 Hz—and (since the speed of light is the same
in either case) just over half the wavelength—
C = λν
When all colors are being reflected we see white light (white isn’t
really a color)
In 1921 Albert Einstein received the Nobel Prize in Physics for discovering the photoelectric
effect
While it was difficult for scientists to believe (they can be stubborn) it did
In the photoelectric effect experiment, why does red light not cause the emission of an
electron though blue light can?
The photons of red light don’t have sufficient energy to eject an electron.
The electric field of the red light oscillates too slowly to eject an electron.
Red light contains fewer photons than blue, not enough to eject electrons.
The red light doesn't’t penetrate far enough into the metal electrode
The Photoelectric Effect
Photoconductive Cell
Photoconductive cells are light-sensitive resistors in which resistance decreases
with an increase in light intensity when illuminated.
These devices consist of a thin single-crystal or polycrystalline film of
compound semiconductor substances.
Most commercially available photoconductive cells are manufactured from
cadmium sulfide (CdS), which is sensitive to light in the visible spectrum.
Other materials that are less commonly used in photoconductive cells include
lead sulfide (PbS), lead selenide (PbSe), and lead telluride (PbTe), although they
react to infrared light, not the visible spectrum.
CdS photoconductive cells (CdS cells) are often referred to as light dependant
resistors (LDR).
They function within the same general spectral range as the human eye, and are
therefore widely used in applications where this type of spectral response is
required.
Photoconductive Cell
Light sensitive material is arranged in the form of a long strip, zigzagged across
a disc shaped base with protective sides. For added protection, a glass or plastic
cover may be included
Characteristics of a Photoconductive cell
They are
Light meters
Infrared detectors
TV cameras
Voltage regulator
Relays and
n-type
semiconductor
+ + + + + + + + + + + + + + + Depletion Zone
- - - - - - - - - - - - - - - - - -
p-type
semiconductor
The diagram above illustrates the operation of a basic photovoltaic cell, also called a
solar cell.
Solar cells are made of the same kinds of semiconductor materials, such as silicon,
used in the microelectronics industry.
For solar cells, a thin semiconductor wafer is specially treated to form an electric
field, positive on one side and negative on the other.
When light energy strikes the solar cell, electrons are knocked loose from the atoms
in the semiconductor material.
If electrical conductors are attached to the positive and negative sides, forming
an electrical circuit, the electrons can be captured in the form of an electric
current that is, electricity.
This electricity can then be used to power a load, such as a light or a tool.
A number of solar cells electrically connected to each other and mounted in a
support structure or frame is called a photovoltaic module.
Multiple modules can be wired together to form an array.
In general, the larger the area of a module or array, the more electricity that will
be produced. Photovoltaic modules and arrays produce direct-current (dc)
electricity.
They can be connected in both series and parallel electrical arrangements to
produce any required voltage and current combination.
Photo-diodes
Photo-diodes:There is an increase flow of majority carriers through a pn
junction due to the application of light photons.
Thus, the conductance of a photodiode increases with light.
Photo-diodes are usually only responsive to a narrow band of
wavelengths typically in the infrared band –around 900 to 1100
nanometres
Phototransistor
Introduction
Operation
Advantages
Dark Current: Small collector can emit leakage current when transistor is
switched off.
Phototransistor Packages
Phototransistor Scheme
Photocurrent: The electrons are amplified by the transistor and appear as a current
in the collector/emitter circuit.
The base is internally left open and is at the focus of a plastic lens.
Phototransistor Operation
The phototransistor must be properly biased
Usable with almost any visible or near infrared light source such as
IREDs, lasers, sunlight, and etc
Automated
Cart LED
Baffle Obstacle
Phototransistor
Phototransistor Applications
Coin counters
Lottery card readers
Position sensors
Remote controllers
audio/visual Equipment
Games - laser tag
Camera shutter control
LED light source - light pens
Security systems
Safety shields
Encoders - measure speed and direction
Photoelectric controls
Remote residential electric meter reading
Process Control instrumentation
If h is too low for the Qout be less than Qin then the
height will increase. If the height increases to a point
that Qout is more than Qin than the height will decrease.
First we must realize that the tank will stabilize at the point that Qin
= Qout, we have the relationship 2.5 gal/min = 1.2*sqrt(h).
h = ((2.5 gal/min)/(1.2))2 = 4.34 ft
(look at page 3 in text for same example with different numbers)
Data were represented by the magnitude of voltages & and currents in analog
from (continuous signal from), procssing of this data (amplifing, filtering,
clipping etc....) is colled analog processing.
Most modern control systems now employ digital computer to perform
controllers operations.
In computers data are represented as binary numbers consisting of a specific
number of bits.
Proecssing this digital signals is referred to as digital processing.
ON/OFF control
In this controller the final control element has only two states, on & off.
fig. below shows on/off control system.
The objective is to maintain the temperature in a system at reference value Tref.
A sensors cinvert temperature values in to a resistance in analog fashin.' i.e ,R
varies smoothly & continuously with T.
In recent days computer becomes more reliable & miniaturized, they have taken over
the controller function.
Thus the analog processing loop is discaded.
The ADC & DAC provide the interface with the process measurement &control action.
The computer inputs the digital equivalent of the temperature, NT, as an ADC O/P of
the I/P voltage VT.
This direct digital control system lets the computer perform the error detection
and controller functions.
Defance Engineering collage Dessie Fentaw 207
Programmable logic cintroller (PLC)
In past electrical realys wired accoreding to complex digram into what was called a
relay logic controller.
In recent years this controller is replaced by PLC. Originally it deigend to discrete -
state(ON/OFF) systems but these days used to implement DDC. Fig below show how
thermal limit switch is used instead of sensr or to indicate when the temprature has
risen above or fallen below the limit temperatue.
These are simply switches designed to open (or colse) when the temperature reaches
creset certain preset value.
1.5 SUMMARY
Steam
Process
fluid
Ti(t) T(t)
T
Condensate
return
Process
fluid
Ti(t) T(t)
T
Condensate
return
Steam
Process
fluid
Ti(t) T(t)
T
Condensate
4/2/2018 Dessie Fentaw 230
return
How it works?
Steam
Process
fluid
Ti(t) T(t)
T
Condensate
return
controller fluid
possible disturbances.
Transmitter
Inlet process temperature Process TT
Ti(t), the process flow f(t), fluid
Points:
Points:
• How it works?
TEMPERATURE
decreases because of the
INLET
decrease in inlet temperature, but
then it increases, even above the TIME
TEMPERATURE
oscillate until it finally stabilizes.
OUTLET
This oscillatory response is typical TIME
of feedback control and shows
CONTROLLER
that it is essentially a trial and
OUTPUT
error operation. That is, when the
controller notices that the outlet
TIME
temperature has decreased below
Fig.1-3 Response
the SET POINT, it signals the valve of feedback control
to open. But theDessie
4/2/2018 opening
Fentaw is more 245
1.4 CONTROL STRATEGIES
TEMPERATURE
Than required. Therefore, the
outlet temperature increases
INLET
above the SET POINT. Noticing
TIME
this, the controller signals the
TEMPERATURE
valve to close again somewhat to
bring the temperature back down.
OUTLET
This trial and error continued until
TIME
the temperature reached and
stayed at SET POINT.
CONTROLLER
OUTPUT TIME
Fig.1-3 Response
of feedback control
4/2/2018 Dessie Fentaw 246
• The block diagrams of feedback control system
Disturbance 1 Disturbance 2
Output
SP
Final control Process Or
Controller
element or plant Controlled
Summing
- variable
junction
Sensor/
Transmitter
Points:
• How it works?
implement feedforward
Steam
control, this disturbance
TT
must first be measured
and then a decision made Ti(t) T(t)
as to manipulate the T
Condensation
retun
steam valve to
compensate for them. Fig 1-5 Feedforward control
TT
Feedforward controller
makes the decision about Ti(t) T(t)
T
how to manipulate the Condensation
retun
steam valve to maintain
the controlled variable at Fig 1-5 Feedforward control
set point.
4/2/2018 Dessie Fentaw 253
• The Block diagrams of Feedforward control
Sensor/
Tranmitter Process flow
Disturbances
Output
SP
Final control Process Or
Controller
element or plant Controlled
variable
Feedforward
In this example, The feedforward controller
TT
of the other disturbances enter
the process, this strategy will not f(t) Ti(t) T(t)
variable.
set point. T
Condensation
retun
Washing machine
Feedforward
Oven control system
Microwave oven
Feedback
Air conditioner control system
?:
How to choose a proper control system?
• Low cost
In this example, TC
SP
Feedforward control
+
now compensate for Feedforward
controller
the “major” +
disturbance;
Steam
feedback control
compensate for all TT
TT
T Condensation
retun
control strategy.
Steam
The sensors and TT
TT
transmitters perform
the measurement. f(t) Ti(t) T(t)
T Condensation
Both feedforward and retun
feedback controller
make the decision. Fig 1-6 Feedforward control with feedback control
The steam valve takes
action.
4/2/2018 Dessie Fentaw 264
1.5 SUMMARY
Electrical
Ac and dc motors
Stepper motors
solenoids
Hydraulic
Use hydraulic fluid to actuate motion
Pneumatic
Use compressed air to actuate motion
A Reservoir
A Hydraulic Pump
Actuator
Reservoir
Selector
Valve
POWER
If the oil gets too hot, it’s properties change and the fluid
will become more viscous.
The fluid lines can transport fluid either under pressure or via
vacuum (i.e. suction).
The major difference is that in pneumatic systems, high pressure air is used
instead of hydraulic fluid.
This is because air is much more compressible than fluid and it is much easier to
store the pressure, using reservoirs.
This can give a reserve of power for short bursts of very heavy operation, or for
emergency use if the system fails.
Pressure Gauges
Pressure regulator
Valve
Solenoid
Actuator
Lift load
Lower load
Solution
DAC
DAC
A1 A2
p2 vB
p1
v0
Rotary actuators are used to convert potential pneumatic energy into mechanical energy.
Rotary actuators produce torque .Commonly called air motors
In most cases rotary actuators are not chosen for their efficiencies, but for their power, speed
and torque.
Linear
Actuator Rotary
Electric Motor
Actuator
Final
Control
Element
Process
For example
pneumatically
hydraulically controlled
For example
Flow Valve
Temperature Heater
Digital signal
Amplification
Nozzle/Flapper system
Current-to-Pressure converters
Solenoid
Electrical motor
i. DC motor
ii. AC motor
Pull Solenoids
Force is Directed Back
towards Solenoid.
Push Solenoids
Force is Directed AWAY
from Solenoid
Clapper Solenoids
Typically Force
application can be the
same as a Push or Pull
Greater amount of End
Force/Hold Force
Process equation
Dynamic behavior of the process
TL F (QA , QB , QS , TA , TS , T0 )
where QA , QB flow rates in pipes A and B
QS steam flow rate
TA ambient temperature
T0 inlet fluid temperature
TS steam temperature
The controller loop adjusts QS and regulate the TL, regardless
of each parameters vary with each other
Process Lag
The time delay that process responds to the load change
Variable Range
Control Lag
Dead Time
Cycling
Controller Modes
e r b
e error
b measured indication of variable
r setpoint of variable (reference)
r b
ep 100
bmax bmin
rpm and (b) the value of (a) expressed as the percentage of control output.
Soln.
We find the slope m and intersect so
Example,
A change in liquid temperature occurs, it is required some
finite time for the control system to physically actuate the
steam control valve
Reverse Action
When an increase in controlled variable cause a
decrease in controller output
Temperature control
If temperature increase, the drive to the heater should be
decrease
0% e p 0
p
100% e p 0
Heater,
if temperature drops below setpoint, the heater is
turn ON.
If the temperature rises above the setpoint, it is turn
OFF
p pi e p ei i 1, 2,...n
100 e p e1
p 50 e1 e p e1
0 e p e1
Defance Engineering collage Dessie Fentaw 373
The graph represents the error and the control output
p K F t p (0) e p e p
p (0) controller output at t=0
100
PB
Kp
Solution:
Given Data: Reset action time = TI = 2.2
min = 132 Seconds
Error = ep = 2.2%
Asked: Integral controller constant = KI = ?
Controller output = p = ?
de p
p(t ) K D
dt
PD
PID
where
PI (0) integral term at t = 0
Eliminate offset
INTRODUCTION:
The advent of the PLC began in the 1970s, and has become the most common choice for
manufacturing controls.
PLCs have been gaining popularity on the factory floor and will probably remain predominant for
some time to come.
Flexible and can be reapplied to control other systems quickly and easily.
Reliable components make these likely to operate for years before failure.
The CPU, which controls all PLC activity, can further be broken down into:
memory system.
provides the interface between the CPU and the information providers (inputs) and controllable
devices (outputs). Origin - in 1968
Original goals:
Programmable
communication capable
Maintainable
Reliable
Compact
inexpensive
Additional features:
discrete & continuous control
4/2/2018 Dessie Fentaw 403
To operate,
the CPU “reads” input data from connected field devices through the use of its input interfaces, and
then “executes” or performs the control program that has been stored in its memory system.
the PLC “writes” or updates output devices via the output interfaces.
The magnetic field pulls a metal switch (or reed) towards it and the
contacts touch, closing the switch.
The contact that closes when the coil is energized is called normally
open.
The normally closed contacts touch when the input coil is not energized.
The output contacts are shown with two parallel lines. Figure 1:
Normally open contacts are shown as two lines, and Simple Relay Layouts and
will be open (non-conducting) when the input is not energized. Schematics
Normally closed contacts are shown with two lines with a diagonal line
through them.
When the input coil is not energized the normally closed contacts will be
closed (conducting).
logic.
inputs,
outputs, and
the logic.
Note:
Notice that;
but the ladder logic inside the PLC has one normally
open contact, and one normally closed contact. Figure 3
A PLC Illustrated With Relays
on.
On the left most part of the rung, power could flow through the top if C is off and D is on.
Power could also (and simultaneously) flow through the bottom if both E and F are true.
This would get power half way across the rung, and then if G or H is true the power will
be delivered to output.
instructions.
4/2/2018 Dessie Fentaw 413
The AND in line 00005 combines the results from the last LD instructions and now
there are two numbers remembered.
This result replaces the two numbers, and there is now a single number there.
The last instruction is the ST (store output) that will look at the last value stored and
if it is 1, the output will be turned on,
For example, input from a sensor which works on 24 VDC must be converted to a signal of 5 VDC in order for a
They are "optically" separated, or in other words, signal is transmitted through light.
whose light in turn incites photo transistor which in turn starts conducting, and
a CPU sees this as logic zero (supply between collector and transmitter falls under 1V)
thus the voltage between collector and emitter falls to 0.7V , and
Inversely it means that a signal at the output exists and is interpreted as logic one.
Mentioning is that sinking-sourcing and sourcing - sinking pairing is always used, and not
sourcing-sourcing or sinking-sinking pairing.
Relays
The following two pictures display a realistic way how a PLC manages external devices.
Main difference between these two pictures is a position of "output load device".
In some cases the output of the sensor is used to switch a load directly, completely
eliminating the PLC.
Typical out-puts from sensors (and inputs to PLCs) are listed below in relative
popularity.
Sinking/Sourcing - Switches current on or off.
Plain Switches - Switches voltage on or off.
Solid State Relays - These switch AC outputs.
TTL (Transistor Transistor Logic) - Uses 0V and 5V to indicate logic levels.
A Schmitt trigger will receive an input voltage between 0-5V and convert it to 0V or 5V.
If the voltage is in an ambiguous range, about 1.5-3.5V it will be ignored.
If a sensor has a TTL output the PLC must use a TTL input card to read the values.
If the TTL sensor is being used for other applications it should be noted that the maximum current output is
normally about 20mA.
Sinking sensors allow current to flow into the sensor to the voltage common,
while sourcing sensors allow current to flow out of the sensor from a positive source.
For both of these methods the emphasis is on current flow, not voltage.
By using current flow, instead of voltage, many of the electrical noise problems are reduced.
When discussing sourcing and sinking we are referring to the output of the sensor that
is acting like a switch.
In fact the output of the sensor is normally a transistor, that will act like a switch (with
some voltage loss).
A PNP transistor is used for the sourcing output, and an NPN transistor is used for the
sinking input.
When discussing these sensors the term sourcing is often interchanged with PNP, and
sinking with NPN.
4/2/2018 Dessie Fentaw 424
A simplified example of a sinking output sensor is shown in Fig.1.3.
The sensor will have some part that deals with detection, this is on the left.
The sensor needs a voltage supply to operate, so a voltage supply is needed for the sensor.
If the sensor has detected some phenomenon then it will trigger the active line.
If the voltage to the transistor on the active line is 0V, then the transistor will not allow current to
flow into the sensor.
If the voltage on the active line becomes larger (say 12V) then the transistor will switch on and allow
current
4/2/2018 to flow into the sensor
Dessieto the common.
Fentaw 425
Sourcing sensors are the complement to sinking sensors.
When the sensor is inactive the active line stays at the V+ value, and the
transistor stays switched off.
When the sensor becomes active the active line will be made 0V, and the
transistor will allow current to flow out of the sensor (hence sourcing).
In the sinking system in Figure 1.5 the light has V+ applied to one side.
The other side is connected to the NPN output of the sensor.
When the sensor turns on the current will be able to flow through the light, into the output to V-
common.
(Note: Yes, the current will be allowed to flow into the output for an NPN sensor.)
In the sourcing arrangement the light will turn on when the output becomes active, allowing current to
flow from the V+, thought the sensor, the light and to V- (the common).
4/2/2018 Dessie Fentaw 427
A PLC Input Card for Sinking Sensors
Inside these devices the is an LED and a phototransistor, but no electrical connection.
In this case they protect the 5V digital levels of the PLC computer from the various
external voltages and currents.
The dashed line in the figure represents the circuit, or current flow path when the sensor is
active.
This path enters the PLC input card first at a V+ terminal (Note: there is no common on
this card) and flows through an optocoupler.
This current will use light to turn on a phototransistor to tell the computer in the PLC the
input current is flowing.
The current then leaves the card at input 00 and passes through the sensor to V-. When the
sensor is inactive the current will not flow, and the light in the optocoupler will be off.
The optocoupler is used to help protect the PLC from electrical problems outside the PLC.
4/2/2018 Dessie Fentaw 429
PLC Input Card for Sourcing Sensors
Note:
When we have a PLC input card that has a
common then we can use PNP sensors.
In this case the current will flow into the
card and then out the common to the power
supply.
But, by integrating three wires worth of function into two, we now couple the power supply and sensing functions into one.
In both of these arrangements the sensor will require a small amount of current to power the sensor, but when active it will
allow more current to flow.
This requires input cards that will allow a small amount of current to flow (called the leakage current), but also be able to
detect when the current has exceeded
4/2/2018 a given
Dessie value.
Fentaw 431
Sourcing and Sinking Schematic Symbols
When drawing wiring diagrams, the symbols in Figure 1.9 are used for sinking
and sourcing proximity sensors.
Notice that:
In the sinking sensor when the switch closes (moves up to the terminal) it contacts
the common.
Closing the switch in the sourcing sensor connects the output to the V+.
On the physical sensor the wires are color coded as indicated in the diagram.
The brown wire is positive,
The blue wire is negative and
The output is white for sinking and black for sourcing.
The outside shape of the sensor may change for other devices, such as photo
sensors which are often shown as round circles.
4/2/2018 Dessie Fentaw 432
The Comparator (Schmitt trigger )
When the op-amp has one input sensor signal connected to its
inverting input terminal and a second input sensor signal connected
to its noninverting input terminal, it will compare the voltage level
of the two inputs and the output will be the amount of difference
between the two signals multiplied by the gain.
Which provide a voltage drop circuit that is connected to the noninverting input.
A diode and the coil of a control relay are connected in series with the output terminal.
The diode will ensure that only +ve voltage will pass to the coil to energize it.
is < 5V.
As long as the output voltage is –ve , the diode will be reverse biased & no current will flow to
If the light conditions change and the sensor’s resistance changes so that the voltage drop
ckt produces a voltage > 5V reference voltage,
The output will become +ve & the diode will be forward biased and allow current to flow to the
When current flows through the CR coil, it becomes magnetized and closes the NO contacts.
4/2/2018 Dessie Fentaw 434
PLC Functions
Ladder logic input contacts and output coils allow simple logical
decisions.
However, Functions extend basic ladder logic to allow other types of
control.
For example, the addition of timers and counters allowed event based
control.
Most of the functions will:
use PLC memory locations to get values, store values and track function status.
normally become active when the input is true. But, some functions, such as TOF timers, can
remain active when the input is off.
Mathematics PID
Conversions Communications
Move Functions
MOV (value, destination) - moves a value from one location in memory and
place it in another memory location.
When A is true,
the MOV function moves a floating point
unchanged.
When B is true,
the floating point number in the source will
When C is true,
the integer value of 123 will be placed in the
SUB(value,value,destination) – subtract
MUL(value,value,destination) – multiply
DIV(value,value,destination) – divide
That will retrieve values from N7:4 and F8:35, convert them both to the type of the
destination address, add the floating point numbers, and store the result in F8:36.
COS(value,destination) – cosine
SIN(value,destination) – sine
TAN(value,destination) – tangent
Given
Assign A = F8:0
B = F8:1
C = F8:2
D = F8:3
The equation uses the same memory locations chosen in the previous logic
diagram.
The steps will be executed in a simple order that may change as the result of
some simple decisions.
Statement:
When a start button is pushed the tank will start to fill, and the flow out will be stopped.
When full, or the stop button is pushed the outlet will open up, and the flow in will be stopped.
The first operation is to open the outlet valve and close the inlet valve.
when the button is pushed the yes branch is followed and the inlet valve is opened, and the
outlet valve is closed.
Then the flow chart goes into a loop that uses two decision blocks to wait until the tank is
full, or the stop button is pushed.
If either case occurs the inlet valve is closed and the outlet valve is opened.
The system then goes back to wait for the start button to be pushed again.
The instruction is shown in Figure 10, and will appear as a matched pair of outputs labeled
MCR.
If the first MCR line is true then the ladder logic on the following lines will be scanned as
If the first line is false the lines to the next MCR block will all be forced off.
F2 is simple, and
F5 is very similar.
Consider a bank machine that will go through very carefully selected states.
The general sequence of states might be idle, scan card, get secret number, select
transaction type, ask for amount of cash, count cash, deliver cash/return card, then
idle.
Likewise
The first step requires the identification of vending machine states as shown:
STATES
inserting coins - coins have been entered and the total is displayed
user choose - enough money has been entered and the user is making coffee
selection
service needed - the machine is out of coffee, cups, or another error has
occurred
4/2/2018 Dessie Fentaw 463
The states are then drawn in a state diagram as shown in Figure 20.
Here we can see that when powered up the machine will start in an idle state.
The transitions here are based on the inputs and sensors in the vending machine.
Figure 20
4/2/2018 State Diagram
Dessie Fentaw for a Coffee Machine 464
State Diagram Example
this means is that a cross walk button must be pushed to end the green light. This is not
The transition from Yellow E/W to Green N/S is caused by a 4 second delay (this is normal.)
The next transition is also abnormal, requiring that the cross walk button be pushed to end the
The last state has a 4 second delay before returning to the first state in the table.
This diagram is equivalent to the state table in Figure 23, but it can be
valuable for doing visual inspection.
State diagrams can be converted directly to ladder logic using block logic.
This technique will produce larger programs, but it is a simple method to understand, and easy
to debug.
The locations B3/1 to B3/4 are internal memory locations that will be used to track which
states are on.
others.
The transition is S1 or I/1 which will end state 1 B3/1 and start state 2 B3/2.
When the timer is done state 2 will be unlatched, and state 3 will be latched on.
The timer is retentive, so it must also be reset when the state is done, so that it will
start at zero the next time the state starts.
Figure 30
Ladder Logic for State Three
Figure 31
Ladder Logic for State Four