You are on page 1of 33

PROGRAMMABLE LOGIC CONTROLLERS AND LADDER LOGIC

Submitted to Dr. Alfred R. Boysen De !rtment of "um!nities Sout# D!$ot! S%#ool of Mines !nd Te%#nolo&y Te%#ni%!l Communi%!tions I By Gre& P. 'immerm!n A ril ())*

13361 Gideons Trail Keystone, SD 57751 April 10, 2008

Dr. Alfred . !oysen Depart"ent of #$"anities So$t% Da&ota S'%ool of (ines and Te'%nolo)y apid *ity, So$t% Da&ota 57701 Dear Dr. !oysen+ , a" s$-"ittin) t%e follo.in) report, /0ro)ra""a-le 1o)i' *ontrollers and 1adder 1o)i',2 for 3n)lis% 274 5 Te'%ni'al *o""$ni'ations ,. T%is report dis'$sses+ 16 01* and 'ontrols %istory, 26 01* 'o"ponents, 36 ladder lo)i', and 76 ladder lo)i' pro)ra""in). , .o$ld li&e to ta&e t%is ti"e to t%an& yo$ Dr. !oysen, for "a&in) t%is 'lass t%e first 3n)lis% 'lass , %a8e en9oyed. :o$r tea'%in) te'%ni;$es are one of t%e "ain reasons in "y 'ontin$ed interest in 3n)lis% and t%e li-eral arts. :o$r fle<i-ility .it% "e and "y o.n te'%ni;$es %as %elped "e to learn "ore a-o$t "yself as .ell. T%is is t%e first paper t%at , %a8e en9oyed .ritin) in ;$ite a lon) ti"e, and t%is is -e'a$se , .as allo.ed to .rite it a-o$t .%at , .anted to .rite a-o$t. =%en , enter t%e .or&for'e, , .ill re"e"-er .%at yo$ %a8e ta$)%t "e so t%at , "ay -e -etter a-le to 'o""$ni'ate "y ideas to "y 'o.or&ers, in8estors, or .%oe8er else it "ay -e. ,n t%is report , %ope to f$rt%er t%e readers $nderstandin) of lo)i' 'ontrollers and ladder lo)i'.

Sin'erely,

Gre) 0. >i""er"an 3le'tri'al 3n)ineerin) ?nder)rad$ate 2

TABLE O+ CONTENTS
List of +i&ures.................................................................................................... ..........................., Abstr!%t..................................................................................................................... ....................Introdu%tion................................................................................................................................... . S$-9e't............................................................................................................ ...................6 0$rpose....................................................................................................... .......................7 0lan of De8elop"ent........................................................................................................ ..8 PLC "istory........................................................................................................... ......................./ 01* #istory......................................................................................................... ..............4 #ard@=ired elay *o"parison.............................................................................. ..........10 PLC Com onents.............................................................................................................. ..........01 Definition............................................................................................................... ..........13 *o"ponents................................................................................................... ..................13 01* Aperation................................................................................................ .................16 L!dder Lo&i%............................................................................................................. ..................0/ Definition............................................................................................................... ..........14 *o"parison to elay 1o)i'.................................................................. ...........................20 L!dder Lo&i% Pro&r!mmin&................................................................................................... ....(,ntrod$'tion.................................................................................................................... ..25 !asi' ABD C A Gates................................................................................................ ...27 !asi' Ti"ers and *o$nters.............................................................................................. .28 !$ildin) a 01*D1adder 1o)i' 0ro)ra"................................................ ...........................24 Con%lusion................................................................................................................... ................11 S$""ary.................................................................................................................... ......33 *losin) S$""ary............................................................................................................ .33

LIST O+ +IG2RES
Ei)$re 1+ Typi'al S"all S'ale *ontrol 0anel.....................................................................11 Ei)$re 2+ Typi'al 01* *ontrol 0anel.................................................................................12 Ei)$re 3+ 01* *o"ponents Dia)ra"................................................................................15 Ei)$re 7+ 01* S'an Dia)ra".............................................................................................17 Ei)$re 5+ !asi' 1adder 1o)i' 0ro)ra"..............................................................................14 Ei)$re 6+ 3le'tro"e'%ani'al elay....................................................................................20 Ei)$re 7+ !asi' elay 1o)i' *ir'$it..................................................................................21 Ei)$re 8+ elay 1o)i' *ir'$it .it% Fo) f$n'tion added.....................................................22 Ei)$re 4+ elay 1o)i' *ir'$it .it% Fo) f$n'tion and Stat$s ,ndi'ators.............................22 Ei)$re 10+ *o"ple< 1adder Dia)ra"................................................................................23 Ei)$re 11+ Si"plified 1o)i' *ir'$it...................................................................................25 Ei)$re 12+ Si"plified ABD )ate........................................................................................27 Ei)$re 13+ Si"plified A )ate...........................................................................................27 Ei)$re 17+ An@Delay Ti"er G TA6....................................................................................28 Ei)$re 15+ ?p *o$nter.......................................................................................................24 Ei)$re 16+ 1adder Dia)ra" in elay 1o)i'.......................................................................24 Ei)$re 17+ elay Dia)ra" .it% o8erload re"o8ed............................................................30 Ei)$re 18+ elay *ir'$it .it% Addition of Fo) E$n'tion...................................................30 Ei)$re 14+ elay *ir'$it .it% Addition of Stat$s ,ndi'ators.............................................31 Ei)$re 20+ elay 1o)i' Dia)ra" *on8erted to 01* 1adder 1o)i'...................................32

ABSTRACT
T%is report ans.ers -asi' ;$estions t%at "ay -e posed -y anyone in t%e 3le'tri'al 3n)ineerin) field, in'l$din) ele'tri'al en)ineerin) te'%ni'ians and ele'tri'ians. T%e reader does not need to %a8e any -a'&)ro$nd in 'ontrols or ladder lo)i'H only an interest in %o. 01*s .or& and a -asi' $nderstandin) of di)ital lo)i'. T%e ;$estions t%at .ill -e ans.ered in t%is report are+ 1. =%at is a 01*I 2. =%at is ladder lo)i'I 3. =%at are t%e different 01* 'o"ponentsI 7. #o. does ladder lo)i' .or&I 5. #o. does a 01* syste" .or& in 'on9$n'tion .it% e8eryt%in) elseI 6. #o. do yo$ pro)ra" a ladder lo)i' pro)ra"I ,n order to ans.er all of t%ese ;$estions, , %a8e relied on "y personal &no.led)e of pro)ra""a-le lo)i' 'ontrollers and ladder lo)i' alon) .it% "y .or& e<perien'e .it% t%e". T%is report pro8ides t%e reader .it% infor"ation on+ 16 pro)ra""a-le lo)i' %istory and t%e ad8an'e"ent of 'ontrols te'%nolo)y alon) .it% 01* operation, 26 01* 'o"ponents, 36 ladder lo)i', and 76 ladder lo)i' pro)ra""in).

