Sie sind auf Seite 1von 51

PLCHANDBOOK

Chapter1:INTRODUCTIONTOPLCs

WhatdoesPLCmean? A PLC (Programmable Logic Controllers) is an industrial computer used to monitor inputs, and dependingupontheirstatemake decisionsbasedonitsprogramor logic,tocontrol(turnon/off) its outputstoautomateamachineoraprocess. NEMAdefinesaPROGRAMMABLELOGICCONTROLLERas: Adigitallyoperatingelectronicapparatuswhichusesaprogrammablememoryfortheinternalstorage of instructions by implementing specific functions such as logic sequencing, timing, counting, and arithmetic to control, through digital or analog input/output modules, various types of machines or processes. TraditionalPLCApplications Inautomatedsystem,PLCcontrollerisusuallythecentralpartofaprocesscontrolsystem. TorunmorecomplexprocessesitispossibletoconnectmorePLCcontrollerstoacentralcomputer. DisadvantagesofPLCControl Toomuchworkrequiredinconnectingwires. Difficultywithchangesorreplacements. Difficultyinfindingerrors;requiringskillfulworkforce. Whenaproblemoccurs,holduptimeisindefinite,usuallylong. AdvantagesofPLCcontrol Ruggedanddesignedtowithstandvibrations,temperature,humidity,andnoise. Haveinterfacingforinputsandoutputsalreadyinsidethecontroller. Easilyprogrammedandhaveaneasilyunderstoodprogramminglanguage. MajorTypesofIndustrialControlSystems Industrial control system or ICS comprise of different types of control systems that are currently in operationinvariousindustries.ThesecontrolsystemsincludePLC,SCADAandDCSandvariousothers: PLC TheyarebasedontheBooleanlogicoperationswhereassome modelsusetimersandsomehave continuouscontrol.Thesedevicesarecomputerbasedandareusedtocontrolvariousprocessand equipmentswithinafacility.PLCscontrolthecomponentsintheDCSandSCADAsystemsbutthey areprimarycomponentsinsmallercontrolconfigurations. DCS DistributedControlSystemsconsistsofdecentralizedelementsandalltheprocessesarecontrolled bytheseelements.Humaninteractionisminimizedsothelaborcostsandinjuriescanbereduced. EmbeddedControl Inthiscontrolsystem,smallcomponentsareattachedtotheindustrialcomputersystemwiththe helpofanetworkandcontrolisexercised. SCADA SupervisoryControlAndDataAcquisitionreferstoacentralizedsystemandthissystemiscomposed ofvarioussubsystemslikeRemoteTelemetryUnits,HumanMachineInterface,ProgrammableLogic ControllerorPLCandCommunications. 2

Chapter2:PLCHISTORY
PLCdevelopmentbeganin1968inresponsetoarequestfromanUScarmanufacturer(GE).Thefirst PLCswereinstalledinindustryin1969. Communicationsabilitiesbegantoappearinapproximately1973.Theycouldalsobeusedinthe70sto sendandreceivevaryingvoltagestoallowthemtoentertheanalogworld. The 80s saw an attempt to standardize communications with manufacturing automation protocol (MAP), reduce the size of the PLC, and making them software programmable through symbolic programming on personal computers instead of dedicated programming terminals or handheld programmers. The90shaveseenagradualreductionintheintroductionofnewprotocols,andthemodernizationof thephysicallayersofsomeofthemorepopularprotocolsthatsurvivedthe1980s. The latest standard IEC 11313 has tried to merge PLC programming languages under one international standard. Wenow have PLCs that are programmable in function block diagrams, instructionlists,Candstructuredtextallatthesametime. 3

Chapter3:PLCHARDWARE
HardwareComponentsofaPLCSystem Processor unit (CPU), Memory, Input/Output, Power supply unit, Programming device, and other devices.

CentralProcessingUnit(CPU) CPU Microprocessor based, may allow arithmetic operations, logic operators, block memory moves,computerinterface,localareanetwork,functions,etc. CPU makes a great number of checkups of the PLC controller itself so eventual errors would be discoveredearly. SystemBusses TheinternalpathsalongwhichthedigitalsignalsflowwithinthePLCarecalledbusses. Thesystemhas fourbusses: TheCPUusesthedatabusforsendingdatabetweenthedifferentelements Theaddressbustosendtheaddressesoflocationsforaccessingstoreddata Thecontrolbusforsignalsrelatingtointernalcontrolactions ThesystembusisusedforcommunicationsbetweentheI/OportsandtheI/Ounit. Memory System(ROM)togivepermanentstoragefortheoperatingsystemandthefixeddatausedbytheCPU. RAM for data. This is where information is stored on the status of input and output devices and the valuesoftimersandcountersandotherinternaldevices.EPROMforROMsthatcanbeprogrammed andthentheprogrammadepermanent. I/OSections Inputsmonitorfielddevices,suchasswitchesandsensors. Outputscontrolotherdevices,suchasmotors,pumps,solenoidvalves,andlights. PowerSupply MostPLCcontrollersworkeitherat24VDCor220VAC.SomePLCcontrollershaveelectricalsupplyas aseparatemodule,whilesmallandmediumseriesalreadycontainthesupplymodule. ProgrammingDevice Theprogrammingdeviceisusedtoentertherequiredprogramintothememoryoftheprocessor. Theprogramisdevelopedintheprogrammingdeviceandthentransferredtothememoryunitof thePLC. 4

Chapter4:PLCOPERATION
InputRelays These are connected to the outside world. They physically exist and receive signals from switches, sensors,etc.Typicallytheyarenotrelaysbutrathertheyaretransistors. InternalUtilityRelays These do not receive signals from the outside world nor dothey physically exist. They aresimulated relaysandarewhatenablesaPLCtoeliminateexternalrelays.Therearealsosomespecialrelaysthat arededicatedtoperformingonlyonetask. Counters These do not physically exist. They are simulated counters and they can be programmed to count pulses. Typically these counters can count up, down or both up and down. Since they are simulated theyarelimitedintheircountingspeed.Somemanufacturersalsoincludehighspeedcountersthatare hardwarebased. Timers These also do not physically exist. They come in many varieties and increments. The most common type is an ondelay type. Others include offdelay and both retentive and nonretentive types. Incrementsvaryfrom1msthrough1s. OutputRelays Theseareconnectedtotheoutsideworld.Theyphysicallyexistandsendon/offsignalstosolenoids, lights,etc.Theycanbetransistors,relays,ortriacsdependinguponthemodelchosen. DataStorage Typicallythereareregistersassignedtosimplystoredata,usuallyusedastemporarystorageformath ordatamanipulation.Theycanalsotypicallybeusedtostoredatawhenpowerisremovedfromthe PLC. 5

Chapter5:PLCCOMMUNICATIONS
ExtensionModules PLC I/O number can be increased through certain additional modules by system extension through extension lines. Each module can contain extension both of input and output lines. ExtensionmodulescanhaveinputsandoutputsofadifferentnaturefromthoseonthePLCcontroller. WhentherearemanyI/OlocatedconsiderabledistancesawayfromthePLCaneconomicsolutionisto useI/Omodulesandusecablestoconnectthese,overthelongdistances,tothePLC. RemoteI/Oconnections: WhentherearemanyI/OlocatedconsiderabledistancesawayfromthePLCaneconomicsolutionisto useI/Omodulesandusecablestoconnectthese,overthelongdistances,tothePLC. RemotePLCs In some situations a number of PLCs may be linked together with a master PLC unit sending and receivingI/Odatafromtheotherunits. Cables Twistedpaircabling,oftenroutedthroughsteelconduit.Coaxialcableenableshigherdataratestobe transmittedanddoesnotrequiretheshieldingofsteelconduit.Fiberopticcablinghastheadvantage ofresistancetonoise,smallsizeandflexibility. ParallelCommunication Parallelcommunicationiswhenalltheconstituentbitsofawordaresimultaneouslytransmittedalong parallelcables.Thisallowsdatatobetransmittedovershortdistancesathighspeeds.Mightbeused whenconnectinglaboratoryinstrumentstothesystem. ParallelStandards: ThestandardinterfacemostcommonlyusedforparallelcommunicationisIEEE488,andnowtermed asGeneralPurposeInstrumentBus(GPIB). Parallel data communications can take place between listeners, talkers and controllers. There are 24 lines:8data(bidirectional),5status&control,3handshakingand8groundlines. SerialCommunication Serialcommunicationiswhendataistransmittedonebitatatime.Adatawordhastobeseparated into its constituent bits for transmission and then reassembled into the word when received. Serial communication is used for transmitting data over long distances. Might be used for the connection betweenacomputerandaPLC. SerialStandards: RS232communicationsisthemostpopularmethodofPLCtoexternaldevicecommunications.RS232 isacommunicationinterfaceincludedunderSCADAapplications.OtherstandardssuchasRS422and RS423aresimilartoRS232althoughtheypermithighertransmissionratesandlongercabledistances. Thereare2typesofRS232devices: DTEDataTerminalEquipmentandacommonexampleisacomputer. DCEDataCommunicationsEquipmentandacommonexampleisamodem. PLCmaybeeitheraDTEorDCEdevice. ASCII ASCIIisahumanreadabletocomputerreadabletranslationcode(eachletter/numberistranslatedto 1sand0s).Itsa7bitcode,sowecantranslate128characters(2^7is128). 6

