Sunteți pe pagina 1din 11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

Programmablelogiccontroller
FromWikipedia,thefreeencyclopedia

Aprogrammablelogiccontroller,PLCorprogrammable
controllerisadigitalcomputerusedforautomationoftypically
industrialelectromechanicalprocesses,suchascontrolofmachinery
onfactoryassemblylines,amusementrides,orlightfixtures.PLCs
areusedinmanyindustriesandmachines.PLCsaredesignedfor
multipleanalogueanddigitalinputsandoutputarrangements,
extendedtemperatureranges,immunitytoelectricalnoise,and
resistancetovibrationandimpact.Programstocontrolmachine
operationaretypicallystoredinbatterybackedupornonvolatile
memory.APLCisanexampleofa"hard"realtimesystemsince
outputresultsmustbeproducedinresponsetoinputconditions
withinalimitedtime,otherwiseunintendedoperationwillresult.
BeforethePLC,control,sequencing,andsafetyinterlocklogicfor
manufacturingautomobileswasmainlycomposedofrelays,cam
timers,drumsequencers,anddedicatedclosedloopcontrollers.
Sincethesecouldnumberinthehundredsoreventhousands,the
processforupdatingsuchfacilitiesfortheyearlymodelchangeover
wasverytimeconsumingandexpensive,aselectriciansneededto
individuallyrewiretherelaystochangetheiroperational
characteristics.

SiemensSimaticS7400systemat
rack,lefttoright:powersupplyunit
PS4074A,CPU4163,interface
moduleIM4600andcommunication
processorCP4431.

Digitalcomputers,beinggeneralpurposeprogrammabledevices,
weresoonappliedtocontrolofindustrialprocesses.Early
computersrequiredspecialistprogrammers,andstringentoperating
environmentalcontrolfortemperature,cleanliness,andpower
quality.Usingageneralpurposecomputerforprocesscontrolrequiredprotectingthecomputerfromthe
plantfloorconditions.Anindustrialcontrolcomputerwouldhaveseveralattributes:itwouldtoleratethe
shopfloorenvironment,itwouldsupportdiscrete(bitform)inputandoutputinaneasilyextensible
manner,itwouldnotrequireyearsoftrainingtouse,anditwouldpermititsoperationtobemonitored.The
responsetimeofanycomputersystemmustbefastenoughtobeusefulforcontroltherequiredspeed
varyingaccordingtothenatureoftheprocess.[1]Sincemanyindustrialprocesseshavetimescaleseasily
addressedbymillisecondresponsetimes,modern(fast,small,reliable)electronicsgreatlyfacilitatebuilding
reliablecontrollers,especiallybecauseperformancecanbetradedoffforreliability.
In1968GMHydraMatic(theautomatictransmissiondivisionofGeneralMotors)issuedarequestfor
proposalsforanelectronicreplacementforhardwiredrelaysystemsbasedonawhitepaperwrittenby
engineerEdwardR.Clark.ThewinningproposalcamefromBedfordAssociatesofBedford,
Massachusetts.ThefirstPLC,designatedthe084becauseitwasBedfordAssociates'eightyfourthproject,
wastheresult.[2]BedfordAssociatesstartedanewcompanydedicatedtodeveloping,manufacturing,
selling,andservicingthisnewproduct:Modicon,whichstoodforMOdularDIgitalCONtroller.Oneofthe
peoplewhoworkedonthatprojectwasDickMorley,whoisconsideredtobethe"father"ofthePLC.[3]
TheModiconbrandwassoldin1977toGouldElectronics,andlateracquiredbyGermanCompanyAEG
andthenbyFrenchSchneiderElectric,thecurrentowner.
http://en.wikipedia.org/wiki/Programmable_logic_controller

1/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

Oneoftheveryfirst084modelsbuiltisnowondisplayatModicon'sheadquartersinNorthAndover,
Massachusetts.ItwaspresentedtoModiconbyGM,whentheunitwasretiredafternearlytwentyyearsof
uninterruptedservice.Modiconusedthe84monikerattheendofitsproductrangeuntilthe984madeits
appearance.
TheautomotiveindustryisstilloneofthelargestusersofPLCs.