Introdu%tion
Sub3e%t
0ro)ra""a-le lo)i' 'ontrollers G01*s6 %a8e -e'o"e t%e "ost predo"inant 'ontrol ele"ents for t%e dis'rete e8ent 'ontrol of a "e'%atroni's syste". Si"plifi'ation of en)ineerin) and pre'ise 'ontrol of "an$fa't$rin) pro'ess 'an res$lt in si)nifi'ant 'ost sa8in)s. T%e "ost 'ost@effe'ti8e .ay .%i'% 'an pay -i) di8idends in t%e lon) r$n is fle<i-le a$to"ationH a planned approa'% to.ards inte)rated 'ontrol syste"s. ,t re;$ires a 'ons'io$s effort on t%e part of plant "ana)ers and en)ineers to identify areas .%ere a$to"ation 'an res$lt in -etter deploy"ent andDor $tiliJation of %$"an reso$r'es and sa8in)s in "an@%o$rs or do.n ti"e. *ontrols a$to"ation need not -e %i)% ended and e<tre"ely sop%isti'atedH it is t%e p%ased, step@-y@step effort to a$to"ate, e"ployin) 'ontrol syste"s tailored to ones spe'ifi' re;$ire"ents t%at a'%ie8es t%e "ost attra'ti8e res$lts. T%is is .%ere pro)ra""a-le lo)i' 'ontrols %a8e -een a -rea&t%ro$)% in t%e field of a$to"ation and 'ontrol te'%ni;$es. T%is report loo&s at t%e role 01*s play in t%ese te'%ni;$es. A 'onstant de"and for -etter and "ore effi'ient "an$fa't$rin) and pro'ess "a'%inery %as led to t%e re;$ire"ent for %i)%er ;$ality and relia-ility in 'ontrol te'%ni;$es. =it% t%e a8aila-ility of intelli)ent, 'o"pa't solid state ele'troni' de8i'es, it %as -een possi-le to pro8ide 'ontrol syste"s t%at 'an red$'e "aintenan'e, do.n ti"e and i"pro8e prod$'ti8ity to a )reat e<tend. !y installin) an effi'ient and $ser friendly ele'troni's syste"s for "an$fa't$rin) "a'%inery or pro'essors, one 'an o-tain a pre'ise and relia-le "eans for prod$'in) ;$ality prod$'ts. Ane of t%e latest te'%ni;$es in solid state 'ontrols t%at offers fle<i-le and effi'ient operation to t%e $ser is pro)ra""a-le

'ontrollers. T%e -asi' idea -e%ind t%ese pro)ra""a-le 'ontrollers .as to pro8ide "eans to eli"inate %i)% 'ost asso'iated .it% infle<i-le, 'on8entional relay 'ontrolled syste"s. 0ro)ra""a-le 'ontrollers offer a syste" .it% 'o"p$ter fle<i-ility t%at is s$ited to .it%stand t%e %ars% ind$strial en8iron"ent, %as si"pli'ity of operationDreada-ility, 'an red$'e "a'%ine do.n ti"e and pro8ide e<panda-ility for f$t$re and is a-le to -e "aintained -y plant te'%ni'ians.

Pur ose
T%is report is an infor"ati8e o8er8ie. of t%e p$rpose of pro)ra""a-le lo)i' 'ontrollers and ladder lo)i'. D$e to t%e 'o"ple<ity of pro)ra""a-le lo)i' 'ontrollers and ladder lo)i', only t%e -asi' operation and pro)ra""in) .ill -e dis'$ssed. 0rior &no.led)e of -asi' ele'tri'al 'ir'$itry, 'ontrols, and 'o"p$ter pro)ra""in) is s$))ested -efore readin) t%is report. ,n order for t%e reader to -etter $nderstand t%is report, t%e follo.in) ;$estions .ill -e e<plained+ 1. =%at is a 01*I 2. =%at is ladder lo)i'I 3. =%at are t%e different 01* 'o"ponentsI 7. #o. does ladder lo)i' .or&I 5. #o. does a 01* syste" .or& in 'on9$n'tion .it% e8eryt%in) elseI 6. #o. do yo$ pro)ra" a ladder lo)i' pro)ra"I

Pl!n of De4elo ment


To ans.er t%ese ;$estions, t%e report .ill in'l$de t%e follo.in) se'tions+ 1. 0ro)ra""a-le 1o)i' #istory+ T%is se'tion .ill dis'$ss t%e %istory and ad8an'e"ent of 'ontrols te'%nolo)y, .it% a 'o"parison of pro)ra""a-le lo)i' 'ontrollers and %ard@.ired relays. ,t .ill also dis'$ss 01* operation. 2. 01* 'o"ponents+ T%is se'tion .ill define .%at pro)ra""a-le lo)i' is and des'ri-e all %ard.are asso'iated .it% it. 3. 1adder 1o)i'+ T%is se'tion .ill 'o8er ladder lo)i' and its )eneral pro)ression fro" relay lo)i'. 7. 1adder 1o)i' 0ro)ra""in)+ T%is se'tion .ill 'o8er -asi' pro)ra""in) te'%ni;$es and t%eir i"ple"entation.

Pro&r!mm!ble Lo&i% "istory


PLC "istory
01*s .ere first introd$'ed in t%e 1460s. T%e pri"ary reason for desi)nin) s$'% a de8i'e .as eli"inatin) t%e lar)e 'ost in8ol8ed in repla'in) t%e 'o"pli'ated relay -ased "a'%ine 'ontrol syste"s. !edford Asso'iates G!edford, (A6 proposed so"et%in) 'alled a (od$lar Di)ital *ontroller G(AD,*AB6 to a "a9or ?S 'ar "an$fa't$rer. T%e (AD,*AB 087 -ro$)%t t%e .orldKs first 01* into 'o""er'ial prod$'tion. =%en prod$'tion re;$ire"ents '%an)ed so did t%e 'ontrol syste". T%is -e'o"es 8ery e<pensi8e .%en t%e '%an)e is fre;$ent. Sin'e relays are "e'%ani'al de8i'es t%ey also %a8e a li"ited lifeti"e -e'a$se of t%e "$ltit$de of "o8in) parts. T%is also re;$ired stri't ad%esion to "aintenan'e s'%ed$les. Tro$-les%ootin) .as also ;$ite tedio$s .%en so "any relays are in8ol8ed. Bo. pi't$re a "a'%ine 'ontrol panel t%at in'l$ded "any, possi-ly %$ndreds or t%o$sands, of indi8id$al relays. T%e siJe 'o$ld -e "ind -o))lin) not to "ention t%e 'o"pli'ated initial .irin) of so "any indi8id$al de8i'es. T%ese relays .o$ld -e indi8id$ally .ired to)et%er in a "anner t%at .o$ld yield t%e desired o$t'o"e. T%e pro-le"s for "aintenan'e and installation .ere %orrendo$s. T%ese ne. 'ontrollers also %ad to -e easily pro)ra""ed -y "aintenan'e and plant en)ineers. T%e lifeti"e %ad to -e lon) and pro)ra""in) '%an)es easily perfor"ed. T%ey also %ad to s$r8i8e t%e %ars% ind$strial en8iron"ent. T%e ans.ers .ere to $se a pro)ra""in) te'%ni;$e "ost people .ere already fa"iliar .it% and repla'e "e'%ani'al parts .it% solid@state ones .%i'% %a8e no "o8in) parts. *o""$ni'ations a-ilities -e)an to appear in appro<i"ately 1473. T%e first s$'% 4

