IntroductiontoEPICSAndrewJohnsonComputerScientist,AES-SSGAESEPICSTraining—May2013—IntroductiontoEPICS2WhatisEPICS?■ACollaboration■AControlSystemArchitecture■ASoftwareTool-kitAESEPICSTraining—May2013—IntroductiontoEPICS3WhatisEPICS?■ACollaboration–Beganin1989betweenLANL/GTA&ANL/APS•(BobDalesio&MartyKraimer)–Over150licenseagreementsweresignedbeforeEPICSbecame“opensource”in2004–RecentEPICScollaborationmeetings•100+Attendees•30+Institutions•75+Presentations–Mailingliststech-talkandcore-talkshowthecollaborationinaction–Collaborativeeffortsvary•Jointdevelopmentofnewsoftware•Assistinfindingbugs•AnnualCodeathon(CodeSprint)•Sharetools,schemes,andadviceAESEPICSTraining—May2013—IntroductiontoEPICS4WhatisEPICS?■MajorCollaborators–ANL(APSAccelerator,APSBeamlines,IPNS)–LANL(LANSCE)–ORNL(SNS)–SLAC(SSRL,LCLS)–HZB(BESSY-2)–PSI(SLS)–DIAMONDLightSource–TheAustralianSynchrotron–KEK■RecentCollaborators–ITERAESEPICSTraining—May2013—IntroductiontoEPICS5WhatisEPICS?EPICSForEPICS,clientandserverspeakoftheirChannelAccessrolei.e.ChannelAccessClient&ChannelAccessServerClientClientServerServerCACACACA■ACollaboration■AControlSystemArchitecture–Network-based“client/server”model(hencethelogo)AESEPICSTraining—May2013—IntroductiontoEPICS6WhatisEPICS?■ChannelAccessclientsneedtoaccessProcessVariablestocarryouttheirdesignatedtasksAChannelAccessservergivesitsclientsaccesstoitsProcessVariablesStripToolMEDMProcessVariablesProcessVariablesCASCASCACCACAESEPICSTraining—May2013—IntroductiontoEPICS7WhatisEPICS?■ProcessVariable(PV)–AProcessVariableisanamedpieceofdataassociatedwiththemachine(e.g.status,readback,setpoint,parameter)–ExamplesofPVnamesandvalues:•S1:VAC:reading3.2e-08torr•LINAC:BPM4:xPosition-0.323mm•BOOSTER:gateValvePosition‘OPEN’•S3:DIPOLE:PS:setPoint123.4Amps•APS:Mode‘StoredBeam’•BL3:HISTOGRAM{3,8,1,2,56,44,32,43,3,5,1}AESEPICSTraining—May2013—IntroductiontoEPICS8WhatisEPICS?■ProcessVariable–AProcessVariableisanamedpieceofdatawithasetofattributes–ExamplesofAttributes:•AlarmSeverity(e.g.NO_ALARM,MINOR,MAJOR,INVALID)•AlarmStatus(e.g.LOW,HI,LOLO,HIHI,READ_error)•Timestamp•Numberofelements(array)•NormalOperatingRange•ControlLimits•EngineeringUnitDesignation(e.g.degrees,mm,MW)AESEPICSTraining—May2013—IntroductiontoEPICS9WhatisEPICS?■AControlSystemArchitecture–Network-based“client/server”modelwherethebasicdataelementsareProcessVariables–TheChannelAccessProtocoldefineshowProcessVariabledataistransferredbetweenaserverandclient–TheentiresetofProcessVariablesestablishaDistributedReal-timeDatabaseofmachinestatus,informationandcontrolparametersProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASProcessVariablesCASAESEPICSTraining—May2013—IntroductiontoEPICS10WhatisEPICS?■Bydefault,ChannelAccesstrafficisconstrainedtoasingleTCP/IPv4subnet,butconfigurationoptionscandirecttrafficelsewhere■Physicalhierarchiescanbeimplementedusingstandardnetworkswitchesandrouters,andCAGatewaysGatewayAESEPICSTraining—May2013—IntroductiontoEPICS11WhatisEPICS?■AnyprogramthatusestheChannelAccessprotocolcanberegardedas“EPICSCompliant.”MyAcceleratorSimulatorCode(PVs)CASMySpecialDataCollectionProgramCACEPICSisatool-kitofprogramsthatareEPICSCompliantorassociatedwithothersuchprograms.Userscanselectexistingtoolsthatmatchtheirneeds,ordevelopnewtools.StripToolMEDMCACCACiocCore(PVs)LabView(PVs)CASCACCASCACAESEPICSTraining—May2013—IntroductiontoEPICS12PowerSupplyBeamPositionMonitorVacuumGaugeComputerInterfaceComputerInterfaceComputerInterfaceProcessVariables:ChannelAccessServerS1A:H1:CurrentAOS1:P1:xS1:P1:yS1:G1:vacuumChannelAccessClientChannelAccessClientChannelAccessClientChannelAccessClientHowdoesitdoit?AESEPICSTraining—May2013—IntroductiontoEPICS13PowerSupplyBeamPositionMonitorVacuumGaugeComputerInterfaceComputerInterfaceComputerInterfaceProcessVariables:ChannelAccessServerS1A:H1:CurrentAOS1:P1:xS1:P1:yS1:G1:vacuumiocCoreChannelAccessClientChannelAccessClientChannelAccessClientChannelAccessClientRemoteControl&MonitoringAccessSecurityAlarmDetectionDataTrending/ArchivingAutomaticSequencingAlarmLogging/ReportingDataConversion/FilteringClosed-loopControlClosed-loopControlOperationalConstraintsOperationalConstraintsDataTrending/ArchivingModeling/Simulation/AnalysisAutomaticSequencingConfigurationControlWheredoesitdoit?AESEPICSTraining—May2013—IntroductiontoEPICS14CanonicalFormofanEPICSControlSystemCommercialInstrumentsIOCIOCIOCIOCCASCASChannelAccessIOCSoftwareEPICSDatabaseSequenceProgramsCustomProgramsReal-timeControlClientSoftwareMEDMALHStripToolTCL/TKPerlScriptsOAGAppsMany,manyothersCAServerApplicationCustomChassis/PanelsTechnicalEquipmentProcessVariablesAESEPICSTraining—May2013—IntroductiontoEPICS15RTEMSIOCIOCIOCIOCCASCASEPICSBaseisportableandrunsonmostmajoroperatingsystemsCommercialInstrumentsCustomChassis/PanelsTechnicalEquipmentTypicalRealizationofanEPICSSystem