fundamentals of plcs review

Upload: patrickschardt

Post on 14-Feb-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 Fundamentals of PLCs Review

    1/65

    1: Review of PLCProgramming and Logi

    FundamentalsMTR 335 Advanced PLCs and Integration

    Fall 2015

    Dr. enni!er "il#$rn

  • 7/23/2019 Fundamentals of PLCs Review

    2/65

    Outline

    Revie% o! PLCs Ladder Logic F$nda&ental Circ$its

    Me&or' and Pro(ect )rgani*ation

    +it,Level Progra&&ing

  • 7/23/2019 Fundamentals of PLCs Review

    3/65

    Review of PLCs

  • 7/23/2019 Fundamentals of PLCs Review

    4/65

    What is a PLC?

    Progra&&a#le Logic Controllers -PLCs is an ind$strial,gradeco&/$ter $sed to /er!or& control !$nctions.

    PLCs %ere originall' develo/ed to re/lace co&/le rela' logic controlcirc$its.

    Te ca/a#ilities o! PLCs are ever,e/anding &eaning tat PLCs are#eing $sed to control increasingl',co&/le s'ste&s. Te' are nolonger li&ited to si&/le digital in/$to$t/$t s'ste&s.

    PLC Progra&&ing is designed to #e readil' accessi#le to 4eldengineers and tecnicians %o &a' not necessaril' #e !a&iliar %itco&/$ter /rogra&&ing.

  • 7/23/2019 Fundamentals of PLCs Review

    5/65

    Advantages of PLCs Increased relia#ilit'

    P'sical contacts on electro&agnetic rela's %ear o$t &$c !aster tan PLCs a&e /rogra& can #e do%nloaded to &an' PLCs no cance o! &is%iring

    More 6ei#ilit' 7asier to &a8e logic canges in te PLC /rogra& tan te rela' circ$it

    7/anded !$nctionalit' not ($st digital I)

    ec$rit' !eat$res

    Lo%er cost Rela'sContactors are not cea/.

    PLCs do not ave to go o$t o! service to /rocess logic canges.

    Co&&$nications ca/a#ilit' $/ervisor' control data gatering &onitoring devices and /rocess /ara&eters re&ote I)

    Faster res/onse ti&e Designed !or ig,s/eed and real,ti&e a//lications

    Rela' circ$its do not res/ond 9$ic8l' eno$g !or s'ste&s tat /rocess to$sands o! /arts /er second

    7asier to tro$#lesoot Diagnostic ca/a#ilities si&$late in/$ts cec8 logic %atc /rogra& eec$te in real,ti&e

  • 7/23/2019 Fundamentals of PLCs Review

    6/65

    Parts of a PLC

    Mod$lar Fied

  • 7/23/2019 Fundamentals of PLCs Review

    7/65

    Principle of Operations

  • 7/23/2019 Fundamentals of PLCs Review

    8/65

    Principle of Operations - Example

  • 7/23/2019 Fundamentals of PLCs Review

    9/65

    Principle of Operations - Example1. Te /ress$re s%itc te&/erat$re

    s%itc and /$s#$tton in/$ts areea&ined and teir stat$sesrecorded in te controller:s &e&or'.

    a. Closed ; 1 o/en ; 0

    2. Te ladder diagra& is eval$ated#ased on tese in/$t states.Activated r$ngs assign a logic val$e

    o! 1 to teir o$t/$t coil:s &e&or'location.

  • 7/23/2019 Fundamentals of PLCs Review

    10/65

    Typical PLC InstructionsSiemens SIMATIC STEP 7 Allen-Bradley RSLogix 5000

    Normally-Open Contact XIC Examine If Closed

    Normally-Closed Contact XIO Examine If Open

    Positive Signal Edge OSR One-Shot Rising

    Assignment Coil OTE Output Energize

    Set Coil OTL Output Latch

    Reset Coil OTU Output Unlatch

  • 7/23/2019 Fundamentals of PLCs Review

    11/65

    Typical PLC InstructionsSiemens SIMATIC STEP 7 Allen-Bradley RSLogix 5000

    TOF Timer Off Delay TOF Timer Off Delay

    TON Timer On Delay TON Timer On Delay

    CTD Count Down CTD Count Down

    CTU Count Up CTU Count Up

  • 7/23/2019 Fundamentals of PLCs Review

    12/65

    Addressing

    ie&ens

    I In/$t

    = )$t/$t

    M Me&or'

    Process I&age> )nl' %a' to to access I)#its +ool ?I 0.0@ ?= 0.0@

    +'te ?I+ 10@ ?=+ 10@

    "ord ?I" 1@ ?=" 1@

    Do$#le "ord ?ID 2B@ ?=D 2B@

    Ti&ers> T3B

    Co$nters> C23

    Local> L0.0 L+1 L"2 LDB

    Pointer> P !ollo%ed #' an address li8eP2.0 or PIB.1

    Allen,+radle'

    I In/$t

    ) )$t/$t

    M Me&or'

    For&at>

    )0>0100 File t'/e ) ; o$t/$t I ; in/$t

    > , 4le deli&iter

    0 rac8 n$er

    1 gro$/ -0,E gro$/s in a rac

    , #it deli&iter

    00 ter&inal n$er -#it addres

  • 7/23/2019 Fundamentals of PLCs Review

    13/65

    Types of PLCs

    Co&/act

    o&eti&es called ?Co&/act@ or?Micro@ PLCs

    Li&ited n$er o! I) /orts

    I) /orts are integrated into te #od'o! te PLC %it te CPG &e&or' and

    co&&$nications ?

  • 7/23/2019 Fundamentals of PLCs Review

    14/65

    I/O Modules Discrete I)

    Analog I)

    /ecial I) Mod$les> Jig,/eed Co$nter Mod$le

    T$%eel Mod$le

    TTL Mod$le

    7ncoder,Co$nter Mod$le

    +AIC or ACII Mod$le te//er,Motor Mod$le

    +CD,)$t/$t Mod$le

    Pro/ortional,Integral,Derivative -PID Control Mod$le

    Motion and Position Control Mod$le

    Co&&$nication Mod$les

  • 7/23/2019 Fundamentals of PLCs Review

    15/65

    Discrete I/O Module Digital In/$t Mod$le $sed to read

    in/$ts s$c as> /$s#$ttonsselector s%itces li&it s%itces/roi&it' s%itces

    Digital )$t/$t Mod$le $sed toactivate> indicator ligts signalingcol$&ns rela's &otor coils

    Availa#le in vario$s AC and DCvoltage ratings

    Mod$les receive /o%er !roac8/lane

    Devices receive /o%er !ro& 4eld,s$//lied voltage so$rce

  • 7/23/2019 Fundamentals of PLCs Review

    16/65

    Analog I/O Module T'/ical analog in/$ts and o$t/$ts

    var' !ro& 0 to 20 &A B to 20 &Aor 0 to 10 .

    T%o #asic t'/es o! analog in/$ts> C$rrent sensing

    oltage sensing

    T'/ical 9$antities &eas$red>

    te&/erat$re s/eed

    level

    6o%

    %eigt

    /ress$re

    /osition

  • 7/23/2019 Fundamentals of PLCs Review

    17/65

    Special Modules High-speed counter:co$nts inde/endentl' !ro& te /rocessor rates $/ to 1008J*

    Thumbwheel module:reads t$%eel s%itces

    TTL module:co&&$nicate %it TTL,level signals

    Encoder-counter module> Reads encoder stores data to #e read later #' /rocessor

    BASIC or ASCII module:r$ns $ser,%ritten +AIC and C /rogra&s inde/endentl'!ro& PLCE inter!ace #et%een re&ote devices and PLC /rocessor

    Stepper-Motor module: Provides /$lse trains to drive a ste//er &otor

    BCD output module:Gsed to control +CD o$t/$ts li8e ,seg&ent dis/la's

    ID module: allo%s co&/le PID control algorit& to #e co&/$ted o$tside te PLCCPG !reeing te PLC !ro& tese c$erso&e calc$lations

    Motion !nd osition Control module:control ste//er and servo &otors %it ig/recision !or ig,s/eed &acining and /ac8aging o/erations

    Communic!tions module: Gsed to esta#lis /oint,to,/oint co&&$nications !orecange o! data a&ong &od$les co&/$ters PLCs o/erator stations /rocesscontrol s'ste&s etc.

  • 7/23/2019 Fundamentals of PLCs Review

    18/65

    Ladder Logic

    Fundamental Circuits

  • 7/23/2019 Fundamentals of PLCs Review

    19/65

    AND gate

    A B Q

    0 0 0

    0 1 0

    1 0 0

    1 1 1

  • 7/23/2019 Fundamentals of PLCs Review

    20/65

    OR gateA B Q

    0 0 0

    0 1 1

    1 0 1

    1 1 1

  • 7/23/2019 Fundamentals of PLCs Review

    21/65

    NOT gateA B

    0 1

    1 0

  • 7/23/2019 Fundamentals of PLCs Review

    22/65

    NAND gateA B Q

    0 0 1

    0 1 1

    1 0 1

    1 1 0

  • 7/23/2019 Fundamentals of PLCs Review

    23/65

    NOR gateA B Q

    0 0 1

    0 1 0

    1 0 0

    1 1 0

  • 7/23/2019 Fundamentals of PLCs Review

    24/65

    XOR gateA B Q

    0 0 0

    0 1 1

    1 0 1

    1 1 0

  • 7/23/2019 Fundamentals of PLCs Review

    25/65

    Inverting Inputs and Outputs

    A rela' &$st #e $sed to invert teo$t/$t o! a logic o/eration.

    A si&/le

  • 7/23/2019 Fundamentals of PLCs Review

    26/65

    Memory and Project

    Organization

  • 7/23/2019 Fundamentals of PLCs Review

    27/65

    Programmable Automation Controller More advanced &at and logic &ani/$lation !$nctions

    PACs loo8 and act li8e PLCs #$t %it e/anded ca/a#ilities> advanced control o! co&&$nications

    data logging

    signal /rocessing

    &otion control

    /rocess control

    &acine vision

    For Allen,+radle' PLCs tese PACs incl$de>

    ControlLogi Co&/actLogi

    FleLogi

    o!tLogi 500

    DriveLogi

    o!t%are &a8es te diHerence. tandard Ladder Logic doesn:t cange #$taddressing o! instr$ctions does.

  • 7/23/2019 Fundamentals of PLCs Review

    28/65

    Memory Layout ControlLogi -CL /rocessors ave a 6ei#le &e&or' str$ct$re no

    4ed areas o! &e&or' allocated !or s/eci4c t'/es o! data or !or I)

    Me&or' organi*ation is con4g$red #' te $ser in RLogi 5000

    A CL s'ste& can #e co&/osed o! onl' a controller and standard I)&od$les in a single cassis or it can #e as co&/le as a igl',distri#$ted s'ste& containing several cassis and net%or8s %or8ingtogeter.

  • 7/23/2019 Fundamentals of PLCs Review

    29/65

    Configuration Con4g$ration o! a &od$lar CL s'ste&

    involves esta#lising a co&&$nications lin8#et%een te controller and te /rocess.

    Te so!t%are needs to 8no% %at ard%areis #eing $sed in ordered to #e a#le to sendor receive data.

    Con4g$ration incl$des %at /rocessor-sI) &od$les s/ecial &od$les and

    net%or8ing are #eing $sed.

    RLogi 5000 is $sed to con4g$re te&e&or' o! te controller

    RLin is $sed to create a connection#et%een RLogi 5000 and te ard%are.

  • 7/23/2019 Fundamentals of PLCs Review

    30/65

    Configuration (contd) To esta#lis co&&$nications %it a controller a driver &$st #e created

    RLin.

    R"o allo%s 'o$ to vie% all con4g$red net%or8 drivers.

    A!ter drivers are con4g$red te &od$les are con4g$red in RLogi 500&$st #e con4g$red correctl' or te' %ill not %or8 /ro/erl' -or at all.

    RLin can also #e $sed to 4nd data a#o$t &od$les li8e 4r&%are and rversion.

  • 7/23/2019 Fundamentals of PLCs Review

    31/65

    Project RLogi 5000 -and 500 stores a

    controller:s /rogra&&ing andcon4g$ration in!or&ation in a 4lecalled aproject.

    Te /ro(ect 4le contains allin!or&ation relating to te /ro(ect> tas8s

    /rogra&s

    ro$tines

    A controller can onl' old andeec$te one /ro(ect at a ti&e.

  • 7/23/2019 Fundamentals of PLCs Review

    32/65

    Project (contd) RLogi 5000 /ro(ect organi*ation tree so%s

    Tas8s Progra&s

    Ro$tines

    Data t'/es

    Trends

    I) con4g$ration

    Tags

    Folders gro$/ co&&on !$nctions togeter

    Rigt,clic8ing on diHerent o#(ects #rings $/relevant contet,sensitive /o/$/ &en$s

  • 7/23/2019 Fundamentals of PLCs Review

    33/65

    Tasks Tas8s are te 4rst level o! sced$ling %itin a

    /ro(ect A tas8 is a collection o! sced$led /rogra&s

    "en a tas8 is eec$ted te associated/rogra&s are eec$ted in te order listed -te/rogra& sced$le.

    Tas8s /rovide sced$ling contain no eec$ta#lecode.

    )nl' one tas8 &a' eec$te at a ti&e Main t'/es o! tas8s>

    Contin$o$s eec$te non,sto/ #$t are al%a'sinterr$/ted #' /eriodic tas8sE lo%est /riorit'.

  • 7/23/2019 Fundamentals of PLCs Review

    34/65

    Programs Progra&s are te second leve

    sced$ling %itin a /ro(ect

    Te !olders $nder Tas8 ?Maindeter&ine %ic /rogra&s eand in %at order.

  • 7/23/2019 Fundamentals of PLCs Review

    35/65

    Routines

    Ro$tines are te tird level or sc%itin a /ro(ect.

    Ro$tines contain te eec$ta#le /ro(ect.

    7ac ro$tine contains a set o! lo

    !or a s/eci4c /rogra&&ing lang$ "en a ro$tine is created it is s/e

    Ladder Logic e9$ential F$nction +loc8 Diagra& or tr$ct$red Tet.

    An' one ro$tine &$st #e in onl' on#$t diHerent ro$tines &a' containlang$ages %itin te sa&e /ro(ect

    Li#raries o! standard ro$tines caand re$sed on &$lti/le &acine

    a//lications.

    A ro$tine can #e assigned as> Main ro$tine eec$tes 4rst in te

    $#ro$tine called #' anoter ro$co&/le tas8s or tose tat re9$ione /rogra&&ing lang$age.

    Fa$lt ro$tine eec$tes i! controlle/rogra& !a$lt. 7ac /rogra& can

    ro$tine -i! desired.

  • 7/23/2019 Fundamentals of PLCs Review

    36/65

    Tags Tag,#ased addressing str$ct$re

    Tags are &eaning!$l na&es li8e?varia#les@

  • 7/23/2019 Fundamentals of PLCs Review

    37/65

    Tags (contd) ?co/e@ re!ers to %ic /rogra&s ave

    access to a tag co/e &$st #e declared %en 'o$

    create te tag

    T%o sco/es> Progra& sco/e -local data visi#le %itin

    ro$tines %itin te /rogra&

    Controller sco/e -glo#al data accessi#le#' all ro$tines %itin a controller

    Te sa&e tag na&e &a' a//ear %itindiHerent /rogra&s as local varia#les#eca$se oter /rogra&s cannot see tetag.

    Te sco/e o! a tag &$st #e declared%en 'o$ create te tag.

    I) t t ti ll d 4

  • 7/23/2019 Fundamentals of PLCs Review

    38/65

    Tags (contd)

    I) tags are a$to&aticall' de4ncontroller sco/ed tags.

    Tere are !o$r diHerent t'/es o!tags> #ase

    alias

    /rod$ced cons$&ed

    +ase stores vario$s t'/es o! d!or $se #' logic in te /ro(ect 7. Local>2>).Data.B

  • 7/23/2019 Fundamentals of PLCs Review

    39/65

    Tags (contd) Alias $sed to create an alternate na&e !or a

    tag or anoter na&e !or an alread',na&edaddress in &e&or'

    An' action to te #ase also a//ens to tealias and vice versa.

    Prod$cedcons$&ed tags are $sed tosare tag in!or&ation over a net%or8#et%een 2 or &ore devices.

    A /rod$ced tag sends data Prod$ced tags are al%a's control,sco/ed

    A cons$&ed tag receives data M$lti/le controllers can connect to an'

    data #eing /rod$ced %ic /revents teneed to send &$lti/le &essagescontaining te sa&e data.

  • 7/23/2019 Fundamentals of PLCs Review

    40/65

    Data Types Logi controllers are #ased on 32,#it o/erations

    T'/es o! data tat can #e a #ase ta are> +))L

    I

  • 7/23/2019 Fundamentals of PLCs Review

    41/65

    Data Types (contd) +))L one #it o! data stored in #it

    0 o! a B #'te &e&or' location I

  • 7/23/2019 Fundamentals of PLCs Review

    42/65

    Structures tr$ct$res are anoter data,t'

    A str$ct$re,t'/e tag is a gro$/diHerent data t'/es tat !$ncta single $nit and serve a s/eci/$r/ose.

    7ac ele&ent o! a str$ct$re is a &eer and eac &eer ca diHerent data t'/e

    Tere are tree diHerent t'/esstr$ct$res in a ControlLogicontroller> Prede4ned

    Mod$le,de4ned

    Gser,de4ned

  • 7/23/2019 Fundamentals of PLCs Review

    43/65

    Predefined Structures Te controller creates /rede4ned

    str$ct$res !or 'o$ tat incl$de> ti&ers

    co$nters

    &essages

    PID

    In te 4g$re te Co$nter str$ct$recontains te /reset val$e te

    acc$&$lation val$e and teco$nter instr$ction:s stat$s #its.

  • 7/23/2019 Fundamentals of PLCs Review

    44/65

    Module-defined Structures Mod$le,de4ned str$ct$res are

    a$to&aticall' created %en te &od$les are con4g$red !or te s

    "en 'o$ add in/$t or o$t/$t &a n$er o! de4ned tags area$to&aticall' added to te contrtags

    Te 4g$re so%s t%o str$ct$res added %en an in/$t &od$le is a

    )ne stores in/$t data and te otstores con4g$ration data.

    ?Local@ indicates tat tese tagste sa&e rac8 as te /rocessor. Te ?1@ indicates tat te &od$le

    1 o! te cassis.

  • 7/23/2019 Fundamentals of PLCs Review

    45/65

    User-defined Structures Gser,de4ned str$ct$res /rovide te a#ilit'

    to store and andle data as a gro$/.

    7a&/le> Te str$ct$re in te 4g$recontains data !or a storage tan8 so tatall data relative to te tan8 are storedtogeter.

    "en designing te /rogra&&er createste str$ct$re tat contains all te diHerentas/ects o! te storage tan8

    7ac &eer as a &eaning!$l na&e andan a//ro/riate data t'/e.

    It is eas' !or installation and &aintenance/ersonnel to locate all data associated%it te o/eration o! te tan8 as it isstored togeter.

  • 7/23/2019 Fundamentals of PLCs Review

    46/65

    Creating Tags Man' %a's to create tags>

    create tags !ro& te tag editor #/rogra&&ing

    enter tag na&es as 'o$ /rogra&

    $se O as /laceolders and enter na&es later

    "en de4ning tags te !ollo%in!or&ation &$st #e s/eci4ed> Tag na&e

    Tag descri/tion -o/tional Tag t'/e

    Data t'/e

    Dis/la' st'le

    "eter te tag is cons$&a#le n$er o! controllers tat can cit

  • 7/23/2019 Fundamentals of PLCs Review

    47/65

    Monitoring and Editing Tags A!ter tags ave #een created te'

    can #e &onitored in te ?MonitorTags@ %indo%

    Te ?Force Mas8@ is $sed to !orcein/$ts and o$t/$ts %entro$#lesooting.

    In te ?7dit Tags@ %indo% 'o$ canedit eisting tags or create ne%

    tags.

  • 7/23/2019 Fundamentals of PLCs Review

    48/65

    Array Man' control /rogra&s re9$i

    a#ilit' to store #loc8s o!in!or&ation as ta#les tat caaccessed at r$nti&e.

    An arrayis a tag t'/e tat coa #loc8 o! &$lti/le /ieces o!

    7ac ele&ent o! an arra' &$te sa&e data t'/e -e. all +

    all I

  • 7/23/2019 Fundamentals of PLCs Review

    49/65

    Bit-Level Programming

  • 7/23/2019 Fundamentals of PLCs Review

    50/65

    Program Scan "en a ControlLogi controller

    eec$tes a /rogra& it &$st 8no%in real ti&e%en eternal devicescontrolling a /rocess are canging.

    D$ring eac o/erating c'cle te/rocessor>1. Reads all te in/$ts

    2. tores tese val$es

    3. 7val$ates te $ser /rogra&B. 7nergi*es and deenergi*es teo$t/$ts in accordance %it te $ser/rogra&.

    Tis is teprogram scan.

  • 7/23/2019 Fundamentals of PLCs Review

    51/65

    Program Scan (contd) D$ring te /rogra& scan te controller reads te r$ngs

    and #rances !ro& rigt,to,le!t and to/,to,#otto& as!ollo%s> Te stat$s o! in/$ts at te input moduleare cec8ed !or tr$e

    -1 or )

  • 7/23/2019 Fundamentals of PLCs Review

    52/65

    Creating Ladder Logic )! te 4ve availa#le /rogra&&ing

    lang$ages !or PLCs Ladder Logic iste &ost /revalent.

    In general Ladder Logic isco&/osed o! I

  • 7/23/2019 Fundamentals of PLCs Review

    53/65

    Creating Ladder Logic (contd) )! te 4ve availa#le /rogra&&ing lang$ages !or PLCs Ladder Logic is te

    &ost /revalent.

    In general Ladder Logic is co&/osed o! I

  • 7/23/2019 Fundamentals of PLCs Review

    54/65

    Creating Ladder Logic (contd) All in/$t instr$ctions &$st #e to te le!t o! an o$t/$t instr$ction.

    Te last instr$ction on a r$ng &$st #e an o$t/$t instr$ction.

    Te IC -7a&ine I! Closed ret$rns TRG7 i! te in/$t val$e is 1.

    Te I) -7a&/le i! )/en ret$rns TRG7 i! te in/$t val$e is 0.

    Te )T7 -)$t/$t 7nergi*e coil instr$ction sets te tag associated %it it toTRG7 -1 %en te r$ng as logic contin$it'. "en tr$e it can #e $sed toenergi*e an o$t/$t device or to set te val$e o! a &e&or' #it to 1.

  • 7/23/2019 Fundamentals of PLCs Review

    55/65

    Creating Ladder Logic (contd) ControlLogi PLCs -RLogi 5

    s$//ort &$lti/le o$t/$ts on or$ng.

    It also s$//orts series o$t/$tcon4g$rations tat would noi! connected tis %a' in an aelectrical circ$it. Tis is not te case !or RLogi

    tis series o$t/$t con4g$ratio

    not #e valid.

    RLogi 5000 also /er&its o$instr$ctions to #e /laced #etin/$t instr$ctions as long aslast ite& on te r$ng is an o$

  • 7/23/2019 Fundamentals of PLCs Review

    56/65

    Tag-Based Addressing RLogi 5000 s$//orts tag,#ased addressing str$ct$re.

    A tag is li8e a ?varia#le@ na&e !or a section o! &e&or' %ena /iece o! data is stored.

    Tags are &eant to give &eaning!$l na&es to oter%ise diKc$lt,to,re&eer addresses.

    In te ea&/le te tag Li&its%itc as addressLocal>1>I.Data.2-C. Local indicates tat te &od$le is in te sa&e rac8 as te /rocessor

    1 indicates tat te in/$t &od$le is in slot 1 o! te rac8

    I indicates tat te &od$le is te in/$t t'/e

    Data indicates tat it is a digital in/$t

    2 indicates tat te li&it s%itc is attaced to ter&inal 2 on te&od$le

    C indicates tat it is a ?controller@ tag %ic as glo#al access

    In te ea&/le te tag Jigli&itligt as addressLocal>2>).Data.B-C. Local indicates tat te &od$le is in te sa&e rac8 as te /rocessor

    2 indicates tat te in/$t &od$le is in slot 2 o! te rac8

    ) indicates tat te &od$le is te o$t/$t t'/e

    Data indicates tat it is a digital o$t/$t

    B indicates tat te ig li&it ligt is attaced to ter&inal B on te&od$le

    C indicates tat it is a ?controller@ tag %ic as glo#al access

  • 7/23/2019 Fundamentals of PLCs Review

    57/65

    Tag-Based Addressing (contd) )ne advantage o! te $se i! tag,#ased addressing is tat all te

    allocation o! varia#le na&es !or /rogra& val$es is not tied to s/eci4c&e&or' locations in te &e&or' str$ct$re.

    Initiall' all /rogra& develo/&ent can /roceed %it ($st te tagna&es and te data t'/es assigned.

    Gsing tag aliases /rogra&&ers can %rite code inde/endent o!electrical connection assign&ents.

    At a later ti&e in/$t and o$t/$t 4eld devices are easil' &atced to

    te /in n$ers on te res/ective &od$le te are connected to.

  • 7/23/2019 Fundamentals of PLCs Review

    58/65

    Adding Ladder Logic to the Main Rou In te 4g$re o! te ard%ired

    &otor startsto/ circ$it tenor&all',o/en start #$tton is&o&entaril' closed to energte contactor coil ad close itscontacts to start te &otor.

    Te seal,in a$iliar' contact connected in /arallel %it t#$tton to 8ee/ te &otor coienergi*ed %en te start #$treleased.

    Te nor&all' closed sto/ #$t&o&entaril' o/ened to de,energi*e te contactor coil asto/ te &otor.

    AddingLadderLogictotheMainRou

  • 7/23/2019 Fundamentals of PLCs Review

    59/65

    Adding Ladder Logic to the Main Rou(contd) Te 4g$re so%s te PLCLadder

    Logic set$/ !or te &otor startsto/circ$it.

    Te ?O@ are $sed in /lace o! tagna&es to so% tat %e do not aveto tie an instr$ction to a &e&or'addresstag #e!ore %e create tenet instr$ction.

    Te %iring is as so%n> Te sto/ #$tton is %ired to in/$tter&inal 3.

    Te start #$tton is %ired to in/$tter&inal B.

    Te contactor coil is %ired to ter&inalB o! te o$t/$t &od$le.

    Adding Ladder Logic to the Main Routine( d)

  • 7/23/2019 Fundamentals of PLCs Review

    60/65

    (contd) Tags el/ doc$&ent or ?co&&

    'o$r ladder code.

    For tis si&/le circ$it 3 tags

    created> Motortart

    Motorto/

    MotorR$n

    Loo8ing at Motortart a lin8tro$g te &od$le to te 4edevice &$st #e s/eci4ed to liin/$t ter&inal 3 to te /ro/erna&e.

    Tag na&es are do%nloaded anstored in te controller #$t tdescri/tion is not. It is conside#e /art o! te doc$&entation

    Adding Ladder Logic to the Main Rou

  • 7/23/2019 Fundamentals of PLCs Review

    61/65

    g g(contd)

    Te sa&e data can #e re!erenced&$lti/le ti&es $nder diHerentna&es $sing ?aliases@.

    "en te &otor is o/erating> Te IC Motortart instr$ction is

    !alse.

    Te IC Motorto/ is tr$e.

    Te )T7 instr$ction is tr$e #eca$sete r$ng as logic contin$it'.

  • 7/23/2019 Fundamentals of PLCs Review

    62/65

    Internal Relay Instructions Internal rela' instr$ctions are $sed

    %en oter tan real,%orld 4elddevices are needed as in/$t oro$t/$t re!erence instr$ctions.

    Co&&onl' an internal rela' #it is$sed as an o$t/$t %en te RL) o!te r$ng is $sed to control oterinternal logic.

    In RLogi 5000 %e do tis #'creating a tag -eiter /rogra& orcontroller t'/e and assigning a+ool data t'/e to it.

  • 7/23/2019 Fundamentals of PLCs Review

    63/65

    Latch and Unlatch Instructions Te o$t/$t latc -)TL instr$ctio

    retentive o$t/$t instr$ction tat

    $sed to &aintain or latc an o$

    I! tis o$t/$t is t$rned on -energit %ill sta' energi*ed on !$t$re sc'cles even i! te r$ng tat eneit is no longer tr$e.

    Te onl' %a' to t$rn te energi*o$t/$t #ac8 oH is to energi*e an

    $nlatc -)TG instr$ction %it tsa&e tag as te /revio$sl' activ-)TL.

    Te latced state %ill even #e&aintained i! te PLC is /o%ereand #ac8 $/ again.

  • 7/23/2019 Fundamentals of PLCs Review

    64/65

    One-Shot Instruction Te one,sot -)

  • 7/23/2019 Fundamentals of PLCs Review

    65/65

    References1. Fran8 D. Petr$*ella ?Ca/ter 1 , Progra&&a#le Logic Controllers

    -PLCs> An )vervie%@ Progra&&a#le Logic Controllers BteditionMcQra%,Jill 2011.

    2. Fran8 D. Petr$*ella ?Ca/ter 2 PLC Jard%are Co&/onents@Progra&&a#le Logic Controllers Btedition McQra%,Jill 2011.

    3. Fran8 D. Petr$*ella ?Ca/ter B F$nda&entals o! Logic@Progra&&a#le Logic Controllers Btedition McQra%,Jill 2011.

    B. Fran8 D. Petr$*ella ?Ca/ter 15 ControlLogi Controllers@ Part 1 Me&or' and Pro(ect )rgani*ation Progra&&a#le Logic ControllersBtedition McQra%,Jill 2011.

    5. Fran8 D. Petr$*ella ?Ca/ter 15 ControlLogi Controllers@ Part 2 +it,Level Progra&&ing Progra&&a#le Logic Controllers BteditionMcQra%,Jill 2011.