syste" .as (odi'onKs (od-$s. T%e 01* 'o$ld no. tal& to ot%er 01*s and t%ey 'o$ld -e far a.ay fro" t%e a't$al "a'%ine t%ey .ere 'ontrollin). T%ey 'o$ld also no. -e $sed to send and re'ei8e 8aryin) 8olta)es to allo. t%e" to $se analo) si)nals, "eanin) t%at t%ey .ere no. appli'a-le to "any "ore 'ontrol syste"s in t%e .orld. ?nfort$nately, t%e la'& of standardiJation 'o$pled .it% 'ontin$ally '%an)in) te'%nolo)y %as "ade 01* 'o""$ni'ations a ni)%t"are of in'o"pati-le proto'ols and p%ysi'al net.or&s. T%e 1480s sa. an atte"pt to standardiJe 'o""$ni'ations .it% General (otorKs "an$fa't$rin) a$to"ation proto'ol G(A06. ,t .as also a ti"e for red$'in) t%e siJe of t%e 01* and "a&in) t%e" soft.are pro)ra""a-le t%ro$)% sy"-oli' pro)ra""in) on personal 'o"p$ters instead of dedi'ated pro)ra""in) ter"inals or %and%eld pro)ra""ers. T%e 1440s sa. a )rad$al red$'tion in t%e introd$'tion of ne. proto'ols, and t%e "oderniJation of t%e p%ysi'al layers of so"e of t%e "ore pop$lar proto'ols t%at s$r8i8ed t%e 1480Ks. 01*s 'an no. -e pro)ra""a-le in f$n'tion -lo'& dia)ra"s, instr$'tion lists, * and str$'t$red te<t all at t%e sa"e ti"e. 0*Ks are also -ein) $sed to repla'e 01*s in so"e appli'ations. T%e ori)inal 'o"pany .%o 'o""issioned t%e (AD,*AB 087 %as no. s.it'%ed to a 0* -ased 'ontrol syste".

"!rd 5ired Rel!y Com !rison


At t%e o$tset of ind$strial re8ol$tion, espe'ially d$rin) si<ties and se8enties, relays .ere $sed to operate a$to"ated "a'%ines, and t%ese .ere inter'onne'ted $sin) .ires inside t%e 'ontrol panel. ,n so"e 'ases a 'ontrol panel 'o8ered an entire .all. To dis'o8er an error in t%e syste" "$'% ti"e .as needed, espe'ially .it% "ore 'o"ple<

10

pro'ess 'ontrol syste"s. An top of e8eryt%in), a lifeti"e of relay 'onta'ts .as li"ited, so so"e relays %ad to -e repla'ed. ,f repla'e"ent .as re;$ired, "a'%ine %ad to -e stopped and prod$'tion as .ell. Also, it 'o$ld %appen t%at t%ere .as not eno$)% roo" for ne'essary '%an)es. A 'ontrol panel .as $sed only for one parti'$lar pro'ess, and it .asnt easy to adapt to t%e re;$ire"ents of a ne. syste". As far as "aintenan'e, ele'tri'ians %ad to -e 8ery s&illf$l in findin) errors. ,n s%ort, 'on8entional 'ontrol panels pro8ed to -e 8ery infle<i-le. Typi'al e<a"ple of 'on8entional 'ontrol panel is )i8en in t%e follo.in) pi't$re.

Figure 1: Typical Small Scale Control Panel ,n Ei)$re 1 yo$ 'an see a lar)e n$"-er of ele'tri'al .ires, relays, ti"ers and ot%er ele"ents of a$to"ation typi'al for t%at period. T%e pi't$red 'ontrol panel is not one of t%e "ore 'o"pli'ated ones, so yo$ 'an i"a)ine .%at 'o"ple< ones loo&ed li&e. T%e "ost fre;$ently "entioned disad8anta)es of a 'lassi' 'ontrol panel are+ 1. 2. 3. 7. 1ar)e a"o$nt of .or& re;$ired 'onne'tin) .ires Diffi'$lty .it% '%an)es or repla'e"ents Diffi'$lty in findin) errorsH re;$irin) s&illf$lDe<perien'ed .or& for'e =%en a pro-le" o''$rs, %old@$p ti"e is indefinite, $s$ally lon)

11

=it% in8ention of pro)ra""a-le 'ontrollers, "$'% %as '%an)ed in %o. a pro'ess 'ontrol syste" is desi)ned. (any ad8anta)es appeared. Typi'al e<a"ple of 'ontrol panel .it% a 01* 'ontroller is )i8en in t%e follo.in) pi't$re.

Figure 2: Typical PLC Control Panel Ad8anta)es of 'ontrol panel t%at is -ased on a 01* 'ontroller 'an -e presented in fe. -asi' points+ 1. *o"pared to a 'on8entional pro'ess 'ontrol syste", n$"-er of .ires needed for 'onne'tions is red$'ed -y appro<i"ately 80L 2. Dia)nosti' f$n'tions of a 01* 'ontroller allo. for fast and easy error dete'tion. 3. *%an)e in operatin) se;$en'e or appli'ation of a 01* 'ontroller to a different operatin) pro'ess 'an easily -e a''o"plis%ed -y repla'in) a pro)ra" t%ro$)% a 'onsole or $sin) 0* soft.are Gnot re;$irin) '%an)es in .irin), $nless addition of so"e inp$t or o$tp$t de8i'e is re;$ired6. 7. Beeds fe.er spare parts 5. ,t is "$'% '%eaper 'o"pared to a 'on8entional syste", espe'ially in 'ases .%ere a lar)e n$"-er of ,np$tDA$tp$t instr$"ents are needed and .%en operational f$n'tions are 'o"ple< 6. elia-ility of a 01* is )reater t%an t%at of an ele'tro@"e'%ani'al relay or a ti"er, -e'a$se of less "o8in) parts 7. T%ey are 'o"pa't and o''$py less spa'e 8. ?se of 01* res$lts in appre'ia-le sa8in)s in #ard.are and .irin) 'ost

12

Pro&r!mm!ble Lo&i% Controller Com onents


Definition
A 0ro)ra""a-le 'ontroller is a solid state $ser pro)ra""a-le 'ontrol syste" .it% f$n'tions to 'ontrol lo)i', se;$en'in), ti"in), arit%"eti' data "anip$lation and 'o$ntin) 'apa-ilities. ,t 'an -e 8ie.ed as an ind$strial 'o"p$ter t%at %as a 'entral pro'essor $nit, "e"ory, inp$t o$tp$t interfa'e and a pro)ra""in) de8i'e. T%e 'entral pro'essin) $nit pro8ides t%e intelli)en'e of t%e 'ontroller. ,t a''epts data, stat$s infor"ation fro"

8ario$s sensin) de8i'es li&e li"it s.it'%es, pro<i"ity s.it'%es, e<e'$tes t%e $ser 'ontrol pro)ra" stored in t%e "e"ory and )i8es appropriate o$tp$t 'o""ands to de8i'es s$'% as solenoid 8al8es, s.it'%es et'. ,np$t o$tp$t interfa'e is t%e 'o""$ni'ation lin& -et.een field de8i'es and t%e 'ontrollers. T%ro$)% t%ese interfa'es t%e pro'essor 'an sense and "eas$re p%ysi'al ;$antities re)ardin) a "a'%ine or pro'ess, s$'% as, pro<i"ity, position, "otion, le8el, te"perat$re, press$re, et'. !ased on stat$s sensed, t%e *0? iss$es 'o""and to o$tp$t de8i'es s$'% as 8al8es, "otors, alar"s, et'. T%e pro)ra""er $nit pro8ides t%e "an "a'%ine interfa'e. ,t is $sed to enter t%e appli'ation pro)ra", .%i'% often $ses a si"ple $ser@friendly lo)i'.