Contents
1Development
1.1Programming
2Functionality
2.1Programmablelogicrelay(PLR)
3PLCtopics
3.1Features
3.2Scantime
3.3Systemscale
3.4Userinterface
3.5Communications
3.6Programming
3.7Security
3.8Simulation
3.9Redundancy
4PLCcomparedwithothercontrolsystems
5Discreteandanalogsignals
5.1Example
6Seealso
7References
8Furtherreading
9Externallinks

Development
EarlyPLCsweredesignedtoreplacerelaylogicsystems.ThesePLCswereprogrammedin"ladderlogic",
whichstronglyresemblesaschematicdiagramofrelaylogic.Thisprogramnotationwaschosentoreduce
trainingdemandsfortheexistingtechnicians.OtherearlyPLCsusedaformofinstructionlist
programming,basedonastackbasedlogicsolver.
http://en.wikipedia.org/wiki/Programmable_logic_controller

2/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

ModernPLCscanbeprogrammedinavarietyofways,fromtherelayderivedladderlogictoprogramming
languagessuchasspeciallyadapteddialectsofBASICandC.AnothermethodisStateLogic,averyhigh
levelprogramminglanguagedesignedtoprogramPLCsbasedonstatetransitiondiagrams.
ManyearlyPLCsdidnothaveaccompanyingprogrammingterminalsthatwerecapableofgraphical
representationofthelogic,andsothelogicwasinsteadrepresentedasaseriesoflogicexpressionsinsome
versionofBooleanformat,similartoBooleanalgebra.Asprogrammingterminalsevolved,itbecamemore
commonforladderlogictobeused,fortheaforementionedreasonsandbecauseitwasafamiliarformat
usedforelectromechanicalcontrolpanels.NewerformatssuchasStateLogicandFunctionBlock(whichis
similartothewaylogicisdepictedwhenusingdigitalintegratedlogiccircuits)exist,buttheyarestillnot
aspopularasladderlogic.AprimaryreasonforthisisthatPLCssolvethelogicinapredictableand
repeatingsequence,andladderlogicallowstheprogrammer(thepersonwritingthelogic)toseeanyissues
withthetimingofthelogicsequencemoreeasilythanwouldbepossibleinotherformats.

Programming
EarlyPLCs,uptothemid1990s,wereprogrammedusingproprietaryprogrammingpanelsorspecial
purposeprogrammingterminals,whichoftenhaddedicatedfunctionkeysrepresentingthevariouslogical
elementsofPLCprograms.[2]SomeproprietaryprogrammingterminalsdisplayedtheelementsofPLC
programsasgraphicsymbols,butplainASCIIcharacterrepresentationsofcontacts,coils,andwireswere
common.Programswerestoredoncassettetapecartridges.Facilitiesforprintinganddocumentationwere
minimalduetolackofmemorycapacity.TheveryoldestPLCsusednonvolatilemagneticcorememory.
Morerecently,PLCsareprogrammedusingapplicationsoftwareonpersonalcomputers,whichnow
representthelogicingraphicforminsteadofcharactersymbols.ThecomputerisconnectedtothePLC
throughEthernet,RS232,RS485orRS422cabling.Theprogrammingsoftwareallowsentryandediting
oftheladderstylelogic.Generallythesoftwareprovidesfunctionsfordebuggingandtroubleshootingthe
PLCsoftware,forexample,byhighlightingportionsofthelogictoshowcurrentstatusduringoperationor
viasimulation.ThesoftwarewilluploadanddownloadthePLCprogram,forbackupandrestoration
purposes.Insomemodelsofprogrammablecontroller,theprogramistransferredfromapersonalcomputer
tothePLCthroughaprogrammingboardwhichwritestheprogramintoaremovablechipsuchasan
EEPROMorEPROM.

Functionality
ThefunctionalityofthePLChasevolvedovertheyearstoincludesequentialrelaycontrol,motioncontrol,
processcontrol,distributedcontrolsystemsandnetworking.Thedatahandling,storage,processingpower
andcommunicationcapabilitiesofsomemodernPLCsareapproximatelyequivalenttodesktopcomputers.
PLClikeprogrammingcombinedwithremoteI/Ohardware,allowageneralpurposedesktopcomputerto
overlapsomePLCsincertainapplications.Desktopcomputercontrollershavenotbeengenerallyaccepted
inheavyindustrybecausethedesktopcomputersrunonlessstableoperatingsystemsthandoPLCs,and
becausethedesktopcomputerhardwareistypicallynotdesignedtothesamelevelsoftoleranceto
temperature,humidity,vibration,andlongevityastheprocessorsusedinPLCs.Operatingsystemssuchas
Windowsdonotlendthemselvestodeterministiclogicexecution,withtheresultthatthecontrollermaynot
alwaysrespondtochangesofinputstatuswiththeconsistencyintimingexpectedfromPLCs.Desktop

