1、IEEETRANSACTIONSONNUCLEARSCIENCE/VOL/51/NO/3/JUNE2004489MeasurementofReal-TimeAspectsofSimaticPLCOperationintheContextofPhysicsExperimentsHaraldKleines/JanosSarkadi/FrankSuxdorf/andKlausZwollAbstractToday/mostslowcontrolsystemsforphysicsex-perimentsatForschungszentrumJlichareimplementedwithProgramma
2、bleLogicController(PLC)technologyandfieldbussystems/Inmanycases/evendeterministicresponseisrequiredfromthePLCs/Thisraisesthequestionaboutthereal-timeperformancethatcanbeexpectedfromaPLC/Response-timemeasurementsofSimaticPLCsmanufacturedbytheworldmarketleaderSiemensarepresented/Influenceofprogramstru
3、ctureandhardwareconfigurationonperformanceanddeterministicbehaviorofaPLCisdiscussed/I/PROGRAMMABLELOGICCONTROLLERS(PLCS)INEXPERIMENTCONTROLSYSTEMSTODAY/industrialautomationtechnologyiswellestab-lishedininfrastructuresystemsforphysicsexperiments/e/g//inwaterorgassupplysystems/Thisleadstotheheavyuseof
4、ProgrammableLogicControllers(PLCs)/whichtypicallyaretheintelligentautomationstationsformingthecoreofindustrialsystems1/Mainreasonsincludelowpricesinducedbymassmarket;robustness;longtermavailabilityandsupportfrommanufacturer;professionality(connectors/conformancetostandards/)Beyondthescopeofpureinfra
5、structuresystems/PLCsarein-creasinglybecomingcentralcomponentsofexperimentcontrolsystems/replacingVME-orPC-basedreal-timesystems2/3/ThisiscausedbythefollowingfeaturesofmodernPLCfamilies/Highdegreeofscalability/ModernPLCfamilieshaveawidespectrumofCPUtypes/thatisscalablenotonlywithregardtoperformance/
6、butalsowithregardtofunction-alityandformfactor/Foroutdoororfaulttolerantappli-cationsspecialversionsareavailable/Extensibility/ThemodulardesignofPLCsenablestheextensionwithawiderangeofdigitalandanalogI/Omodules/Additionally/integratedtechnologymod-ulesareavailablefordifferentapplicationareas/e/g//st
7、eppermotorcontrollers/servomotorcontrollers/orPIDcontrollers/Extensivecommunicationcapabilities/ModernPLCshaveatleastoneintegratedcommunicationportandcanbeextendedbyavarietyofcommunicationcontrollersManuscriptreceivedMay16/2003;revisedOctober1/2003/TheauthorsarewithZentrallaborfrElektronik/Forschung
8、szentrumJlich/D-52425Jlich/Germany(e-mail/h/kleinesfz-juelich/de)/DigitalObjectIdentifier10/1109/TNS/2004/828504fordifferentfieldandprocessbussystems/thusenablingconnectionofotherindustrialdevices/AkeyissueistheextensionofacentralPLCsystemwithdecentralperipheryviaspecialfieldbusses(e/g//PROFIBUSDP)/
9、thatallowsthetransparentconnectionof“unintelligent”I/O-modules/ThusaPLCprogramcanaccessthisdecen-tralperipheryinthesamewayascentralPLCperiphery/Powerfuldevelopmentenvironment/ModernPLCfami-liescomewithahomogeneouscrossdevelopmentenvi-ronment/thatsupportsallthemajorIEC1131program-minglanguages4/Typic
10、ally/representationsininstruc-tionlist(IL)/functionblockdiagram(FBD)orladderdiagram(LD)canbeswitcheddynamically/Thedevelop-menttoolsallowsemigraphicalhardwareconfiguration/offerstrongdebuggingmechanismsandallowincrementaldevelopmentbytheexchangeofblocksduringruntime/Today/inFZJuelich/allnewandadvanc
11、edexperimentcon-trolsystemsareheavilyPLC-based3/asillustratedbythear-chitectureofaneutronspectrometercontrolsystemshowninFig/1/BecausetheworldmarketleaderSiemensdominatestheEuropeanmarket/SimaticS7PLCsareusedinFZJuelich/almostexclusively/ThemidrangeseriesS7-300ismostpopular/Thehigh-endseriesS7-400is
12、targetedatapplicationswithextremeperformancerequirementsandsupportsalsomultiprocessorconfigurations/TheminiPLCseriesS7-200israrelyused/becauseitgotthenameS7bypuremarketingreasonsanditsprogrammingenvironmentisincompatibletotheotherS7devices/InsteadoftheS7-200/theIM151/CPUservesasaminiPLC/TheIM151/CPU
13、isanintelligentcontrollerforthedecentralperipheryfamilyET200S/AlsothedecentralperipherysystemsET200LandET200MareusedcommonlyinJlich/TheSoftPLCWinAChasonlybeentestedintheLab/sofar/TheresponsibleplanningofPLC-basedcontrolsystemsre-quiresknowledgeontheirreal-timefeatures/WhatisthemagnitudeofPLCresponse
14、time/dependingonPLCtype?Candeadlinesbeguaranteed?Whatprogrammingruleshavetobefollowed?Thepaperaddressestheseissuesbymeasurementsatdif-ferentPLCtypesoftheSimaticS7family/ThestandardIEC1131definesacommonframeworkforPLCfunctionalityandprogramminglanguages4/whichallthemajorPLCmanufac-turersconformto/Thu
15、sgeneralresultscanbegeneralizedalsototheirPLCfamilies/0018-9499/04$20/002004IEEE490IEEETRANSACTIONSONNUCLEARSCIENCE/VOL/51/NO/3/JUNE2004Fig/1/ControlsystemarchitectureoftheneutronspectrometerKWS3/Fig/2/Blockcallinghierarchy/II/SIMATICS7PROGRAMMINGMODELClassicalreal-timeapplicationsinresearchareimple
16、mentedwithreal-timekernelslikeOS-9orVxWorks/thatfollowanasynchronousparallelprogrammingapproach/asdefinedinPOSIX5/forexample/Thesoftwaredeveloperstructureshisprogramintasksaccordingtothelogicalstructureoftheproblemtosolve/Thesetasksareexecutedquasiparallelbytheoperatingsystem/andtheexecutionisbasica
17、llyevent-triggered/Byassigningprioritiestothetaskstheprogrammergiveshintstotheoperatingsystemaboutthedesiredexecutionorder/Thustheprogrammerdoesnothavetoplantheschedulingdetails/Ontheotherhanditisdifficulttounderstandtheexecutionorderandtodecide/ifaspecifictaskcanmeetitsdeadlines/Theprogrammingmecha
18、nismsinPLCsystemsaretotallydifferent/becausetheyfollowtheolderapproachofsyn-chronousprogramming6/Here/theexecutionoftasksiscompletelytime-triggered/andtheprogrammerhastoorganizehisprogramintotasksaccordingtothetime/whenataskhastorun/Sohemustplantheexecutionorderhimself/whichismorecomplicatedbutalsog
19、ivesmorecontrol/InStep7/thedevelopmentenvironmentoftheS7/allcodeexistsinblocks/asdefinedinIEC1131/TasksarerepresentedbyOrganizationBlocks(OBs)/OBsaretheschedulableitems/thatarecalledbytheoperatingsystemofthePLCatcertainevents/e/g//whenatimerexpiresoranerroroccurs/Thus/theOBsaretheinterfaceoftheopera
20、tingsystemtotheuserpro-gram/AsindicatedinFig/2/OBscancallFunctions(FCs)/whichareblocksthatcorrespondtofunctionsinaprocedurallanguage/FCscancallotherFCsorsystemfunctions(SFCs)/whichcorrespondtooperatingsystemcallsinaPOSIXenviron-ment/FunctionBlocks(FBs)/SystemFunctionBlocks(SFCs)areFCs/SFCswithanassi
21、gneddatablockforstaticfunctiondata/A“normal”PLCprogramiscontainedinOB1/whichiscalledcyclicallybytheoperatingsystem/asindicatedinFig/3/BeforeOB1iscalledtheoperatingsystemtransfersdatafromtheinputmodulestoamemoryareacalledprocessimagetable/AfterOB1hasbeencalled/datafromtheprocessimagetableiscopiedtoth
22、eoutputmodules/TheindirectaccesstoI/O-modulesviatheprocessimagetablereducesaccesstimeandincreasesconsistency/KLEINESetal//SIMATICPLCOPERATION491Fig/3/ExecutionofmainprogramscancycleOB1/TheexecutiontimeofOB1ismonitored/andifapreconfig-uredmaximumisexceeded/thetimeerrorOB80iscalled/OnS7-400andWinACals
23、oaminimumforthecycletimeofOB1canbeconfigured/IftheexecutiontimeforOB1islessthen/thebackgroundOB90iscalled/whichhasthelowestpriority/ThepriorityofallotherOBsincreaseswithitsnumber/OnlyonS7-400andWinACthisdefaultpri-oritycanbechanged/EachOBcanbeinterruptedbyOBswithahigherpriority/TableIliststhepossibl
24、eOBs/AvailabilityofOBsdependsontheCPUtype/IfmoreOBsofacertaintypearerequired/amoreexpensiveCPUhastobebought/Time-of-dayinterruptOBsarestartedatapreconfiguredtime/e/g//endofashift/whereastimedelaysinterruptOBsarestartedattheexpirationofaone-shot-timer/CyclicinterruptOBsarestartedwithafixedfrequency/T
25、hetimeintervalandthephaseoffsetcanbeconfiguredwithagranularityof1ms/HardwareinterruptsOBsarestartedbyaaneventataninputorfunctionmodule/e/g//detectionoftherisingedgeofadigitalsignal/Thisfunctionalityisonlyavailablewithso-called“HighFeature”inputmodules/SynchronouserrorOBsarestartedbyerrorsintheuserpr
26、ogram/whereasasynchronouserrorinterruptOBsarestartedbyPLCfaults/likepowerfailure/modulefailureortimeerrors/Atimeerroroccurs/whenanOBcannotmeetitsscheduledstarttime/andisanuniquefeatureofPLCs/III/REAL-TIMEPERFORMANCEMEASUREMENTSA/PerformanceEvaluationGoalsAkeyissueofreal-timeperformanceisthereactiont
27、imetoexternalevents/BecausePLCsystemsbasicallyconformtoasynchronousprogrammingmodel/thisisdirectlydeterminedbythecycletime/whichhastobeanalyzedforthefreerunningcycleOB1andcyclicinterrupts;e/g//OB35/TodeterminetheapplicationareaofPLCclasses/theminimumofhastobemeasuredfordifferentPLCtypes/Theactualval
28、ueofinaspecificapplicationdependsontheamountofcodeinthecyclicOB/ofcourse/TABLEIOBTYPESOFASIMATICS7TABLEIIPLCSUNDERTESTDeterministicbehaviorofaPLCisdeterminedbythejitterof/whichisofprimaryinterestforcyclicinterrupts/With“HighFeature”inputmodules/alsohardwareinterruptsarepossible/Heretheminimumrespons
29、etime/whichisdefinedasthetimetoactivateOB40/anditsjitterhastobemeasured/Inordertogetacompletepicture/themeasurementshavetobeconductedforaminiPLC/amidrangePLCandahigh-endPLC/TableIIshowstheCPUs/thathavebeenselectedforthemeasurementsinthispaper/Thetimeforafloatingpointaddi-tionhasbeenmeasuredbyrepeati
30、ngittimes/inordertoconveyanimpressionoftheirrelativeperformance/whichdif-fersconsiderably/BecauseofthedistributednatureofPLC-basedsystems/theimpactofPROFIBUScommunicationtoresponsetimeisanim-492IEEETRANSACTIONSONNUCLEARSCIENCE/VOL/51/NO/3/JUNE2004Fig/4/Experimentsetup/Fig/5/HistogramofOB1cycletimeat
31、IM151/CPU/portantissue/Thustheadditionaldelaysintroducedbycommu-nicationaswellastheadditionaljitterhavetobeanalyzed/Butpresentationofcommunication-relatedmeasurementswouldgobeyondthescopeofthispaperandwillbecoveredbyafuturepublication/Theanalysisoftheresponsetimeasafunctionofthesystemload/e/g//induc
32、edbyharddiskactivity/communicationorback-groundcomputing/isakeyissueonconventionalPOSIX-likereal-timesystems/ThisisnotanissueonPLCsystemsbe-causeoftheirsynchronouscyclicoperation/Eventhecommu-nicationonfieldbusseslikePROFIBUSDPV0orAS-Interfaceiscyclically/thusinducingaconstantload/Forasynchronoustyp
33、eofcommunication/e/g//TCP/IP/intelligentcommunica-tioncontrollersareused/thusoffloadingtheCPU/AnexceptionfromthisruleistheMPI(MultipointInterface/aproprietaryfieldbus)/thatisintegratedineachCPU/ButinJlichMPIisonlyusedforprogramming/B/MeasurementScenarioAccordingtoFig/4theinputsofthePLCsundertest(lis
34、tedinTableII)areconnectedtoapulsegenerator/OB40isacti-vatedbyarisingedgeoftheinputsignalandtogglesaoutputsignal/TheoutputofthepulsegeneratorandoutputsofthePLCundertestareconnectedtotheNationalInstrumentsanaloginputmoduleNI6062E/Thesignalsaresampledwithafre-Fig/6/HistogramofOB1cycletimeatCPU314C-2DP/
35、quencyof100kHz/Matlabcodehasbeendevelopedthatde-tectsrisingedgesinthesampledsignals/computestherequiredtimedifferencesandformsanhistogramofthemeasureddata/ThusthedistributionoftheresponsetimeofthePLCcanbemeasured/Thedistributionofthecycletimeismeasuredinananalogousway/Alternatively/thesignalsareconn
36、ectedtotheTDCmoduleSIS3400fromStruckInnovativeSystems/Thusthecorrectnessandthesufficientprecisionofthemeasureddatacouldbeverified/C/MeasurementsoftheMainProgramScanCycleOB1Figs/57showthedistributionofforOB1measuredonthefirstthreePLCinTableI/TherewasnootheractivityonthesystemthanOB1/whichonlycontaine
37、dcodefortogglingadigitaloutputdirectlywithoutusingtheprocessimagetable/TheminimumforanditsjitterarecausedbyoperatingsystemactivitiesandgetbetterwithincreasingperformanceofthePLCundertest/AlthoughmevalueandvarianceoffortheS7-300aremuchbetterthanforIM151/CPUtheworstcaseiscomparable/CPU412-2isalmostdetermistic/basicallytakingtwodiscretevalues/ThisisnotnecessarilycausedbyCPUbehavior/becauseatthesefrequenciesthebehaviorofthedigitaloutputsgetssignificant/too/ThiscausedartifactsontheCPU414-1wherewemeasuredaminimumcycletimeof0/2ms/Butinthissituationthetimebetweentwostatechanges
免责声明:
1. 《外文翻译--基于物理实验SimaticPLC运行的实时显示测量 英文版》内容来源于互联网,版权归原著者或相关公司所有。
2. 若《86561825文库网》收录的文本内容侵犯了您的权益或隐私,请立即通知我们删除。