Protocols

It is necessary to exercise control of the flow of data between two devices so what constitutes the message, and how the communication is to be initiated and terminated, is defined. This is termed the protocol.
Onedeviceneedstoindicatetotheothertostartorstopsendingdata.Interconnectingseveraldevices canpresentproblemsbecauseofcompatibilityproblems. In order to facilitate communications between different devices the International Standard Organization (ISO) in 1979 devised a model to be used for standardization for Open System Interconnection(OSI). START/STOPBits STARTBitisasynchronizingbitaddedjustbeforeeachcharacterwearesending.Thisisconsidered aSPACEornegativevoltageora0. STOPBittellsusthatthelastcharacterwasjustsent.ThisisconsideredaMARKorpositivevoltage ora1. ParityBit ParityBitisaddedtocheckwhethercorruptionhasoccurred.Commonformsofparityare:None,Even, andOdd.Duringtransmission,thesendercalculatestheparitybitandsendsit.Thereceivercalculates parity for the character and compares the result to the parity bit received. If the calculated and real paritybitsdontmatch,anerroroccurredandweactappropriately. BaudRate Itisthenumberofbitspersecondthatarebeingtransmittedorreceived.Commonvalues(speeds)are 1200,2400,4800,9600,19200,and38400. RS232DataFormat RS232dataformat(baudratedatabitsparitystopbits).96008N1meansabaudrateof9600,8data bits,parityofNone,and1stopbit. SoftwareHandshaking Softwarehandshaking(flowcontrol)isusedtomakesurebothdevicesarereadytosend/receivedata. ThemostpopularcharacterflowcontroliscalledXON/XOFF.ThereceiversendstheXOFFcharacter whenitwantsthetransmittertopausesendingdata.Whenitsreadytoreceivedataagain,itsendsthe transmittertheXONcharacter. STX&ETX SometimesanSTXandETXpairisusedfortransmission/receptionaswell.STXisstartoftextandETX isendoftext.TheSTXissentbeforethedataandtellstheexternaldevicethatdataiscoming.After allthedatahasbeensent,anETXcharacterissent. ACK/NAKPair Thetransmittersendsitsdata.Ifthereceivergetsitwithouterror,itsendsbackanACKcharacter.If therewasanerror,thereceiversendsbackaNAKcharacterandthetransmitterresendsthedata. 7

Chapter6:RS232COMMUNICATIONS
RS232 is an asynchronous communications method (a marching band must be in sync witheachothersothatwhenonestepstheyallstep.Theyareasynchronous inthattheyfollowthe bandleadertokeeptheirtiming). We use a binary system to transmit our data in the ASCII format. PLCs serial port is used for transmission/receptionofthedata,itworksbysending/receivingavoltage,WithRS232,normally,a1 bit is representedbyavoltage12 V,anda 0byavoltage+12 V (The voltage between+/ 3 volts is considered). Thereare2typesofRS232devices: DTEDataTerminalEquipmentandacommonexampleisacomputer. DCEDataCommunicationsEquipmentandacommonexampleisamodem. PLCmaybeeitheraDTEorDCEdevice. WhenPLCandexternaldevicearebothDTE,(orbothDCE)devicestheycanttalktoeachother.The solutionistouseanullmodemconnection.Usually,thePLCisDTEandtheexternaldeviceisDCE. UsingRS232withPLC Some manufacturers include RS232 communication capability in the main processor. Some use the programmingportforthis.OthersrequireaspecialmoduletotalkRS232withanexternaldevice. External device may be an operator interface, an external computer, a motor controller, a robot, a visionsystem,etc. TocommunicateviaRS232wehavetosetup: Where,indatamemory,willwestorethedatatobesent? Where,indatamemory,willweputthedatawereceivefromtheexternaldevice? 8

Chapter7:ISO/OSIMODEL
Interconnectingseveraldevices can presentproblemsbecause of compatibility problems. In order to facilitate communications between different devices the International Standard Organization (ISO) devisedanISO/OSImodeltobeusedforstandardizationforOpenSystemInterconnection(OSI). Acommunicationlinkbetweenitemsofdigitalequipmentisdefinedintermsof: Physical Electrical Protocol Userstandards

Each layer is selfcontained and only deals with the interfaces of the layer immediately above and below.Itperformsitstasks andtransfers itsresultstothelayer aboveorthelayerbelow.Itenables manufacturersofproductstodesignproductsoperableinaparticularlayerthatwillinterfacewiththe hardwareofothermanufacturers. 9

Chapter8:ISO/OSIPROTOCOLS
ControlNet TheControlNetnetworkusestheCommonIndustrialProtocol(CIP)tocombinethefunctionalityofan I/O network and a peertopeer network. ControlNet take precedence over program uploads and downloadsandmessaging.Itsupportsamaximumof99nodes. DeviceNet DeviceNet is mainlyused in industrial and process automation. It is based on CANtechnology. It is a lowcostcommunicationlinktoconnectindustrialdevicestoanetworkandeliminateexpensivehard wiring.Powerandcommunicationsuppliedovera4wirebus.Itsupportsupto62devicesonthesame busnetwork. MODBUS MODBUSisanopen,serialcommunicationprotocolbasedonthemaster/slavearchitecture.Thebus consistsofamasterstation,controllingthecommunication,andofanumberofslavestations. MODBUS is an application layer messaging protocol, positioned at level 7 of the OSI model, that provides client/server communication between devices connected on different types of buses or networks.MODBUSisusedtomonitorandprogramdevices;tocommunicateintelligentdeviceswith sensorsandinstruments;tomonitorfielddevicesusingPCsandHMIs.MODBUSisanidealprotocolfor RTUapplicationswherewirelesscommunicationisrequired. MODBUSofferstwobasiccommunicationmechanisms: Question/Answer(polling)The mastersendsan inquiry to anyof the stations, andwaits forthe answer. BroadcastThemastersendsacommandtoallthestationsonthenetwork,andtheseexecutethe commandwithoutprovidingfeedback. SerialTransmissionModesofMODBUSNetworks Thetransmissionmodedefinesthebitcontentsofthemessagebytestransmittedalongthenetwork, andhowthemessageinformationistobepackedintothemessagestreamanddecoded.Themodeof transmissionisusuallyselectedwithotherserialportcommunicationparametersaspartofthedevice configuration. StandardMODBUSNetworksEmploy ASCIIModeEachcharacterbyteinamessageissentas2ASCIIcharacters.Thismodeallowstime intervalofuptoasecondbetweencharactersduringtransmissionwithoutgeneratingerrors. RTUModeEach8bitmessagebytecontainstwo4bithexadecimalcharacters,andthemessageis transmitted in a continuous stream. The greater effective character density increases throughput overASCIImodeatthesamebaudrate. PROFIBUS PROFIBUSDPpurposeisforlargerdeviceslikePCsandPLCstotalkwithmultiplesmallerdeviceslike sensors,drives,valves,etc.ItusesRS485fortransmissionofdata.Itusesashieldedtwistedpaircable andenablesdatatransmissionspeedsupto12Mbit/sec. Amaximumof9segments(trunkline)areallowedonanetwork.Thedevicesarethebranchescoming offthetrunkline.Upto32individualdevicescanbeconnectedtoasinglesegment.Thatnumbercan be expanded up to 126 if repeaters are used. Each PROFIBUS segment can be a maximum of 1200 metersinlength.Thereare10definedcommunicationspeedsandeachhasamaximumdefinedcable lengththatspermitted.

10

Master/Slave PROFIBUSusesamaster/slaveconfigurationforcommunication.Itisusuallyasinglemasterdevice(a PLC)thattalkswithmultipleslavedevices(sensors).Themasterdevicespolltheslaveswhentheyhave thetoken.Slavedevicesonlyanswerwhenaskedaquestion.Theyarepassiveandthemastercanbe saidtobeactive.Theslavedevicesjustcollectdataandpassittothemasterdevicewhenaskedtodo so. Ethernet EthernetisoneofthemostwidelyimplementedLANarchitecture.Itusesabus,starortreetopologies. ItusestheCSMA/CDaccessmethodtohandlesimultaneousdemands.Itsupportsdatatransferratesof 10Mbps,FastEthernet(100BaseT)100Mbps,andGigabitEthernet1000Mbps. CarrierSenseMultipleAccess/CollisionDetection(CSMA/CD) This is a system where each computer listens to the cable before sending anything through the network. If the network is clear, the computer will transmit. If some other node is already transmittingonthecable,thecomputerwillwaitandtryagainwhenthelineisclear. TCP/IPProtocol Most manufacturers who offer Ethernet compatibility to implement supervisory functions over equipment controlling plant floor functions use a transmission control protocol/internet protocol (TCP/IP) for layers 3 and 4 of the OSI model. Some PLC manufacturers offer programmable controllers with TCP/IP overEthernet protocol built into the PLC processor. This allows the PLC to connectdirectlytoasupervisoryEthernetnetwork.NotethatthePLCcanalsohaveacontrolnetwork withotherPLCs. 11

