Status and Design of the Advanced Photon Source Control ... - CERN

7 downloads 12352 Views 445KB Size Report
own hardware. This custom hardware also required custom software. Today, most new facilities are .... The heart of an IOC is a memory-resident database to-.
© 1993 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Status and Design of the Advanced Photon Source Control System W. McDowell, M. Knott, F. Lenkszus,M. Kraimer. N. Arnold, R. Daly Advanced Photon Source, Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 additional crates controlling insertion devices. A real-time operating system,VxWorks, is run in the crate central processing This paper presents the current status of the Advanced unit (CPU) to provide the basis for the real-time control. Photon Source (APS) control system.It will discussthe &sign Design challenges for the group implementing the APS decisions which led us to use industrial standardsand collaborations with other laboratories to develop the APS control controls included protecting investment from rapid obsolessystem. The system uses high performancegraphic worksta- cence and designing into the system the ability to quickly tions and the X-windows Graphical User Interface (GUI) at the incorporate improved equipment and software. The APS apoperator interface level. It connects to VME/VXI-based mi- proach to the solution to theseproblems is to use a distributed croprocessorsat the field level using TCP/lP protocols over control systemand standards,to provide “tools” to the greatest extent possible instead of custom programming, and to collabhigh performancenetworks.This strategyassuresthe flexibility and expansibility of the control system. A defined interface orate with other laboratoriesand groups whenever possible. between the system components will allow the system to II. STANDARDS evolve with the direct addition of future, improved equipment The use of standardsallows vendor independence,a miand new capabilities. gration path for future advancesin technology, and the use of I. INTRODUCTION commercially available “tools” when these tools meet The APS acceleratorcontrol system is a distributed sys- requirements. A modular approach to design supports both tem consisting of operator interfaces,a network, and interfac- hardware and software modularity in crates, workstations, I/O modules,etc. Standardsalso make it possible to shareacceleres to hardware. ator control software and collaborate with other laboratories. The operator interface is a UNIX-based workstation with Before hardware standards,each facility designedand built its an X-windows graphical user interface. The workstation may own hardware. This custom hardware also required custom be located at any point on the facility network and maintain full software. Today, most new facilities are selecting hardware functionality. The user hasthe ability to generateand alter conbased upon industrial standardsand thus sharing software has trol displays and to accessthe alarm handler, the archiver, become possible. interactive control programs,custom code, and other tools. III. COLLABORATION The TCP/IP networking protocol has beenselectedas the underlying protocol for the control systemnetwork. TCP/IP is The advantagesof collaboration are obvious. Coliaboma commercial standard and readily available from network tion reducesthe need to start from scratch when a majority of hardware vendors. Its implementation is independent of the the system requirements are not unique. Collaboration also particular network medium selectedto implement the controls takesadvantageof existing “tools” that meet standardrequirenetwork. In the development environment copper Ethernet is ments and has the effect of freeing up staff to work on “non-s the network medium; however, in the actual implementation a tandard” requirements.EPICS collaborators now include Los fiber-based system using hub technology will be utilized. The Alamos National Laboratory, Lawrence Berkeley Laboratory, function of the network is to provide a generalizedcommuni- and the SuperconductingSupercollider Laboratory. cation path betweenthe host computers,operator workstations, Prior to the Accelerator Control Toolkit Workshop in input/output crates,and other hardware that comprise the con- 1988 [l] the APS controls group had decided to examine existtrol system. ing control systemswith the aim of determining if they could be The crate or input/output controller (IOC) provides direct usedat APS. After studying severalsystemswe decided to purcontrol and input/output interfaces for each accelerator sue a collaboration with the AT-8 group at Los Alamos Nasubsystem. The standard crate uses either the VME or VXI tional Laboratory (LANL). standards,a Motorola 68040 processor,network communicaAPS received the fist version of the LANL Ground Test tions, and a variety of signal and sub-network interfaces.The Accelerator Control System (GTACS) software in late 1988, 68040 processorprovides the crate with the intelligence to al- the controls and computing group at Argonne APS, with the low it to run its software autonomously with respect to all cooperation of Los Alamos AT-8, suggestedand implemented other devices in the system.The software running in the crate several changesto the structure of the core software which fahides hardwaredependenciesfrom the high-level softwarerun- cilitated the incorporation of many different hardware devices ning on the workstation. There are approximately 45 crates without recompiling the complete code. This new, extensible, used in the accelerator control systemwith plans for about 50 version of the code was then named EPICS (Experimental *Work supportedby U.S. DOE Office of Basic Energy Scienc- Physics and Industrial Control System) to distinguish it from the original GTACS. GTACS is still in use at Los Alamos and es under contract no. W-31-109~ENG-38. Abstract

0-7803-1203-l/93$03.00