http://en.wikipedia.org/wiki/Programmable_logic_controller

3/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

logicapplicationsfinduseinlesscriticalsituations,suchaslaboratoryautomationanduseinsmall
facilitieswheretheapplicationislessdemandingandcritical,becausetheyaregenerallymuchless
expensivethanPLCs.

Programmablelogicrelay(PLR)
Inmorerecentyears,smallproductscalledPLRs(programmablelogicrelays),andalsobysimilarnames,
havebecomemorecommonandaccepted.TheseareverymuchlikePLCs,andareusedinlightindustry
whereonlyafewpointsofI/O(i.e.afewsignalscominginfromtherealworldandafewgoingout)are
involved,andlowcostisdesired.Thesesmalldevicesaretypicallymadeinacommonphysicalsizeand
shapebyseveralmanufacturers,andbrandedbythemakersoflargerPLCstofillouttheirlowendproduct
range.PopularnamesincludePICOController,NANOPLC,andothernamesimplyingverysmall
controllers.Mostofthesehavebetween8and12discreteinputs,4and8discreteoutputs,andupto2
analoginputs.Sizeisusuallyabout4"wide,3"high,and3"deep.Mostsuchdevicesincludeatinypostage
stampsizedLCDscreenforviewingsimplifiedladderlogic(onlyaverysmallportionoftheprogrambeing
visibleatagiventime)andstatusofI/Opoints,andtypicallythesescreensareaccompaniedbya4way
rockerpushbuttonplusfourmoreseparatepushbuttons,similartothekeybuttonsonaVCRremote
control,andusedtonavigateandeditthelogic.MosthaveasmallplugforconnectingviaRS232orRS
485toapersonalcomputersothatprogrammerscanusesimpleWindowsapplicationsforprogramming
insteadofbeingforcedtousethetinyLCDandpushbuttonsetforthispurpose.UnlikeregularPLCsthat
areusuallymodularandgreatlyexpandable,thePLRsareusuallynotmodularorexpandable,buttheir
pricecanbetwoordersofmagnitudelessthanaPLCandtheystillofferrobustdesignanddeterministic
executionofthelogics.

PLCtopics
Features
ThemaindifferencefromothercomputersisthatPLCsarearmoredforsevereconditions(suchasdust,
moisture,heat,cold)andhavethefacilityforextensiveinput/output(I/O)arrangements.Theseconnectthe
PLCtosensorsandactuators.PLCsreadlimitswitches,analogprocessvariables(suchastemperatureand
pressure),andthepositionsofcomplexpositioningsystems.Someusemachinevision.[4]Ontheactuator
side,PLCsoperateelectricmotors,pneumaticorhydrauliccylinders,magneticrelays,solenoids,oranalog
outputs.Theinput/outputarrangementsmaybebuiltintoasimplePLC,orthePLCmayhaveexternalI/O
modulesattachedtoacomputernetworkthatplugsintothePLC.

Scantime
APLCprogramisgenerallyexecutedrepeatedlyaslongasthecontrolledsystemisrunning.Thestatusof
physicalinputpointsiscopiedtoanareaofmemoryaccessibletotheprocessor,sometimescalledthe"I/O
ImageTable".Theprogramisthenrunfromitsfirstinstructionrungdowntothelastrung.Ittakessome
timefortheprocessorofthePLCtoevaluatealltherungsandupdatetheI/Oimagetablewiththestatusof
outputs.[5]Thisscantimemaybeafewmillisecondsforasmallprogramoronafastprocessor,butolder
PLCsrunningverylargeprogramscouldtakemuchlonger(say,upto100ms)toexecutetheprogram.If
thescantimeweretoolong,theresponseofthePLCtoprocessconditionswouldbetooslowtobeuseful.

http://en.wikipedia.org/wiki/Programmable_logic_controller