Chapter9:SINKING/SOURCINGI/O
Sinking and Sourcing terms are very important in connecting a PLC correctly with external environment. These terms are applied only for DC modules. The most brief definition of these two conceptswouldbe: SINKING=CommonGNDline() SOURCING=CommonVCCline(+) MostcommonlyusedDCmoduleoptionsinPLCsare: Sinkinginputmodule Sourcingoutputmodule

Sinking I/O circuits on the I/O modules receive (sink) current from sourcing field devices. Sinking outputmodulesusedforinterfacingwithelectronicequipment. SourcingI/Oarethesourcingoutputmodulesusedforinterfacingwithsolenoids. PLC AC I/O circuits accommodate either sinking or sourcing field devices. Solidstate DC I/O circuits requirethattheyusedinaspecificsinkingorsourcingcircuitdependingontheinternalcircuitry. PLCcontact(relay)outputcircuitsACorDCaccommodateeithersinkingorsourcingfielddevices. 12

Chapter10:PLCINPUTUNITS
Example of input lines can be connection of external input device. Sensor outputs can be different dependingonasensoritselfandalsoonaparticularapplication. Inpracticeweuseasystemofconnectingseveralinputs(oroutputs)toonereturnline.Thesecommon linesareusuallymarkedCOMMonthePLCcontrollerhousing. DCInputs DC input modules allow to connect either PNP (sourcing) or NPN (sinking) transistor type devices to them. When we are using a sensor have to worry about its output configuration. If we are using a regularswitch(toggleorpushbutton)wetypicallydonthavetoworryaboutwhetherwewireitasNPN orPNP. ACInputs AnACvoltageisnonpolarized.Mostcommonly,theACvoltageisbeingswitchedthroughalimitswitch or other switch type. AC input modules are less common than DC input modules, because todays sensorstypicallyhavetransistoroutputs.IfapplicationisusingasensoritprobablyisoperatingonaDC voltage. TypicalconnectionofanACdevicetoPLCinputmodule

TypicallyanACinputtakeslongerthanaDCinputforthePLCtosee.Inmostcasesitdoesntmatterto theprogrammer becausean AC inputdevice istypically a mechanical switch and mechanical devices areslow. ItsquitecommonforaPLCtorequirethattheinputbeonfor25ms(ormore)beforeitsseen.This delayisrequiredbecauseofthefilteringwhichisneededbythePLCinternalcircuit. 13

Chapter11:PLCOUTPUTUNITS
PLCOutputunitscanbe: Relay Transistor Triac CheckthespecificationsofloadbeforeconnectingittothePLCoutput. MakesurethatthemaximumcurrentitwillconsumeiswithinthespecificationsofthePLCoutput. RelayOutputs Oneofthemostcommontypesofoutputsavailableistherelayoutput.Existenceofrelaysasoutputs makes it easier to connect with external devices. A relay is nonpolarized and typically it can switch eitherACorDC. TransistorOutputs TransistortypeoutputscanonlyswitchaDCcurrent.ThePLCappliesasmallcurrenttothetransistor baseandthetransistoroutputcloses.Whenitsclosed,thedeviceconnectedtothePLCoutputwill beturnedon. A transistor typically cannot switch as large a load as a relay. If the load current you need to switch exceedsthespecificationoftheoutput,youcanconnectthePLCoutputtoanexternalrelay,andthen connecttherelaytothelargeload. Typically a PLC will have either NPN or PNP transistor type outputs. Some of the common types availableareBJTandMOSFET.ABJTtypeoftenhaslessswitchingcapacitythanaMOSFETtype.The BJTalsohasaslightlyfasterswitchingtime. Atransistorisfast,switchesasmallcurrent,hasalonglifetimeandworkswithDConly.Arelayisslow, canswitchalargecurrent,hasashorterlifetimeandworkswithACorDC. TriacOutput TriacoutputcanbeusedtocontrolACloadsonly.Triacoutputisfasterinoperationandhaslongerlife thanrelayoutput. Inductiveloadshaveatendencytodeliverabackcurrentwhentheyturnon.Thisbackcurrentislike avoltagespikecomingthroughthesystem.Thiscouldbedangeroustooutputrelays.Typicallyadiode, varistor,orothersnubbercircuitshouldbeusedtoprotectthePLCoutputfromanydamage. 14

Chapter12:PLCNETWORKS
As control systems become more complex, they require more effective communication schemes between the system components. Some machine and process control systems require that programmable controllers be interconnected, so that data can be passed among them easilytoaccomplishthecontroltask. Other systems require a plantwide communication system that centralizes functions, such as data acquisition,systemmonitoring,maintenancediagnostics,andmanagementproductionreporting,thus providingmaximumefficiencyandproductivity. LocalAreaNetworks The term local area network (LAN) is used to describe a communication network designed to link computers and their peripherals within the same building or site. A LAN is a highspeed, medium distancecommunicationsystem. FormostLANs,themaximumdistancebetweentwonodesinthenetworkisatleastonemile,andthe transmission speed ranges from 1 to 20 megabaud. Also, most local networks support at least 100 stations,ornodes. IndustrialNetwork AspecialtypeofLAN,theindustrialnetwork,isonewhichmeetsthefollowingcriteria: Capableofsupportingrealtimecontrol Highdataintegrity(errordetection) Highnoiseimmunity Highreliabilityinharshenvironments Suitableforlargeinstallations 15

Chapter13:PLCPROGRAMMING
ProgrammingLanguages AprogramloadedintoPLCsystemsinmachinecode,asequenceofbinarycodenumberstorepresent theprograminstructions. Assembly language based on the use of mnemonics can be used, and a computer program called an assemblerisusedtotranslatethemnemonicsintomachinecode. HighlevelLanguages(C,BASIC,etc.)canbeused. ProgrammingDevices PLCcanbereprogrammedthroughanappropriateprogrammingdevice: ProgrammingConsole PC HandProgrammer IntroductiontoLadderLogic Ladderlogicusesgraphicsymbolssimilartorelayschematiccircuitdiagrams.Ladderdiagramconsists of two vertical lines representing the power rails. Circuits are connected as horizontal lines between thesetwoverticals. LadderDiagramFeatures Powerflowsfromlefttoright. Outputonrightsidecannotbeconnecteddirectlywithleftside. Contactcannotbeplacedontherightofoutput. Eachrungcontainsoneoutputatleast. Eachoutputcanbeusedonlyonceintheprogram. Aparticularinputa/ooutputcanappearinmorethanonerungofaladder. Theinputsa/ooutputsareallidentifiedbytheiraddresses,thenotationuseddependingonthePLC manufacturer.

16

IntroductiontoStatementlist StatementlistisaprogramminglanguageusingmnemonicabbreviationsofBooleanlogicoperations. Booleanoperationsworkoncombinationofvariablesthataretrueorfalse. AstatementisaninstructionordirectiveforthePLC. StatementListOperations: Load(LD)instruction And(A)instruction Or(O)instruction Output(=)instruction FunctionBlockDiagrams Functionblockisrepresentedasaboxwiththefunctionnamewrittenin. Example:

Pleasenote: LD:load O:or AN:andnot(andanormallyclosedcontact) ALD:ANDthefirstLDwithsecondLD 17

