D. CHAPTER dffrtgfffffffgggfffdddFIVE.pdf

interaman123 27 views 41 slides May 01, 2024
Slide 1
Slide 1 of 41
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41

About This Presentation

wdgbxcxfbbncvggcvbb bbnn bn xjz mmmdvvvvvv


Slide Content

CHAPTER FIVE
5. Programmable
Logic Controllers (PLCs)
Prepared by: Daniel .K 2016EC
Design of Electromechanical System I

❑A programmable logic controller (PLC) is a special form of microprocessor-based controller
❑PLCs are similar to computers but whereas computers are optimized for calculation and
display tasks, PLCs are optimized for control tasks and the industrial environment.
❑It uses a programmable memory to store instructions and to implement functions such as
logic, sequencing, timing, counting and arithmetic in order to control machines and processes.
❑The term logic is used because programming is primarily concerned with implementing logic
and switching operations,
e.g. The program may be in the form of:-
if A or B occurs switch on C,
if A and B occurs switch on D.
❑The operator then enters a sequence of instructions, i.e. a program, into the memory of
the PLC. The controller then monitors the inputs and outputs according to this program
and carries out the control rules for which it has been programmed.
❑Introduction

❑By changing the instructions in the program we can use the same microprocessor system
to control a wide variety of situations.
❑In the ‘traditional’ form of control system, the rules governing the control system and when
actions are initiated are determined by the wiring.
•When the rules used for the control actions are changed, the wiring has to be changed.
❑SoinPLCormicroprocessorcontrolsystem,insteadofhardwiringeachcontrolcircuitfor
eachcontrolsituationwecanusethesamebasicsystemforallsituationsifweusea
microprocessor-basedsystemandwriteaprogramtoinstructthemicroprocessorhowto
reacttoeachinputsignalfrom,say,switchesandgivetherequiredoutputsto,say,motors
andvalves.
Conti…..

❑What type of task (function) might a control system have?
❖Itmightberequired
✓To control a logic, sequence of events, timing, counting
and arithmetic or ON-OFF state.
✓Tomaintainsomevariableconstant,motion
✓To follow some prescribed change.
❑PLC initially designed to replace relay logic boards
oSequence device actuation
oCoordinate activities
•Accepts input from a series of switches
•Sends output to devices or relays
Conti…..

For example,
❑Thecontrolsystemforanautomaticdrillingmachine
asshowninfiguremightberequiredto
•startloweringthedrillwhentheworkpieceisin
position,
•startdrillingwhenthedrillreachestheworkpiece,
stopdrillingwhenthedrillhasproducedthe
requireddepthofhole,
•retractthedrillandthenswitchoffandwaitforthe
nextworkpiecetobeputinpositionbeforerepeating
theoperation

❑PLCs have the great advantage that:-
✓There is no need to rewire.
✓It is a flexible, cost effective,
✓Are easily programmed and have an easily understood
programming language
✓used with a wide range of control systems by resetting the
programed instructions.
✓It is Rugged and designed to withstand vibrations, temperature,
humidity and noise.
✓Have interfacing for inputs and outputs already inside the
controller.

❑Parts of PLC
❑Typically a PLC system has the basic functional components of
✓Rack or chassis
✓processor unit,
✓memory,
✓power supply unit,
✓input/output interface section,
✓communications interface and
✓the programming device.

✓is the unit containing the microprocessor and
✓this 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.
2.The processor unit or central processing unit (CPU)
1.Rack or chassis
✓In all PLC systems, the PLC rack or chassis forms the most important module and
acts as a backbone to the system.
✓PLCs are available in different shapes and sizes.
✓Itdistributes the power supply evenly. It houses different input-output modules.
✓It acts as a communication link between the CPU and different modules.
✓When more complex control systems are involved, it requires larger PLC racks.
✓All I/O modules will be residing inside this rack/chassis.

✓It is where the program is stored that is to be used for the control actions to be
exercised by the microprocessor and data stored from the input for processing
and for the output for outputting.
4.The memory unit
3.The programming device
✓It 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.
2.The power supply unit
✓This module is used to provide the required power to the whole PLC system.
✓It converts the available AC power to DC power which is required by the
CPU and I/O module.
✓It generally works on a 24V DC supply.
✓Few PLC uses an isolated power supply

✓is used to receive and transmit data on communication networks from or to
other remote .
✓It is concerned with such actions as device verification, data acquisition,
synchronization between user applications and connection management.
6.The communications interface
✓are where the processor receives information from
external devices and communicates information to
external devices.
✓Input devices, e.g. Switches or other sensors such as
temperature sensors, flow sensors, proximity sensor,
and output devices in the system being controlled,
e.g. motors, solenoid valves, etc., are connected to
the PLC.
5.The input and output sections