4/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

AsPLCsbecamemoreadvanced,methodsweredevelopedto
changethesequenceofladderexecution,andsubroutineswere
implemented.[6]Thissimplifiedprogrammingcouldbeusedtosave
scantimeforhighspeedprocessesforexample,partsofthe
programusedonlyforsettingupthemachinecouldbesegregated
fromthosepartsrequiredtooperateathigherspeed.
SpecialpurposeI/Omodulesmaybeusedwherethescantimeof
thePLCistoolongtoallowpredictableperformance.Precision
timingmodules,orcountermodulesforusewithshaftencoders,are
usedwherethescantimewouldbetoolongtoreliablycountpulses
ordetectthesenseofrotationofanencoder.Therelativelyslow
PLCcanstillinterpretthecountedvaluestocontrolamachine,but
theaccumulationofpulsesisdonebyadedicatedmodulethatis
unaffectedbythespeedoftheprogramexecution.

Systemscale
AsmallPLCwillhaveafixednumberofconnectionsbuiltinfor
inputsandoutputs.Typically,expansionsareavailableifthebase
modelhasinsufficientI/O.

ControlpanelwithPLC(grey
elementsinthecenter).Theunit
consistsofseparateelements,from
lefttorightpowersupply,controller,
relayunitsforinandoutput

ModularPLCshaveachassis(alsocalledarack)intowhichare
placedmoduleswithdifferentfunctions.Theprocessorand
selectionofI/Omodulesarecustomizedfortheparticular
application.Severalrackscanbeadministeredbyasingleprocessor,andmayhavethousandsofinputsand
outputs.AspecialhighspeedserialI/Olinkisusedsothatrackscanbedistributedawayfromthe
processor,reducingthewiringcostsforlargeplants.

Userinterface
PLCsmayneedtointeractwithpeopleforthepurposeofconfiguration,alarmreportingoreveryday
control.Ahumanmachineinterface(HMI)isemployedforthispurpose.HMIsarealsoreferredtoasman
machineinterfaces(MMIs)andgraphicaluserinterfaces(GUIs).Asimplesystemmayusebuttonsand
lightstointeractwiththeuser.Textdisplaysareavailableaswellasgraphicaltouchscreens.Morecomplex
systemsuseprogrammingandmonitoringsoftwareinstalledonacomputer,withthePLCconnectedviaa
communicationinterface.

Communications
PLCshavebuiltincommunicationsports,usually9pinRS232,butoptionallyEIA485orEthernet.
Modbus,BACnetorDF1isusuallyincludedasoneofthecommunicationsprotocols.Otheroptionsinclude
variousfieldbusessuchasDeviceNetorProfibus.Othercommunicationsprotocolsthatmaybeusedare
listedintheListofautomationprotocols.
MostmodernPLCscancommunicateoveranetworktosomeothersystem,suchasacomputerrunninga
SCADA(SupervisoryControlAndDataAcquisition)systemorwebbrowser.
http://en.wikipedia.org/wiki/Programmable_logic_controller

5/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

PLCsusedinlargerI/Osystemsmayhavepeertopeer(P2P)communicationbetweenprocessors.This
allowsseparatepartsofacomplexprocesstohaveindividualcontrolwhileallowingthesubsystemstoco
ordinateoverthecommunicationlink.ThesecommunicationlinksarealsooftenusedforHMIdevicessuch
askeypadsorPCtypeworkstations.
Formerly,somemanufacturersoffereddedicatedcommunicationmodulesasanaddonfunctionwherethe
processorhadnonetworkconnectionbuiltin.