Chapter14:PLCINSTRUCTIONS
FunctionsandInstructions Relaytype(Basic)instructions: I,O,OSR,SET,RES,T,C DataHandlingInstructions: DatamoveInstructionsMOV,COP,FLL,TOD,FRD,DEG,RAD(degreestoradian) ComparisoninstructionsEQU(equal),NEQ(notequal),GEQ(greaterthanorequal),GRT(greater than) Mathematicalinstructions ContinuousControlInstructions(PIDinstructions) Programflowcontrolinstructions: MCR(mastercontrolreset),JMP,LBL,JSR,SBR,RET,SUS,REF Specificinstructions: BSL, BSR (bit shift left/right), SQO (sequencer output), SQC (sequencer compare), SQL (sequencer load) Highspeedcounterinstructions: HSC,HSL,RES,HSE Communicationinstructions: MSQ,SVC ASCIIinstructions: ABL,ACB,ACI,ACL,CAN InternalRelays Auxiliaryrelays,markers,flags,coils,bitstorage.Usedtoholddata,andbehavelikerelays,beingable tobeswitchedonoroffandswitchotherdevicesonoroff.Theydonotexistasrealworldswitching devicesbutaremerelybitsinthestoragememory. InternalRelaysuse: Inprogramswithmultipleinputconditionsorarrangements.Forlatchingacircuitandforresettinga latchcircuit.GivingspecialbuiltinfunctionswithPLCs. Retentiverelays(batterybackedrelays) Such relays retain their state of activation, even when the power supply is off. They can be used in circuitstoensureasafeshutdownofplantintheeventofapowerfailureandsoenableittorestartin anappropriatemanner. LatchInstructions(SetandReset) The set instructioncauses therelay toselfhold, i.e. latch. It then remains in thatcondition untilthe reset instruction is received. The latch instruction is often called a SET or OTL (output latch). The unlatchinstructionisoftencalledaRES(reset),OTU(outputunlatch)orRST(reset). 18

Chapter15:PLCINSTRUCTIONSIITIMERS
Timers Timerisaninstructionthatwaitsasetamountoftimebeforedoingsomething(controltime).Timers countfractionsofsecondsorsecondsusingtheinternalCPUclock.Thetimedurationforwhichatimer hasbeensetistermedthepresetandissetinmultiplesofthetimebaseused. Mostmanufacturersconsidertimerstobehavelikerelayswithcoilswhichwhenenergizedresultinthe closureoropeningofcontactsaftersomepresettime.Thetimeristhustreatedasanoutputforarung with control being exercised over pairs of contacts elsewhere. Others treat a timer as a delay block whichwheninsertedinarungdelayssignalsinthatrungreachingtheoutput. TimersTypes OnDelaytimersimplydelaysturningon.ItiscalledTON,TIMorTMR. OffDelaytimersimplydelaysturningoff.ItiscalledTOFandislesscommonthantheondelay type. Theon/offdelaytimersabovewouldberesetiftheinputsensorwasnton/offforthecompletetimer duration. RetentiveorAccumulatingtimerholdsorretainsthecurrentelapsedtimewhenthesensorturnsoffin midstream.ItiscalledRTOorTMRA.Thistypeoftimerneeds2inputs. Weneedtoknow2thingswhenusingtimers: WhatwillenablethetimerTypicallythisisoneoftheinputs(asensorconnectedtooneinput). HowlongwewanttodelaybeforewereactWaitXsecondsbeforeweturnonaload. When the instructions before the timer symbol are true the timer starts ticking. When the time elapsesthetimerwillautomaticallycloseitscontacts. When the program is running on the PLC, the program typically displays the current value. Typically timerscantickfrom0to9999(16bitBCD)or0to65535times(16bitbinary). TimerAccuracy TherearesoftwareandHardwareErrorswhenusingatimer. SoftwareErrors: Inputerrordependsuponwhenthetimerinputturnsonduringthescancycle. Output error depends upon when in the ladder the timer actually times out and when the PLC finishesexecutingtheprogramtogettothepartofthescanwhenitupdatestheoutputs. Totalsoftwareerroristhesumofboththeinputandoutputerrors. HardwareErrors: Thereisahardwareinputerroraswellasahardwareoutputerror. ThehardwareinputerroriscausedbythetimeittakesforthePLCtoactuallyrealizethattheinput isonwhenitscansitsinputs.Typicallythisdurationisabout10ms(toeliminatenoiseorbouncing inputs). The hardware output error is caused by the time it takes from when the PLC tells its output to physically turn on until the moment it actually does. Typically a transistor takes about 0.5ms whereasamechanicalrelaytakesabout10ms. 19

Chapter16:PLCINSTRUCTIONSIIICOUNTERS
Counters A counter is set to some preset value and, when this value of input pulses has been received, it will operateitscontacts. ThecounteraccumulatedvalueONLYchangesattheofftoontransitionofthepulseinput.Typically counterscancountfrom0to9999,32,768to+32,767or0to65535. ThenormalcountersaretypicallysoftwarecounterstheydontphysicallyexistinthePLCbutrather they are simulated in software. A good rule of thumb is simply to always use the normal (software) countersunlessthepulsesyouarecountingwillarrivefasterthan2Xthescantime. CounterTypes Upcounterscountsfromzerouptothepresetvalue.ThesearecalledCTU,CNT,C,orCTR. Downcounterscountdownfromthepresetvaluetozero.ThesearecalledCTD. Updowncounterscountupand/ordown.ThesearecalledCTUD. ForCTUorCTDcounterweneed2inputs,butinCTUDweneed3(up,downandpreset). Tousecounterswemustknow3things: WherethepulsesthatwewanttocountarecomingfromTypicallythisisfromoneoftheinputs. Howmanypulseswewanttocountbeforewereact When/howwewillresetthecountersoitcancountagain CounterFormats Somemanufacturersconsiderthecounterasarelayandconsistoftwobasicelements: Onerelaycoiltocountinputpulses Onetoresetthecounter&theassociatedcontactsofthecounterbeingusedinotherrungs. Others(Siemensforexample)treatthecounterasanintermediateblockinarungfromwhichsignals emanatewhenthecountisattained. HighSpeedCounter Mostmanufacturersalsoincludealimitednumberofhighspeedcounters(HSC).Typicallyahighspeed counterisahardwaredevice.Hardwarecountersarenotdependentonscantime. Sequencers TheSequencerisaformofcounterthatisusedforsequentialcontrol.Itreplacesthemechanicaldrum sequencerthatwasusedtocontrolmachinesthathaveasteppedsequenceofrepeatableoperations. ThePLCsequencerconsistsofamastercounterthathasarangeofpresetscountscorrespondingtothe differentstepsandso,asitprogressesthroughthecount,wheneachpresetcountisreachedcanbe usedtocontroloutputs. 20

Chapter17:ADVANCEDINSTRUCTIONS
DataHandlingInstructions Timers,countersandindividualrelaysareallconcernedwiththehandlingofindividualbits,i.e.single onoff signal. PLC operations involve blocks of data representing a value, such blocks being termed words. Data handling consists of operations involving moving or transferring numeric information stored in onememorywordlocationtoanotherwordinadifferentlocation,comparingdatavaluesandcarrying outsimplearithmeticoperations. Aregisteriswheredatacanbestored.Eachdataregistercanstoreabinarywordofusually8or16bits. Thenumberofbitsdeterminesthesizeofthenumberthatcanbestored(2n1). Example: 4bitregistercanstoreapositivenumberbetween0and+15 8bitcanstoreapositivenumberbetween0and+255 16bitcanstoreapositivenumberbetween0and+65535 DataMovementInstructions Therearetypically2commoninstructionsets.ThesingleinstructioniscommonlycalledMOV(move) whichcopiesavaluefromoneaddresstoanother. TheMOVinstructionneedstoknow2things: Sourcewherethedatawewanttomoveislocated. Destinationthelocationwherethedatawillbemovedto. Wewriteanaddresshere.Also,thedatacanbemovedtothephysicaloutputs. DataComparison ThedatacomparisoninstructiongetsthePLCtocomparetwodatavalues.Thusitmightbetocompare adigitalvaluereadfromsomeinputdevicewithasecondvaluecontainedinaregister. PLCsgenerallycanmakecomparisonsfor: Lessthan(<orLESS) Equalto(=orEQU) Lessthanorequalto(<=orLEQ) Greaterthan(>orGRT) Greaterthanorequalto(>=orGEQ) Notequalto(NEQ) Arithmetic(mathematical)Instructions PLCsalmostalwaysincludemathfunctionstocarryoutsomearithmeticoperations: Addition(ADD)Thecapabilitytoaddonepieceofdatatoanother Subtraction(SUB)Thecapabilitytosubtractonepieceofdatafromanother Multiplication(MUL)Thecapabilitytomultiplyonepieceofdatabyanother Division(DIV)Thecapabilitytodivideonepieceofdatafromanother Overflow Typicallythememorylocationsare16bitlocations.Ifaresultisgreaterthanthevaluethatcouldbe storedinamemorylocationthenwegetanoverflow.ThePLCturnsonaninternalrelaythattellsusan overflow has happened. We get an overflow if the number is greater than 65535 (2^16=65536). DependingonthePLC,wewouldhavedifferentdatainthedestinationlocation.Someuse32bitmath whichsolvestheproblem.Ifweredoingdivision,andwedividebyzerotheoverflowbitturnson. 21

