




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高危儿健康教育
- 外科肿瘤护理评估
- 老年拐杖椅子设计
- 输液治疗的信息化管理
- 小学心理健康课程体系构建
- 2025年涂胶纺织物、带项目申请报告
- 2025年航天器及其运载工具、零件项目提案报告
- 【白城】2025年吉林白城洮南市事业单位面向春季应征入伍毕业生招聘11人笔试历年典型考题及考点剖析附带答案详解
- 【博尔塔拉】2025年新疆博尔塔拉职业技术学院招聘专任教师147人笔试历年典型考题及考点剖析附带答案详解
- 音素的教学课件
- 2025年艾滋病知识讲座
- TCAMA 109-2024 半封闭温室设计规范
- 《尼尔斯骑鹅旅行记》读书分享课件
- 北京八中分班数学试卷
- 工伤保险待遇申请表
- 【艺恩】JELLYCAT品牌洞察报告
- 2025年中考物理终极押题猜想(广东省卷专用)(原卷版)
- 《公路建设项目文件管理规程》
- 无人机物流运输操作规程
- 国家开放大学电大《药剂学》期末试题题库及答案
- 国家开放大学《Web开发基础》形考任务实验1-5参考答案
评论
0/150
提交评论