0 1993 IEEE

1960

PAC 1993

several other sites. Argonne, with the cooperation of Los Alamos, has taken a lead role in developing and applying EPICS tools. Los AlamOShas taken the role of coordinating the development efforts between laboratories as well as maintaining and improving sections of the system software.The Advanced Photon Source control system has been completely developed using EPICS tools. The original applications at APS were the radio frequency (RF) test standand the linac test stand.Today the linac itself is being installed and is completely controlled by the EPICS system. As a further example of the APS commitment to EPICS, it has beendecidedthat EPICS will be the systemused to develop and run all ANL-developed experimental beamlines and front-end devices at the APS. Continuing developmentof the software is foreseen.APS plans to improve the systemby adding new functionality when required by applications. We expectother laboratorieswill also add functionality to the system.

B. Channel Access

Channel accessprovides network-transparent access to IOC databases.It is basedon a client-server model. Each IOC provides a channel accessserver which is willing to establish communication with an arbitrary number of clients. Channel accessclient services are available on both OPIs and IOCs. A client can communicatewith an arbitrary number of servers.[2] C. Database

The heart of an IOC is a memory-resident databasetogether with various memory-residentstructures describing the contentsof the database.EPICS supportsa large and extensible set of record types, e.g. ai (Analog Input), ao (Analog Output), etc. Each record type has a fixed set of fields. Some fields are common to all record types and others are specific to particular record types. Every record has a record name and every field hasa field name.The first field of every databaserecord holds the record name, which must be unique across all IOCs attachedto the sameTCP/IP subnet.A number of data structures are provided so that the databasecan be accessedefficiently. IV. GENERAL DESIGN FEATURES OF EPICS EPICS-basedcontrol systemsinclude operator interfaces Becausethey accessthe databasevia databaseaccessroutines, which consist of multi-screen UNIX workstations using a most software components do not need to be aware of these graphical user interface basedon the X-windows Motif model. structures. The selection of a workstation implementation based on X- D. Database Access With the exception of record and device support, all acwindows for the operator interface allows field instruments, cess to the database is via the channel or database access video tools and the interface for controls and data acquisition, and the software development effort to take place in the same routines. Database scanning is the mechanism for deciding environment. It is now possible to locate consoles in offices, when to processa record. Four types of scanning are possible: labs, seminars,and whereverthey are required in the field. The periodic, event, I/O event, and passive. operator can selectby list, diagram,flow chart, and map as well A requestcan be madeto processa record periodically; a as the more standardtext-basedselection menus.The worksta- number of time intervals are supported. Event scanning is tion supports external software interfaces including: Wingz, based on the posting of an event by any IOC software Nodal, Mathematics, accelerator modeling codes,Fortran, C, component.The I/O event scanning system processesrecords and any application software a physicist may write. Auxiliary based on external interrupts. An IOC device driver interrupt displays using X-window terminals and projection and large routine must be available to acceptthe external interrupts. screendisplays in the main control room and seminarrooms are E. APS-Developed EPICS Tools easily implemented using commercial equipment. The Motif-based Display Editor/Manager Tool (MEDM)

V. SPECIFIC EPICS FEATURES EPICS provides a number of tools for creating a control system.This minimizes the need for custom coding and helps ensureuniform operator interfaces. An arbitrary number of IOCs and operator interfaces (OPIs) can be supportedand, as long as the network is not saturated, no single bottleneck is present.If a single IOC becomes saturated,its functions can be spreadover severalIOCs. Rather than running all applications on a single host, the applications can be spreadover many OPIs. A. EPICS Core Software

EPICS consists of a set of core software and a set of optional components.The core software, i.e. the componentsof EPICS without which EPICS would not function, are: channel access-clientand server software, databasescanners-monitors, the databaseconfiguration tool (DCT), and the source/release control. All other softwarecomponentsare optional.

allows staff to easily create,configure, and modify displays and then activate and connect displays to actual hardware. The display editor portion of MEDM provides processconnections via an interactive display editor/control. Editing/drawing commands are used to build displays with little or no custom programming required to build applications. Processconnections to the data are entered as processvariable name and field name; no other knowledge of the hardware configuration is required. This tool allows the designer to modify any aspectof the display element, as well as copy, align, and group display elements. Standarddrawing tools can be used to create backgroundswhich can then be imported into MEDM via GIF files. The alarm handler provides the ability to display alarm messagesin a hierarchical manner. The backup and restore tool (BURT) stores and retrieves data from selected channels. A databaseconfiguration tool @CT) allows the application designer to configure the run-time database.The knob manager (KM) allows the operator to attach physical knobs to process variables.

1961 PAC 1993