❑Ladder programming
•AverycommonlyusedmethodofprogrammingPLCsisbasedontheuseof
Ladderprogrammingor(ladderdiagrams).
•Aladderdiagram(alsocalledcontactsymbology)isameansofgraphically
representingthelogicrequiredinarelaylogicsystem.
•Writingaprogramisthenequivalenttodrawingaswitchingcircuit.
❑In drawing a ladder diagram, certain conventions are adopted:
▪Theverticallinesrepresentthepowerrailsbetweenwhich
circuitsareconnected.
▪Eachrungdefinesoneoperationinthecontrolprocess.
▪Aladderdiagramisreadfromlefttorightandfromtopto
bottom,
▪TheendrungindicatedbyablockwiththewordENDorRETfor
return,sincetheprogrampromptlyreturnstoitsbeginning.

▪Eachrungmuststartwithaninputorinputsandmustendwithatleast
oneoutput.
▪Aparticulardevicecanappearinmorethanonerungofaladder.
▪Theinputsandoutputsareallidentifiedbytheiraddresses,thenotation
useddependingonthePLCmanufacturer.
❑To illustrate the drawing of the rung of a ladder
diagram, consider a situation that input is the
switch and the output the motor.
✓In drawing ladder diagrams the names of the
associated variable or addresses of each element
are appended to its symbol, seefig c.
Fig. Siemens notation a, b, c.
Conti….

❑Logic functions
❑Logic states:-
ON : TRUE, contact closure, energize, etc.
OFF: FALSE, contact open , de-energize, etc.
❖Do not confuse the internal relay and program with the external
switch and relay.
✓Internal symbols are used for programming.
✓External devices provide actual interface.
❖AND & OR LOGIC
Fig. AND gate
Fig. ORgate
❑Logic gate representation using ladder diagram

❖NAND & NOR gate
Fig. NAND gate Fig. NOR gate
❖Not gate
Fig. Not gate
Conti….

❑Latching
oThere are often situations where it is necessary to hold an output energized,
even when the input ceases.
oThe term latch circuit is used for the circuit used to carry out such an
operation.
oIt is a self-maintaining circuit in that, after being energized, it maintains that
state until another input is received.
Fig. Latched circuit
Example.
❑Thus, once the motor energize, even if the input A
opens, the circuit will still maintain the output
energized.
▪The only way to release the output is by operating the
normally closed contact B.

❖COUNTER
❑AcounterisaPLCinstructionthateitherincrements(countsup)ordecrements
(countsdown)anintegernumbervaluewhenpromptedbythetransitionofabit
from0to1(“false”to“true”).
❑Acounterissettosomepresetnumbervalueand,whenthisvalueofinputpulses
hasbeenreceived,itwilloperateitscontacts.Thusnormallyopencontactswouldbe
closed,normallyclosedcontactsopened.
❑Counterinstructionscomeinthreebasictypes:upcounters,downcounters,and.
up/downcounters
❑Example:-Thismightbeusedwhereitemshavetobecountedastheypassalonga
conveyorbelt,orthenumberofrevolutionsofashaft,orperhapsthenumberof
peoplepassingthroughadoor.

❑Up-Counters:
❑Up counter is an increment counter which means it counts “up” with
each off-to-on transition input to its “CU” input.
❑Up-counters count from zero up to the preset value, i.e. events are
added until the number reaches the preset value. When the counter
reaches the set value, its contacts change state.

❑Whenever there is a true value entry in the CU input, the counter will turn on
and CV will display the count.
❑This counter output must be activated whenever the current value is equal to
or greater than the pre-set value (Q is active if CV ≥ PV).
❑The counter output instruction will increase by 1 each time the counted
event occurs
Conti….

Example program for UP counter

➢OperatingpushbuttonPB1providestheoff-to-ontransition
pulsesthatarecountedbythecounter.
➢Thepre-setvalueofthecounterissetto7.
➢Eachfalse-to-truetransitionofrung1increasesthecounter’s
accumulatedvalueby1.
➢After7pulses,orcounts,whenthepre-setcountervalueequals
theaccumulatedcountervalue,outputDNisenergized.
❑Working principle of the above up counter ladder program

➢Asaresult,rung2becomestrueandenergizesoutputO:2/0to
switchtheredpilotlightON.
➢At the same time, rung 3 becomes false and de-energizes output
O:2/1 to switch the green pilot light off.
➢The counter is reset by closing pushbutton PB2, which makes
rung 4 true and resets the accumulated count to zero.
➢Counting can resume when rung 4 goes false again
Conti….

❑Down Counter:
❑Down-counters count down from the preset value to zero, i.e. events are subtracted
from the set value. When the counter reaches the zero value, its contacts change
state.
❑The down-counter instruction will count down or decrease by 1 each time the
counted event occurs.
❑Each time the countdown event occurs, the accumulated value decreases.
❑Normally, the down counter is used together with the ascending counterto form
an up / down counter

Conti….
Fig. Down counter:

Up/down counting
❑It is possible to program up-and down-counters together.
❑Consider the task of counting products as they enter a conveyor line and as they
leave it,or perhaps cars as they enter a multi-storage parking lot and as they
leave it.
❑When an item enters it gives a pulse on input In 1. This increases the count by
one. Thus each item entering increases the accumulated count by 1.
❑When an item leaves it gives an input to In 2. This reduces the number by 1.
Thus each item leaving reduces the accumulated count by 1.
❑When the accumulated value reaches the preset value, the output Out 1 is
switched on.

