DesignofPLCTimerSystemBasedonFPGALiKejian,LiuTong,CaiQizhongSchoolofElectronicInformationandControlEngGuangxiUniversityofTechnologyLiuzhouGuangxiChinalijian6262@I26.com;srk04I26@I26.com;cqiqzh@163.comAbstract-AimingatthedesignofthesmallPLCtimersystem,basedontheanalysisofoperationalcharacteristicsofPLCtimerandtheprocessofPLCusertimerprogramandthedatatransmissionrequirementsofPLCuserprogramexecutionmoduleandthetimer,amethodwhichappliestheFPGAParallelalgorithmtodesigningsmallPLCtimersystem,ispresented.Thetimersystemiscomposedofclockgeneratorunit,timingunit,timingcontrolunitandthechipselectcircuit.Whilethetimerrunsatthespeedoflmstimedpulse,theoperationoftimeristranslatedintotheoperationofRAMmemorycellwhichismadeupofFPGA.ThatmakesusercanoperateonRAMmemorycellinsteadofthetimer,anditjusttakeupafewexecutiontimeofPLCuserprogram.ThispaperintroducesthetheoryandstructureoftheFPGAtimersystem,thestatetransitiondiagramoftimercontrolmodule,thetimingdiagramofuserprogramexecutionmoduleoperatingontimer,finallytakeanexperimentandgivesanalysisoftheresults.Keywords-PLetimersystem;FPGA;dynamicin/ormationcode;paralle/operation;statetransition;1.INTRODUCTIONTimerisanimportantsoft-devicesofProgrammableLogicController(PLC)[1][2],whichisusedasthetimerelayofrelaycontrolsystem.Timeriswidelyusedinautomaticcontrolsystem,suchastimingsampling,timinginspection,timingscanning,etc.Theimplementationsoftimingarenon-programmablehardwaretiming,softwaretimingandprogrammablehardwaretiming.PLCprovideshundredstothousandsoftimers[3][4],andtheirtimingunittypicallyhasthreekindslike1ms,10msandlOOms.Ifthetimerwereimplementedallbyhardwaredesign,itwouldberelativelysimplebutwouldtakeupalotofhardwareresources.Therefore,ithasgreatpracticalsignificancetoimplementedthislargenumberoftimerfunctionsreasonably.ThispaperproposesatheoryusingtheFPGAParallelalgorithmtodesignasmallPLCtimersystem.Thistimersystemiscomposedofclockgeneratorunit,timingunit,timingcontrolunitandthechipselectcircuit.Eachtimingunitismadeupof3bitdynamicinformationdataand28bittimingparametersdata.Severalmemorycellswillconstituteonetimingunit.Whileoperatingatthespeedof1mstimingpulse,timercontrolmodulejudgesthestateofthe3bitdynamicinformationcodeoftimingunitandoperatesthetimingprocess.Atthesametime,thetimercontrolmodulewillscanthestatusofuserprogramexecutionmoduleoperatingtimer,thatmakesuserprogramexecutionmoduleoperatesonRAMmemorycellinsteadofthetimeritselfanditjusttakeupalittletheexecutivetimeofPLCuserprogram.ThispaperintroducesthetheoryandstructureoftheFPGAtimersystem,thestatetransitiondiagramoftimercontrolmodule,thetimingdiagramofuserprogramexecutionmoduleoperatingontimer,finallytakeanexperimentandgivesanalysisoftheresults.II.SYSTEMDESIGNA.TheoperationontimerbyPLCuserprogramexecutionmoduleThenumbersofdifferenttypesPLCtimeraredifferentandneitherthetypesoftimers.ThesmallPLCtimerhasthreekindsofworkingstate.Thefirststateiswhentheinputconditionsarenotsatisfied,thesoftcomponentoftimercoilisinpower-downstateandthecorrespondingcontactisdisconnected.Thesecondstateiswhentheinputconditionsaresatisfied,timerworksinatimingstateandthecorrespondingcontactisdisconnected.Thethirdstateiswhenthetimingiscompleted,theinputconditionsarestillsatisfiedandthecorrespondingcontactisclosed.ThePLCtimertimingvalueT=timingresolutionfactormultipletimingconstantK.Inprogrammingapplications,oncethetimerisselected,thetimingresolutionfactorissubsequentlyidentifiedasIms,10msorlOOms.Figure1isaladderprogramdiagramoftimerTO.TimerTOisonesoftcomponentwhichmadeupofcoilanditsstatusis1whenpowerisonandOwhenpowerisoff.Whentimingiscompleted,thesoftcomponentoftimerTOispoweron,itscontactclosesanditsstatusbecomes1,whentimingisnotcompleted,thesoftcomponentoftimerTOispoweroff,itscontactbreaksanditsstatusstays0.IfthetimingresolutionfactorofTOis1OOmsandKis100thenthetimevalueT=lOOmsx100=lOs.AnexampleofthetimingprocessisshowninFig.1.WhentheinputsignalXOisconnected,thecoiloftimerTOisdriven.ThetimercountsthelOOmspulses,atthesametime,thecountingvalueiscontinuallycomparedwiththepresetvalue.Whenthesetwovaluesareequal,thecontactofTOwillbeconnected.Thefunctionis,oncethetimingcoilsispoweron,itscontactswillbeclosedafterlOstime-delay.WhentheinputsignalXOisdisconnected,thecoilwillberesetandpoweroff,thecountervalueandtheoutputofcontactTOwillbothberesetimmediately.B.ThedatatransmissionofPLeuserprogramexecutionmoduleandtimerInordertotransferonetimerdatabetweenthePLCuserprogramexecutionmoduleandtimerinonetime,a32-bitdatalineisadopted,showninFigure2.theoperationsofUserprogramexecutionmoduleontimerareOUTTxxx,Kxxx,andthecorrespondingstateoftimer'sinputconditions.Txxxistheaddress,Kxxxisthetimingdata.ThentheinformationthatPLCuserprogramexecutionmoduleexportstothetimersystemmainlycontainthetimingdata,thetimingaddress,thestatusofsoftcoilandtheflagstatusoftimer(beingusedornot).TheinformationthatthetimersystemexportstoPLCuserprogramexecutionmodulemainlycontainthetimingaddress,thecompletingstatusoftheprocessoftiming,thecontrolinformationofmessagereadorwritten,etc.Timerunitisinde
本文标题:关于PLC英文文献
链接地址:https://www.777doc.com/doc-5268082 .html