Com onents
T%e 01* "ainly 'onsists of a *0?, "e"ory areas, and appropriate 'ir'$its to re'ei8e inp$tDo$tp$t data. =e 'an a't$ally 'onsider t%e 01* to -e a -o< f$ll of %$ndreds or t%o$sands of separate relays, 'o$nters, ti"ers and data stora)e lo'ations. T%ey donKt p%ysi'ally e<ist -$t rat%er t%ey are si"$lated and 'an -e 'onsidered soft.are 'o$nters, ti"ers, et'. 3a'% 'o"ponent of a 01* %as a spe'ifi' f$n'tion+ 13

,np$t

elays G'onta'ts6 @ T%ese are 'onne'ted to t%e o$tside .orld. T%ey

p%ysi'ally e<ist and re'ei8e si)nals fro" s.it'%es, sensors, et'. Typi'ally t%ey are not relays -$t rat%er t%ey are transistors. ,nternal ?tility elays @ T%ese do not re'ei8e si)nals fro" t%e o$tside .orld nor do t%ey p%ysi'ally e<ist. T%ey are si"$lated relays and are .%at ena-les a 01* to eli"inate e<ternal relays. T%ere are also so"e spe'ial relays t%at are dedi'ated to perfor"in) only one tas&. So"e are al.ays on .%ile so"e are al.ays off. So"e are on only on'e d$rin) po.er@on and are typi'ally $sed for initialiJin) data t%at .as stored. *o$nters @ T%ese are si"$lated 'o$nters and t%ey 'an -e pro)ra""ed to 'o$nt p$lses. Typi'ally t%ese 'o$nters 'an 'o$nt $p, do.n or -ot% $p and do.n. Sin'e t%ey are si"$lated t%ey are li"ited in t%eir 'o$ntin) speed. So"e "an$fa't$rers also in'l$de %i)%@speed 'o$nters t%at are %ard.are -ased. =e 'an t%in& of t%ese as p%ysi'ally e<istin). Ti"ers @ T%ese 'o"e in "any 8arieties and in're"ents. T%e "ost 'o""on type is an on@delay type. At%ers in'l$de off@delay and -ot% retenti8e and non@retenti8e types. ,n're"ents 8ary fro" 1 "illise'ond t%ro$)% 1 se'ond. A$tp$t elays G'oils6 @ T%ese are 'onne'ted to t%e o$tside .orld. T%ey p%ysi'ally e<ist and send onDoff si)nals to solenoids, li)%ts, et'. T%ey 'an -e transistors, relays, or tria's dependin) $pon t%e "odel '%osen. Data Stora)e @ Typi'ally t%ere are re)isters assi)ned to si"ply store data. T%ey are $s$ally $sed as te"porary stora)e for "at% or data "anip$lation. T%ey 'an also typi'ally -e $sed to store data .%en po.er is re"o8ed fro" t%e 01*. ?pon po.er@$p t%ey .ill still %a8e t%e sa"e 'ontents as -efore po.er .as re"o8ed.

17

Figure 3: PLC Components Diagram A 'o$nter is a si"ple de8i'e intended to do one si"ple t%in) @ 'o$nt. ?sin) t%e" 'an so"eti"es -e a '%allen)e %o.e8er -e'a$se e8ery "an$fa't$rer see"s to $se t%e" a different .ay. T%ere are se8eral different types of 'o$nters. T%ere are $p@'o$nters 'alled *T? *BT, or *T t%at only 'o$nt $p, s$'% as 1, 2, and 3. T%ere are also do.n 'o$nters 'alled *TD t%at only 'o$nt do.n, s$'% as 4, 8, 7, et'. ,n addition to t%ese t.o, t%ere are $p@do.n 'o$nters, typi'ally 'alled ?D* G$p@do.n 'o$nter6. T%ese 'o$nt $p andDor do.n G1,2,3,7,3,2,3,7,5,...6. A ti"er is an instr$'tion t%at .aits a set a"o$nt of ti"e -efore doin) so"et%in). As $s$al in ind$stry, different types of ti"ers are a8aila-le .it% different "an$fa't$rers. T%e "ost 'o""on type of ti"er is an An@Delay Ti"er. T%is type of ti"er si"ply delays t$rnin) on its respe'ti8e o$tp$t. ,n ot%er .ords, after o$r sensor Ginp$t6 t$rns on .e .ait /<2 n$"-er of se'onds -efore a'ti8atin) a solenoid 8al8e Go$tp$t6. T%is is t%e "ost 15

'o""on ti"er. ,t is often 'alled TAB Gti"er on@delay6, T,( Gti"er6 or T(

Gti"er6.

Anot%er type of ti"er is an Aff@Delay Ti"er. T%is type of ti"er is t%e opposite of t%e on@ delay ti"er listed a-o8e. T%is ti"er delays t$rnin) off its respe'ti8e o$tp$t. After a sensor Ginp$t6 sees a tar)et .e t$rn on a solenoid Go$tp$t6. =%en t%e sensor no lon)er sees t%e tar)et .e %old t%e solenoid on for < n$"-er of se'onds -efore t$rnin) it off. ,t is 'alled a TAE Gti"er off@delay6 and is less 'o""on t%an t%e on@delay type listed a-o8e. Mery fe. "an$fa't$rers in'l$de t%is type of ti"er, alt%o$)% it 'an -e ;$ite $sef$l. T%e last type of ti"er is a etenti8e or A''$"$latin) ti"er. T%is type of ti"er needs 2 inp$ts. Ane inp$t starts t%e ti"in) e8ent Gi.e. t%e 'lo'& starts ti'&in)6 and t%e ot%er resets it. T%e onDoff delay ti"ers a-o8e .o$ld -e reset if t%e inp$t sensor .asnKt onDoff for t%e 'o"plete ti"er d$ration. T%is ti"er %o.e8er %olds or retains t%e '$rrent elapsed ti"e .%en t%e sensor t$rns off in "id@strea". Eor e<a"ple, .e .ant to &no. %o. lon) a sensor is on for d$rin) a 1 %o$r period. ,f .e $se one of t%e a-o8e ti"ers t%ey .ill &eep resettin) .%en t%e sensor t$rns offDon. T%is ti"er %o.e8er, .ill )i8e $s a total or a''$"$lated ti"e. ,t is often 'alled an TA Gretenti8e ti"er6 or T( A Ga''$"$latin) ti"er6.

PLC O er!tion
A 01* .or&s -y 'ontin$ally s'annin) a pro)ra". =e 'an t%in& of t%is s'an 'y'le as 'onsistin) of 3 i"portant steps. T%ere are typi'ally "ore t%an 3 -$t .e 'an fo'$s on t%e i"portant parts and not .orry a-o$t t%e ot%ers. Typi'ally t%e ot%ers are '%e'&in) t%e syste" and $pdatin) t%e '$rrent internal 'o$nter and ti"er 8al$es. T%e first type of s'annin), as s%o.n in t%e dia)ra" -elo., is not as 'o""on as t%e type t%at .ill -e dis'$ssed se'ond.