Conti….

Example for up-Down counter:
❑One application for an up/down-counter is to keep count of the cars that enter
and leave a parking garage. A typical PLC program that could be used to
implement this.

➢As a car enters, the enter switch triggers the up counter output instruction and
increments the accumulated count by 1.
➢As a car leaves, the exit switch triggers the down counter output instruction and
decrements the accumulated count by 1.
➢Because both the up-and down-counters have the same address, C5:1, the
accumulated value will be the same in both instructions as well as the pre-set.
➢Whenever the accumulated value of 150 equals the pre-set value of 150, the
counter output is energized by the done bit to light up the Lot Full sign.
➢A reset button has been provided to reset the accumulated count
❑The operation of the program can be summarized as follows:

❑A PLC timer is a program that controls and operates a device for a set period.
❑We can use the timer to do any certain activities for a fixed period or to build
up a time-based action.
❑The timer action is used to provide programming logic and to decide when
to switch on and off the circuit
❑There are a number of different forms of timers that can be found with PLCs:
ON Delay Timer , OFF Delay Timer , and Retentive Timer
❑TIMER

❑ON-Delay Timer :-Which means delayed on i.e. the timer will not update the contact
until the pre-set time has passed
✓As you can see in the diagram, the input supply is delivered, but there is no output until the
predetermined time(pre-set time) has passed .

❑Off delay Timer:-means that delayed off , even if the timers input power is turned off, the timer
continues to give contact to the exiting circuit.
✓As shown in the diagram, the input signal is turned off, but the contact remains closed.

❑Retentive Timer: Retain accumulated value through power loss, processor mode
change, or rung state going from true to false.
•Use a retentive timer to track the running time of a motor for maintenance purpose.
Each time the motor is turned off, the timer will remember the motor elapsed
running time. The next time the motor is turned on, the time will increase from there.
•To reset this time, use a reset instruction.

✓Considerthetaskofobtainingcyclicmovementofapistoninacylinder.Figure
showsthevalveandpistonarrangementthatmightbeused,writeapossible
ladderprogramthatoperatethetwosolenoidsequentially.
A.Control of Cyclic movement of a piston
❑Project examples
Fig. valve and piston arrangement

Fig. Ladder logic diagram for valve and piston control.
Conti….

▪Working principle
✓When the start contact X400 are closed, Timer one T450 start timing and
there is an output Y431(solenoid B)(i.e. the cylinder retract).
✓After 10sec that the Timer T450 start timing and solenoid B energized, all
normally closed T450 open so that solenoid B de-energized, solenoid A
energized (i.e. the cylinder extract) and also Timer two T451 start timing.
✓After 10sec that T451 start timing and solenoid A energized, normally closed
contact of T451 open that cause the timer T450 de-energize and energize
Y431 solenoid(i.e. the cylinder retract),
✓At the same time that Y431 energize, the latch contact y431 cause the Timer 1
T450 to start timing .
✓Thus the sequence repeat it self.

B.Traffic light control
❑Suppose we have three light Red, Green, and Yellow. Write a possible ladder
program that first Red light on for 5sec, then Yellow for 2sec, then green for
2sec and then repeat the operation

Fig. Ladder logic diagram for traffic light control.
Conti….

Working principle
•When start button pressed(closed), memory bit M0 energized, then Timer 1
(T1) start timing and also green light on for 2secon.
•After 2sec timer 1 relay energized and make normally open timer one
contact closed & normally closed one open, and then Timer two(T2) start
timing and also read light ON for 5sec .
•After 5sec , normally closed timer two contact open and normally opened
one closed , and so timer three(T3) start timing, Yellow light ON for 2sec.
•After 2sec, normally opened timer three(T3) contact closed and normally
closed one open, and then Timer one(T1) start timing and also green light
ON for 2sec.
•Then the sequence repeat itself.
•If stop button pressed, the process end.

C.Water level control.
❑As shown in the figure we have a water thank, we
need to control the water level in the thank, write
a possible ladder program that fill the water to
the thank, if the level is low and discharge the
water, if the level is high.
# Quiz

Fig. Ladder logic diagram for water level control.
Conti….

Working principle.
•When the start button(X2) is pressed(closed), the internal relay(M1)
energized and the inlet valve start filling(i.e. Y0 is open) until the water
level reach the higher level sensor(Xo).
•When the water level exceedthe high level sensor(i.e. Xo energized ), it
cause to close the inlet valve(Y0) (i.e. water doesn’t flow in) .
•When thee water level is high, both high level sensor(X0) and low level
sensor(X1) energized, those cause the discharge valve(Y1) open(i.e. water
start flow out).
•After the water level being below the lower level sensor(X1), both sensor de-
energized, it causes the discharge valve(Y1) close(i.e. water doesn’t flow
out) and also the inlet valve(Y0) open.
•Those the sequence repat itself.
•If the stop button(X3) pressed(opened), the prosses stop.
Tags