Third party softwarenow interfaced to EPICS via channel connection for setpoint, proportional, integral, and derivative accesscalls include Wingz, Nodal, DevTest, Mathematics and gains; incremental or positional output; and anti-windup and an interpretative version of C. An automatic cavity condition- reseton the integral term. ing system has been developed using a Mathamatica routine VII. NETWORKS AND SUBNETS running under EPICS. The communication network will be a combination of VI. SYSTEM FEATURES FDDI, Ethernet over fiber, and Ethernet over copper. Future The equipment interface or input/output controller is plans call for the introduction of 100 MB Ethernet and ATM based on VME/VXI standardand usesa Motorola 68040 mi- when theseprotocols have been standardized.The cable plant croprocessorfor control and a fast, real-time kernel, VxWorks, will be installed using fiber with a hub and spoketopology. All as the operating system.No local disk drive is required in this fibers will terminate in the main control room. This technique system. The software image can be down-loaded from a file will allow APS to tailor network bandwidth as required by the server or from on-board PROM. The systemalso supportstask application running in a particular IOC. priorities and interrupts as well as custom code. The APS conSubnetscan be driven from the IOC. GPIB, RS-232, and trol system will use about 45 such crates. More than twenty Bitbus [3] are presently supported. These subnetsallow variVME input-output modules are currently supported. Others ous instruments and low-cost, few-point interfaces to be will be supportedas they becomeavailable and desirable. connectedand controlled. The Bitbus can be used to make reMost information preprocessingis performedat this level. mote, multidrop connections to GPIB and other interface Sequential and control-loop operations can be performed. In subsystems. this way, maximum benefit is gained from the many IGC proVIII. PRESENT STATUS cessorsoperating in parallel. All seven of the linac 100 are now installed and have Hardware I/O can be generalizedinto several types: ana- been successfully tested. All subnetshave been installed and log and binary I/O, stepper motor, and sub-network are being tested.The linac timing systeminstallation and testconnections. Hardware records contain information for run- ing is complete. Local consoles, implemented with time processingincluding scaling, engineering units, hardware X-terminals, are now operational in the klystron gallery. File address,and scanning information. The processdatabasecon- servers and OPIs have been installed in the injector control tains parameters such as scan requirements, address of I/O, room to support linac commissioning. An FDDI link between engineering unit conversions,alarm limits, control parameters, the Building 362 development area and the injector control current value, etc. for each defined processvariable. Records room hasbeen installed and is operational. This allows contincan be linked together to implement complex algorithms. The uedcontrols developmentand supportsnetwork growth into the databasescannerscansdatabaserecords and updatesdynamic final APS site. Positron accumulator ring (PAR) installations fields (i. e. value, alarm status,severity, etc.). Data conversions will start in June 1993. including linear, piecewise linear, and value-to-state are EPICS tools in development include a graphical processsupported.Alarm checking for limit violations, stateviolations, variable links tool which will reducethe complicated processof hardware communication errors, and alarm severity is creating and documenting multi-parameter control processes. supported. Binary and analog I/O are provided through the A generalizeddrag-and-dropprocesshasbeen developedto fadatabase.Analog input canbe smoothed,and analogoutput can cilitate the transfer of process-variable namesbetween EPICS be either incremental or positional and the output rate of change tools. The sequencertool hasbeenported from the IOC to the can be specified. Multi-bit (16 states)and single binary I/OSare OPI using a Posix threadslibrary. supported. IX. REFERENCES All I/O fields can be connectedto a hardware device or [l] Accelerator Automation Application Toolkit Workshop, another databaseelement (calculator, PID, fan-out to several sponsoredby AT Division and MP Division, Los Alamos devices). Timing signals, motion control, and transient digitizNational Laboratory and CERN, Geneva, 31 October - 4 ers are supportedthrough the database. November, 1988. Stepper motor records can get desired position/velocity [2] J. 0. Hill, “Channel Access: A Software Bus for the input from user or other data, provide positional or velocity LAACS,” in Accelerator and Large Experimental Physics mode operation, provide position feedbackthrough an encoder Control Systems, D. P. Gurd and M. Crowley-Milling, Eds., or another databaserecord, and allow simple closed-loop posiICLAEPCS, Vancouver, B. C., Canada,pp. 288-291,1989. tion maintenance.Limit switchesare supportedthrough indexer or other databaserecords. [3] G. J. Nawrocki, N. D. Arnold, M. G. Hoffberg, J. R. Winans, S. J. Benes, “An I/O Subnet for the APS Control General purposecalculations, a PID algorithm, and a sigSystem, The BITBUS Universal Gateway,” these nal selector are supported to provide closed-loop control and proceedings. data filtering. The calculation record supportsup to six setsof input, C language expressions,algebraic operations,relational operations, boolean operations, and trigonometric functions. The PID algorithm allows a user interface optional database

1962

PAC 1993

Suggest Documents