Programmable Logic Controllers (PLCs) utilize integrated circuits to control industrial machines by storing instructions for various functions like sequencing and data manipulation. Advancements in PLC technology include faster scan times, smaller units, and the incorporation of high-level programming languages, enhancing their application range. The operation of PLCs involves reading inputs, executing control programs, and updating outputs, with a modular architecture that allows for flexibility and expansion.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views136 pages
Programmable Logic Control
Programmable Logic Controllers (PLCs) utilize integrated circuits to control industrial machines by storing instructions for various functions like sequencing and data manipulation. Advancements in PLC technology include faster scan times, smaller units, and the incorporation of high-level programming languages, enhancing their application range. The operation of PLCs involves reading inputs, executing control programs, and updating outputs, with a modular architecture that allows for flexibility and expansion.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
PROGRAMMABLE LOGIC
CONT ROL-state members of computer family using
intregrated circuits instead of electomechanical devices to
implement control functions.
They can store instructions like
sequencing ,timing counting ,arithmetic,data manipulation
and communication to control industrial machines and
processing.
In early 70s were used as relay replacers in controlling
industrial automation..its operation include ON/OFF
control of the machines and process that requiredADVANCEMENTS
In advanced programmable controller in industry, changes
occur in both hardware(physical components) and
software(control program). example of hardware
advancement
[Link] scan time using advanced microprocessor and
electronics technology
[Link] low cost PLCs
[Link] -density I/O system provide space —efficient
interfaces at low costIe mE REMUS
[Link] incoperate with OOPs tools and multiple languages
based on IE 1131-3 standards
[Link] PLCs have been provided with powerful instructions
which extend area of application for small controllers
[Link] level languages such as BASIC and C have been
implemented
[Link] functional block instructions have been
implemented for ladder diagram for easy instruction
command.Principle of operation
~ I/O and the CPUGPU consist of processor memory system,
i consist of processor, memory system,
and the power supply .it govern all PLC
activities
1/0 system are connected to the field device
that encountered the machine and may be
discrete or analogy such as limit switch,
pressure transducers, push buttons, motor
starter ,solenoids
‘During operation CPU can 1. read or accept
data from inputs [Link] or
performs ,control program stored in the
memory system [Link] or updates thea
‘| The whole process of sequentially reading
the inputs ,executing the program in the
memory and updating the output is known
as scanning
Always the programming device or PC are
required to enter program into a memory
‘| Assignment : application of plc and its
rangesLadder diagram
a
q
It’s a traditional way of representing
electrical sequences of operations.
It represent the interconnection of field
devices in such a way that the activation or
turning ON, of one device will turn ON
another device according to pre determined
sequence of eventsExample of simple
u1“transformation of previous ladder diagram to PLC
format.”.
q
Note the real I/O field devices are
connected to input and output interfaces
while the ladder program is implemented in
a manner similar to hardwiring inside the
PLC ‘s CPU (Softwired) Instead of hardwired
in a panel
CPU reads the status of inputs ,energizes
the corresponding ckt element according to
the program and controls a real output
device via the output interfaces.PLC format ladder diagram
u1 12
u1 uw
PB1 PL
PB1 tsi PL x
2
“st Ls2
Ls2
{(_] represents input module —<> represents output modulePossible solutions
ne
q
For the hardwired [Link] in fig. 1 the pilot
light(PL) will turn ON if the limit switch
1(LS1) and push button PB1 or limit switch
2(LS2) closes.
For PLC ckt in fig.2 the same series of
events will cause the pilot light connected to
output module to turn ON.
The fig.3 shows possible configurations for
the ckt in fig.1 ,the highlighted blue lines
indicate that power is present to that
connection pointElectric(hardwired) and PLC ckt. Illustration from fig.1&2
Hardwired Description PLC
No Event
= PET ist PL, | Takes Pie aan PBI LSt PL Pu
FOS pet is open eo 1 -O-
LS1is Open ust
im LS2 is Open of} |
PLISOFF i
is2
of
PBI Is Closeo “a fer ist ws
St is Open 1 Or
sz Open ist
PLisOFF tse
H
us2
ot
PBI ls Closed
St is Open
PLISOFFCont..
a Pat
AL
ust PL) oe coced PBI LSt PL
°) ane
s
us2 PLIGON os
Ls
PE ust PL, PBI Lst PL
PBt Is Open
| (ste Closed
is2 L526 Closed LsAdvantages of PLCs
q
Generally PLC architecture is modular and
flexible, allowing hardware and software
elements to expand as the application
require changes i.e for large application the
small unit can be easily replaced with a unit
having greater memory and I/O Capacity.
Provides many benefits to control system
from reliability and repeatability to
programmabilityTHE MEMORY SYSTEM AND
wn LLO_INTERACTION.
q
The memory system is the area in the PLC’s
CPU where all of the sequences of
instructions, or programs, are stored and
executed by the processor to provide the
desired control of field devices
The memory sections that contain the
control programs can be changed, or
reprogrammed to adapt to manufacturing
line procedure changes or new system
start-up requirements.The total memory system in a PLC is
actually composed of two different
the executive memory
the application memory
The executive memory is a collection of
permanently stored programs that are
considered part of the PLC itself.
These supervisory programs direct all system
activities, such as execution of the control
program and communication with peripheral
devices(i.e., relay instructions, block transfer
functions, math instructions, etc.). This area of
memory is not accessible to the user.Cont....
a
The application memory provides a storage area for the
user-programmed instructions that form the application
program. The application memory area is composed of
several areas, each having a specific function and usage.
The storage and retrieval requirements for the executive
and application
memory sections are not the same; therefore, they are not
always stored in the
same type of memory. For example, the executive requires
amemory that
permanently stores its contents and cannot be erased or
altered either by loss
of electrical power or by the user. This type of memory is
often unsuitable for
the application program.Memory can be separated into two
categories
=
Q
Volatile memory loses its programmed contents if all
operating power is lost or removed, whether it is normal
power or some form of backup power
Volatile memory is easily altered and quite suitable for most
applications when supported by battery backup and
possibly a disk copy of the program.
Nonvolatile memory retains its programmed contents, even
during a complete loss of operating power, without requiring
a backup source. Nonvolatile memory generally is
unalterable, yet there are special nonvolatile memory types
that are alterable. Today's PLCs include those that use
nonvolatile memory, those that use volatile memory with
battery backup, as well as those that offer both.Input &Output devices
The input devices include digital and analogue
devices such as mechanical switches for
position detection, proximity switches,
photoelectric switches, encoders, temperature
and pressure switches, potentiometers, linear
variable differential transformers, strain
gauges, thermistors, thermo transistors and
thermocouples.
Output devices considered include
relays,contactors,solenoid valves and motors.Input Devices
o
The term sensor is used for an input device that
provides a usable output in response to a
specified physical input. For example, a
thermocouple is a sensor which converts a
temperature difference into an electrical output.
Sensors which give digital/discrete, i.e. on-off,
outputs can be easily connected to the input
ports of PLCs.
Sensors which give analogue signals have to
be converted to digital signals before inputting
them to PLC ports.Examples Of Some Of The Commonly Used PLC Input
Devices And Their Sensors.
M1. Mechanical switches
®» — Amechanical switch generates an on-off signal or
signals as a result of some mechanical input causing
the switch to open or close.
Such a switch might be used to indicate the presence
of a work piece on a machining table, the work piece
pressing against the switch and so closing it.
“The absence of the work piece is indicated by the
switch being open and its presence by it being closed
Example on the fig (a),shows the input signals to a
single input channel of the PLC with its logic levels
work piece not present 0
work piece present 1
relCont...
(a) (b)PEE eS pee Ne
The 1 level might correspond to a 24 V d.c. input, the Oto a
0 V input
a
q
With the arrangement shown in Figure (b), when the
switch is open the supply voltage is applied to the PLC
input, when the switch is closed the input voltage drops
to a low value. The logic levels are thus:
Work piece not present 1
Work piece present 0
Switches are available with normally open (NO) or
normally closed (NC) contacts or can be configured as
either by choice of the relevant contacts. An NO switch
has its contacts open in the absence of a mechanical
input and the mechanical input is used to close the
switch.
An NC switch has its contacts closed i in the absence of
Te
ae[Link] switches
q
Proximity switches are used to detect the presence of
an item without making contact with it. There are a
number of forms of such switches, some being only
suitable for metallic objects. The eddy current type of
proximity switch has a coil which is energised by a
constant alternating current and produces a constant
alternating magnetic field. When a metallic object is
close to it, eddy currents & voltage are induced in it.
The voltage can be used to activate an electronic
switch circuit, basically a transistor which has its
output switched from low to high by the voltage
change, and so give an on-off device[Link] sensors and
switches
=
transmissive types where the object being detected
breaks a beam of light, usually infrared radiation, and
stops it reaching the detector or reflective types where
the object being detected reflects a beam of light onto
the detector
“In both types the radiation emitter is generally a
light-emitting diode (LED). The radiation detector might
be a phototransistor, often a pair of transistors, known
as a Darlington pair. The Darlington pair increases the
sensitivity. Depending on the circuit used, the output
can be made to switch to either high or low when light
strikes the transistor. Such sensors are supplied as
packages for sensing the presence of objects at close
range, typically at less than about 5mmLight-emitting diode Light-emitting diode
/ Za
“>! opject
—_ +
Photodetector Photodetector
With the above sensors, light is converted to a current, voltage
or resistance change. If the output is to be used as a measure of
the intensity of the light, rather than just the presence or
absence of some object in the light path, the signal will need
amplification and then conversion from analogue to digital by an
analogue-to-digital converter.4. Encoders
ne
q
The term encoder is used for a device that provides a
digital output as a result of angular or linear
displacement.
An increment encoder detects changes in angular or
linear displacement from some datum position, while
an absolute encoder gives the actual angular or linear
position.
The Fig . On next slide shows the basic form of an
incremental encoder for the measurement of angular
displacement. A beam of light, from perhaps a
light-emitting diode (LED), passes through slots ina
disc and is detected by a light sensor, e.g. a
photodiode or phototransistor. When the disc rotates,
the light beam is alternately transmitted and stopped
and so a pulsed output is produced from the lightDetector
> oS
Light
Single
aperture res ~_ Rotating dies
0 DooneTa
g The absolute encoder differs from the incremental encoder in
having a pattern of slots which uniquely defines each angular
position. With the form shown in Figure on next slide
the rotating disc has four concentric circles of slots and four
sensors to detect the light pulses. The slots are arranged in
such a way that the sequential output from the sensors is a
number in the binary code, each such number corresponding to
a particular angular position. With 4 tracks there will be 4 bits
and so the number of positions that can be detected is 2*4 = 16,
ie. a resolution of 360/16 = 22.5%. Typical
encoders tend to have up to 10 or 12 tracks. The number of bits
in the
binary number will be equal to the number of tracks. Thus with
10 tracks
there will be 10 bits and so the number of positions that can be
detected is 2°10, i.e. 1024, a resolution of 360/1024 = 0.35 “o.SS
‘| The rotating wheel of the absolute encoder.
Note that though the normal form of binary
code is shown in the above figure, in practice
a modified form of binary code called the
Gray code is generally used.
This code, unlike normal binary, has only one
bit changing in moving from one number to
the next. Thus we have the sequence 0000,
0001, 0011,
| 0010, 0011, 0711, 0101, 0100, 1100, 1107,
11171.OUTPUT DEVICES
and signal conditioning functions so that
sensors and actuators can often be directly
connected to them without the need for
other circuitry.
It is also through the input/output unit that
programs are entered from a program panel.
Every input/output point has a unique
address which can be used by the CPU.
Electrical isolation from the external world is
usually by means of optoisolators (the term
optocoupler is also often used).Opto coupler
|
Infrared radiation
pone conn ne
|
Light- \
emitting ad Photo-
! transistor
|
!
yq
When a digital pulse passes through the light-emitting
diode, a pulse of infrared radiation is produced. This
to a voltage in that circuit.
The gap between the light-emitting diode and the
phototransistor gives electrical isolation but the
arrangement still allows for a digital pulse in one
circuit to give rise to a digital pulse in another circuit.
The digital signal that is generally compatible with the
microprocessor in the PLC is 5 V d.c. However, signal
conditioning in the input channel with isolation,
enables a wide range of input signals to be supplied to
it.
A range of inputs might be available with a larger PLC,
e.g. 5 V, 24 V, 110 V and 240 V digital/discrete,
Outputs are specified as being of relay type, transistor
tvpe or triac tvpeWith the relay type, the signal from the PLC output is used to
operate arelay and is able to switch currents of the order
of a few amperes in an external circuit. The relay not only
|
are, however, relatively slow to operate.
Relay outputs are suitable for a.c. and d.c. switching.
They can withstand high surge currents and voltage
transients.
The transistor type of output uses a transistor to switch
current through the external circuit. This gives a
considerably faster switching action. It is, however, strictly
for d.c. switching and is destroyed by over current and
high reverse voltage. As a protection, either a fuse or
built-in electronic protection are used. Optoisolators are
used to provide isolation
Triac outputs, with optoisolators for isolation, can be used
to control external loads which are connected to the ac.
power supply. It is strictly for a.c. operation and is very
easily destroved hy overcurrent. Fuses are virtually1. Relay
q
Solenoids form the basis of a number of output
control actuators. When a current passes through a
solenoid a magnetic field is produced and this can
then attract ferrous metal components in its vicinity.
One example of such an actuator is the relay, the term
contactor being used when large currents are involved.
When the output from the PLC is switched on, the
solenoid magnetic field is produced and pulls on the
contacts and so closes a switch or switches .
The result is that much larger currents can be
switched on. Thus the relay might be used to switch
on the current to a motor.From PLC ——Relay Switched2. Directional control valves
Ta
Another example of the use of a solenoid as an
actuator is a solenoid operated valve.
The valve may be used to control the directions
of flow of pressurised air or oil and so used to
operate other devices such as a piston moving
in a cylinder.[Link]
a
“ Ad.c. motor has coils of wire mounted in slots on a
oylinder of ferromagnetic material, this being termed
the armature.
‘The armature is mounted on bearings and is free to
rotate. Itis mounted in the magnetic field produced
by permanent magnets or current passin through
coils of wire, these being termed the field coils.
‘When a current passes through the armature coil,
forces act on the coil and result in rotation. Brushes
and a commutator are used to reverse the current
through the coil every half rotation and so keep the
coil rotating.
‘The speed of rotation can be changed by changing
the size of the current to the armature coil.I/O PROCESSING
Qn
The input/output (1/0) unit provides the
interface between the PLC controller and the
outside world and must therefore provide
the necessary signal conditioning to get the
signal to the required level and also to
isolate it from possible electrical hazards
such as high voltages
This chapter includes the forms of typical
input/output modules and installation where
sensors are some distance from the PLC
processing, their communication links to the
PLC.Input signals from sensors and the outputs required for
actuating devices can be:
SS
1. Analogue, i.e. a signal whose size is related to
the size of the quantity being sensed.
2. Discrete, i.e. essentially just an on-off signal.
3. Digital, i.e. a sequence of pulses
The CPU, however, must have an input of
digital signals of a particular size, normally 0
to 5 V. The output from the CPU is digital,
normally 0 to 5 V. Thus there is generally a
need to manipulate input and output signals
so that they are in the required form.
esInput units
an
The terms sourcing and sinking are used to
describe the way in which d.c devices are
connected to a PLC. With sourcing, using the
conventional current flow direction as from
positive to negative, an input device receives
current from the input module, i.e. the input
module is the source of the current.
If the current flows from the output module to
an output load then the output module is
referred to as sourcing
With sinking, using the conventional current flow
direction as from positive to negative, an input
device supplies current to the input module, i.e.
the input module is the sink for the current
If the current flows to the output module from
an niitniit nad than tha niitniit madiilea icSourcing and Sinking
an. —
Input Input
module module
- +4
Input
a) device (b)
- 4
Input Input Input
device | module module
- 4
(a)
(b)
Output loadD.C input unit
rs
LED indicator VW
of input soa Optoisolator [| intemal PL voltage
Signal to
PLC CPU
W
Voltage
divider circuitA.C Input Unit|| The figures in previous slides show the basic input unit
circuits for discrete and digital d.c. and discrete a.c.
inputs. Optoisolators are used to provide protection. With
the a.c. input unit, a rectifier bridge network is used to
rectify the a.c. so that the resulting d.c. signal can provide
the signal for use by the optoisolator to give the input
signals to the CPU of the PLC.
“Individual status lights are provided for each input to
indicate when the input device is providing a signal.
| Analogue signals can be inputted to a PLC if the input
channelis able to convert the signal to a digital signal
using an analogue-to-digital converter. With a rac
mounted system this may be achieved by mounting a
suitable analogue input card in the rack.So that one analogue card is not required for each
analogue input, multiplexing is generally used see
the figure below
Inputs
Multi- Selected
Channel
selection signal&
ef
Analogue} Analogue-
to-digital
(a)
Wn
Digital
0000 0010
0000 0001
0000 0000
(b Analogue input“Fig (a) in previous slide illustrates the function
of an analogue-to-digital converter (ADC). A
single analogue input signal gives rise to on-off
output signals along perhaps eight separate
wires. The eight signals then constitute the
so-termed digital word corresponding to the
analogue input signal level.
With such an 8-bit converter there are 2’8 = 256
different digital values possible; these are 0000
0000 to 1111 1111, i.e. 0 to 255.
"The digital output goes up in steps Fig(b) and
the analogue voltages required to produce each
digital output are termed quantisation levels| The analogue voltage has to change by the difference in
analogue voltage between successive levels if the binary
output is to change. The term resolution is used for the
smallest change in analogue voltage which will give rise to
a change in one bit in the digital output. With an 8-bit ADC
if, say, the full-scale analogue input signal varies between
0 and 10 V then a step of one digital bit involves an
analogue input change of 10/255 V or about 0.04 V.
| This means that a change of 0.03 V in the input will
produce no change in the digital output. The number of
its in the output from an analogue-to-digital converter
thus determines the resolution, and hence accuracy,
possible. If a 10-bit ADC is used then 210 = 1024 different
digital values are possible and, for the full-scale analogue
input of 0 to 10 V, a step of one digital bit involves an
analogue input change of 10/1023 V or about 0.01 V.
‘| In general, the resolution of an n-bit ADC is 1/(2‘n - 1).Analogue-to-digital conversion for an 8-bit
converter when the analogue input is in the range
0 to 10 V:
Analogue input (V) _—_—Diigital output (V)
0.00 0000 0000
0.04 0000 0001
0.08 0000 0010
0.12 0000 0011
0.16 0000 0100
0.20 0000 0101
0.24 0000 0110
0.28 0000 0111
0.32 0000 1000
etc.Output units
q
With a PLC output unit, when it provides the
current for the output [Link] a below
said to be sourcing and when the output
device provides the current to the output
unit it is said to be sinking.
Fig. b Quite often, sinking input units are
used for interfacing with electronic
equipment and sourcing output units for
interfacing with solenoids.Output units: (a)sourcing (b)
sinking
a
Load Load
- +
() 0)a
‘| Output units can be relay, transistor or triac.
Figures below shows the basic form of a
relay output unit, transistor output unit and
that of a triac output unit.Relay output module
Ta
‘Output signal LED PLC
Fuse
og
Optoisolator RelayTransistor o/p unit current
sinking
aTransistor o/p unit current
sourcing
a
Optocoupler
poccmo- eHTriac output unitSS
‘| Analogue outputs are frequently required
and can be provided by digital-to-analogue
converters (DACs) at the output channel.
The input to the converter is a sequence of
bits with each bit along a parallel line as
shown on next slide.Digtalto-
mnaiogue
converter
BEneesence
=‘Abit inthe 0 line gives rise to a certain size output
pulse. A bit in the 1 line gives rise to an output pulse
of twice the size of the O line pulse. A bit in the 2 line
gives rise to an output pulse of twice the size of the
line pulse. A bit in the 3 line gives rise to an output
pulse of twice the size of the 2 line pulse, and so on.
‘When the digital input changes, the analogue output
changes in a stepped manner, the voltage changing
by the voltage changes associated with each bit. For
example, if we have an 8-bit converter then the
output is made up of voltage values of 2*8 = 256
analogue steps. Suppose the output range is set to
10 V d.c. One bit then gives a change of 10/255 V or
about 0.04 V.Signal Conditioning
o
When connecting sensors which generate
digital or discrete signals to an input unit, care
has to be taken to ensure that voltage levels
match.
However, many sensors generate analogue
signals. In order to avoid having a multiplicity of
analogue input channels to cope with the wide
diversity of analogue signals that can be
generated by sensors, external signal
conditioning is often used to bring analogue
signals to a common range and so allow a
standard form of analogue input channel to be
used.SS
| Acommon standard that is used (Fig.
below) is to convert analogue signals to a
current in the range 4 to 20 mA and thus to
a voltage by passing it through a 250 0
resistance to give a1 to 5 V input signal.
\ Thus, for example, a sensor used to monitor
liquid level in the height range 0 to 1m
would have the 0 level represented by 4 mA
and the 1 m represented by 20 mA.Standard analogue signal
4to 20 mA
250 Q 1tosvCan be used to requce a voltage
from
=m a sensor to the required level; =
the output voltage level Vout is:
Vou =
Rs
ith"
R,
My
Ry Moaa
‘| Amplifiers can be used to increase the
voltage level; Figure shows the basic form of
the circuits that might be used with a 741
operational amplifier with (a) being an
inverting amplifier and (b) a non-inverting
‘| amplifier. With the inverting amplifier the
output Vout is:
R>
Vout =— Vi
out Ri m
and with the non-inverting amplifier:
Vout = i
Vn@)
R2
+
‘out
+
—v
+SS
Often a differential amplifier is needed to
amplify the difference between two input
voltages. Such is the case when a sensor,
e.g. a strain gauge, is connected ina
Wheatstone bridge and the output is the
difference between two voltages ora
thermocouple where the voltage difference
between the hot and cold junctions is
required.
‘Figure shows ~
operational arr Vout = x 2 (V2 —Vi) rpose.
The output vol{1% Dire amor
pci
As an illustration of the use of signal
conditioning, Figure on previous slide shows
the arrangement that might be used for a
strain gauge sensor.
The sensor is connected in a Wheatstone
bridge and the out-of-balance potential
difference amplified by a differential
amplifier before being fed via an
analogue-to-digital converter unit which is
part of the analogue input port of the PLC.Serial and Parallel
Communications
a
Bits
76543210
—
@
(0)
Bits
7
6
5
4
3
2
1
0
Voy‘| Serial communication is when data is transmitted
one bit at a time (Figure (a)). Thus if an 8-bit
word is to be transmitted, the eight bits are
transmitted one at a time in sequence along a
cable. This means that a data word has to be
separated into its constituent bits for
transmission and then reassembled into the
word when received.
‘| Parallel communication is when all the
constituent bits of a word are simultaneously
transmitted along parallel cables (Figure (b)).
This allows data to be transmitted over short
distances at high speeds.“Serial communication is used for transmitting
data over long distances. It is much cheaper to
run, for serial communication, a single core
cable over a long distance than the multicore
cables that would be needed for parallel
communication
‘Parallel communication might be used when
connecting laboratory instruments to the
system. However, internally, PLCs work, for
speed, with parallel communications. Thus,
circuits called UARTS (universal asynchronous
receivers— transmitters) have to be used at
input/output ports to converts serial
communications signals to parallel.Serial standards
a
Requirements for serial communication
1. Determine the voltage levels to be used for
signals, i.e. what signal represents a 0 and
what represents a 1.
2. What the bit patterns being transmitted mean and
how the message is built up. A sequence of
words are being sent along the same cable and it
is necessary to determine when one word starts
and finishes and the next word starts.
3. The speed at which the bit pattern is to be sent,
i.e. the number of bits per second.
4. Synchronization of the clocks at each end.SS
5. Protocols, or flow controls, to enable such
information as ‘able to receive data’ or ‘not
ready to receive data’. This is commonly done
by using two extra signal wires (termed
handshake wires), one to tell the receiver that
the transmitter is ready to send the data and
the other to tell the transmitter that the
receiver is ready to receive data.
6. Error-checking to enable a bit pattern to be
checked to determine if corruption of the data
has occurred during transmissionSS
‘| The most common standard serial
communications interface used is the
RS232. Connections are made via 25-pin
D-type connectors (see the figure on next
slide).
With usually, though not always, a male plug
on cables and a female socket on the
equipment. Not all the pins are used in every
application.D TYPE CONNECTOR
O o000000000000 0
Oo00000000000
Pins 14 to 24a
The minimum requirements are:
Pin 1: Ground connection to the frame of chassis
Pin 2: Serial transmitted data (output data pin)
Pin 3: Serial received data (input data pin)
Pin 7: Signal ground which acts as a common signal return path
A configuration that is widely used with interfaces involving computers is:
Pin 1: Ground connection to the frame of chassis
Pin 2: Serial transmitted data (output data pin)
Pin 3: Serial received data (input data pin)
Pin 4: Request to send
Pin 5: Clear to send
Pin 6: Data set ready
Pin 7: Signal ground which acts as a common signal return path
Pin 20: Data terminal readya
‘| The signals sent through pins 4, 5, 6 and 20
are used to check that the receiving end is
ready to receive a signal, the transmitting
end is ready to send and the data is ready to
be sent. With RS232, a1 bit is represented
by a voltage between -5 and -25 V, normally
-12 V, and a0 by a voltage between +5 and
+25 V, normally +12 V.a
“The term baud rate is used to describe the
transmission rate, it being approximately the
number of bits transmitted or received per
second.
) However, not all the bits transmitted can be
used for data, some have to be used to
indicate the start and stop of a serial piece
of data, these often being termed flags, and
as a check as to whether the data has been
corrupted during transmissionRS232 signal levels
q
The fig. below shows the type of signal that might be
sent with RS232. The parity bit is added to check
whether corruption has occurred, with even parity a 1
being added to make the number of 1s an even
number. To send seven bits of data, eleven bits may be
n Start bit Data Parity bit
+>
\ 4 bit
01101000 14—SePbt
voltage v
1 level‘| The signals sent through pins 4, 5, 6 and 20
are used to check that the
receiving end is ready to receive a signal, the
transmitting end is ready to
‘| send and the data is ready to be sent. With
RS232, a 1 bit is represented
‘| by a voltage between -5 and -25 V, normally
-12 V, and a0 by a voltage
between +5 and +25 V, normally +12 V.Ladder and functional
block programming
=
q
Programming can be made even easier by the use of
the so-called high level languages, e.g. C, BASIC,
PASCAL, FORTRAN,COBOL
These use pre-packaged functions, represented by
simple words or symbols descriptive of the function
concerned. For example, with C language the symbol
& is used for the logic AND operation. However, the
use of these methods to write programs requires
some skill in programming and PLCs are intended to
be used by engineers without any great knowledge of
programming, hence ladder diagram programming was
developed.
This is a means of writing programs which can then be
converted into machine code by some software for
use by the PLC microprocessor.a
‘| This chapter is an introduction to the
programming of a PLC using ladder
diagrams and functional block diagrams,
Here we are concerned with the basic
techniques involved in developing ladder
and function block programs to represent
basic switching operations, involving the
logic functions of AND, OR, Exclusive OR,
NAND and NOR, and latching.PLC ladder programming
‘Writing a program is then equivalent to drawing a
switching circuit. The ladder diagram consists of
two vertical lines representing the power rails.
Circuits are connected as horizontal lines, i.e. the
rungs of the ladder, between these two verticals.
a). 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.
‘| b). 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. See on the next fig.Power flow
Left power rail —> Right power rail
Rung 1
Rung 2
Rung 3
Rung 4
END End rung
Note:The end rung might be indicated by a
block with the word END or RET for return, since
the program prompily returns to its beginningd). Each rung must start with an input or inputs
and must end with at least one output.
e). Electrical devices are shown in their normal
condition. Thus a switch which 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.
‘| f). A particular device can appear in more than
one rung of a ladder. For example, we might
have a relay which switches on one or more
devices. The same letters and/or numbers are
used to label the device in each situation.yl
i
g). The inputs and outputs are all identified
by their addresses, the notation used
depending on the PLC manufacturer.
Note: Some slight variations occur between
the symbols when used in semi-graphic
form and when in full graphic. Note that
inputs are represented by different symbols
representing normally open or normally
closed contactsSome symbol in semi and full
graphics
=
rormatyopencanaes maa] fe 4
Normally closed contact ---|/|--- —/|—
Output coil: if the power flow ---( )--- —{ }E
to it is on then the coil state is onq
In drawing ladder diagrams the names of the
associated variable or addresses of each
element are appended to its symbol. Thus
Figures below shows how the ladder diagram
would appear using
(a) Mitsubishi, (b) Siemens, (c) Allen-Bradley,
(d) Telemecanique notations for the addresses.
Thus Figure (a) indicates that this rung of the
ladder program has an input from address X400
and an output to address Y430.
When wiring up the inputs and outputs to the
PLC, the relevant ones must be connected to
the input and output terminals with these
addresses.