ContinuousControl(PIDInstruction) Continuouscontrolofsomevariablecanbeachievedbycomparingtheactualvalueofthevariablewith the desired set value and then giving an output depending on the control law required. Many PLCs providethe PIDcalculationtodetermine thecontrolleroutput as a standardroutine. All thatis then necessary is to pass the desired parameters, i.e. the values of Kp, Ki, and KD, and input/output locationstotheroutineviathePLCprogram. Controlinstructionsareusedtoenableordisableablockoflogicprogramortomoveexecutionofa programfromoneplacetoanotherplace. Thecontrolinstructionsinclude: MasterControlinstruction(MC/MCR) Jumptolabelinstruction(JMP) Labelinstruction(LBL) JumptoSubroutineinstruction(JSR) Subroutineinstruction(SBR) ReturnfromSubroutineinstruction(RET) ShiftRegisters MasterControl/MasterControlReset(MC/MCR) Whenlargenumbersofoutputshavetobecontrolled,itissometimesnecessaryforwholesectionsof programtobeturnedonoroffwhencertaincriteriaarerealized.Thiscouldbeachievedbyincludinga MCRinstruction.AMCRinstructionisanoutputinstruction. Themastercontrolinstructiontypicallyisusedinpairswithamastercontrolreset.Differentformats areusedbydifferentmanufacturers: MC/MCR(mastercontrol/mastercontrolreset) MCS/MCR(mastercontrolset/mastercontrolreset) MCR(mastercontrolreset) ThezonebeingcontrolledbeginswitharungthathasthefirstMCinstruction,whichstatusdependson itsrungcondition.ThiszoneendswitharungthathasthesecondMCRinstructiononly. WhentherungwiththefirstMCRinstructionistrue,thefirstMCRinstructionishighandtheoutputs oftherunginthecontrolledzonecanbeenergizedordeenergizedaccordingtotheirrungconditions. Whentherungisfalse,alltheoutputsinthezonearedeenergized,regardlesstheirrungconditions. TimersshouldnotbeusedinsidetheMC/MCRblockbecausesomemanufacturerswillresetthemto zerowhentheblockisfalsewhereasothermanufacturerswillhavethemretainthecurrenttimestate. Counterstypicallyretaintheircurrentcountedvalue. JumpInstructions TheJUMPinstructionsallowforbreakingtherungsequence&movetheprogramexecutionfromone rungtoanotherortoasubroutine.TheJumpisacontrolledoutputinstruction: Youcanjumpforwardorbackward Youcanusemultiplejumpstothesamelabel Jumpswithinjumpsarepossible,i.e.(a)JumptoLabel&(b)Jumptosubroutine 22

RETURN/END A Return from Subroutine instruction marks the end of Subroutine instruction. When the rung conditionofthisinstructionistrue,itcausesthePLCtoresumeexecutioninthecallingprogramfileat therungfollowingtheJumptoSubroutineinstructioninthecallingprogram. WhenaReturnfromSubroutineinstructionisnotprogrammedinasubroutinefile,theENDinstruction automatically causes the PLC to move execution back to the rung following the Jump to Subroutine instruction. A Jump to Subroutine instruction can be used either in a main application program or a subroutineprogramtocallanothersubroutineprogram. ShiftRegisters Theshiftregisterisanumberofinternalrelaysgroupedtogether(normally8,16,or32)whichallow storedbitstobeshiftedfromonerelaytoanother.Thegroupingtogetherofinternalrelaystoforma shiftregisterisdoneautomaticallybyaPLCwhentheshiftregisterfunctionisselected.Thisisdoneby using the programming code against the internal relay number that is to be the first in the register array. Shift registerscanbeused wherea sequence ofoperations is requiredorto keeptrack of particular itemsinaproductionsystem.Theshiftregisterismostcommonlyusedinconveyorsystems,labelingor bottlingapplications,etc. 23

Chapter18:PROGRAMMINGEXAMPLES

Example1 Writeaprogram(instructionlist)toputthenumber(4000)inamemorylocation,andthenumber(41) inanotherlocation.dividethefirstonebythesecondandputtheresultinamemorylocation. Solution

24

Example2 Make a program to increase the counter by one with each pulse from the pulse generator SM0.4 (onrisingedge),anddecreaseanothercounterbythesamepulse. Solution

Stepsforthissolutionwouldbe: 1. Putzeroinmemorylocationvw100 2. Put(10)inthememorylocationvw110 3. WitheachrisingedgefromSM0.4(every30sec),weincreasememorylocationvw100byone 4. Atthesametimedecreasevw110byone 5. Theprogramwillcontinuelikethatwithoutanyinstructiontostop Pleasenotethat: MOVW=>moveword INCW=>incrementword DECW=>decrementword 25

Example3 Putavalueinmemorylocationvw200,andusingshiftingmethod,movethisvaluetotheoutputofthe PLC. Solution

1. WhenwepressthePLCinputbutton(I0.0),thePLCwillputthevalue(980)insidememorylocation vw200 2. Whentherisingedgeofthepulsearrives,thecontentsofmemorylocationwillbeshiftedtothe leftforonebit(theinstructionSLW=shiftleftword) 3. Wecouldput2after#toshifttwobitstoleft 4. Ifweput7afterthe#,theoverflowindicatorwillbeactivated(SM1.1=1)whichwillactivatethe outputinquestion Ladderdiagram:

26

Example4 Usingtwotimers,writeaprogramsowehaveapulseonPLCoutputwith(TON=10sec.)and(TOFF= 10sec.) Solution:

*TON:timeroutputon,TOFF:timeroutputoff.

27

Example5 Usingupcounter(CTU),makethePWMalgorithm. Solution There are places insidethe PLC for generating a series of pulses with fixed durations. One of these placesisSM0.5.Itgeneratesapulseof1second(ontimeis0.5secandofftimeis0.5sec).Anotherone isSM0.4,whichgeneratesa60secondpulses.

TimingDiagram:

28

Example6 Inthenextfigurewewanttofillthetwotankswithwaterbyapump.Thepumpisoperatingmanually by a pushbuttonStart. When the 1sttankbecomesfull, the circuit shouldautomaticallystartto fill the2ndtankbyclosingthe1stvalve,andopeningthe2ndvalve,andwhenthe2ndtankisfull,thepump disconnectsautomaticallyandasignlampisturnedontoshowthat2ndtankisfull.

Solution We need first to identify the inputs and outputs of the system, so wecanset relations between the outsideworldandtheinputs/outputsoftheprogrammablelogiccontroller. (Note:NCnormallyclosed,NOnormallyopen)

LadderDiagram&InstructionListforthesystem:

29

Example7 Use the instructions (set, reset) with the timer (SM0.4) to turn an output on/off after several pulses fromtheSM0.4timer.

TimingDiagram:

30

Example8 Thenextfigurerepresentstheprocessofmakingteaeverydayinthemorningforsevendays(waterin thetankisenoughfor7daysonly)

Solution
Whenpressingthestartbutton,thevalve 1(V1)opens,sothewaterpassthroughthevalvetothe heatingtank.Andwhenthewaterlevelreachesthefloatswitch(FS),thevalveshouldcloseandheating mustbegin. Whenthetemperaturereachtherequiredlevelthethermostatdisconnectstheheaterandopensvalve 2(V2)for10secondsthenthealarmbellisactivated(asasignthattheteajugisfillednowwithhot water).

31

Chapter19:VENDORSELECTION

The range of PLC suppliers is vast and many offer a number of alternative product ranges with any number of modules, boasting special features. Our choice must meet the application requirements, provideextracapacityforfuturedevelopmentandprovideacosteffectivesolution. Priceisthemostcommonlystatedreasonformakingachoice,butthetruepriceofaPLCtomeetthe requirements of a particular application is often much the same over a wide range of supplier equipment. ThefinalchoiceofsupplierforourPLCwilldependuponfunctionality,supportavailable,customer preferences,userknowledgeandprice. Issuestobeaddressed 1. FunctionalityWehavetomatchtheapplicationrequirementswiththefeaturesofeachofthe contendingsuppliersequipmenttoidentifytheonethatbestmeetsourrequirements. 2. SupportBeforeanypurchaseismadethefollowingpointsshouldbeconfirmedwithany manufacturer: Training Technicalsupport(onsiteandoverthephone) Applicationsupporttoconfigureanddesignasystem Rapidexchange/repairoffailedequipment Guaranteedsupportforanyproductsforatleast10yearsfrompurchase 32

Chapter20:CHOOSINGTHECORRECTPROCESSOR

ForselectingModularProcessorsthefollowingcriteriaaretobeexamined I/O points (local I/O points and expandable points). Each PLC processor will only be capable of workingwithalimitednumberofeachtypeofI/Omodules. Memory size (for data storage or program storage) and Performance (scan time depends on the processor).Thesizeofprogramisdependentuponthecomplexityofthecontrolproblemandthe skillandstyleoftheprogrammer. The required operating speed for all the I/O must be determined, with a PLC selected to match. Thisrequirestheestimationoftheprogramsizeandtheproportionofslowinstructions.Thescan speedisnormallyexpressedintermsofms/Kforastatedmixofsimpleandcomplexinstructions.A PLCwithanappropriatememorycapacityandspeedcanbeselected. ForanyparticularapplicationitisessentialtoensurethatthePLCselectedcanhandletherequired operations. When a communications facility is required we need to determine whether the builtin port is adequatefortheapplication,orwhetheraseparatemodulewillberequired. 33

