外文翻译--基于物理实验SimaticPLC运行的实时显示测量  英文版.pdf_第1页
外文翻译--基于物理实验SimaticPLC运行的实时显示测量  英文版.pdf_第2页
外文翻译--基于物理实验SimaticPLC运行的实时显示测量  英文版.pdf_第3页
外文翻译--基于物理实验SimaticPLC运行的实时显示测量  英文版.pdf_第4页
外文翻译--基于物理实验SimaticPLC运行的实时显示测量  英文版.pdf_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

IEEETRANSACTIONSONNUCLEARSCIENCE,VOL.51,NO.3,JUNE2004489MeasurementofReal-TimeAspectsofSimaticPLCOperationintheContextofPhysicsExperimentsHaraldKleines,JanosSarkadi,FrankSuxdorf,andKlausZwollAbstractToday,mostslowcontrolsystemsforphysicsex-perimentsatForschungszentrumJlichareimplementedwithProgrammableLogicController(PLC)technologyandfieldbussystems.Inmanycases,evendeterministicresponseisrequiredfromthePLCs.Thisraisesthequestionaboutthereal-timeperformancethatcanbeexpectedfromaPLC.Response-timemeasurementsofSimaticPLCsmanufacturedbytheworldmarketleaderSiemensarepresented.InfluenceofprogramstructureandhardwareconfigurationonperformanceanddeterministicbehaviorofaPLCisdiscussed.I.PROGRAMMABLELOGICCONTROLLERS(PLCS)INEXPERIMENTCONTROLSYSTEMSTODAY,industrialautomationtechnologyiswellestab-lishedininfrastructuresystemsforphysicsexperiments,e.g.,inwaterorgassupplysystems.ThisleadstotheheavyuseofProgrammableLogicControllers(PLCs),whichtypicallyaretheintelligentautomationstationsformingthecoreofindustrialsystems1.Mainreasonsincludelowpricesinducedbymassmarket;robustness;longtermavailabilityandsupportfrommanufacturer;professionality(connectors,conformancetostandards,)Beyondthescopeofpureinfrastructuresystems,PLCsarein-creasinglybecomingcentralcomponentsofexperimentcontrolsystems,replacingVME-orPC-basedreal-timesystems2,3.ThisiscausedbythefollowingfeaturesofmodernPLCfamilies.Highdegreeofscalability:ModernPLCfamilieshaveawidespectrumofCPUtypes,thatisscalablenotonlywithregardtoperformance,butalsowithregardtofunction-alityandformfactor.Foroutdoororfaulttolerantappli-cationsspecialversionsareavailable.Extensibility:ThemodulardesignofPLCsenablestheextensionwithawiderangeofdigitalandanalogI/Omodules.Additionally,integratedtechnologymod-ulesareavailablefordifferentapplicationareas,e.g.,steppermotorcontrollers,servomotorcontrollers,orPIDcontrollers.Extensivecommunicationcapabilities:ModernPLCshaveatleastoneintegratedcommunicationportandcanbeextendedbyavarietyofcommunicationcontrollersManuscriptreceivedMay16,2003;revisedOctober1,2003.TheauthorsarewithZentrallaborfrElektronik,ForschungszentrumJlich,D-52425Jlich,Germany(e-mail:h.kleinesfz-juelich.de).DigitalObjectIdentifier10.1109/TNS.2004.828504fordifferentfieldandprocessbussystems,thusenablingconnectionofotherindustrialdevices.AkeyissueistheextensionofacentralPLCsystemwithdecentralperipheryviaspecialfieldbusses(e.g.,PROFIBUSDP),thatallowsthetransparentconnectionof“unintelligent”I/O-modules.ThusaPLCprogramcanaccessthisdecen-tralperipheryinthesamewayascentralPLCperiphery.Powerfuldevelopmentenvironment:ModernPLCfami-liescomewithahomogeneouscrossdevelopmentenvi-ronment,thatsupportsallthemajorIEC1131program-minglanguages4.Typically,representationsininstruc-tionlist(IL),functionblockdiagram(FBD)orladderdiagram(LD)canbeswitcheddynamically.Thedevelop-menttoolsallowsemigraphicalhardwareconfiguration,offerstrongdebuggingmechanismsandallowincrementaldevelopmentbytheexchangeofblocksduringruntime.Today,inFZJuelich,allnewandadvancedexperimentcon-trolsystemsareheavilyPLC-based3,asillustratedbythear-chitectureofaneutronspectrometercontrolsystemshowninFig.1.BecausetheworldmarketleaderSiemensdominatestheEuropeanmarket,SimaticS7PLCsareusedinFZJuelich,almostexclusively.ThemidrangeseriesS7-300ismostpopular.Thehigh-endseriesS7-400istargetedatapplicationswithextremeperformancerequirementsandsupportsalsomultiprocessorconfigurations.TheminiPLCseriesS7-200israrelyused,becauseitgotthenameS7bypuremarketingreasonsanditsprogrammingenvironmentisincompatibletotheotherS7devices.InsteadoftheS7-200,theIM151/CPUservesasaminiPLC.TheIM151/CPUisanintelligentcontrollerforthedecentralperipheryfamilyET200S.AlsothedecentralperipherysystemsET200LandET200MareusedcommonlyinJlich.TheSoftPLCWinAChasonlybeentestedintheLab,sofar.TheresponsibleplanningofPLC-basedcontrolsystemsre-quiresknowledgeontheirreal-timefeatures.WhatisthemagnitudeofPLCresponsetime,dependingonPLCtype?Candeadlinesbeguaranteed?Whatprogrammingruleshavetobefollowed?Thepaperaddressestheseissuesbymeasurementsatdif-ferentPLCtypesoftheSimaticS7family.ThestandardIEC1131definesacommonframeworkforPLCfunctionalityandprogramminglanguages4,whichallthemajorPLCmanufac-turersconformto.ThusgeneralresultscanbegeneralizedalsototheirPLCfamilies.0018-9499/04$20.002004IEEE490IEEETRANSACTIONSONNUCLEARSCIENCE,VOL.51,NO.3,JUNE2004Fig.1.ControlsystemarchitectureoftheneutronspectrometerKWS3.Fig.2.Blockcallinghierarchy.II.SIMATICS7PROGRAMMINGMODELClassicalreal-timeapplicationsinresearchareimplementedwithreal-timekernelslikeOS-9orVxWorks,thatfollowanasynchronousparallelprogrammingapproach,asdefinedinPOSIX5,forexample.Thesoftwaredeveloperstructureshisprogramintasksaccordingtothelogicalstructureoftheproblemtosolve.Thesetasksareexecutedquasiparallelbytheoperatingsystem,andtheexecutionisbasicallyevent-triggered.Byassigningprioritiestothetaskstheprogrammergiveshintstotheoperatingsystemaboutthedesiredexecutionorder.Thustheprogrammerdoesnothavetoplantheschedulingdetails.Ontheotherhanditisdifficulttounderstandtheexecutionorderandtodecide,ifaspecifictaskcanmeetitsdeadlines.TheprogrammingmechanismsinPLCsystemsaretotallydifferent,becausetheyfollowtheolderapproachofsyn-chronousprogramming6.Here,theexecutionoftasksiscompletelytime-triggered,andtheprogrammerhastoorganizehisprogramintotasksaccordingtothetime,whenataskhastorun.Sohemustplantheexecutionorderhimself,whichismorecomplicatedbutalsogivesmorecontrol.InStep7,thedevelopmentenvironmentoftheS7,allcodeexistsinblocks,asdefinedinIEC1131.TasksarerepresentedbyOrganizationBlocks(OBs).OBsaretheschedulableitems,thatarecalledbytheoperatingsystemofthePLCatcertainevents,e.g.,whenatimerexpiresoranerroroccurs.Thus,theOBsaretheinterfaceoftheoperatingsystemtotheuserpro-gram.AsindicatedinFig.2,OBscancallFunctions(FCs),whichareblocksthatcorrespondtofunctionsinaprocedurallanguage.FCscancallotherFCsorsystemfunctions(SFCs),whichcorrespondtooperatingsystemcallsinaPOSIXenviron-ment.FunctionBlocks(FBs)/SystemFunctionBlocks(SFCs)areFCs/SFCswithanassigneddatablockforstaticfunctiondata.A“normal”PLCprogramiscontainedinOB1,whichiscalledcyclicallybytheoperatingsystem,asindicatedinFig.3.BeforeOB1iscalledtheoperatingsystemtransfersdatafromtheinputmodulestoamemoryareacalledprocessimagetable.AfterOB1hasbeencalled,datafromtheprocessimagetableiscopiedtotheoutputmodules.TheindirectaccesstoI/O-modulesviatheprocessimagetablereducesaccesstimeandincreasesconsistency.KLEINESetal.:SIMATICPLCOPERATION491Fig.3.ExecutionofmainprogramscancycleOB1.TheexecutiontimeofOB1ismonitored,andifapreconfig-uredmaximumisexceeded,thetimeerrorOB80iscalled.OnS7-400andWinACalsoaminimumforthecycletimeofOB1canbeconfigured.IftheexecutiontimeforOB1islessthen,thebackgroundOB90iscalled,whichhasthelowestpriority.ThepriorityofallotherOBsincreaseswithitsnumber.OnlyonS7-400andWinACthisdefaultpri-oritycanbechanged.EachOBcanbeinterruptedbyOBswithahigherpriority.TableIliststhepossibleOBs.AvailabilityofOBsdependsontheCPUtype.IfmoreOBsofacertaintypearerequired,amoreexpensiveCPUhastobebought.Time-of-dayinterruptOBsarestartedatapreconfiguredtime,e.g.,endofashift,whereastimedelaysinterruptOBsarestartedattheexpirationofaone-shot-timer.CyclicinterruptOBsarestartedwithafixedfrequency.Thetimeintervalandthephaseoffsetcanbeconfiguredwithagranularityof1ms.HardwareinterruptsOBsarestartedbyaaneventataninputorfunctionmodule,e.g.,detectionoftherisingedgeofadigitalsignal.Thisfunctionalityisonlyavailablewithso-called“HighFeature”inputmodules.SynchronouserrorOBsarestartedbyerrorsintheuserprogram,whereasasynchronouserrorinterruptOBsarestartedbyPLCfaults,likepowerfailure,modulefailureortimeerrors.Atimeerroroccurs,whenanOBcannotmeetitsscheduledstarttime,andisanuniquefeatureofPLCs.III.REAL-TIMEPERFORMANCEMEASUREMENTSA.PerformanceEvaluationGoalsAkeyissueofreal-timeperformanceisthereactiontimetoexternalevents.BecausePLCsystemsbasicallyconformtoasynchronousprogrammingmodel,thisisdirectlydeterminedbythecycletime,whichhastobeanalyzedforthefreerunningcycleOB1andcyclicinterrupts;e.g.,OB35.TodeterminetheapplicationareaofPLCclasses,theminimumofhastobemeasuredfordifferentPLCtypes.TheactualvalueofinaspecificapplicationdependsontheamountofcodeinthecyclicOB,ofcourse.TABLEIOBTYPESOFASIMATICS7TABLEIIPLCSUNDERTESTDeterministicbehaviorofaPLCisdeterminedbythejitterof,whichisofprimaryinterestforcyclicinterrupts.With“HighFeature”inputmodules,alsohardwareinterruptsarepossible.Heretheminimumresponsetime,whichisdefinedasthetimetoactivateOB40,anditsjitterhastobemeasured.Inordertogetacompletepicture,themeasurementshavetobeconductedforaminiPLC,amidrangePLCandahigh-endPLC.TableIIshowstheCPUs,thathavebeenselectedforthemeasurementsinthispaper.Thetimeforafloatingpointaddi-tionhasbeenmeasuredbyrepeatingittimes,inordertoconveyanimpressionoftheirrelativeperformance,whichdif-fersconsiderably.BecauseofthedistributednatureofPLC-basedsystems,theimpactofPROFIBUScommunicationtoresponsetimeisanim-492IEEETRANSACTIONSONNUCLEARSCIENCE,VOL.51,NO.3,JUNE2004Fig.4.Experimentsetup.Fig.5.HistogramofOB1cycletimeatIM151/CPU.portantissue.Thustheadditionaldelaysintroducedbycommu-nicationaswellastheadditionaljitterhavetobeanalyzed.Butpresentationofcommunication-relatedmeasurementswouldgobeyondthescopeofthispaperandwillbecoveredbyafuturepublication.Theanalysisoftheresponsetimeasafunctionofthesystemload,e.g.,inducedbyharddiskactivity,communicationorback-groundcomputing,isakeyissueonconventionalPOSIX-likereal-timesystems.ThisisnotanissueonPLCsystemsbe-causeoftheirsynchronouscyclicoperation.Eventhecommu-nicationonfieldbusseslikePROFIBUSDPV0orAS-Interfaceiscyclically,thusinducingaconstantload.Forasynchronoustypeofcommunication,e.g.,TCP/IP,intelligentcommunica-tioncontrollersareused,thusoffloadingtheCPU.AnexceptionfromthisruleistheMPI(MultipointInterface,aproprietaryfieldbus),thatisintegratedineachCPU.ButinJlichMPIisonlyusedforprogramming.B.MeasurementScenarioAccordingtoFig.4theinputsofthePLCsundertest(listedinTableII)areconnectedtoapulsegenerator.OB40isacti-vatedbyarisingedgeoftheinputsignalandtogglesaoutputsignal.TheoutputofthepulsegeneratorandoutputsofthePLCundertestareconnectedtotheNationalInstrumentsanaloginputmoduleNI6062E.Thesignalsaresampledwithafre-Fig.6.HistogramofOB1cycletimeatCPU314C-2DP.quencyof100kHz.Matlabcodehasbeendevelop

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论