16

Figure 4: PLC Scan Diagram T%e first step is to '%e'& t%e inp$t stat$s. T%is step is t%erefore )enerally referred to as t%e /*%e'& ,np$t Stat$s2 sta)e. Eirst t%e 01* ta&es a loo& at ea'% inp$t to deter"ine if it is on or off. ,n ot%er .ords, is t%e sensor 'onne'ted to t%e first inp$t onI #o. a-o$t t%e se'ond inp$tI #o. a-o$t t%e t%irdI T%is )oes on and on t%ro$)% t%e entire pro)ra". ,t re'ords t%is data into its "e"ory to -e $sed d$rin) t%e ne<t step. Be<t t%e 01* e<e'$tes yo$r pro)ra" one instr$'tion at a ti"e, 'alled t%e /3<e'$te 0ro)ra"2 sta)e. Eor e<a"ple, if yo$r pro)ra" said t%at if t%e first inp$t .as on t%en it s%o$ld t$rn on t%e first o$tp$t. Sin'e it already &no.s .%i'% inp$ts are onDoff fro" t%e pre8io$s step it .ill -e a-le to de'ide .%et%er t%e first o$tp$t s%o$ld -e t$rned on -ased on t%e state of t%e first inp$t. ,t .ill store t%e e<e'$tion res$lts for $se later d$rin) t%e ne<t step. Einally t%e 01* $pdates t%e stat$s of t%e o$tp$ts. ,t $pdates t%e o$tp$ts -ased on .%i'% inp$ts .ere on d$rin) t%e first step and t%e res$lts of e<e'$tin) yo$r pro)ra" d$rin) t%e se'ond step. !ased on t%e e<a"ple in step 2 it .o$ld no. t$rn on t%e first o$tp$t -e'a$se t%e first inp$t .as on and yo$r pro)ra" said to t$rn on t%e first o$tp$t

17

.%en t%is 'ondition is tr$e. A ne. style of s'annin) %as -een i"ple"ented in t%e "ore re'ent years, 'alled /r$n) s'annin)2. T%is type -asi'ally s'ans ea'% ladder r$n) indi8id$ally in t%e entire ladder lo)i' pro)ra", $pdatin) t%e o$tp$ts on t%at r$n) after s'annin) t%ro$)% t%e inp$ts. T%is '%an)es t%e type of pro)ra""in) t%at .ill -e $sed as .ell. ,f an o$tp$t is in a r$n) a-o8e t%e inp$ts it depends on, yo$ .ill not )et t%e o$tp$t $pdated $ntil t%e ne<t s'an, as t%e pro)ra" .ill &eep s'annin) do.n $ntil t%e last r$n), t%en start o8er. T%is style is 8ery ad8anta)eo$s in 'ertain sit$ations. ,f yo$ .ant yo$r o$tp$ts $pdated at t%e soonest possi-le "o"ent, t%is is t%e style of s'annin) t%at yo$ .ant to $se.

18

L!dder Lo&i%
Definition
1adder lo)i' is one for" of dra.in) ele'tri'al lo)i' s'%e"ati's, and is a )rap%i'al lan)$a)e 8ery pop$lar for pro)ra""in) 0ro)ra""a-le 1o)i' *ontrollers. 1adder lo)i' .as ori)inally in8ented to des'ri-e lo)i' "ade fro" relays. T%e na"e is -ased on t%e o-ser8ation t%at pro)ra"s in t%is lan)$a)e rese"-le ladders, .it% t.o 8erti'al NrailsN and a series of %oriJontal Nr$n)sN -et.een t%e". Ei)$re 5 -elo. is a 8ery -asi' e<a"ple of ladder lo)i' $sed in a pro)ra""a-le lo)i' 'ontrols pro)ra".

Figure 5: Basic Ladder Logic Program

14

Com !rison to Rel!y Lo&i%


T%e pro)ra" $sed in a 'ontrols s'%e"ati', 'alled a ladder dia)ra", is si"ilar to a s'%e"ati' for a set of relay 'ir'$its. An ar)$"ent t%at aided t%e initial adoption of ladder lo)i' .as t%at a .ide 8ariety of en)ineers and te'%ni'ians .o$ld -e a-le to $nderstand and $se it .it%o$t "$'% additional trainin), -e'a$se of t%e rese"-lan'e to fa"iliar %ard.are syste"s. T%is ar)$"ent %as -e'o"e less rele8ant lately )i8en t%at "ost ladder lo)i' pro)ra""ers %a8e a soft.are -a'&)ro$nd in "ore 'on8entional pro)ra""in) lan)$a)es, and in pra'ti'e i"ple"entations of ladder lo)i' %a8e '%ara'teristi's s$'% as se;$ential e<e'$tion t%at "a&e t%e analo)y to %ard.are so"e.%at i"perfe't. 3le'tri'ians and data 'a-lin) or 'ontrol te'%ni'ians still ar)$e t%at t%is is t%e -est )rap%i'al interfa'e as t%ey )enerally do not %a8e any 'o"p$ter s'ien'e or di)ital syste"s -a'&)ro$nd, and are t%erefore ta$)%t .it% t%is interfa'e in se;$en'e .it% relay lo)i'.

Figure : !lectromec"anical #elay elay lo)i' is t%e pre'$rsor to ladder lo)i', and is a "et%od of 'ontrollin) ind$strial ele'troni' 'ir'$its -y $sin) relays and 'onta'ts. Ei)$re 6 a-o8e s%o.s an a8era)e "e'%ani'al relay $sed in older relay lo)i' syste"s. T%e s'%e"ati' dia)ra"s for relay lo)i' 'ir'$its are often 'alled line dia)ra"s, -e'a$se t%e inp$ts and o$tp$ts are essentially dra.n in a series of lines, .it% t%e lines representin) a't$al .ires r$n in t%e 20

'ir'$it. A relay lo)i' 'ir'$it is an ele'tri'al net.or& 'onsistin) of lines, in .%i'% ea'% inp$tDo$tp$t )ro$p "$st %a8e ele'tri'al 'ontin$ity .it% all 'o"ponents in t%at )ro$p of de8i'es to ena-le t%e o$tp$t de8i'e. T%e elay lo)i' dia)ra"s represent t%e p%ysi'al

inter'onne'tion of de8i'es, .%ile t%e relay lo)i' 'ir'$it for"s an ele'tri'al s'%e"ati' dia)ra" for t%e 'ontrol of inp$t and o$tp$t de8i'es. T%is is .%y ele'tri'ians and 'ontrol te'%ni'ians 'an easily $nderstand and interpret relay lo)i' and ladder lo)i' dia)ra"s. Ei)$re 7 -elo. s%o.s a -asi' relay lo)i' 'ir'$it. Boti'e %o. it differs fro" t%e ladder lo)i' 'ir'$it in Ei)$re 5 in t%at t%e /8irt$al2 inp$ts and o$tp$ts in t%e ladder lo)i' 'ir'$it %a8e repla'ed t%e a't$al relays and 'oils in t%e relay lo)i' 'ir'$it.

Figure $: Basic #elay Logic Circuit Ei)$re 7 is a s"all, -asi' relay lo)i' 'ir'$it. :o$ 'an see %o. in relay lo)i' 'ir'$its t%e p$s%-$ttons are represented .it% )rap%i'al dra.in)s of a nor"ally 'losed p$s%-$tton for t%e stop -$tton, and a nor"ally open p$s%-$tton for t%e start -$tton. T%e 'oil t%at is "ar&ed /(2 is a "otor 'oil, and is a p%ysi'al pie'e of e;$ip"ent in t%e sa"e lo'ation as t%e "otor, .%i'% is represented -y a 'ir'le .it% t%e letter ( in t%e "iddle. T%e o8er '$rrent or o8erload de8i'e is represented -y a nor"ally 'losed 'oil sy"-ol .it% /A.1.2 o8er it. T%ere .o$ld only -e se8en .ires to 'onne't in t%is 'ir'$it, so t%is .o$ld not -e 8ery diffi'$lt to .ire, -$t .%en "ore inp$ts and o$tp$ts are added, t%e diffi'$lty )ro.s e<ponentially. Ei)$re 8 s%o.s an e<panded relay 'ir'$it of Ei)$re 7 in t%at a

21

do$-le pole sin)le t%ro. p$s%-$tton is added into t%e dia)ra" to -e $sed as a /9o) f$n'tion2. As t%e dia)ra" s%o.s, a 9o) s.it'% is $sed to r$n t%e o$tp$t G"otor6. Anly one 'o"ponent is added, -$t t%ree .ires need to -e installed in t%e 'ir'$it for t%e 'o"ponent to -e $tiliJed in t%e intended "anner.

Figure %: #elay Logic Circuit &it" 'og (unction added Ei)$re 4 -elo. adds fo$r "ore 'o"ponents to t%e syste". T.o of t%e" are 9$st 'oils fro" t%e "otor apparat$s t%at are $sed as inp$ts and t%e ot%er t.o are a red and )reen li)%t to -e $tiliJed as o$tp$tD"otor stat$s indi'ators for t%e $ser.

Figure ): #elay Logic Circuit &it" 'og (unction and Status *ndicators T%is 'ir'$it adds 6 additional .ires to t%e ori)inal 'ir'$it in Ei)$re 7. ,f -ot% of t%e additions fro" Ei)$re 8 and 4 .ere added to t%e ori)inal 'ir'$it, t%is .o$ld add 5 'o"ponents and 4 additional .ires. T%is ill$strates %o. $sin) a pro)ra""a-le lo)i'

22

'ontroller is ad8anta)eo$s in t%at addin) any n$"-er of relays ta&es "$'% less effort. ,t doesnt see" li&e a lar)e a"o$nt of .or& to 'onne't 9$st 4 additional .ires, -$t in a real .orld sit$ation, t%e "otor in ;$estion "ay -e on top of a )rain silo, and t%e startDstop station "ay -e a fe. %$ndred feet a.ay in a 'ontrol -oot%. 0$llin) all t%ese 'ontrol .ires .o$ld ta&e %o$rs instead of a fe. "in$tes sittin) in front of a pro)ra""in) ter"inal. 0ro)ra""a-le lo)i' 'ontrollers 'o$pled .it% ladder lo)i' 'an "a&e so"e of t%e "ost la-or intensi8e tas&s -e'o"e easy, en9oya-le pro9e'ts.

Figure 1+: Comple, Ladder Diagram 1adder lo)i' is t%e "ost .idely $sed pro)ra" for pro)ra""a-le lo)i' 'ontrollers .%ere se;$ential 'ontrol of a pro'ess or "an$fa't$rin) operation is re;$ired. 1adder lo)i' is $sef$l for si"ple -$t 'riti'al 'ontrol syste"s, or for re.or&in) old %ard.ired relay 'ir'$its. As pro)ra""a-le lo)i' 'ontrollers -e'a"e "ore sop%isti'ated it %as also -een $sed in 8ery 'o"ple< a$to"ation syste"s. Ei)$re 10 a-o8e s%o.s a "$'% "ore

23

'o"pli'ated ladder lo)i' dia)ra" t%an t%e one s%o.n in Ei)$re 5. ,t is relata-le to t%e relay 'ir'$its in Ei)$res 7, 8, and 4 as .ell in t%at so"e of t%e o$tp$ts are "otors and stat$s li)%ts. ,n addition t%ere are %oldin)Dlat'%in) 'onta'ts in'l$ded, -$t t%ey are not a pie'e of %ard.are. ,n fa't, t%ey are 9$st t%e address of t%e respe'ti8e o$tp$t -ein) referen'ed, .%i'% .ill -e dis'$ssed in )reater detail later. T%is is still not a 8ery lar)e pro)ra". 1adder lo)i' pro)ra"s 'an easily )ro. to "ore t%an 500 /r$n)s2 to finis% so"e f$n'tions.

27

L!dder Lo&i% Pro&r!mmin&


Introdu%tion
1adder lo)i' or ladder dia)ra"s are t%e "ost 'o""on pro)ra""in) lan)$a)e $sed to pro)ra" a 01*. 1adder lo)i' .as one of t%e first pro)ra""in) approa'%es $sed in 01*s -e'a$se it -orro.ed %ea8ily fro" t%e relay dia)ra"s t%at plant ele'tri'ians already &ne.. T%e sy"-ols $sed in relay ladder lo)i' 'onsist of a po.er rail to t%e left, a se'ond po.er rail to t%e ri)%t, and indi8id$al 'ir'$its t%at 'onne't t%e left po.er rail to t%e ri)%t. T%e lo)i' of ea'% 'ir'$it Gor r$n)6 is sol8ed fro" left to ri)%t. A 'o""on "ista&e "ade -y "ost people is tryin) to t%in& of t%e dia)ra" as %a8in) to %a8e '$rrent a'ross t%e r$n) for t%e o$tp$t to f$n'tion. T%is %as )i8en "any people tro$-le -e'a$se of t%e fa't t%at so"e inp$ts are /not2 inp$ts, .%i'% .ill -e tr$e .%en t%ere isnt '$rrent t%ro$)% t%is sensor. T%ese 'on'epts .ill -e dis'$ssed "ore later. T%e sy"-ols of t%ese dia)ra"s loo& li&e a ladder @ .it% t.o side rails and 'ir'$its t%at rese"-le r$n)s on a ladder.

Figure 11: Simpli(ied Logic Circuit Ei)$re 11 s%o.s a si"plified ladder lo)i' 'ir'$it .it% one inp$t and one o$tp$t. T%e lo)i' of t%e r$n) a-o8e is s$'%+ ,f ,np$t1 is AB Gor tr$e6 @ po.er Glo)i'6 'o"pletes t%e 'ir'$it fro" t%e left rail to t%e ri)%t rail @ and A$tp$t1 t$rns AB Gor tr$e6. ,f ,np$t1 is AEE Gor false6 @ t%en t%e 'ir'$it is not 'o"pleted and lo)i' does not flo. to t%e ri)%t @ and A$tp$t 1 is AEE Gor false6.

25

T%ere are "any lo)i' sy"-ols a8aila-le in 1adder 1o)i' @ in'l$din) ti"ers, 'o$nters, "at%, and data "o8es s$'% t%at any lo)i'al 'ondition or 'ontrol loop 'an -e represented in ladder lo)i'. =it% 9$st a %andf$l of -asi' sy"-ols s$'% as a nor"ally open 'onta't, nor"ally 'losed 'onta't, nor"ally open 'oil, nor"ally 'losed 'oil, ti"er and 'o$nter "ost lo)i'al 'onditions 'an -e represented.

Norm!lly O en Cont!%t
T%is 'an -e $sed to represent any inp$t to t%e 'ontrol lo)i' s$'% as a s.it'% or sensor, a 'onta't fro" an o$tp$t, or an internal o$tp$t. =%en sol8ed t%e referen'ed inp$t is e<a"ined for a tr$e Glo)i'al 16 'ondition. ,f it is tr$e, t%e 'onta't .ill 'lose and allo. lo)i' to flo. fro" left to ri)%t. ,f t%e stat$s is EA1S3 Glo)i'al 06, t%e 'onta't is open and lo)i' .ill BAT flo. fro" left to ri)%t.

Norm!lly O en Coil
T%is 'an -e $sed to represent any dis'rete o$tp$t fro" t%e 'ontrol lo)i'. =%en Nsol8edN if t%e lo)i' to t%e left of t%e 'oil is T ?3, t%e referen'ed o$tp$t is T ?3 Glo)i'al 16.

Norm!lly Closed Cont!%t


=%en sol8ed t%e referen'ed inp$t is e<a"ined for an AEE 'ondition. ,f t%e stat$s is AEE Glo)i'al 06 po.er Glo)i'6 .ill flo. fro" left to ri)%t. ,f t%e stat$s is AB, po.er .ill not flo..

Norm!lly Closed Coil


=%en Nsol8edN if t%e 'oil is a lo)i'al 0, po.er .ill -e t$rned on to t%e de8i'e. ,f t%e de8i'e is lo)i'al 1, po.er .ill -e AEE. 26

B!si% AND 6 OR G!tes


T%e ABD is a -asi' f$nda"ental lo)i' 'ondition t%at is easy to dire'tly represent in 1adder 1o)i'. Ei)$re 12 s%o.s a si"plified ABD /)ate2 on a ladder r$n).

Figure 12: Simpli(ied -.D gate ,n order for 1i)%t1 to t$rn T ?3, S.it'%1 "$st -e T ?3, ABD S.it'%2 "$st -e T ?3. ,f S.it'%1 is EA1S3, lo)i' Gnot po.er6 flo.s fro" t%e left rail, -$t stops at S.it'%1. 1i)%t1 .ill -e T ?3 re)ardless of t%e state of S.it'%2. ,f S.it'%1 is T ?3, lo)i' "a&es it to S.it'%2. ,f S.it'%2 is T ?3, po.er 'annot flo. any f$rt%er to t%e ri)%t, and 1i)%t1 is EA1S3. ,f S.it'%1 is T ?3, ABD S.it'%2 is T ?3 @ lo)i' flo.s to 1i)%t1 sol8in) its state to T ?3. T%e A is a lo)i'al 'ondition t%at is easy to represent in 1adder 1o)i'. Ei)$re 13 s%o.s a si"ple A )ate. Boti'e t%e differen'es in lo)i' -et.een t%e A and ABD )ates.

Figure 13: Simpli(ied /# gate ,f S.it'%1 is T ?3, lo)i' flo.s to 1i)%t1 t$rnin) it to T ?3. ,f S.it'%2 is T ?3, lo)i' flo.s t%ro$)% t%e S.it'%2 'onta't, and $p t%e rail to 1i)%t1 t$rnin) it to T ?3. ,f S.it'%1 ABD S.it'% 2 are T ?3 1i)%t1 is T ?3. T%e only .ay 1i)%t1 is EA1S3 is if S.it'%1 ABD S.it'%2 are EA1S3. ,n ot%er .ords, 1i)%t1 is T ?3 if S.it'%1 A S.it'%2 is T ?3. 27

B!si% Timers 6 Counters


(any ti"es pro)ra"s .ill 'all for a'tion to -e ta&en in a 'ontrol pro)ra" -ased on "ore t%an t%e states of dis'rete inp$ts and o$tp$ts. So"eti"es, pro'esses .ill need to t$rn on after a delay, or 'o$nt t%e n$"-er of ti"es a s.it'% is %it. To do t%ese si"ple tas&s, Ti"ers C *o$nters are $tiliJed.

Figure 14: /n0Delay Timer 1#T/2 A ti"er is si"ply a 'ontrol -lo'& t%at ta&es an inp$t and '%an)es an o$tp$t -ased on ti"e. T%ere are t.o -asi' types of ti"ers. T%ere are ot%er ad8an'ed ti"ers, -$t t%ey .ont -e dis'$ssed in t%is report. An An@Delay Ti"er ta&es an inp$t, .aits a spe'ifi' a"o$nt of ti"e, allo.s lo)i' to flo. after t%e delay. An Aff@Delay Ti"er allo.s lo)i' to flo. to an o$tp$t and &eeps t%at o$tp$t tr$e $ntil t%e set a"o$nt of ti"e %as passed, t%en t$rns it false, %en'e off@delay. Ei)$re 17 a-o8e s%o.s an An@Delay Ti"er .it% a 10 se'ond delay -efore it passes t%e lo)i' t%ro$)% it.

28

Figure 15: 3p Counter A 'o$nter si"ply 'o$nts t%e n$"-er of e8ents t%at o''$r on an inp$t. T%ere are t.o -asi' types of 'o$nters 'alled $p 'o$nters and do.n 'o$nters. As its na"e i"plies, .%ene8er a tri))erin) e8ent o''$rs, an $p 'o$nter in're"ents t%e 'o$nter, .%ile a do.n 'o$nter de're"ents t%e 'o$nter .%ene8er a tri))erin) e8ent o''$rs. Ei)$re 15 s%o.s t%e typi'al )rap%i'al representation of an ?p *o$nter.

Buildin& ! PLC7L!dder Lo&i% Pro&r!m


!$ildin) a s"all ladder lo)i' pro)ra" to r$n on a 01* net.or& is ;$ite easy. Eor t%e -e)inner, it is easier to see t%e ladder dia)ra" in t%e for" of relay lo)i'. Ei)$re 16 -elo. s%o.s a -asi' startDstop station for a "otor in relay lo)i'.

Figure 1 : Ladder Diagram in #elay Logic F$st as in Ei)$re 16 a-o8e, relay lo)i' s%o.s all 'o"ponents in t%e syste". T%is is -e'a$se relay lo)i' is t%e sa"e as t%e .irin) dia)ra"s t%at t%e ele'tri'ians $se, so all t%e .irin) needs to -e s%o.n for t%e lo)i' to .or&. !e'a$se of t%is, so"e 'o"ponents "ay not need to -e in'l$ded in t%e pl' ladder lo)i' dia)ra".

24

Figure 1$: #elay Diagram &it" o4erload remo4ed Ei)$re 17 a-o8e s%o.s t%e sa"e 'ir'$it as in Ei)$re 16 .it% t%e o8erload re"o8ed. T%e o8erload is needed in relay lo)i' -e'a$se yo$ %a8e to %a8e an o8erload de8i'e on any 'ir'$itH t%erefore it needs to -e in t%e .irin) dia)ra". T%is .ay, if yo$ p$s% too "$'% '$rrent to t%e "otor, t%e o8erload de8i'e .ill interr$pt t%e 'ir'$it. A8erloads are in'l$ded internally in "ost any de8i'e any"ore, -$t yo$ .ill still see t%is in dia)ra"s. T%ere is still an o8erload de8i'e in a pl' ladder lo)i' 'ir'$it, -$t ladder lo)i' s%o.s only t%ose 'o"ponents t%at %a8e an inp$t or o$tp$t address, so yo$ do not see it. ,n Ei)$re 17, yo$ 'an see t%at t%e start and stop -$ttons alon) .it% t%e "otor relay .ill all -e t$rned to inp$ts in t%e pl' dia)ra" and t%e "otor, si)nified -y a 'ir'le .it% an O( in t%e "iddle .ill -e an o$tp$t. T%e "otor relay .ill not -e a p%ysi'al entity in t%e pl' ladder dia)ra" as it is in t%is relay lo)i'. ,t .ill si"ply -e an inp$t t%at $ses t%e sa"e ,DA address as t%e "otor o$tp$t. T%e stop -$tton inp$t 'an -e lo'ated on eit%er side of t%e start -$ttonDrelay )ate, as lon) as it is still in series .it% it.

Figure 1%: #elay Circuit &it" -ddition o( 'og Function Ei)$re 18 a-o8e s%o.s t%e addition of a OFo) E$n'tion2 to t%e relay 'ir'$it. T%e 9o) f$n'tion is )enerally added to any 'ir'$it for tro$-les%ootin) p$rposes only. (ost 9o) f$n'tions are set $p so t%at t%e only ti"e t%e "otor .ill r$n .it% t%e %elp of t%e 9o)

30

f$n'tion is .%en t%e OFo) !$tton is p$s%ed. ,n Ei)$re 18 a-o8e, yo$ 'an see t%is .it% t%e relay lo)i'. As t%e 'ir'$it loo&s ri)%t no., .%en t%e Start !$tton is pressed, t%e "otor .ill start, ener)iJin) t%e relay, and )oin) a'ross t%e Fo) !$ttons nor"ally 'losed 'onta'ts. T%e "otor .ill stay r$nnin) t%is .ay $ntil t%e Stop !$tton is pressed. ,f instead t%e Fo) !$tton is pressed, t%e '$rrent .ill tra8el a'ross t%e nor"ally open Fo) 'onta'ts t%at are no. 'losed. T%e "otor .ill stay r$nnin) $ntil t%e Fo) !$tton is no lon)er pressed.

Figure 1): #elay Circuit &it" -ddition o( Status *ndicators Ei)$re 14 a-o8e s%o.s t%at sa"e 'ir'$it .it% Stat$s ,ndi'ators added. T%ese are $sed in 'ontrol roo"s to infor" $sers of t%e stat$s of t%eir "otors or ot%er "o8in) parts. Green is t%e )enerally a''epted 'olor for a "otor )oin), .%ile red is stopped. T%e )reen li)%t is ener)iJed .%en t%e nor"ally open 'onta't is ener)iJed -y t%e "o8in) "otor, 'losin) it. T%e red li)%t is ener)iJed .%ene8er a nor"ally 'losed relay is 'losed, so it .ill t$rn off .%ene8er t%e "otor starts to r$n. Ero" Ei)$re 16 to Ei)$re 14, one 'an see t%at .it% e8ery 'o"ponent added, "any .ires need to -e 'onne'ted as .ell. Dependin) on %o. far a.ay t%ese 'o"ponents are a.ay fro" ea'% ot%er, t%is 'an -e 8ery diffi'$lt and ti"e 'ons$"in). 31

Figure 2+: #elay Logic Diagram Con4erted to PLC Ladder Logic Ei)$re 20 a-o8e .as 'on8erted fro" t%e relay lo)i' in Ei)$re 14 to t%e 01* ladder lo)i' seen %ere. ,f t%e 01* lo)i' %ere .as $sed in Ei)$res 16@Ei)$res 14, addin) t%e 8ario$s 'o"ponent .o$ld8e ta&en "$'% less ti"e t%an p%ysi'ally .irin) ea'% 'o"ponent. 01* ladder lo)i' 'an differ fro" relay lo)i' in t%at different 'o"ponents are $sed as .ell. ,n t%e relay dia)ra"s, a sin)le -$tton do$-le pole s.it'% .as $sed so t%at it 'o$ld perfor" t.o different f$n'tions. ,n 01* ladder lo)i', 9$st a sin)le pole -$tton is needed, -e'a$se t%e 'o"p$ter 'an -e as&ed to loo& for a on or off state. Eor t%e stat$s li)%ts, instead of r$nnin) .ires to t%e "otor relays t%e 01* dia)ra" 9$st loo&s for a tr$e or false state of t%e "otor o$tp$t.

32

Con%lusion
Summ!ry
T%is report %as dis'$ssed t%e role t%at pro)ra""a-le lo)i' 'ontrollers %a8e in t%e effi'ient desi)n and 'ontrol of "e'%ani'al pro'esses. Also dis'$ssed .as t%e $nderstandin) of ladder lo)i' and t%e pro)ra""in) in8ol8ed .it% it. Einally, t%e report %as dis'$ssed relay lo)i' and t%e e8ol$tion t%at ladder lo)i' "ade fro" it. Eo$r areas in re)ards to pro)ra""a-le lo)i' 'ontrollers .ere addressed+ 1. 0ro)ra""a-le 1o)i' #istory+ T%is se'tion dis'$ssed t%e %istory and ad8an'e"ent of 'ontrols te'%nolo)y, .it% a 'o"parison of pro)ra""a-le lo)i' 'ontrollers and %ard@.ired relays. 2. 01* 'o"ponents+ T%is se'tion defined .%at pro)ra""a-le lo)i' is and des'ri-ed all %ard.are asso'iated .it% it. 3. 1adder 1o)i'+ T%is se'tion 'o8ered ladder lo)i' and its )eneral pro)ression fro" relay lo)i'. 7. 1adder 1o)i' 0ro)ra""in)+ T%is se'tion 'o8ered -asi' pro)ra""in) te'%ni;$es and t%eir i"ple"entation.

Closin& Comments
=it% t%e speed of '%an)in) te'%nolo)y today it is easy to lose si)%t or &no.led)e of t%e -asi' t%eory or operation of pro)ra""a-le lo)i'. (ost people si"ply $se t%e %ard.are to prod$'e t%e res$lts t%ey desire. #opef$lly, t%is report %as )i8en t%e reader a deeper insi)%t into t%e inner .or&in)s of pro)ra""a-le lo)i' and its role in "e'%ani'al operations. T%e idea of pro)ra""a-le lo)i' is 8ery si"ple to $nderstand, -$t it is t%e 'o"ple< pro)ra"s t%at r$n in t%e ladder dia)ra"s t%at "a&e t%e" diffi'$lt for t%e 'o""on $ser to f$lly $nderstand. #opef$lly t%is %as alle8iated so"e of t%at 'onf$sion.

33

You might also like