1ProgrammableLogicControllers:ProgrammingMethodsandApplicationsbyJohnR.HackworthandFrederickD.Hackworth,Jr.PLCConfigurationsProgrammablecontrollers(theshortenednameusedforprogrammablelogiccontrollers)aremuchlikepersonalcomputersinthattheusercanbeoverwhelmedbythevastarrayofoptionsandconfigurationsavailable.Also,likepersonalcomputers,thebestteacherofwhichonetoselectisexperience.Asonegainsexperiencewiththevariousoptionsandconfigurationsavailable,itbecomeslessconfusingtobeabletoselecttheunitthatwillbestperforminaparticularapplication.BasicPLCsareavailableonasingleprintedcircuitboardasshowninFigure2-1.TheyaresometimescalledsingleboardPLCsoropenframePLCs.Thesearetotallyselfcontained(withtheexceptionofapowersupply)and,wheninstalledinasystem,theyaresimplymountedinsideacontrolscabinetonthreadedstandoffs.Screwterminalsontheprintedcircuitboardallowfortheconnectionoftheinput,output,andpowersupplywires.Theseunitsaregenerallynotexpandable,meaningthatextrainputs,outputs,andmemorycannotbeaddedtothebasicunit.However,someofthemoresophisticatedmodelscanbelinkedbycabletoexpansionboardsthatcanprovideextraI/O.Therefore,withfewexceptions,whenusingthistypeofPLC,thesystemdesignermusttakecaretospecifyaunitthathasenoughinputs,outputs,andprogrammingcapabilitytohandleboththepresentneedofthesystemandanyfuturemodificationsthatmayberequired.SingleboardPLCsareveryinexpensive(somelessthan$100),easytoprogram,small,andconsumelittlepower,but,generallyspeaking,theydonothavealargenumberofinputsandoutputs,andhaveasomewhatlimitedinstructionset.Theyarebestsuitedtosmall,relativelysimplecontrolapplications.PLCsarealsoavailablehousedinasinglecase(sometimesreferredtoasashoebox)withallinputandoutput,powerandcontrolconnectionpointslocatedonthesingleunit,asshowninFigure2-2.Thesearegenerallychosenaccordingtoavailableprogrammemoryandrequirednumberandvoltageofinputsandoutputstosuittheapplication.Thesesystemsgenerallyhaveanexpansionport(aninterconnectionsocket)whichwillallowtheadditionofspecializedunitssuchashighspeedcountersandanaloginputandoutputunitsoradditionaldiscreteinputsoroutputs.Theseexpansionunitsareeitherpluggeddirectlyintothemaincaseorconnectedtoitwithribboncableorothersuitablecable.1.Processor.Theprocessor(sometimescallaCPU),asintheselfcontainedunits,isgenerallyspecifiedaccordingtomemoryrequiredfortheprogramtobeimplemented.Inthemodularizedversions,capabilitycanalsobeafactor.Thisincludesfeaturessuchashighermathfunctions,PIDcontrolloopsandoptionalprogrammingcommands.Theprocessorconsistsofthemicroprocessor,systemmemory,serialcommunicationportsforprinter,PLCLANlinkandexternalprogrammingdeviceand,insomecases,thesystempowersupplytopowertheprocessorandI/Omodules.2.Mountingrack.ThisisusuallyametalframeworkwithaprintedcircuitboardbackplanewhichprovidesmeansformountingthePLCinput/output(I/O)modulesandprocessor.Mountingracksarespecified2accordingtothenumberofmodulesrequiredtoimplementthesystem.Themountingrackprovidesdataandpowerconnectionstotheprocessorandmodulesviathebackplane.ForCPUsthatdonotcontainapowersupply,therackalsoholdsthemodularpowersupply.Therearesystemsinwhichtheprocessorismountedseparatelyandconnectedbycabletotherack.Themountingrackcanbeavailabletomountdirectlytoapanelorcanbeinstalledinastandard19wideequipmentcabinet.MountingracksarecascadablesoseveralmaybeinterconnectedtoallowasystemtoaccommodatealargenumberofI/Omodules.3.Inputandoutputmodules.Inputandoutput(I/O)modulesarespecifiedaccordingtotheinputandoutputsignalsassociatedwiththeparticularapplication.Thesemodulesfallintothecategoriesofdiscrete,analog,highspeedcounterorregistertypes.DiscreteI/Omodulesaregenerallycapableofhandling8or16and,insomecases32,on-offtypeinputsoroutputspermodule.Modulesarespecifiedasinputoroutputbutgenerallynotbothalthoughsomemanufacturersnowoffermodulesthatcanbeconfiguredwithbothin.TheProgrammableLogicControlleroutputpointsinthesameunit.ThemodulecanbespecifiedasAConly,DConlyorAC/DCalongwiththevoltagevaluesforwhichitisdesigned.Analoginputandoutputmodulesareavailableandarespecifiedaccordingtothedesiredresolutionandvoltageorcurrentrange.Aswithdiscretemodules,thesearegenerallyinputoroutput;howeversomemanufacturersprovideanaloginputandoutputinthesamemodule.AnalogmodulesarealsoavailablewhichcandirectlyacceptthermocoupleinputsfortemperaturemeasurementandmonitoringbythePLC.PulsedinputstothePLCcanbeacceptedusingahighspeedcountermodule.Thismodulecanbecapableofmeasuringthefrequencyofaninputsignalfromatachometerorotherfrequencygeneratingdevice.Thesemodulescanalsocounttheincomingpulsesifdesired.Generally,bothfrequencyandcountareavailablefromthesamemoduleatthesametimeifbotharerequiredintheapplication.Registerinputandoutputmodulestransfer8or16bitwordsofinformationtoandfromthePLC.Thesewordsaregenerallynumbers(BCDorBinary)whicharegeneratedfromthumbwheelswitchesorencodersystemsforinputordatatobeoutputtoadisplaydevicebythePLC.OthertypesofmodulesmaybeavailabledependinguponthemanufacturerofthePLCandit'scapabilities.Theseincludespecializedcommunicationmodulestoallowforthetransferofinform