Programming
PLCprogramsaretypicallywritteninaspecialapplicationonapersonalcomputer,thendownloadedbya
directconnectioncableoroveranetworktothePLC.TheprogramisstoredinthePLCeitherinbattery
backedupRAMorsomeothernonvolatileflashmemory.Often,asinglePLCcanbeprogrammedto
replacethousandsofrelays.[7]
UndertheIEC611313standard,PLCscanbeprogrammedusingstandardsbasedprogramminglanguages.
AgraphicalprogrammingnotationcalledSequentialFunctionChartsisavailableoncertainprogrammable
controllers.InitiallymostPLCsutilizedLadderLogicDiagramProgramming,amodelwhichemulated
electromechanicalcontrolpaneldevices(suchasthecontactandcoilsofrelays)whichPLCsreplaced.This
modelremainscommontoday.
IEC611313currentlydefinesfiveprogramminglanguagesforprogrammablecontrolsystems:function
blockdiagram(FBD),ladderdiagram(LD),structuredtext(STsimilartothePascalprogramming
language),instructionlist(ILsimilartoassemblylanguage)andsequentialfunctionchart(SFC).[8]These
techniquesemphasizelogicalorganizationofoperations.[7]
WhilethefundamentalconceptsofPLCprogrammingarecommontoallmanufacturers,differencesinI/O
addressing,memoryorganizationandinstructionsetsmeanthatPLCprogramsareneverperfectly
interchangeablebetweendifferentmakers.Evenwithinthesameproductlineofasinglemanufacturer,
differentmodelsmaynotbedirectlycompatible.

Security
PriortothediscoveryoftheStuxnetcomputervirusinJune2010,securityofPLCsreceivedlittleattention.
PLCsgenerallycontainarealtimeoperatingsystemsuchasOS9orVxWorksandexploitsforthese
systemsexistmuchastheydofordesktopcomputeroperatingsystemssuchasMicrosoftWindows.PLCs
canalsobeattackedbygainingcontrolofacomputertheycommunicatewith.[9]

Simulation
InordertoproperlyunderstandtheoperationofaPLC,itisnecessarytospendconsiderabletime
programming,testing,anddebuggingPLCprograms.PLCsystemsareinherentlyexpensive,anddown
timeisoftenverycostly.Inaddition,ifaPLCisprogrammedincorrectlyitcanresultinlostproductivity
anddangerousconditions.PLCsimulationsoftwareisavaluabletoolintheunderstandingandlearningof
PLCsandtokeepthisknowledgerefreshedanduptodate.TheadvantagesofusingPLCsimulationtools

http://en.wikipedia.org/wiki/Programmable_logic_controller

6/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

suchasPLCLogixarethattheysavetimeinthedesignofautomatedcontrolapplicationsandtheycanalso
increasethelevelofsafetyassociatedwithequipmentsincevarious"whatif"scenarioscanbetriedand
testedbeforethesystemisactivated.[10]

Redundancy
Somespecialprocessesneedtoworkpermanentlywithminimumunwanteddowntime.Therefore,itis
necessarytodesignasystemwhichisfaulttolerantandcapableofhandlingtheprocesswithfaulty
modules.Insuchcasestoincreasethesystemavailabilityintheeventofhardwarecomponentfailure,
redundantCPUorI/Omoduleswiththesamefunctionalitycanbeaddedtohardwareconfigurationfor
preventingtotalorpartialprocessshutdownduetohardwarefailure.

PLCcomparedwithothercontrolsystems
PLCsarewelladaptedtoarangeofautomationtasks.Theseare
typicallyindustrialprocessesinmanufacturingwherethecostof
developingandmaintainingtheautomationsystemishighrelativeto
thetotalcostoftheautomation,andwherechangestothesystem
wouldbeexpectedduringitsoperationallife.PLCscontaininputand
outputdevicescompatiblewithindustrialpilotdevicesandcontrols
littleelectricaldesignisrequired,andthedesignproblemcenterson
expressingthedesiredsequenceofoperations.PLCapplicationsare
AllenBradleyPLCinstalledina
typicallyhighlycustomizedsystems,sothecostofapackagedPLCis
controlpanel
lowcomparedtothecostofaspecificcustombuiltcontrollerdesign.
Ontheotherhand,inthecaseofmassproducedgoods,customized
controlsystemsareeconomical.Thisisduetothelowercostofthecomponents,whichcanbeoptimally
choseninsteadofa"generic"solution,andwherethenonrecurringengineeringchargesarespreadover
thousandsormillionsofunits.
Forhighvolumeorverysimplefixedautomationtasks,differenttechniquesareused.Forexample,a
consumerdishwasherwouldbecontrolledbyanelectromechanicalcamtimercostingonlyafewdollarsin
productionquantities.
Amicrocontrollerbaseddesignwouldbeappropriatewherehundredsorthousandsofunitswillbe
producedandsothedevelopmentcost(designofpowersupplies,input/outputhardwareandnecessary
testingandcertification)canbespreadovermanysales,andwheretheenduserwouldnotneedtoalterthe
control.Automotiveapplicationsareanexamplemillionsofunitsarebuilteachyear,andveryfewend
usersaltertheprogrammingofthesecontrollers.However,somespecialtyvehiclessuchastransitbuses
economicallyusePLCsinsteadofcustomdesignedcontrols,becausethevolumesarelowandthe
developmentcostwouldbeuneconomical.[11]
Verycomplexprocesscontrol,suchasusedinthechemicalindustry,mayrequirealgorithmsand
performancebeyondthecapabilityofevenhighperformancePLCs.Veryhighspeedorprecisioncontrols
mayalsorequirecustomizedsolutionsforexample,aircraftflightcontrols.Singleboardcomputersusing
semicustomizedorfullyproprietaryhardwaremaybechosenforverydemandingcontrolapplications