Chapter21:PLCINSTALLATION&COMMISSIONING

TypicalInstallation Typicalinstallation(enclosure,disconnectdevice,fusedisolationtransformer,mastercontrolrelay, terminalblocksandwiringducts,suppressiondevices). Spacingcontrollersfollowtherecommendedminimumspacingtoallowtheconvectioncooling. Preventingexcessiveheat(060C). Groundingguidelines. Powerconsiderations. Safetyconsiderations. Preventivemaintenanceconsiderations. CommissioningandTestingofaPLCSystem CheckingthatallcableconnectionsbetweenthePLCandtheplantarecomplete,safe,andtothe requiredspecificationandmeetinglocalstandards. CheckingthatalltheincomingpowersupplymatchesthevoltagesettingforwhichthePLCisset. Checkingthatallprotectivedevicesaresettotheirappropriatetripsettings. Checkingthatemergencystopbuttonwork. Checkingthatallinput/outputdevicesareconnectedtothecorrectinput/outputpointsandgiving thecorrectsignals. Loadingandtestingthesoftware. TestingInputsandOutputs Input devices can be manipulated to give the open and closed contact conditions and the correspondingLEDontheinputmoduleobserved.Forcingalsocanbeusedtotestinputsandoutputs. Thisinvolvessoftware,ratherthanmechanicalswitchingonoroff,beingusedwithinstructionstoturn offoroninputs/outputs. TestingSoftware MostPLCscontainsomesoftwarecheckingprogram.Thischecksthroughtheinstalledprogramand providesalistonascreenorasprintoutwithanyerrorsdetected. 34

Chapter22:DISTRIBUTEDCONTROLSYSTEMS
WhatareDistributedControlSystems(DCS) Varioussystemsareintroducedtoautomatetheprocessesinthemanufacturingindustryandminimize the human interaction with the machines. These systems not only save the cost but also keep the injuries to minimum. Distributed processes are controlled by decentralized elements in a distributed controlsystemorDCS. Routineoperationsarecarriedoutwithouttheneedofuserintervention.Thereisaninterfaceknown as SCADA (Supervisory Control and Data Acquisition) which lets the user interact with the system. A DCS consists of a remote and a central control panel with a communication medium. Two different namesaregiventotheremotecontrolpanelsbydifferentsuppliers.Thenamesare: RemotetransmissionUnitorRTU DigitalCommunicationUnitorDCU The functions of these remote units are same as they contain I/O modules and communication mediumsandprocessors.Theseremotecontrolunitscanbeconnectedtothecentralcontrolpanelor SCADAwiththehelpofawirelessorwiredconnection.ThesoftwareusedtoreadtheI/Ocommandis ofspecializednature. AdetailedanalysisofnetworkprotocolsisrequiredbeforetheselectionofDCSisfinalized.Thesystems differintermsofapplicationsandcomplexityandtheapplicationsdependontheimplementationof the system. A DCS with smaller implementation may only consist of a single Programmable Logic ControllerorPLC.Thiscontrollerwillbeconnectedtoacomputerintheremoteoffice. PLCisalsoanattributeofthelargeandcomplexDCSinstallationslikeinelectricalgridsandinpower generation fields. They are also widely used in water treatment plants and in systems for environmentalcontrol.Petroleumrefineriesandpetrochemicalindustryalsousesthesesystemsona mass scale as these are intelligent systems and save all the process data necessary to continue the operationsincaseofacommunicationfailure. 35

Chapter23:SCADA

WhatisSCADA? Supervisory Control and Data Acquisition or SCADA is a system used to monitor and control a plant formacentrallocation.Thisisnotfrequentlyusedbecauseofthecontroloverridepossibility.SCADA itselfchangesthecontrolsetpointsquitefrequently.Itiswidelyusedinwatertreatmentplantsand latelyithasbeenusedchlorinationandpumpingstations. SCADAsystemiscomposedof3mainelements: RTU(RemoteTelemetryUnit) HMI(HumanMachineInterface) Communications The function of an RTU is to collect the onsite information and this information is sent to a central locationwiththehelpofthecommunicationelement.Ifsystemwantstosendinformationbacktothe RTUthenthiscommunicationelementtakeitbacktoo. The function of the HMI element is to display the information received in an easy to understand graphicalwayandalsoarchiveallthedatareceived.Itisusuallyahighendcomputersystemcapableof displayinghighqualitygraphicsandrunningadvancedandcomplexsoftware. Communicationhappensthroughvariousmeans.Itwillhappenviadatacablewithinaplantorthrough afiberoptic.Thecommunicationmayhappenviaradiobetweendifferentregions. WhyisSCADAPopular? Themajorreasonofitspopularityinthemanufacturingindustryisthatitsignificantlyreducesthelabor costs and improves the performance of the plant. Management can save time as well because the informationisgatheredbySCADAatacentrallocationsothepersonneldonothavetogoandwander aboutonsite. Another feature of this system which is seldom appreciated is its capability of displaying the trends. When information gathered is displayed graphically, the system shows the developing problems and helps the management in taking the corrective measures. The SCADA system may be difficult to configureatfirstbutitisextremelyuserfriendlyandeasytouse. 36

Chapter24:INDUSTRISALSAFETYSYSTEMS
IndustrialSafetySystems&theirtypes Industrialautomationhasminimizedthehumaninteractionwiththemachinesbuthasnotcompletely eliminated it. Industrial safety systems are introduced to protect the human who work in hazardous plants. Some examples of these are oil and gas, chemical and nuclear plants. The industrial safety systems notonly protectthehumans butalso protectthe environmentand the plant itself fromthe chemicalreactions. Thesesystemsdonotcontrolanyprocessbutinfactcomeintoplaywhenitisnotpossibletocontrola process through normal means. They are rather installed as a protective measure and are quickly becomingtheneedofeveryworkingenvironment.Therearevarioustypesofsafetysystemsinplace andtheirusedependsonthetypeofindustrytheyareusedin.Hereisalookatsomeofthem. ProcessControlSystems(PCS) They are installed for the monitoring of the manufacturing environment and they control the manufacturingprocesselectronically.Alaserdiodeisusedforthedetectionofliquidorgaspresentin theenvironment.Ifthegasorliquidisdetectedthentheirparticularfrequencysignatureisconverted toadigitalsignalandtheprocessoridentifiesthesignalreceived. SafetyShutdownSystems(SSS) These systems are particularly helpful in the state of emergency as they automatically shutdown a systemtoasafestatewhenevertheysenseadanger.Theycanbeconnectedtothefirandgassystems toachievesecurerworkingenvironment. FireandGasSystems(FGS) Thesesystemsarehighlysensitiveandintelligent.Theysensetheinflammablegas,materialorliquid spillatanearlystage.Theyalsodetectthefirewithintheworkingenvironmentandgiveaudibleand visualsignalsofthethreatdetected.Thesesystemscanbeactivatedautomaticallyormanually. ThereareothersystemslikePressureSafetyValves(PSV)andEmergencyShutdownSystems(ESS)that arewidelyusedinthemanufacturingindustry. 37

Chapter25:SIGNATUREIMAGEPROCESSING
Itisatechnologyusedtoanalyzetheelectricaldatacollectedthroughaweldingprocess.Thisdatais usuallycollectedthroughroboticorautomatedweldingprocesses.Automatedweldingplantsareused inalmost50%ofthemanufacturedproductsinthedevelopedcountries. Certainconditionsarenecessaryforweldingtobeacceptableandlittlevariationinitcanbecomethe causeofrejection.Therewasaneedofareliablesystemthatcoulddetectweldingfaultinrealtime. SIPisasystemthatcanidentifythesmallestoffaultsintheweldingprocess.Powerfulcomputersmake thisrealtimecomputinghappenandhelpinoptimizingtheweldingprocess. TheuseofSIPhasincreasedsignificantlyintheautomotiveindustryandithasresultedintheimproved qualityandsafetyofthevehicles.Theautomaticweldingsystemcaneliminatetheneedtoreworkand recallaproductandmanufacturerscanreducethenumberofhumansintheworkplaceandcansave moreonlaborcosts. SIP was developed for arc welding with the assistance and help of the grant given by Australian government. This systemhas a frontendinterface and softwareandgivesaccurate results as itonly dependsontheelectricalsignalsreceived.Itcansurviveinanyindustrialweldingenvironmentandis easytouseandinstallaswell. GMHoldenwasthefirstpurchaseranduserofthetechnology.Significantimprovementsweremadein thissystemdependingonthefeedbackreceivedfromGMHoldenandtheseimprovementsincreased thecommercialvalueofthissystem.Theimprovementsweremadeinalgorithmsandthesystemwas optimized to achieve accurate fault detection. The interface and installation is simple but the mathematics involved in the working of SIP is complex and the technology has been adopted and appreciatedbytheworldstopautomanufacturers. 38