http://en.wikipedia.org/wiki/Programmable_logic_controller

7/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

wherethehighdevelopmentandmaintenancecostcanbesupported."SoftPLCs"runningondesktoptype
computerscaninterfacewithindustrialI/Ohardwarewhileexecutingprogramswithinaversionof
commercialoperatingsystemsadaptedforprocesscontrolneeds.[11]
Programmablecontrollersarewidelyusedinmotioncontrol,positioningcontrolandtorquecontrol.Some
manufacturersproducemotioncontrolunitstobeintegratedwithPLCsothatGcode(involvingaCNC
machine)canbeusedtoinstructmachinemovements.
PLCsmayincludelogicforsinglevariablefeedbackanalogcontrolloop,aproportional,integral,
derivative(PID)controller.APIDloopcouldbeusedtocontrolthetemperatureofamanufacturing
process,forexample.HistoricallyPLCswereusuallyconfiguredwithonlyafewanalogcontrolloops
whereprocessesrequiredhundredsorthousandsofloops,adistributedcontrolsystem(DCS)wouldinstead
beused.AsPLCshavebecomemorepowerful,theboundarybetweenDCSandPLCapplicationshas
becomelessdistinct.
PLCshavesimilarfunctionalityasremoteterminalunits(RTU).AnRTU,however,usuallydoesnot
supportcontrolalgorithmsorcontrolloops.Ashardwarerapidlybecomesmorepowerfulandcheaper,
RTUs,PLCsandDCSsareincreasinglybeginningtooverlapinresponsibilities,andmanyvendorssell
RTUswithPLClikefeaturesandviceversa.TheindustryhasstandardizedontheIEC611313functional
blocklanguageforcreatingprogramstorunonRTUsandPLCs,althoughnearlyallvendorsalsooffer
proprietaryalternativesandassociateddevelopmentenvironments.
Inrecentyears"safety"PLCshavestartedtobecomepopular,eitherasstandalonemodelsoras
functionalityandsafetyratedhardwareaddedtoexistingcontrollerarchitectures(AllenBradley
Guardlogix,SiemensFseriesetc.).ThesedifferfromconventionalPLCtypesasbeingsuitableforusein
safetycriticalapplicationsforwhichPLCshavetraditionallybeensupplementedwithhardwiredsafety
relays.Forexample,asafetyPLCmightbeusedtocontrolaccesstoarobotcellwithtrappedkeyaccess,
orperhapstomanagetheshutdownresponsetoanemergencystoponaconveyorproductionline.Such
PLCstypicallyhavearestrictedregularinstructionsetaugmentedwithsafetyspecificinstructionsdesigned
tointerfacewithemergencystops,lightscreensandsoforth.Theflexibilitythatsuchsystemsofferhas
resultedinrapidgrowthofdemandforthesecontrollers.

Discreteandanalogsignals
Discretesignalsbehaveasbinaryswitches,yieldingsimplyanOnorOffsignal(1or0,TrueorFalse,
respectively).Pushbuttons,Limitswitches,andphotoelectricsensorsareexamplesofdevicesprovidinga
discretesignal.Discretesignalsaresentusingeithervoltageorcurrent,whereaspecificrangeisdesignated
asOnandanotherasOff.Forexample,aPLCmightuse24VDCI/O,withvaluesabove22VDC
representingOn,valuesbelow2VDCrepresentingOff,andintermediatevaluesundefined.Initially,PLCs
hadonlydiscreteI/O.
Analogsignalsarelikevolumecontrols,witharangeofvaluesbetweenzeroandfullscale.Theseare
typicallyinterpretedasintegervalues(counts)bythePLC,withvariousrangesofaccuracydependingon
thedeviceandthenumberofbitsavailabletostorethedata.AsPLCstypicallyuse16bitsignedbinary
processors,theintegervaluesarelimitedbetween32,768and+32,767.Pressure,temperature,flow,and
weightareoftenrepresentedbyanalogsignals.Analogsignalscanusevoltageorcurrentwithamagnitude
proportionaltothevalueoftheprocesssignal.Forexample,ananalog010Vinputor420mAwouldbe
convertedintoanintegervalueof032767.
http://en.wikipedia.org/wiki/Programmable_logic_controller

8/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

Currentinputsarelesssensitivetoelectricalnoise(i.e.fromweldersorelectricmotorstarts)thanvoltage
inputs.

Example
Asanexample,sayafacilityneedstostorewaterinatank.Thewaterisdrawnfromthetankbyanother
system,asneeded,andourexamplesystemmustmanagethewaterlevelinthetankbycontrollingthe
valvethatrefillsthetank.Shownisa"ladderdiagram"whichshowsthecontrolsystem.Aladderdiagram
isamethodofdrawingcontrolcircuitswhichpredatesPLCs.Theladderdiagramresemblestheschematic
diagramofasystembuiltwithelectromechanicalrelays.Shownare:
Twoinputs(fromthelowandhighlevelswitches)representedbycontactsofthefloatswitches
Anoutputtothefillvalve,labelledasthefillvalvewhichitcontrols
An"internal"contact,representingtheoutputsignaltothefillvalvewhichiscreatedintheprogram.
Alogicalcontrolschemecreatedbytheinterconnectionoftheseitemsinsoftware
Inladderdiagram,thecontactsymbolsrepresentthestateofbitsinprocessormemory,whichcorresponds
tothestateofphysicalinputstothesystem.Ifadiscreteinputisenergized,thememorybitisa1,anda
"normallyopen"contactcontrolledbythatbitwillpassalogic"true"signalontothenextelementofthe
ladder.Therefore,thecontactsinthePLCprogramthat"read"orlookatthephysicalswitch
contactsinthiscasemustbe"opposite"oropeninordertoreturnaTRUEfortheclosedphysical
switches.Internalstatusbits,correspondingtothestateofdiscreteoutputs,arealsoavailabletothe
program.
Intheexample,thephysicalstateofthefloatswitchcontactsmustbeconsideredwhenchoosing"normally
open"or"normallyclosed"symbolsintheladderdiagram.ThePLChastwodiscreteinputsfromfloat
switches(LowLevelandHighLevel).Bothfloatswitches(normallyclosed)opentheircontactswhenthe
waterlevelinthetankisabovethephysicallocationoftheswitch.
Whenthewaterlevelisbelowbothswitches,thefloatswitchphysicalcontactsarebothclosed,andatrue
(logic1)valueispassedtotheFillValveoutput.Waterbeginstofillthetank.Theinternal"FillValve"
contactlatchesthecircuitsothatevenwhenthe"LowLevel"contactopens(asthewaterpassesthelower
switch),thefillvalveremainson.SincetheHighLevelisalsonormallyclosed,watercontinuestoflowas
thewaterlevelremainsbetweenthetwoswitchlevels.Oncethewaterlevelrisesenoughsothatthe"High
Level"switchisoff(opened),thePLCwillshuttheinlettostopthewaterfromoverflowingthisisan
exampleofsealin(latching)logic.Theoutputissealedinuntilahighlevelconditionbreaksthecircuit.
AfterthatthefillvalveremainsoffuntiltheleveldropssolowthattheLowLevelswitchisactivated,and
theprocessrepeatsagain.

|(N.C.physical(N.C.physical|
|Switch)Switch)|
|LowLevelHighLevelFillValve|
|[]|[](OUT)|
|||
|||
|||
|FillValve||
|[]||
||
http://en.wikipedia.org/wiki/Programmable_logic_controller

9/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

||