Chapter26:PROGRAMMABLEAUTOMATIONCONTROLLER

ProgrammableAutomationController(PAC) ProgrammableAutomationControllerorPACisaneasytoconfigurePLCstyledevice.Ithasadvanced capabilities and they are already built into its design. It can perform complex functions like loop control, latching, and data acquisition and delivery. They have other advantages too as open architecturesareusedintheirmanufacturingandtheycanconnecttoalmostanydeviceorbusiness systempresenttoday. CharacteristicsofaPAC ThetermPACwasgivenbyARCandthereweretworeasonsbehindit: Tohelptheusersofautomatedhardwaredefinetheapplicationstheyneed. Givethevendorsatermtoeffectivelycommunicatethecharacteristicsandabilitiesoftheir product. ARC also made and explained a few rules or guidelines for a device to be considered as a programmableautomationcontroller: Operateusingasingleplatform:Itshouldbetrueforsingleormultipledomainsandindrives, motionsandprocesscontrols. Employasingledevelopmentplatform:Itshouldusesingledatabasefordifferenttasksinallthe disciplines. FunctionalBenefits ThecharacteristicsusedtodefineaPACalsoexplainthebenefitsthatcanbeobtainedfromits industrialinstallationandapplication.APACcanmeetcomplexrequirementsanddoesnotneed additionalcomponentslikeaPLC.Duetohighintegrationofhardwareandsoftware,improvedcontrol systemperformanceisexperienced.IntegratedDevelopmentEnvironmentorIDEwhichisusedinthe manufacturingofaPACusesatagnamedatabasethatisusedandsharedbyallthedevelopmenttools. APAConlyneedsonesoftwarepackagetocoveralltheexistingautomationneedsandtheonesthat mayariseinthefutureanddoesnotneedutilitiesfromdifferentvendors.Thecontrolsystemscanbe upgradedeasilyanddueitscompactsize,aprogrammableautomationcontrolleruseslesserspace comparedtootheroptions. 39

Chapter27:COMMONINDUSTRIALPROTOCOL
Common industrial protocol (CIP) is a set of standards that all the automation companies should maintain. Automation is the process of replacing human workers with the computer system and controllingallthemachinesandprocessesthroughthecomputers.ThestandardsofCIParemaintained andsupportedby OpenDeviceNetVendorsAssociation. This networking system is alsobased on CIP andotherbigcompaniesascomponentandEthernetarealsoworkingontheframeworkofCIP. CIPhasdifferentsectionsthataresupportedbyODVA.TheextensionofCommonIndustrialProtocol (CIP)applicationsareCIPsafety,CIPSyncandCIPMotion.CIPcontainsacomprehensiveplanforallthe featuresofautomatione.g.itprovidesservicesforcontrol,andsafety,organizationandarrangement, andmotionandinformation. They also provide messages to users to make it easier for them to understand. If so they can easily integrateapplicationswithdifferentnetworksandtheInternet.Mediadoesnotplayacoreroleinits progress;thissystemissupportedallovertheworld.CIPistheonlycommunicationarchitectureinthe manufacturingenterprisesaroundtheworld. The common feature of a CIP is that it provides the messaging services within the frame of Netlinx architecture. It also enables you to connect to any network and enables you to collect data from anywhere you desire. The advantage of its common routing capabilities is that it saves time and the system quickly configures with required routing table and more logic. Data can be easily transferred betweenthenetworks. CommonbasedknowledgewithintheCIPistimeefficientwhenyouaremovingfromonenetworkto another because less time is required for training of similar tools and features. CIP has many layers which enfold many networking levels. For example; Ethernet uses the transmission control protocol/internetprotocolorTCP/IPwhichisintegrationbetweenCIPandEthernetlayers. 40

Chapter28:PROFIBUS
PROFIBUSorProcessFieldBuswasintroducedin1989anditissometimesconfusedwithPROFINET.It linksplantautomationmoduleswiththeprocesscontrol.PROFIBUSusesamultidropsinglecableto connect the devices. This method is cost effective especially for larger sites when compared to old methods.Itsinstallationcostislowanditiseasytofindfaultsaswellbecauseitisasinglecable. TypesofPROFIBUS TherearetwotypesorversionsofPROFIBUS: 1. PROFIBUSDP Itrunsovertwocorescreenedcablethatisvioletsheathedanditsspeedvariesfrom9.6Kbpsto 12Mbps.Aparticularspeedcanbechosenforanetworktogiveenoughtimeforcommunication with all the devices present in the network. If systems change slowly then lower communication speed is suitable and if the systems change quickly then effective communication will happen throughfasterspeed.TheRS485balancedtransmissionthatisusedinPROFIBUSDPonlyallows32 devicestobeconnectedatoncebutmoredevicescanbeconnectedandnetworkcanbeexpanded withtheuseofhubsorrepeaters. 2. PROFIBUSPA It is slower than PROFIBUS DP and runs at fixed speed of 31.2Kbps via blue sheathed two core screenedcable.Thecommunication may be initiated to minimizethe risk ofexplosion or forthe systemsthatintrinsicallyneedsafeequipment.ThemessageformatsinPROFIBUSPAareidentical toPROFIBUSDP. (Note:PROFIBUSDPandPROFIBUSPAshouldnotbeconfusedwithPROFINET,whichisanEthernet communicationstandardanditisusedforprocesscontrolandprocessmeasurement.Itisbasically usedtolinkcomputersystemsinanofficeoranetwork.) 41

Chapter29:CoDeSys

CoDeSys is the acronym of Controller Development System. It is a development program which enables the user to create visualizations of the operations and processes of the applications. CoDeSys contains an integrated visualization system which is unique and very useful. Its applications of programming controllers are built according to the International industrial standards. CoDeSys software is easy to install and is freely available from the companys site. This software enables the operator to draw a visual chart of the controllers data and can watch and assess the performance easily. No additional tools are required for this software. A manual comes with the software which contains all the information and it has integrated visual program. The credit of developing CoDeSys goes to the software company located in Germany and its most recent version was released by the company in 1994. Five programming languages are used in CoDeSys which enable the programming of different applications. The five programing languages of CoDeSys software include two textual editors, and three graphical editors that are comprehensively explained in IEC standards. Textual editors comprise of an instruction list which is a type of programming language, and a structure test which has similar programing like PASCAL or C. The graphical editor has three units, ladder diagram (LD), Function block diagram (FBD,) and sequential function chart (SFC). The user can combine the contacts and coils with the use of LD and FBD which will provide ease of rapid programing of analogue and Boolean expressions. Thirdly, SFC enables the user to conveniently program the sequential processes of the application. Function Chart of CoDeSys: Apart from these five, there is another additional graphical editor in CoDeSys which is not included in IEC standard protocol and it is called the Continues Function Chart (CFC). It can be seen as the extension of the function block diagram editor. In FBD, the connections are set automatically by the operators but in CFC they have to be drawn manually by the programmer. It also gives free hand to the programmer as all the boxes can be placed freely and feedback loops can be programmed without the use of interim variables.

42

Chapter30:HARTCOMMUNICATIONSPROTOCOL

People use to think that field networks were the only solution when it came to the use of smart field devices but HART proved it wrong. HART communication protocol provides the easy installation that is equipped with 4 to 20mA technique. Today HART is a preferred choice for the smart field devices. HART Communication Protocol is a reliable and globally acknowledged Protocol used for digital communication between the host and smart devices and enables powerful control and monitoring system for the user. In simple words, HART provides two dimensional Communication and data access i.e. from smart device to host and from host to the smart device. A smart device can be any intelligent field instrument and the host is any software application on a laptop or other device used by technician which controls the plant processes, enables security features and is basically the control point of the plant. HART technology has proven to be efficient in modern technology and is more efficient and provides reliable results but it can only be used with the intelligent devices that understand digital data. Almost all the new smart devices accept digital language provided by HART protocol but some may not. If the smart device is not equipped with 4 to 20mA analog wiring, the benefits of HART digital communication cannot be achieved because it provides communication along with 4 to 20mA wiring and signals. So it is important to provide the plant a digital upgrade if it is does not have these analog wirings. Hart technology plays a very important and critical role in the device management and operation. It provides device configuration, device troubleshooting and diagnostics. Its current status of health and it reads all the extra values provided by the machine and HART technology makes this communication possible between the host and the smart device.

43