Acompleteprogrammaycontainthousandsofrungs,evaluatedinsequence.TypicallythePLCprocessor
willalternatelyscanallitsinputsandupdateoutputs,thenevaluatetheladderlogicinputchangesduringa
programscanwillnotbeeffectiveuntilthenextI/Oupdate.Acompleteprogramscanmaytakeonlyafew
milliseconds,muchfasterthanchangesinthecontrolledprocess.
Programmablecontrollersvaryintheircapabilitiesfora"rung"ofaladderdiagram.Someonlyallowa
singleoutputbit.Therearetypicallylimitstothenumberofseriescontactsinline,andthenumberof
branchesthatcanbeused.Eachelementoftherungisevaluatedsequentially.Ifelementschangetheirstate
duringevaluationofarung,hardtodiagnosefaultscanbegenerated,althoughsometimes(asabove)the
techniqueisuseful.Someimplementationsforcedevaluationfromlefttorightasdisplayedanddidnot
allowreverseflowofalogicsignal(inmultibranchedrungs)toaffecttheoutput.

Seealso
Industrialcontrolsystems
Industrialsafetysystems

References
1. ^E.A.Parr,IndustrialControlHandbook,IndustrialPressInc.,1999ISBN0831130857
2. ^abM.A.Laughton,D.J.Warne(ed),ElectricalEngineer'sReferencebook,16thedition,Newnes,2003
Chapter16ProgrammableController
3. ^"Thefatherofinvention:DickMorleylooksbackonthe40thanniversaryofthePLC"
(http://www.automationmag.com/programablecontrol/features/thefatherofinventiondickmorleylooksback
onthe40thanniversaryoftheplc.html).ManufacturingAutomation.12September2008.
4. ^Harms,ToniM.&Kinner,RussellH.P.E.,EnhancingPLCPerformancewithVisionSystems.18thAnnual
ESD/HMIInternationalProgrammableControllersConferenceProceedings,1989,p.387399.
5. ^Maher,MichaelJ.RealTimeControlandCommunications.18thAnnualESD/SMIInternational
ProgrammableControllersConferenceProceedings,1989,p.431436.
6. ^Kinner,RussellH.,P.E.DesigningProgramableControllerApplicationProgramsUsingMorethanOne
Designer.14thAnnualInternationalProgrammableControllersConferenceProceedings,1985,p.97110.
7. ^abW.Bolton,ProgrammableLogicControllers,FifthEdition,Newnes,2009ISBN9781856177511,
Chapter1
8. ^Keller,WilliamLJr.Grafcet,AFunctionalChartforSequentialProcesses,14thAnnualInternational
ProgrammableControllersConferenceProceedings,1984,p.7196.
9. ^[1](http://www.tofinosecurity.com/blog/plcsecurityriskcontrolleroperatingsystems)
10. ^PLCsimulationreference(http://books.google.ca/books?
id=CHYlTBxqrM8C&pg=PA553&dq=plc+simulation+software&hl=en&sa=X&ei=kVAVU
yDB6OOyAG02oDoAg&ved=0CEIQ6AEwAQ#v=onepage&q=plc%20simulation%20software&f=false)
11. ^abGregoryK.McMillan,DouglasM.Considine(ed),Process/IndustrialInstrumentsandControlsHandbook
http://en.wikipedia.org/wiki/Programmable_logic_controller

10/11

10/2/2015

ProgrammablelogiccontrollerWikipedia,thefreeencyclopedia

FifthEdition,McGrawHill,1999ISBN0070125821Section3Controllers

Furtherreading
DanielKandray,ProgrammableAutomationTechnologies,IndustrialPress,2010ISBN97808311
33467,Chapter8IntroductiontoProgrammableLogicControllers

Externallinks
PLCCompleteTutorial(http://www.mbcurl.me/6MDE)
PLCFAQ's
(http://support.automationdirect.com/faq/index.html)
Retrievedfrom"http://en.wikipedia.org/w/index.php?
title=Programmable_logic_controller&oldid=645310178"

Wikiversityhaslearning
materialsabout
Programmablelogic
controller(basics)
WikimediaCommonshas
mediarelatedto
Programmablelogic
controller.

Categories: Automation Industrialcomputing


Thispagewaslastmodifiedon2February2015,at14:41.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmay
apply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisa
registeredtrademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.

http://en.wikipedia.org/wiki/Programmable_logic_controller

11/11

S-ar putea să vă placă și