Chapter31:FAULTDETECTIONTECHNIQUES
ForanyPLCcontrolledplant,byfarthegreaterpercentageofthefaultsarelikelytobewithsensors, actuators,andwiringratherthanwithPLCitself.ThefaultswithinthePLCmostarelikelytobeinthe input/outputchannelsorpowersupplythanintheCPU. Case1 ConsiderasingleoutputdevicefailingtoturnonthoughtheoutputLEDison. IftestingofthePLCoutputvoltageindicatesthatitisnormalthenthefaultmightbeawiringfaultora devicefault. Ifcheckingofthevoltageatthedeviceindicatesthevoltagethereisnormalthenthefaultisthedevice. Case2 FailureofaninputLEDtoilluminateasrequiredcouldbebecause: Inputdeviceisnotcorrectlyoperating Inputdeviceisnotcorrectlypowered Incorrectwiringconnectionstotheinputmodule,orLEDorinputmoduleisdefective Many PLCs provide builtin fault analysis procedures which carry out selftesting and display fault codes,withpossiblyabriefmessage,whichcanbetranslatedbylookingupcodeinalisttogivethe sourceofthefaultandpossiblemethodofrecovery. 44

Chapter32:TROUBLESHOOTING
ProgramTroubleshooting Thereareseveralcausesoffalterationtotheuserprogram: Extremeenvironmentalconditions ElectromagneticInterference(EMI) Impropergrounding Improperwiringconnections Unauthorizedtampering Ifyoususpectthememoryhasbeenaltered,checktheprogramagainstapreviouslysavedprogramon anEEPROM,UVPROMorflashEPROMmodule. Hardwaretroubleshooting Ifinstallationandstartupprocedureswerefollowedclosely,controllerwillgivereliableservice. Ifaproblemshouldoccur,thefirststepinthetroubleshootingprocedureistoidentifytheproblemand its source. Do this by observing your machine or process and by monitoring the diagnostic LED indicatorsontheCPU,PowerSupplyandI/Omodules. ByobservingthediagnosticindicatorsonthefrontoftheprocessorunitandI/Omodules,themajority of faults can be located and corrected. These indicators, along with error codes identified in the programmingdeviceusermanualandprogrammersmonitor,helptracethesourceofthefaulttothe usersinput/outputdevices,wiring,orthecontroller. TroubleshootingController Inidentifyingthesourceofthecontrollersoperationproblemusetroubleshootingconsiderationstable includingstatusindication,troubledescription,probablecausesandrecommendedaction. Formaximumbenefitthesestepsaretobefollowed: IdentifyPowerSupplyandCPULEDstatusindicators MatchprocessorLEDswiththestatusLEDslocatedintroubleshootingtables Once the status LEDs are matched to the appropriate table, simply moveacrossthetableidentifyingerrordescriptionandprobablecauses Follow the recommended action steps for each probable cause until the cause is identified, and if recommended actions do not identify the cause, contact manufacturerordistributorforassistance. TroubleshootingInputModules Aninputcircuitrespondstoaninputsignalinthefollowingmanner: Aninputfilterremovesfalsesignalsduetocontactbounceorelectricalinterference Opticalisolationprotectsthebackplanecircuitsbyisolatinglogiccircuitsfrominputsignals Logiccircuitsprocessthesignal AninputLEDturnsonoroffindicatingthestatusofthecorrespondinginputdevice Theprocessorreceivestheinputstatusforuseinprocessingtheprogramlogic TroubleshootingOutputModules Anoutputcircuitcontrolstheoutputsignalinthefollowingmanner: Theprocessordeterminestheoutputstatus;Logiccircuitsmaintaintheoutputstatus AnoutputLEDindicatesthestatusoftheoutputsignal Opticalisolationseparateslogicandbackplanecircuitsfromfieldsignals Theoutputdriverturnsthecorrespondingoutputonoroff 45

PowerDistribution The master control relay must be able to inhibit all machines motion by removing power to the machineI/Odeviceswhentherelayisdeenergized.TheDCpowersupplyshouldbepowereddirectly fromthefusedsecondaryofthetransformer.PowertotheDCinput,andoutput,circuitsisconnected throughasetofmastercontrolrelaycontacts.InterrupttheloadsiderathertheAClinepower.This avoidstheadditionaldelayofpowersupplyturnonandturnoff. PowerLED ThePOWERLEDonthepowersupplyindicatesthatDCpowerisbeingsuppliedtothechassis.ThisLED couldbeoffwhenincomingpowerispresentwhen: Fuseisblown Voltagedropsbelowthenormaloperatingrange Powersupplyisdefective SafetyConsiderations Activelythinkingaboutthesafetyofyourselfandothers,aswellastheconditionofyourequipment,is ofprimaryimportance. Whentroubleshooting,attentionmustbegiventotheseGeneralWarnings: Haveallpersonnelremainclearofthecontrollerandequipmentwhenpowerisapplied. Theproblemmaybeintermittentandsuddenunexpectedmachinemotioncouldresultininjury. Havesomeonereadytooperateanemergencystopswitchincaseitbecomesnecessarytoshutoff powertothecontrollerequipment. Neverreachintoamachinetoactuateaswitchsinceunexpectedmachinemotioncanoccurand causeinjury. Remove all electrical power at the main power disconnect switches before checking electrical connectionsorinputs/outputscausingmachinemotion. Neveraltersafetycircuitstodefeattheirfunctions.Seriousinjuryormachinedamagecouldresult. CallingforAssistance If you need to contact manufacturer or local distributor for assistance, it is helpful to obtain the following(priortocalling): Processortype,seriesletter ProcessorLEDstatus Processorerrorcodes Hardwaretypesinsystem(I/Omodules,chassis) Revisionofprogrammingdevice(HHTorAPS) SystemDocumentation Thedocumentationisthemainguideusedbytheusersandfortroubleshootingandfaultfindingwith PLCs.ThedocumentationforaPLCinstallationshouldinclude: Adescriptionoftheplant Specificationofthecontrolrequirements DetailsoftheProgrammableLogicController Electricalinstallationdiagrams Listsofallinputsandoutputsconnections Applicationprogramwithfullcommentaryonwhatitisachieving Softwarebackups Operatingmanual,includingdetailsofallstartupandshutdownproceduresandalarms 46

Chapter33:APPLICATIONS
ConveyorSystem Thissimpleapplicationisforaconveyor(movingmaterialmachine)andhowweimplementitusing ladderdiagramandinstructionlist.

Systemrequirements: A PLC is used to start and stop the motors of a segmented conveyor belt; this allows only belt sectionscarryingacopperplatetomove. Thesystemhavethreesegmentedconveyorbelts,eachsegmentrunsbyamotor. Aproximityswitchlocatedattheendofeachsegmenttodetectthepositionoftheplate. Thefirstconveyorsegmentisalwayson. Thesecondconveyorsegmentturnsonwhentheproximityswitchinthefirstsegmentdetectsthe plate. Whentheproximityswitchatthesecondconveyordetectstheplate,thethirdsegmentconveyor turnsON. Thesecondconveyorisstopped,whentheplateisoutofdetectionrangeofthesecondproximity switch,after20seconds. Thethirdconveyorisstoppedafter20seconds,whentheproximityswitchlocatedatthesegment doesntdetecttheplate.

47

48

49

50

Chapter34:PLCLANAPPLICATIONS
CentralizeddataacquisitionanddistributedcontrolarethemostcommonapplicationsofLANs.Data collectionandprocessing,whenperformedbyanindividualcontroller,canburdentheprocessorsscan time,consumelargeamountsofmemory,andcomplicatethecontrollogicprogram. A data highway configuration, in which all data is passed to a host computer that performs all data processing,eliminatestheseproblems. Also, distributed control applications allocate control functions, once performed by a single controller, among several controllers, this eliminates dependence on a single controller and improvesperformanceandreliability. To use the distributed processing approach, a LAN and the PLCs attached to it must provide the functions: CommunicationbetweenPLCs UploadcapabilitytoahostcomputerfromanyPLC DownloadcapabilityfromahostcomputertoanyPLC Reading/writingofI/OvaluesandregisterstoanyPLC MonitoringofPLCstatusandcontrolofPLCoperation I/OBUSNETWORKS This network lets controllers better communicate with I/O field devices, to take advantage of their growing intelligence. This configuration decentralizes control in the PLC system, yieldinglargerandfastercontrolsystems. ThreetypesofI/Obusnetworks: SensorBusNetworks DevicelevelBus ProcessBus SensorBusNetwork At the lowest level of process automation, the Sensor Busses focus solely on discrete devices. ASI (ActuatorSensorInterface)isthemostcommonSensorBusNetwork.Fielddevicestypicallyconnected toSensorBusNetworksincludeon/offvalves,limitswitches,etc. DeviceBusNetworks Device bus networks interface with low level information devices, which primarily transmit data relatingtothestateofthedevice(ON/OFF)anditsoperationalstatus.Theyusedinareaswithahigh density of discrete devices. These networks generally process only a few bits to several bytes of data at a time. The most commonly used include DeviceNet andPROFIBUSDP.

51

Das könnte Ihnen auch gefallen