TRIUMF: Canada's national laboratory for particle and nuclear physics

A conceptual design for the TRIUMF KAON Factory control system Dawson, W. K.; Dobinson, R. W.; Gurd, D. P.; Serre, Ch. 1987

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
51833-TRI-1987-01.pdf [ 56.58MB ]
Metadata
JSON: 51833-1.0107821.json
JSON-LD: 51833-1.0107821-ld.json
RDF/XML (Pretty): 51833-1.0107821-rdf.xml
RDF/JSON: 51833-1.0107821-rdf.json
Turtle: 51833-1.0107821-turtle.txt
N-Triples: 51833-1.0107821-rdf-ntriples.txt
Original Record: 51833-1.0107821-source.json
Full Text
51833-1.0107821-fulltext.txt
Citation
51833-1.0107821.ris

Full Text

A CONCEPTUAL DESIGN FOR THE TRIUMF KAON FACTORYCONTROL SYSTEMW .K . Dawson, R .W . Dobinson,* D.P. Gurd and Ch. Serre* TRIUMF Technology Division*on leave of absence from CERNCANADA’S NATIONAL MESON FACILITY OPERATED AS A JOINT VENTURE BY:UNIVERSITY OF ALBERTA SIMON FRASER UNIVERSITY UNIVERSITY OF VICTORIA UNIVERSITY OF BRITISH COLUMBIAUNDER A CONTRIBUTION FROM THE *onle*oa vfbfovsc ser*sla em so*oCo TR.I-87-1TRI-87-1A CONCEPTUAL DESIGN FOR THE TRIUMF KAON FACTORYCONTROL SYSTEMW .K . Dawson, R .W . Dobinson,* D.P. Gurd and Ch. Serre* TRIUMF Technology Division*on leave of absence from CERNPostal address:T R I U M F4004 Wesbrook Mall Vancouver, B.C.Canada V6T 2A3 December 1987All trademarks found in this report are acknowledged as such.iiTABLE OF CONTENTS1.0 Introduction....................................................... 1 - 11.1 Why Was a Design Study Undertaken?................................ 1 - 11.2 How Was the Work Carried Out? .................................... 1 - 11.3 Report L a y o u t ..................................................... 1-21.4 Acknowledgements ..................................................  1 - 32.0 Requirements....................................................... 2-12.1 The Accelerators..................................................  2-12.2 Timing and Synchronization ........................................  2-12.3 Multiple Rings, Physical Size and Complexity .....................  2-42.4 High Intensity....................................................  2-52.5 Safety Systems..................................................... 2-62.6 Users of the Control S y s t e m ...................................... 2-72.7 General Needs - Motherhood and Apple P i e .........................  2-93.0 Review of Current Technologies and Trends in Other Laboratories . 3-13.1 The Importance and Role of Protocols and Standards................  3-13.1.1 Review........................................................... 3 - 13.1.2 Trends in Other Laboratories .................................... 3-23.2 Software...........................................................  3 - 33.2.1 Review...........................................................  3 - 33.2.2 Trends in Other Laboratories .................................... 3 - 73.3 Minicomputers and Microcomputers .................................. 3-83.3.1 Review........................................................... 3 - 83.3.2 Trends in Other Laboratories .................................... 3 - 93.4 B u s e s .............................................................  3-103.4.1 Review...........................................................  3-103.4.2 Trends in Other Laboratories .................................... 3-123.5 Local Area N e t w o r k s ..............................................  3-133.5.1 Review........................................................   . 3-133.5.2 Trends in Other Laboratories .................................... 3-153.6 Architecture of Control Systems .................................. 3-163.6.1 Review..........   3-163.6.2 Trends in Other Laboratories .................................... 3-184.0 Reference M o d e l ..................................................  4 - 1iii5.0 Implementation..................................................... 5-15.1 The Human I n t e r f a c e ..............................................  5-15.1.1 The Main Control R o o m .......................................... 5 25.1.2 Types of Control Stations ......................................  5-35.1.3 The Operator Interface - H a r d w a r e ...............................  5-35.1.4 The Operator Interface - S o f t w a r e ...............................  5-45.2 Software...........................................................5.2.1 The Software Environment - System Software .....................  5-55.2.1.1 Operating Systems ............................................  5-35.2.1.2 Network Software..............................................  5-65.2.1.3 Languages .....................................................5.2.2 Applications Kernel ............................................  5-85.2.2.1 Console Software ..............................................  5 85.2.2.2 Equipment Access..............................................  5-95.2.2.3 Alarms, Logging, Etc...........................................  5-95.2.3 Application Software............................................  5 105.3 Components of the System..........................................  5 115.3.1 The L A N .........................................................  ^-115.3.2 Equipment Crates................................................  5 135.3.3 Processors....................................................... ^5.3.4 Parting S h o t s ..................................................  ^-165.4 Methodologies .........................  .........................5.4.1 Site Standards..................................................  5-165.4.2 Software Implementation... ....................................... 5-175.4.2.1 Software Engineering..........................................  5 175.4.2.2 Program Definition and P r i o r i t y ............................... 5 185.4.2.3 Application Program Production ................................ 5-195.4.3 Controls Hardware ..............................................  5-205.5 The Organization and Role of the Controls G r o u p ..................  5-216.0 Resources Required ................................................6.1 Manpower...........................................................6.1.1 TRIUMF S t a f f .....................................................6.1.2 The Universities................................................6.1.3 Canadian Industry ..............................................6.1.4 Participation by People from Other Laboratories ................ 6-36.2 Equipment Cost Estimates..........................................  £-46.3 Implementation Timescales ........................................iv7.0 Conclusions 7-17.1 General R e m a r k s ..................................................  7 - 17.2 Current Proposed Design ..........................................  7 - 27.3 Further Work - A Program of Research and Development.............. 7-37.3.1 Overall Design..............................................  7 - 37.3.2 Timing and Synchronization of the Accelerator Complex.... ......  7-37.3.3 Analogue and Video Signal Collection, Distribution and Display . 7-37.3.4 General Software Environment .................................... 7 - 47.3.5 The Use of Workstations and Personal Computers as Consoles . . . 7-47.3.6 VME Hardware and S o f t w a r e ..................................  7 - 47.3.7 Local Device Controllers ........................................ 7 - 57.3.8 L a n g u a g e s ................................................... 7 - 57.3.9 Modelling and Expert Systems .................................... 7 - 57.3.10 Data B a s e s ..................................................... 7 - 57.3.11 Integration With the Present TRIUMF Control System ............ 7-57.4 Final R e m a r k s ....................................................  7 - 6AppendicesAppendix A - Contributors............................................  A-lAppendix B - Preliminary Device Inventory ...........................  B-lAppendix C - Buses Versus Local Area Networks .....................  C-lvExecutive SummaryA design study for a KAON Factory control system has been carried out during the period December 1986 to June 1987. In the course of the study wide-ranging discussions have taken place both internally and with colleagues in other laboratories. Work done so far represents only the first step in the design phase and must be followed up by more detailed studies. Suggestions are presented for a next stage program of KAON Factory control system research and development which must be carried out before final choices can be made. There are many urgent questions still to be resolved.We have reviewed the characteristics of the accelerators making up the KAON Factory, the requirements of potential users of the controls system and the current state of the electronics and computing technologies that might be used. A preliminary inventory of equipment to be controlled has been taken.We propose a reference model for the control system and investigate practical implementations of the model based on the use of widely supported national and international standards. The selected implementation makes use of a number of well established but not fully mature technologies. It can accommodate enhancement of capabilities in a straightforward evolutionary way. An important consideration was the commercial availability from more than one source of as many of the hardware and software components as possible.Preliminary cost estimates for the control system total $38.1 M. Since some major and many minor components have not yet been fully defined this number should be treated as a lower bound. When compared to the overall KAON Factory cost estimate we found, not unexpectedly, that the construction of the control system is manpower intensive. Manpower costs for both hardware and software represent about 17% of the overall manpower cost estimate while equipment costs are about 7.7% of the estimated accelerator costs. A major contributor to the costs is application software which will take about 120 man years - roughly one-half the total manpower estimate.New recruitment for the KAON Factory control system must take account of theneed for specialized talents not at the moment found on site. The KAON Factory control system requires the application of advanced high technology in many areas which are new to TRIUMF. Maximum opportunity should be given topresent staff to meet these new challenges.The magnitude of the new control system will represent a significant increase in size and complexity over the present TRIUMF one. A successful and timely implementation will require, from the start, proper long term planning and organization. It will be essential to use appropriate management tools throughout the project. The role and organization of the controls group should be defined carefully giving it equal weight with other participants in the KAON Factory program. We suggest that a controls representative now be included in the appropriate KAON Factory planning and study groups.SOMMAIREUn avant-projet pour le systAme de controle de l'usine A KAON a AtA effectuA entre dAcembre 1986 et juin 1987. Tout au long de cette Atude de larges discussions ont eu lieu, aussi bien A TRIUMF qu'avec nos collAgues des autres laboratoires. Le travail rAalisA jusqu'A maintenant reprAsente en fait seulement la premiAre Atape de 1'Atude et doit “etre suivi par des recherches plus approfondies. Nous proposons un programme de Recherches et DAveloppements pour le systAme de controle de l'usine A KAON, qui doit "etre entrepris avant que les decisions finales ne soient prises. Beaucoup de problAmes urgents doivent encore'etre rAsolus.Nous avons examinA les caractAristiques des accAlArateurs composant l'usine A KAON, les requetes des utilisateurs potentiels du systAme de controle, l'Avolution de la technologie en Alectronique et en informatique. Un inventaire prAliminaire des Aquipements A controler a AtA effectuA.Nous proposons un raodAle de rAfArence pour le systAme de controle et examinons ses possibles realisations A partir de produits standardises au niveau national et international La realisation choisie fait appel A un certain nombre de technologies bien connues, mais pas encore complAtementAtablies. II peut s'adapter A un accroissement de capacitAs par uneevolution simple et directe. Nous avons pris la precaution de prAvoir, aussi souvent que possible, plus d'un fabricant par produit, aussi bien pour le materiel que pour le logiciel.Les chiffres prAliminaires que nous avons estimAs donnent un total de $38.1 Mpour le systAme de contr'Sle. Etant donnA que certains composants importants et beaucoup de composants de moindre importance n'ont pas encore AtA AtudiAs, ce chiffre doit etre pris comme une limite infArieure. Lorsque nous comparons avec le budget total du projet de l'usine A KAON nous trouvons, tout naturellement, que la rAalisation du systAme de controle rAclame une main d'oeuvre importante. Les co'uts de la main d'oeuvre pour le matAriel et le logiciel reprAsentent environ 17% du cout total de la main d'oeuvre AvaluAe tandis que le cout des Aquipments n'atteint qu'environ 7.7% du cout estimA des accelerateurs. Le logiciel d'application contribue d'une facon importante A ces co^ its; il demandera vraisemblableraent de l'ordre de 120 hommes—annAes, ce qui correspond A peu prAs A la moitiA de la main d'oeuvre totale estimAe.La politique de recrutement pour le systAme de controle de l'usine A KAON doit prendre en considAration le manque actuel de certains types d'experts sur le site; il necessite 1 application de technologies avancAes dans plusieurs domaines qui sont nouveaux pour TRIUMF. Nous devons permettre A 1'actuel personnel de TRIUMF de relever ces nouveaux dAfis.Le systAme de controle proposA pour l'usine A KAON reprAsente un Anorme accroissement de complexitA comparA A celui existant pour TRIUMF. Une realisations couronnAe de succAs et effectuAe dans les temps requiert depuis le dAbut du projet une organisation et une planification A long terme correctes. II sera absoluraent nAcessaire d'utiliser tout au long du projet des outils de gestion appropriAs. Le l^ ole et 1'organisation du groupe Controle doivent etre definis soigneusement, en lui donnant un pouvoir de dAcision au moins Agal A celui des autres participants A la construction de l'usine A KAON. Nous suggArons qu'un reprAsentant du groupe controle soit dAs maintenant inclus dans les groupes d'Atudes appropriAs de l'usine A KAON.vii- 1-1 -1.0 IntroductionThis report is intended to give accelerator builders an idea of what may be realistically expected of the control system, equipment specialists an idea of how their equipment could be integrated into the accelerator complex, control system people an idea of the type of system they will be expected to provideand, finally, to give those who provide the funds a better idea of the costsand effort required.1 »1 Why Was a Design Study Undertaken?A major new development is being planned for TRIUMF.1 The proposed KAON Factory would transform the present laboratory into a world class centre for 21st century nuclear and particle physics. It represents both scientifically and technically a significant increase in size and complexity compared to the present cyclotron.The goal of this design study, which commenced in December 1986, has been to focus attention on the control system required for the sophisticatedchain of accelerators and storage rings making up the KAON Factory.It has stimulated wide-ranging discussions, both internally and with colleagues in other laboratories.Many detailed technical questions can be answered only within the framework of a research and development program which we recommend as a follow-up to the current design study. It is also essential that all equipment specialists and machine physicists early on enunciate clearly what they expect from the control system. It is equally important that the controls group understand what is expected. The controls group organization suggested later explicitly tries to address this problem.1.2 How Was the Work Carried Out?Work was carried out within the organizational framework shown in Appendix A. In order to better understand the problem of implementing a control system for the KAON Factory several concurrent approaches monitored by an overall group were followed. The control system was examined from a general architectural viewpoint as well as from the viewpoint of individual components such as processors, buses and LANs. Similarly general software problems were examined along with ones associated with specific pieces of equipment. A preliminary inventory of accelerator components was carried out in order to add to our understanding of the magnitude of the control system.Visits were made to several laboratories including FNAL, CERN, LBL, SIN, SLAC, KEK and Los Alamos. Contact with colleagues active in the field of accelerator control was further enhanced by attendance at recent conferences and workshops.1 KAON Factory Proposal, TRIUMF, September 1985- 1-2 -The current state of much of the technology relevant to a KAON Factory controls system has been reviewed and informal discussions have been carried out with several potential equipment suppliers.Despite the quite substantial number of people listed in Appendix A-l most had major commitments to other activities and were unable to participate more than a few hours a week. Consequently the total manpower expended on this design study did not exceed 2 man years.As a result of studies carried out during the first four months of thisyear a voluminous, though incomplete, and in some places contentious,first draft of this report was produced. This so-called Workbook formed the basis of the final report presented here. Much of the detail present in the workbook has been omitted from this report in the interest of conciseness and we hope readability. Interested readers may find it useful to refer back to the workbook for a more detailed treatment of some topics.1.3 Report LayoutFollowing this introduction, Chapter 2 is concerned with establishing requirements. Particular attention is focused on the accelerators making up the KAON Factory, stressing how synchrotron operation differs fromthat of the present cyclotron, and the specific needs of the differenttypes of users of the control system.Chapter 3 reviews the current status and future prospects for those areas of computing and electronics that will be used to build a KAON Factory control system, together with trends at other laboratories.Building on the contents of Chapters 2 and 3, Chapter 4 proposes a reference model for a KAON Factory control system.Chapter 5 looks at possible implementations of the reference model.These recommendations are our best estimate of how to proceed at this time. They may change as technologies evolve and new products become available, and as a result of the proposed program of research and development. Particular emphasis in Chapter 5 is placed on software and also on the need for good design, implementation and organization methodologies. These are vital aspects of a control system which are often overlooked.Chapter 6 reviews the resources required to build the KAON Factory control system.Chapter 7 summarizes the work done to date and the conclusions reached so far. It suggests a program of research and development that needs to be undertaken prior to completing the design of the control system.- 1-3 -1.4 AcknowledgementsWhile this report was, of necessity, written by a few people its content is based on the work of many. Appendix A-l names those at TRIUMF formally involved with the study. In addition Roger Poirier, Klaus Reiniger, John Yandon and Ulrich Wienands contributed to our understanding of requirements and ways to satisfy them. Colleagues from other laboratories were generous with their time.Many of our colleagues have read this report in draft form. All their comments are appreciated and have had a definite impact on this version.The views expressed are the responsibility of the authors.All during the preparation of the workbook and this report Maureen White has endured, and survived our many changes. Thanks.Ch. Serre would like to acknowledge CERN providing him with the opportunity to work at TRIUMF during his sabbatical year and TRIUMF's Technology division for its hospitality.- 2-1 -2.0 RequirementsIt is early in the KAON Factory project. For this reason quantitative answers to many control system questions are not yet readily or reliably available. Much has been learnt about the general thrust of requirements but details are missing. Hence the requirements presented here are much more qualitative than quantitative. However, the information supplied does provide a useful framework into which more quantitative aspects can be placed as available.2.1 The AcceleratorsThe specifications for a KAON Factory, based upon considerations of the science it is to address, call for the provision of 100 microamp proton beams at 30 Gev. Technical and economic considerations have lead to a proposed design using the present TRIUMF cyclotron to inject into a chain of five rings as follows (Figure 2.1)::accumulates 440 MeV beam from the TRIUMF cyclotron over 20 ms periods :50 Hz synchrotron; accelerates beam to 3 GeV :collects 5 Booster pulses and manipulates beam longitudinal emittance:main 10 Hz synchrotron; accelerates beam to 30 GeV:30 GeV storage ring for slow extractione each 34 m in radius while the C, D and E rings are each 170 m in radius. Figure 2.2 is an energy-time plot showing the progress of the beam through the five rings. It shows that the TRIUMF cyclotron output is accepted without a break and that the B and D rings run continuous acceleration cycles. Hence the full 100 microamps from the cyclotron can be accelerated to 30 GeV for either fast or slow extraction.A AccumulatorB BoosterC CollectorD DriverE ExtenderThe A and B rings2.2 Timing and SynchronizationThe TRIUMF experience has been with a cyclotron, which is a dc machine.In that context, it is important to state the most obvious but most essential at the outset: the KAON Factory proposal is based uponsynchrotrons, which are pulsed machines. This imposes a whole new way of thinking, not yet experienced at TRIUMF, for example the control system must be very closely synchronized to the cycles of the different accelerators.important to distinguish between the two time scales relevant to acquisition and control in a synchrotron environment - that of the RF system, which handles individual proton bunches, and that of the magnet system, which determines the acceleration cycle for beam pulses. The RF- 2-2 -3 GeV BOOSTERTUNNELS*o n  \A B n;—  5m— ► BOOSTERi-4.5rrn MAIN RING100 m I iCYCLOTRONNEUTRINOFACILITYEXPERIMENTALHALLFigure 2.1 Proposed Layout of the KAON Factory Accelerators30 GeV3 GeVl 440 MeVI i i i i " i— i— i— i— i— |0 100Time (ms)Figure 2.2 Energy-time Plot Showing the Progress of the Beam Through the Five Rings- 2-3 -frequencies range from 46 to 61 MHz in the Booster, and from 61 to 63 MHz in the Driver. Thus the 'buckets' into which beam bunches are transferred in the C ring, for example, are only 16 nsecs wide, and the proton bunches themselves are less than 2 nsecs wide. Subnanosecond precision is required. This level of performance cannot be achieved using programmable processors. Rather it must be achieved by fast feedback systems implemented in hardware. Only operator interfaces and high level, slow, supervisory control based on sophisticated diagnostics need be provided by a central control system.The central control system is more intimately concerned with phenomena and activities occurring on the timescale of the acceleration cycles of the booster and driver rings. However, it is very unlikely that the implied time constraints can be met by general purpose computer systems. Where programmable processors are used they are likely to be embedded in smart function generators, power supplies and analogue-to-digital converters. This leads immediately to the concept of a control system with highly distributed intelligence.A key need will be for a standard site-wide timing system. A set of fiduciaries with respect to known timing references, such as fixed points on the magnet cycle of the B and D rings, would be made available. Standard timing modules, could, under computer control, be programmed to recognize particular fiduciaries and trigger appropriate actions.It can be concluded that many functions will be performed by what can be called synchronized data acquisition and control. This involves a set-up phase which is computer controlled, followed by an action phase triggered by some externally defined time event probably from the site-wide tuning systems and an optional final phase to read back data and status associated with the action. The rapid cycling of the booster and driver rings makes this synchronized mode of operation essential.For example, a series of measurements would be set up around the ring, the actual measurements would be provoked by an external trigger and afterwards the resulting data would be collected, processed and displayed for the operator at his console. Each set of acquired data must be time stamped to ensure coherence throughout the whole control system. Some diagnostic equipment require triggering precision in the nanosecond range. The measurement lasts from a few microseconds to an entire acceleration cycle. Set-up, collection and display should, in most cases, add no more than about half a second to these times.Pulse-to-pulse modulation (PPM) is not foreseen for the KAON Factory. Nonetheless, if it is at all possible without undue expense, the option should be left open in the system design. The SPS experience suggests that retrofitting for PPM is a major and expensive undertaking.- 2-42.3 Multiple Rings, Physical Size and ComplexityThe choice of a multiple ring design, and the physical size and complexity of the proposed facility, also influence the design of its control system. The individual rings are fairly tightly coupled by the beam itself. Although the stringent requirements for bucket to bucket transfer between rings is not the responsibility of the computer control system, the macroscopic timing of injection and extraction to ensure energy matching is, and will require some independent communications between accelerator subsystems. In general, however, it should be possible to think of the rings as separate systems, and the control system architecture should be such as to allow the beam to be 'handed off' in a known state from one ring to the next. Beam information in the transfer lines must therefore be readily and equally available to systems responsible for the control of the rings on either side. Multiple stage acceleration is hardly new, and should present no insurmountable problems for the control system.The physical size of the proposed facility is an important factor in determining the architecture and implementation of the control system. Although the geographic distribution of equipment to be controlled has not yet been determined, it is safe to say that it will be distributed on the scale of the outer ring, which is 340 m in diameter. This appears to present no special controls problems, such as are met on the large sites at LEP and the proposed SSC. There are several general techniques that could be applied, ranging from the predominantly CAMAC-based approach used in the present TRIUMF control system to designs based on local area network technologies, as implemented at SLC and LEP. The physical size of the KAON Factory allows its communications backbone to be selected from a wide range of possible technologies, based upon considerations such as functionality, bandwidth, cost and reliability.A further way of looking at the KAON Factory control system is in terms of the number of input and output parameters to be acquired and controlled. These can be classified into two broad types, analogue I/O (analogue to digital and digital to analogue converters) and digital I/O (control and status bits). Shown below are the numbers obtained from a very preliminary inventory of devices (see Appendix B) associated with the KAON Factory control system, together with those for the present TRIUMF cyclotron and the CERN PS complex. Devices range in complexity all the way from thermocouples, to beam profile monitors.Number of Devices Analogue I/O Digital I/OTRIUMFKAON Factory CERN PS3,7006,1006,5005,60012,80011,40011,10024,30044,000- 2-5 -The number of analogue channels expected for the KAON Factory already exceeds the total for the mature CERN PS and is twice the number at the TRIUMF cyclotron.In contrast with TRIUMF many analogue values for the KAON Factory have a time variation, representing a greater degree of complexity.The total number of analogue and digital parameters at the KAON Factory (35,000) is roughly comparable to the estimated total channels at the proposed EHF (40,000) and LAMPF II (30,000). The KAON Factory number must be considered an irreducible minimum which will grow as more detailed design of the accelerator is carried out. The low digital I/O number is, we feel, due mainly to our incomplete understanding of all the requirements. In addition the provision of tens of thousands of thermocouple channels has been proposed but not included.The construction of the KAON Factory will last at least five years. The A and B rings will be built first in their own building, followed by C, D and E rings in a tunnel. Commissioning of A and B will take place while the other rings are still under construction and it is possible that the E ring will be built after C and D have been commissioned. The design of the control system should take account of this sequential construction.2.4 High IntensityThe principal specification of the KAON Factory, which affects the design of the control system as much as the accelerator itself, is the high circulating current. We have learned to respect the 50 kilowatts of power in the TRIUMF beam. There will be 3 Megawatts of power in the KAON Factory beam! There is therefore a stringent requirement to minimize absolute beam losses for personnel and equipment protection as well as for accelerator performance. This means acceptable percentage losses are far less than for TRIUMF, in spite of the fact that beams in the KAON Factory rings can occupy 50% of the pipe cross-sections as compared to only 10% or 20% in external TRIUMF beams. There is therefore far less margin for error.This has two direct consequences for the control system. Firstly, a requirement for careful and complete instrumentation for beam diagnostics; and secondly, a probable heavy dependence on simulation for commissioning, tuning, and operation.The beam diagnostic system will probably make the most severe demands on the control system data acquisition bandwidth. Demands on data acquisition for beam diagnostics are increased by the rapid cycling rate. For example, a closed orbit measurement in the Driver Synchrotron will require the synchronized acquisition of data from 48 monitors at a specified time in the acceleration cycle. These data will have to be converted to horizontal and vertical beam centroids, and then collected- 2-6 -for orbit calculations and display. To minimize the amount of data invoked, a further indication that a widely distributed model is appropriate.The control system will be required to invoke sophisticated procedures for producing beams of lower average intensity for commissioning and tuning. It will be instrumental in the delicate operation of "painting" the beam extracted from TRIUMF into the A Ring phase space, required to achieve high intensity and to extend the life of the stripper. Moreover, rapid changes in beam loading due to the empty buckets in the circulating beams, as well as the asymmetric loading of the C ring, may result in beam instabilities requiring diagnosis by the control system. For these and other reasons the high beam intensity in the KAON Factory will result in heavy demands on its control system.Beam control will in general require the manipulation of many parameters simultaneously. Such changes will frequently be changes in parameter programs over the acceleration cycle. Moreover, as has already been demonstrated by experience in commissioning the SLC, the requirement for stringent beam control to minimize losses in an accelerator of the complexity of the KAON Factory implies extensive use of simulation. As arule, the effects of parameter changes should be calculated and displayedbefore possibly being applied to the beam. To meet these requirements, the control system will have to include powerful number-crunching computers on line.2.5 Safety SystemsThere are two types of safety system: Those whose primary aim is toprotect equipment and those whose primary aim is to protect people.In t u r n  equipment protection is of two types. For one type eachpiece of equipment ensures that it is being asked to operate, and is indeed operating, within safe limits. Each device must protect itself from self destruction or damage. If a power supply receives inadequate cooling because of reduced water or air flow it should turn itself off • This is a fundamental principle of device design.The other type of equipment protection is required by the possibility oflack of proper cooperation between otherwise correctly operating pieces of equipment or is invoked as a secondary response to equipment failure. For example, the RF frequency may not be set to properly track the time change in a ring's dipoles hence causing much greater beam losses than acceptable. If such a condition persists it may cause damage to the machine or make sections of it highly radioactive. Machine protection actions may proceed by aborting the current action or by dumping the beam and then waiting for a manual reset before resuming operation or simply trying again at the next opportunity. The reason for any machineprotection action should be recorded in a way that is available to thecontrol system and this information should be clearable only by the- 2-7 -control system. The action taken by a piece of equipment in order to protect itself may also lead to a machine protection action being taken.All users of the control system, especially operators, require an alarm system which describes problems such as those outlined above in as clear and unmistakeable a way as possible. Most accelerator systems are weak in this respect largely because of the complexity of the problem. However, recent advances in technology may provide distinct improvements in what can be done. Expert systems are coming of age and could well be the cornerstone of a good alarm and diagnostic system for accelerators.Not all the personnel safety system can be automated. Site safety rules such as the wearing of radiation dosimeters and hard hats cannot be enforced by computer. The parts of the personnel safety system that can be automated are associated with the monitoring of hazardous conditions (electrical, chemical and radiological) and the controlling of access to areas where such hazards may exist. Three general principles apply to the personnel safety system. They are as follows:1. The personnel safety system must be separate from the accelerator control system.2* The logic of the personnel safety system must be implemented in as tamper-proof a way as possible. Any changes should be based on a formal approval process and made only by designated people after approval has been obtained.3. The accelerator control system must not be allowed to override any interlock or action taken by the personnel safety system.Although the need for an independent personnel safety system is clear it is also clear that there must exist an intimate relationship between it and the accelerator control system. Operators make use of both systems hence both should be available in the control room. Many accelerator parameters are of interest to both the control and the personnel safety systems. For example radiation field measurements required for personnel safety can be used as an aid for beam tuning. Also status indicators for most devices are of interest to both systems. In general, to maintain the independence and integrity of the systems, devices should have separate sensors for each system. The control system should be able to find out that a device failed to function simply because certain named interlocks were not satisfied.2.6 Users of the Control SystemThe operation of any complex accelerator facility requires the efforts of specialists in many different disciplines. Very often these specialists are dealing with the same physical piece of equipment but are looking at these pieces in quite different ways and with different degrees of abstraction. Since all interact with the accelerator through its central control system the control system must be able to present each specialist with a perspective of the accelerator appropriate to the tasks to be- 2-8 -carried out. Details of operation should be hidden when not required, yet be available for monitoring and adjustment when appropriate.The equipment specialists will be the first to meet the control system. They have to construct and test the independent pieces that will later be assembled to form the accelerator. Hence at times they require complete autonomy (i.e. stand-alone operation) while at other times their facilities have to be integrated into a larger system.In order to fully test and maintain their equipment they will need portable test stations as well as the ability to violate normal operating rules (but not safety rules) in order to ensure proper operation under all circumstances. They will also require the tools to develop and test device control algorithms in both hardware and software. Equipment specialists have to be sensitive to overall controls issues.It is the responsibility of the accelerator physicists to take the pieces of hardware supplied by the equipment specialists and connect them to form an operating machine. Hence they will be concerned not only with the functioning of individual components but also, more importantly, with their interaction. They require measurements of properties of the beam itself and the control system should supply help in converting beam measurement information into new sets of control parameters for the various pieces of equipment. Accelerator physicists must also be able to explore different operating modes of the accelerator in order to either improve beam quality or to produce new types of beams. Particularly because of the high beam intensity the use of modelling and simulation programs as well as expert systems will be required prior to the exploration of new operating modes or the actual attempts to improve oldones •The accelerator operators have the task of keeping the accelerator complex running continuously for long periods of time producing, at different times, beams of various qualities. The control system must provide them with a convenient way to monitor overall operation of the accelerator, to diagnose and correct faults and to change parameters as required. An important function carried out by the control system is theperiodic logging of machine parameters. The proper selection,understanding and analysis of logged information is vital for reliable operation and an indispensible tool for operators. The ergonomics of the control consoles and the main control room (MCR) are particularly important for operators as they have to deal with the system 24 hours a day, day in and day out.Experimentalists place few additional requirements upon the accelerator control system. In general these requirements consist ofsupplying information about the state of the accelerator and its beam ina way that can be correlated with the acquisition of experimental data. Provision should be made to allow diagnostic information gathered by experiments to be sent to the MCR. Secondary channels associated with- 2-9 -experiments should be controllable from the main control room as well as from the experiment counting room. However, experimenters should not be allowed to change parameters which affect the overall operation of the facility or its safety.Associated with the running of the accelerator are also those responsible for its maintenance and repair. These people, mostly a subset of all those mentioned above, have particularly pressing needs. If the accelerator has suddenly ceased operating, these people (especially the operators) are under great pressure to make it operational again in the least amount of time. They must be able to perform tests, either ad hoc or canned, to determine the source of the problem. On-line documentation of accelerator operation and devices is essential as probably is the assistance of expert systems. Operators must feel confident that during these difficult times the control system is not contributing to the problem.Finally among the users of the control system one must include the providers of the system. During the initial stages of accelerator construction the control system specialists, both hardware and software, need extensive program development and test facilities as well as the tools to make quantitative measurements of the performance of various components of the system. The control system has to be designed and operated in such a way that these needs are looked after along with the requirements of other accelerator subsystems.When scheduling maintenance activities the maintenance of the control system itself should not be overlooked. While much of this work can be done in conjunction with other maintenance activities the providers (and maintainers) of the system must have at scheduled intervals unimpeded and uninhibited access to the entire control system.2.7 General Needs - Motherhood and Apple PieOne very clear user need that has emerged is for the autonomous operation of subsystems (such as one or more RF stations) or even individual components (such as a single magnet or beam monitor). This stand-alone mode is of particular significance for testing, commissioning, repair and maintenance. An easy transition between such an environment and fully integrated operation within the overall control system must exist. The need for stand-alone operation suggests again a control system with highly distributed intelligence.The nerve centre for operating all accelerators will be a single main control room. It should contain several primary consoles from which overall control of all accelerators can be carried out. The MCR will act as the hub for viewing analogue and video signals from all over the site and will also be the focal point for site-wide voice communication.It provides the most convenient place from which access to all parts of the accelerators and experimental areas can be controlled. Given the- 2-10 -importance of the MCR it is extremely important to make sure it is properly planned, adequately sized and ergonomically laid out.It will be important to provide much of the same functionality obtainable in the MCR at other places on site, for example, local to equipment or in offices and laboratories. However, in many cases read-only access should be possible. It is equally important to present a uniform human interface throughout the control system.Since many people will be working on the accelerator during its construction and its operation it is essential that appropriate documentation of each part of the system be prepared as work progresses. This documentation should be stored in computer accessible form and widely available on-line. Obvious candidates for computerized documentation are topics like site cabling, device operating manuals, operational procedures, etc. As for the control system itself a design and implementation methodology should be chosen that assures that documentation gets produced at the same time that the hardware and software does. Documentation should not be considered a luxury to be enjoyed only when time is available. Indeed, no part of the accelerator should be considered complete until it is properly documented. Computer aided design tools will be required in many areas and should be provided very early on in the construction period.Another need of just about all users is history. An equipment specialist repairing a particular piece of equipment should have a complete performance, maintenance and repair history of the unit under test. Indeed, the specification of the information to be recorded in such a history should be part of the specification of each device. Needless to say all this information should be available on-line to all users.The very nature of the job of producing the control system makes its constructors strong proponents of standards - hardware and software. These standards must be set in conjunction with all users and then adhered to. A great variety of standards is required ranging from the amplitude of analog signals, the labelling of cables and how devices are turned on and off all the way to how graphics information is described and presented. It is probably true that standards can raise the cost of certain individual pieces of equipment but it is unequivocally true that well thought out standards reduce overall costs and make system maintenance and repair much more manageable.3.0 Review of Current Technologies and Trends in Other LaboratoriesIn this chapter the current status of the technologies relevant to designing a KAON Factory control system is reviewed. Trends in the use of these techniques in other laboratories are also briefly surveyed. Particular emphasis is placed on standards.The situation described in this chapter and any conclusions reached should be the subject of ongoing review. The field of computing and electronics advances at a hectic pace and new technologies and products appear almost daily on the marketplace.3.1 The Importance and Role of Protocols and Standards3.1.1 ReviewThe best technique yet devised for the construction of a large complex system is to carry out a process of decomposition into smaller subsystems or modules. Each subsystem performs a well defined task which may require the services of other subsystems. The decompositionprocess continues until a set of simple subsystems is obtained whichare expressed in fundamental terms of the implementation tools being used.There is no single way to carry out this process. Its effectiveness must rely upon the skill and understanding of those who do it as well as the care with which the needs of the system are defined.If subsystems and users are to obtain the services of other subsystems the interface between them has to be carefully defined. Designers on either side of the interface need to know precisely what to expect from each subsystem and precisely how to ask for it. This completedefinition of what to expect and how to ask for it is called aprotocol. Protocols may be concerned with services that are supplied entirely by software, entirely by hardware or by a combination of hardware and software. An important aspect of protocols is that they can specify the service to be supplied without specifying how that service is to be performed.Hierarchies of protocols can be constructed so that progressively more complex services can be carried out while at the same time retaining conceptual simplicity.Perhaps one of the most interesting and important areas of technology advancement since the construction of the TRIUMF cyclotron, and one that is generally overlooked, is the area of standards. At the time of construction of TRIUMF all instrumentation buses, with the exception of the nascent CAMAC, were proprietary. Only CAMAC remains today. Had TRIUMF followed another route great difficulties and expenses would- 3-1 -- 3-2 -have had to have been faced when support for the chosen proprietary instrumentation bus ceased.The concept of non-proprietary, open, standards has spread to numerousand diverse areas of computing and electronics. In many casesstandardization has taken place under the auspices of national or international bodies such as IEEE, ANSI, NIM, ESONE and ISO.Protocol standards exist to provide a wide spectrum of services, for example:perform a cycle on a microprocessor bus send a packet over a local area network- communicate between processes in different computers- log on to a remote computer access a remote fileThere are language standards (for example FORTRAN) and standard subroutines giving high level access to instrumentation (the CAMAC standard subroutines). There is even a standard operating system (UNIX) .The wide industrial support for open standards is in no small measuredue to user demand for such standardization.The importance to users of open standards arises for many reasons.Their openness allows users to, if required, know exactly what is going on. The user has a choice of suppliers and there is plenty of room for niche suppliers who only fill a particular aspect of user needs. Interfaces between popular standards are also often available commercially. Open standards are much more stable than proprietary ones and tend to evolve in an upward compatible way.There are, however, no specific protocols or standards for certain aspects of KAON Factory controls. While extensive use can be made of public domain standards there are still important large areas of the system which are too specialized or immature for the international community to have considered. We will have to develop our own in-house standards to cover these areas.3.1.2 Trends in Other LaboratoriesAll accelerator facilities subscribe to the importance of open standards. Many of the improvements that the providers and users of controls systems would like to make are associated with the replacement of proprietary or home-based solutions with ones based on true standards.- 3-3 -In the absence of suitable open standards FNAL was forced to design and implement an in-house site-wide protocol for communication with the numerous and varied microprocessors present in the control system.The LEP Controls group is making extensive use of widely available bus and local area network standards and is building on them to provide further services relevant to accelerator needs.The CERN PS upgrade has shown the value of a well conceived site protocol for magnet power supplies. On the surface such a problem appears deceptively simple. The reality is that there are complexities in both the hardware and software that took many man years to get under control. A group of laboratories is now working on a common protocol in this area.3.2 Software3.2.1 ReviewSoftware development tools cover a wide range of facilities ranging from the obvious (languages) to the not so obvious (code management systems). There are many commercially available versions of each of these facilities. It is important that the implementations of the various facilities chosen be compatible with one another and, of course, that they be capable of running on the hardware chosen.Indeed, the choice of hardware should probably be deferred until at least the general thrust of the software choices is known.LanguagesThe topic of computer languages is one that arouses deep passions.While there seems to be a strong desire on the part of many users to take advantage of all the latest hardware technology there seems to be a corresponding reluctance to take advantage of advances in language design.Before discussing languages it is probably worthwhile to briefly mention some features that are considered useful if not necessary for the production of large systems:a methodology should be chosen which allows automatic checking for logic consistency at the design stage.- the control structure of the language should make programs easier to read, understand and maintain.- the decomposition of a program into simple and logically complete modules should enforce cohesion and robustness and allow a clear separation between program definition and implementation.- explicit definition of all objects used in a program allows a compiler to detect a wide class of errors.- 3-4 -It is unfortunate that Fortran, the most popular language for the physical sciences makes little use of modern language concepts and structures. In a laudable attempt to retain backward compatibility with earlier versions of the standard, FORTRAN allows sloppy and hence difficult to maintain and debug programs. No doubt the next version, FORTRAN 8X, will contain some of the newer developments in language design but the language's inherent characteristics do not make it appropriate for control systems. Nonetheless FORTRAN will no doubt be used for much of the modelling and other calculational aspects of the control system.Pascal, C, Modula-2 and ADA are all languages that incorporate some or all of the desirable features outlined previously. Pascal was originally intended for small jobs running in a compile, load and go environment in order to teach students good programming practices and techniques. Recently a series of implementation level descriptions have attempted retroactive changes to the language definition to accommodate modularity and to extend its utility to realistic environments. Despite this we feel that Pascal should not be used in control systems.C can probably best be viewed as a high level assembler in that it allows access to low level hardware features that are usually hidden from most high level language users. It is high level in its control flow and data structuring facilities but places responsibility for modularity and portability in the hands of the programmer. C code could replace most assembler code required with the beneficial result that the programs generated would be less difficult to produce, more readable and easier to maintain.C has become a very popular and widespread language for programming real-time microprocessor-based applications. Most commercially available software in this area has a very heavy C bias. C is therefore a strong candidate for widespread use in the KAON Factory control system.As its name implies Modula-2 includes the capability of program construction from independently developed modules. It also supplies features that support accessing hardware details and concurrency management, both of which are required for real-time and system programming. Modula-2 has not yet received the widespread commercial support that Pascal has but this is likely to change.Finally there is the U.S. Department of Defence's ADA standard. While no accelerator control system is either using or planning to use ADA many control systems experts believe it should be given serious consideration. It is a standard that is and will be rigidly enforced. Some consider its size (no sub- or super-sets allowed) and richness to be a disadvantage. Others believe this to be an advantage. There are concerns about the current lack of experienced ADA programmers.- 3-5 -Most languages rely upon the operating system to supply such features as multitasking and exception handling. Hence program stability and portability has to rely upon operating system stability and universality. Not so with ADA where many features previously usually the province of the operating system are defined as features of the language. ADA has features essential for the building of embedded microprocessor systems.It is as yet too early to reach firm conclusions about ADA. Products and expertise are not yet widely available. More study will be required before reaching a final decision whether to use it in the KAON Factory controls system. However, the prospects are exciting and possible benefits tempting.Interpreted languages of which BASIC is the best known example, will have an important role to play in any KAON Factory control system.They are invaluable in a test and maintenance environment where rapid changes and small ad hoc programs are the norm. In some cases interpreted languages can be compiled; this offers advantages in terms of both speed and the ability to incorporate the compiled code with modules written in other (compiled) languages.BASIC is the only interpreter to approximate a standard, however PILS and NODAL are widely used in our sister laboratories. PILS is said to incorporate many excellent language features; however NODAL was developed specifically for distributed accelerator control systems.Operating SystemsNo single operating system works well in all the hardware and operational environments anticipated for the control system. There are general purpose systems for program development and computation, real-time systems, and rudimentary executives running in embedded processors. Further, with one exception, operating systems are proprietary in nature and run, at best, on a family of similar processors — VMS on the VAX family for example. The non—proprietary operating system is UNIX and it suffers from the fact that several widespread versions of it exist.Given the current capabilities of operating systems it is likely that the control system will have to invoke at least two of them - one for general purposes and one for response critical real-time work. UNIX, especially if current efforts to generate a unified version are successful, is probably the best choice for general purposes. While it is not always as robust or as friendly as VMS it does allow the choice of a wide range of computing systems. For real-time work thechoice of operating system will be dependent upon the choice of processor or vice versa. For example the choice of VAXELN would lead to the use of VAX processors. It should be remarked that standard UNIX is not considered to be suitable for time critical real-time applications, although real-time extensions have been implemented by- 3-6 -some manufacturers and are the subject of study by the IEEE Portable Operating Systems P1003 Standards Committee.User InterfaceOne technique much in vogue is that of windows. A window system displays the activity of multiple applications on one screen at the same time. The user has control over the size, position, shape and overlap of the windows and can move data between them. The relevance of windows to control systems is readily apparent: windows can be usedto build a very attractive and effective human interface between the control system and its users.Recently a number of manufacturers including Apollo, Data General, DEC, Hewlett-Packard and SUN, have announced support for a public domain standard windowing system, originating from MIT, called X Windows. X will be of considerable significance in achieving portable applications programs. The same source code could be compiled to run on a variety of different hosts without dependence on the precise nature of its hardware. X also helps enforce a uniform user interface via a tool box of standard menus, message boxes, keypads, etc. Windowing is supported in a multiprocessor environment, an application program can run on one machine and use a display on another remote machine connected via a local area network.X Windows has been specifically developed for use in a multi-vendor environment. It is written in C and source code is available at nominal cost. It appears to be a highly significant tool for use in a KAON Factory control system.Expert SystemsIf not at the start then certainly later on, expert systems will play an important role in the control system. Unlike the situation just a short time ago creating an expert system is no longer a research project. While the main part of the control system involves the writing of procedures the expert system emphasis is on data - the knowledge base - as the procedures are fixed and supplied. A great variety of expert system building tools is becoming available which allows a selection to be made which closely approximates one's needs. Besides supplying the procedures that are applied to the information in the knowledge base (the inference engine) these building tools supply good developer and user interfaces. It should be noted that the construction of an expert system requires much help and work on the part of experts and as yet we have no experts in running KAON factories!- 3-7 -Data BasesAccelerator control systems require the use of many data bases. These include the description and addresses of accelerator devices, the current values of accelerator variables and many types of stored data having to be retrieved in an efficient and timely manner. Although commercial applications are often quite different, the widespread need for data base management systems in business and industry has led to a proliferation of products which run on most computers.Although other systems of data base organization are both possible and extensively used, the relational model, in which data is organized into interrelated two dimensional tables, has a strong theoretical basis, and has gained broad acceptance and extensive application in recent years. Two popular products based on the relational model are Oracle and Ingres, both currently in use at TRIUMF. Oracle has been chosen at CERN for management of LEP data bases.Commercial data base products provide tools for the management of widely distributed data bases over standard wide and local area networks. An international standard language for the interrogation and manipulation of data bases — the 'Standard Query Language' or SQL - has been adopted and is supported by all major commercial suppliers.Earlier experiences with commercial data base products in real-time accelerator applications were not entirely successful. The commercial product should be used for data base management (as intended) and as a tool for the production of more efficient, distributed, run-time data bases.3.2.2 Trends in Other LaboratoriesIn the U.S. FORTRAN is the dominant language used in control systems.In Europe and Japan interpreters are widely used, in particular Nodal was designed specifically for accelerator controls. The use of C has increased markedly over the last few years but in addition, at least at CERN, Modula-2 and Pascal-like languages have played a role. There are for the moment no plans in any lab to use ADA. However, several people have remarked on the likely interest of the language on the timescale of the KAON Factory.UNIX is playing a major role at LEP and is also starting to appear in control systems elsewhere. There is as yet no trend towards any particular real-time operating system for microprocessors, even if there is a strong convergence on the Motorola 68000 family and VME.- 3-8 -Experience at the CERN PS and in large physics experiments has demonstrated the advantages to be gained in using a software engineering approach for applications programs.Modelling, simulation and expert systems seem destined to play an ever more significant role in accelerator controls and were the subject of much attention at the recent Washington Particle Accelerator Conference. Both CERN and SLAC are devoting effort to exploring possible uses of expert systems.A number of general lessons can be learned from our sister laboratories. Firstly, that it is possible to design a system which allows non-control system specialists such as operators, equipment engineers and accelerator physicists to write application programs which run in the control system, make use of system resources, do what is wanted, and don't crash. Secondly, that it is important not to underestimate the effort required to implement the software.It is from TRIUMF itself that we must learn a final lesson, namely that one must not get trapped into writing large amounts of code in assembly language. Modern accelerator controls systems require a user friendly high level language programming environment.3.3 Minicomputers and Microcomputers3.3.1 ReviewTechnology has now evolved to the point where computing power for minicomputers and microprocessors is quantized in Mips and memory is measured in Mbytes. Furthermore, the conventional distinction between minis and micros has all but disappeared as the power of microprocessor chips has increased. 32-bit microprocessors are now the norm and are complemented by powerful floating point coprocessors. This technology now rivals that used in the highest performance supercomputers in terms of Mflops per dollar. Recent benchmarks at the Argonne National Laboratory indicate that most 'bang per buck' comes not from a Cray but from a 68000-based SUN workstation.Very significant computing power can be placed wherever it is required and dedicated to a single user or task. Distinctions between different systems are more likely to be made in terms of their packaging, peripherals and software environment supported than purely in terms of processing power. For example, traditional minicomputers are delivered as complete, full-featured hardware and software systems. In contrast more sophisticated users may choose to synthesize their own system using single board computers, memory and peripherals built up around a standard backplane bus. This approach offers a system tailored to a- 3-9 -particular need. However, the onus to provide software, and to perform overall system integration, falls upon the end user.A significant development over the last years has been the arrival on the marketplace of powerful professional workstations and personal computers (the distinction is not always easy to make). These machines are characterized by a radical change in man-machine interface compared to traditional time-shared systems, for example as found on IBM mainframes and VAX family minicomputers. Slow alpha-numeric terminals using keyboard interaction have been superseded by high resolution (1000 x 1000 pixels) bit-map graphics, menu and windowing mechanisms, together with point and pick devices, of which the ubiquitous mouse is the best known and most widely used. Workstations and personal computers offer a significant platform on which to build cost effective and friendly interfaces between control systems and their users.3.3.2 Trends in Other LaboratoriesAlthough many control systems in operation today use traditional minicomputers there is a clear trend in accelerator and industrial control systems towards distributed processing. The availability of powerful microprocessors at low price has led to ever increasing functionality being placed at lower levels of the control system — frequently right within the equipment being controlled. Although perhaps not evident, this trend is driven at least in part by considerations of economy.At LEP, for example, every power supply will have its own microprocessor associated with it. There are over 1000 processors distributed at all levels throughout the Fermilab control system. A major thrust of the CERN PS upgrade was to move functionality closer to the equipment, and to redesign the software around this concept. Over the past several years TRIUMF, although limited somewhat by the architectural constraints of an older system, has installed over 30 local processors (TRIMACs).At least in North America DEC computers have found widespread use in accelerator control systems. Nonetheless, it should be noted that where obliged by political or other considerations, it has been demonstrably possible to build successful control systems using other manufacturer's equipment (for example, at CERN, DESY and KEK). DEC cannot yet supply the low-end processing required in distributed systems, and other manufacturer's products, in particular the Motorola 68000 family, have assumed a prominent role in newer systems. Fears are widely expressed in many laboratories about the closed nature of current DEC products which makes the attachment of third party equipment difficult or even impossible. Even access to technical information is difficult as DEC has become increasingly paranoid about revealing the internals of its products.- 3-10 -Several laboratories advocate the use of workstations and personal computers as a basis for accelerator control consoles and are actively investigating the use of a WIMP user interface (windows, icons, menus and pointers). One important motivation is economy. Traditional consoles are expensive (each CERN PS console cost $500,000) and workstations offer high off-the-shelf functionality at low cost. It is important to note that although workstation based consoles are planned for LEP, and their potential has been impressively demonstrated at SLAC, there is as yet no operational experience with uniquely workstation-based accelerator control consoles.There is little agreement about what constitutes an ideal man-machine interface. In the past a wide spectrum of devices have been used; touch panels, tracker balls, knobs and buttons. In the main such devices are not directly supported by workstation manufacturers. Most laboratories use multiple screens at their main consoles. However, it is felt that future workstation-based consoles may reduce this need by the use of multiple windows.The use of personal workstations as operator consoles in accelerator control systems is fashionable and offers significant advantages compared to traditional schemes. However, it is early yet and the jury is still out.3.4 Buses3.4.1 ReviewToday one finds a bewildering choice of buses in the market place.1)Of these at least 30 are open standards. The major players for the next five years or so are probably known since there now exist popular and effective buses that match well with high performance 32-bit processors and advanced instrumentation.Despite the wide choice the number of buses of relevance to large accelerator control systems is limited to about a dozen. Generally, serial buses are used to connect geographically distant devices. Examples include MIL STD 1553 and the P1118 standard currently being developed by IEEE.The 1553 bus is a well established standard which has been in wide use in military applications for a number of years. The P1118 bus provides low cost communications between microprocessors and microcontrollers in an industrial environment. However, the definition of the standard is still in its early stages. Bitbus, an Intel product, is one candidate to become the P1118 standard; however, it is too early to know whether other manufacturers will support such a move. Reservations must be1) W.K. Dawson and R.W. Dobinson, Buses and Bus Standards, Computer Standards and Interfaces, to be published.- 3-11 -expressed about use of the P1118 bus if it is too closely tied to Intel and its products.There are several low/medium end buses designed around small cards, single processors and simple protocols. The IBM PC bus, STD, STE and G64 buses all fall into this category. They are particularly suitable for use in applications where local intelligence is built into equipment — for example, a power supply. Product availability for these buses is good with the possible exception of STE bus.Both VME and Multibus II are used as platforms on which to build multi-microprocessor systems. It is claimed that such an architecture can offer significant advantages over traditional minicomputers in terms of cost, performance and, above all, flexibility.High-end microprocessor based systems are dominated by VME bus products and Motorola 68000 family microprocessors. For many VME is the bus of choice over the older Multibus standard and the emerging Multibus II. VME scores heavily over Multibus II in terms of product availability, price, performance and software support.Despite the strong case for VME the bus is not without its problems. Interoperability between different manufacturers' products and electrical noise on the backplane are just two areas of concern for a prospective user. There are better buses around than VME. Both Multibus II and Futurebus are probably electrically more sound and provide a better bus architecture on which to build multiprocessor systems.Futurebus is a truly manufacturer and processor independent bus with many advanced features. However, it is too early to tell whether it will be supported to any great extent by manufacturers. The proposed IEEE Nubus standard, a simpler, though close relative of Multibus II, has recently been accepted for use in the newest version of the Apple Macintosh. Its support, which has been very uncertain until now, can be expected to grow.Obviously the high-end microprocessor buses provide a superset of the general capabilities of the low-end single processor ones. If the high-end features are not required then the choice should be governed by consideration of product availability, quality and cost. At present the cost differential between equivalent products for the two types of buses is decreasing - so much so that if one needs the capabilities of a high-end bus an additional low-end bus may not be required. Many construction and operating costs are reduced by making use of a single busing system. On the timescale of the KAON Factory it may be argued that the future lies with 32-bit processors. This is an additional reason not to support more than a single (high-end) microprocessor bus.- 3-12 -Given the widespread use of DEC computers, it is important to review buses associated with PDP-11 and VAX computers. The Unibus, having served DEC and its customers for so long, seems now to have been retired by DEC. However, its near relative, the Qbus, is said by DEC to have a healthy future, in particular for low-end systems. Qbus product availability is very good, but the bus is rather unsuitable for housing substantial numbers of process I/O modules; it lacks the convenient crate structure of CAMAC and most microprocessor buses. In addition the Qbus hardware provides very poor multiprocessor support and there is no software support from DEC.The new VAXBI bus is of considerable interest and it has on occasion been touted as a competitor to VME and Multibus II. However, DEC is very tightly restricting information about the technical aspects of the BI bus. Protocol chips are sold only to licensed companies whose proposed use clearly does not overlap present or planned DEC products. The closed nature of the BI bus eliminates it from consideration and also reduces the desirability of DEC computers. The very few BI compatible OEM products that exist appear to be extremely expensive when compared to equivalent products for other buses.CAMAC because of its architecture does not allow full advantage to be taken of distributed processing. Its role in normal control systems has been usurped by newer buses, increasingly VME. However, despite the fact that it is based on 20 year old technology concepts it could have a role to play in accelerator diagnostic systems because of the availability of many of the data acquisition modules required to make the measurements. FASTBUS is a possible choice for the instrumentation of very complex or high speed diagnostics with, possibly, some fast real-time feedback. Beam diagnostic systems have certain similarities to medium scale physics experiments and the ability to take advantage of expertise and experience with physics instrumentation systems is an advantage.The continuing use of the IEEE 488 standard seems to be assured although it will not play more than a rather restricted role. Most general laboratory test and measurements use this bus; oscilloscopes, digital voltmeters, transient recorders, etc., often come with a 488 connection.3.4.2 Trends in Other LaboratoriesThe clearest trend that has emerged during visits to other laboratories and discussion with our colleagues has been a move away from the use of CAMAC. There is no CAMAC at LEP and strong statements were made by leaders of both the CERN PS and FNAL controls groups, both of whose systems are instrumented in CAMAC, that they would not go that route again. The recent SLC control system does make extensive use of CAMAC, however, using Multibus to drive small clusters of CAMAC crates.- 3-13 -At CERN and FNAL there Is a very clear move towards the use of VME where it is claimed many of the modules required for process control are already available commercially. Availability of 'physics modules’ (fast ADCs, TDCs and scalers) in VME is admitted to be poor at the moment which reinforces our supposition that CAMAC may still have a role to play in the area of beam instrumentation. CERN has spent much time and effort on defining crate and power supply specifications and has recently spearheaded efforts to define a standard intercrate highway for VME.TRIUMF was somewhat of a pioneer in its choice of CAMAC as equipment bus in 1969 and extensive use is made of this standard in the present control system. A proposal for how VME might be insinuated into the TRIUMF central control system has been made.At LEP VME is complemented by several other buses. The 1553 bus is used in a 'local area network type role' for interconnecting equipment over larger distances. IEEE 488 plays a role in those areas where measuring and test instruments are required. The use of G64 at LEP seems to be contentious. Some people expressed the view that its 16- bit addressing capability is already proving a limitation, and that with VME prices dropping the need for G64 had lessened. A further comment was that single height VME boards could be used if standard size VME was deemed inappropriate for low-end systems.In conclusion, much of the accelerator controls world is turning from CAMAC to VME. There is probably still a role for CAMAC and IEEE 488 in specialized areas but there is no clear agreement about what other additional buses should be used.3.5 Local Area Networks3.5.1 ReviewThe dominant influence in the field of LANs are the IEEE 802 standards. Although there are several very successful proprietary LANs it seems unlikely that in the future they will have the attractiveness and general applicability of public domain standards. Many of the proprietary LANs came into existence before the 802 standards were fully developed.The protocols for the more popular 802 LAN standards have been or are in the process of being implemented in silicon. Besides reducing the cost of a network connection they also help ensure interoperability of devices on the hardware level.The 802 specifications include three types of medium access control methods: CSMA-CD, token bus and token ring. CSMA-CD (carrier sensemultiple access with collision detect) requires users of a common transmission medium to listen before sending data. If the medium is- 3-14 -already in use transmission is deferred until an absence of traffic is sensed. If two or more stations sense they are both trying to send at the same time transmission is aborted and tried again later after a random time interval which differs for each station. In token passing schemes permission to send, called the token, is passed among all users of the network so that each in turn is offered an opportunity to transmit.The 802.2 logical link control protocol provides procedures for the transfer of data between two stations. These procedures are independent of the lower level medium access methods used.The 802.3 CSMA-CD standard exists in several forms. First there is the original 'thick' cable Ethernet running at 10 Mbits/s and spanning distances of up to 2.5 km. 'Thin' Ethernet, or Cheapernet, uses a lower quality cable and runs at the same bit rate but supports fewer connections and spans a maximum distance of only about 1 km. The most recent development, called Starlan, runs at 1 Mbits/s over twisted pair (phone) lines and is targeted at cheap low end applications.There is a very wide range of 802.3 compatible products. Competition and the ready availability of protocol chips are driving prices steadily downward. Most computer manufacturers support 802.3 connections.The 802.4 token bus is seen by its supporters to have a number of advantages. It is said to be robust in a hostile environment where it can coexist on a broadband cable with video, voice and other data communications systems. In addition its predictable performance even under heavy loading makes it attractive for real-time applicationsrequiring a guaranteed response time. For the moment there are fewproducts; protocol chips are only just becoming available and prices are high by a factor of 4 or 5 compared to the 802.3 standard.802.4 is the basis of the MAP standard for factory automation. MAPwill eventually use a complete range of 0SI compatible protocols, however for the moment the specification is not finalized and products where available are expensive. Some manufacturers, in particular DEC, are lukewarm towards MAP. Measurements on MAP's real-time response have suggested its performance is poor. For the moment at least token bus and MAP appear to offer little to a KAON Factory control system.The token passing ring standard, 802.5, is of more relevance to accelerator controls applications. Current versions run at from IMbit/s to 4 Mbits/s over twisted pair cable. It can make use of a ring-star layout which makes it easier to add new stations, remove old ones and to isolate faults than with the more orthodox method of threading the ring directly through all the stations. Token ring like token bus is claimed to have a more predictable performance for real-time applications than 802.3 CSMA-CD. It can span longer distances than 802.3 and take advantage of fibre optics technologies.- 3-15 -Token ring is strongly supported by IBM. A complete chip set is available and reasonably priced products are appearing on the marketplace. However, product availability and computer manufacturer support lags considerably behind the 802.3 standard.In spite of considerable analysis and testing many practical performance questions for the various 802 standards remain unanswered. Under heavy loading conditions CSMA-CD systems are less predictable than token bus or ring systems. However, this neglects the network trauma caused when a token gets lost. Also many discussions neglect the software overheads of higher level protocols. It is probably safe to say that a 10 Mbits/s CSMA-CD system and a 4 Mbits/s token ring are both comfortable and reasonably predictable with a total data throughput of around 3 Mbits/s. Software overheads reduce this rate if only two stations are communicating.An interesting evolution of the 802.5 standard is FDDI (Fibre Distributed Data Interface) being developed by ANSI. It is a fibre optic token passing ring running at 100 Mbits/s. Systems with up to 2000 nodes have been discussed as have rings of a total length of 200 km. The close relationship between FDDI and the 802 standards means that it will be easy to replace a 802-based network with a FDDI one if required. The work required to replace, say, Ethernet by FDDI is, because of the careful layering of the standards, confined to the lowest layers and would not affect user application code. FDDI is still in the early stages of development and is at the moment expensive. Costs will certainly come down and FDDI will provide insurance in case an 802 application runs out of bandwidth. FDDI is likely to be supported by most if not all computer manufacturers. It will be a highly significant product on the timescale of the KAON Factory.The existence and likely future dominance of 802 and FDDI LAN standards solves only part of the LAN interoperability problem. Low-level compatibility between different manufacturers 802 products may be guaranteed and easily achieved; however, for the moment severe problems exist at higher (user) levels. Users require consistency across a multi-vendor heterogeneous local area network to allow, for example, remote log-on, file access and task-to-task communication. Although in the longer term there is agreement between most manufacturers to move towards the use of OSI standard protocols to meet these needs, for the moment OSI products are not really with us. The current reality is that there are only two really widespread suites of protocols, the proprietary DECNET and the more open TCP/IP originating from the well known DOD ARPA network.3.5.2 Trends in Other LaboratoriesNon-standard local area networks have been used in accelerator control systems for some time. These are either locally developed as at CERN, KEK, SLAC and DESY, or DEC proprietary as at FNAL.- 3-16 -More recently there has been a move towards using IEEE 802 standards.802.3 (Ethernet) is in use at the LAMPF control system and will be implemented as part of a PSR upgrade. Ethernet has been introduced into the SLC control system and the new control system for the KEK 12 Gev PS. It is already extensively used at TRIUMF, including a short segment for terminal service within the controls system. At the CERN PS°we were informed by the leader of the controls group that he would in future applications use Ethernet or Cheapernet instead of serial CAMAC.In those laboratories where there is a preponderance of DEC computers DECNET is extensively used.The 802.5 token ring will be used for the LEP control system. It is also being introduced at FNAL. In both cases much of the push for a token ring solution seems to have come from the large distances that have to be spanned. LEP has a mix of several manufacturers' computers and as a consequence has elected to use TCP/IP protocols as a lowest common denominator to communicate between heterogeneous systems.No laboratory has any plans to use token bus and MAP. There is however, interest in FDDI.3.6 Architecture of Control Systems3.6.1 ReviewAn accelerator control system provides an interface between operators and the accelerator complex. It consists of a collection of processes that acquire data, carry out control algorithms, drive displays, provide an operator interface, etc. Processes may be grouped into levels of a functional hierarchy.1)At the lowest level, processes interact directly with I/O modules, usually in crates, providing supervisory or closed loop control, data acquisition, condition monitoring and so on. We refer to these as equipment level processes (E).Processes at a higher level act as data concentrators (C), and may carry out alarm or other safety functions relating to subsystems.Third level processes provide the operator interface (Op). Operators can access all system data and set points for integration and presentation through this interface.The top functional level (U) provides library facilities, simulation, software development services, data base management and so on.1) P.N. Clout, Distributed Computers in Accelerator Control Systems. To be published in Automatica.- 3-17 -In general, processes at the lower levels require speed and responsiveness of real-time multitasking executives, while those at the upper levels require the services of full-featured operating systems.The availability of cheap processing power makes it possible to distribute processes among many processors geographically - by task, or by subsystem as required or appropriate. Given the scale of modern accelerator systems, their requirements can be met only with such a distributed multiprocessor system. The functional hierarchy of processes described above, present in any system, may or may not then be reflected in a corresponding hardware architectural hierarchy of computers.Systems in which the functional hierarchy is strongly reflected architecturally are said to be hierarchical. An extreme example of such a system is shown in Figure 3.1. Each functional level process resides in a computer which communicates through other processors and links to processes at other levels. Communication to processes at the same level must be established with the active participation of higher level processors. In the example shown, all four functional levels are directly reflected in the architecture.In flat topologies all functional levels communicate on a single system backbone. This allows peer-to-peer communication between all processors. Where such communication would require the intervention of another processor at another level in a hierarchical topology, the flat design is clearly more efficient.Flat topologies over distances of a few kilometers have become attractive because of the availability of network standards and of economical network interface chip sets which can be applied at all levels. Thus even an inexpensive local device controller can be directly attached to the LAN, and economies are achieved by having a uniform network interface and protocol throughout the system. Figure3.2 is an example of a completely flat system design.The flat topology has an additional advantage in terms of system reliability. Failure of a data concentrator computer in the hierarchical model of Figure 3.1, for example, isolates the operator from some equipment. Not so in the case of a flat topology, where a direct connection can still be established.One apparent disadvantage of the flat topology is that all interprocessor communication is concentrated on a single network, as opposed to the hierarchical case where most communication is point-to-point and traffic is shared among several independent buses and LANs. This potential bandwidth problem can be reduced by LAN segmentation which is achieved by the use of bridges which separate segments, passing only those messages with destinations on the other side.- 3-18 -There are two possible ways to characterize the various control system topologies. One is to count the worst case number of links required for communication between an operator console and an equipment crate. The other is to count the corresponding number for communications between two equipment crates. Intuitively both numbers are related to system responsiveness - the first to operator interactions and the second to general interequipment interactions. For the fully hierarchical topology (Figure 3.1) these numbers are 4 and 6 (operator, interequipment links) while for the flat topology of Figure 3.2 they are 1 and 1.3.6.2 Trends in Other LaboratoriesFigure 3.3 shows the basic topologies used in several accelerator control systems. We briefly discuss the features of each in turn.The TRIUMF control system uses a proprietary high speed (1/2 Megaword/ second) parallel interprocessor communications bus to connect utility computers, coordinators, and computers which run the operator consoles. Console computers and coordinators are Data General Nova 4s (16-bit computers). Utility computers are DEC VAXes and Data General Eclipses. All equipment crates are connected to all computers using parallel CAMAC and an executive crate interface. Some small subsystems are controlled by local processors in the equipment crates; however most equipment level control takes place in the Novas.The CERN PS control system uses the CERN designed packet switched star network to connect operator consoles, utility computers and coordinators. All machines are NORD minicomputers. Equipment crates are connected via serial CAMAC to coordinators for each of seven different accelerators.FNAL uses the high speed DEC PCL proprietary LAN to connect the same basic components as at the CERN PS. The consoles and coordinators are DEC PDP 11 minicomputers; the utility machines are DEC VAXes. The CAMAC equipment crates are again connected to the coordinators using the serial highway. Coordination is carried out on a per accelerator basis. For both the CERN PS and FNAL systems a large number of microprocessors are employed at the equipment crate level.The Tristan approach followed very closely that at CERN and FNAL. The consoles, utility computers and coordinators, in this case HIDIC minicomputers, communicate over an in-house designed fibre optic ring. Serial CAMAC is used at the equipment crate level. Coordination is on a per subsystem basis (beam monitors, vacuum, magnets, RF and beam transfers) for each of two rings.- 3-19 -The SLC controls system connects small numbers of CAMAC crates to geographically dispersed coordinators (Multibus-based microprocessor systems). The coordinators are connected to a utility computer using an in-house developed HDLC local network. Operator consoles are attached to utility computers (DEC VAXes) using one of two local area networks. Earlier consoles, based on Multibus crates, are connected via a prototype Ethernet LAN. Consoles added recently used VAX workstations connected via the IEEE 802.3 standard.LEP elected to use the IEEE 802.5 token ring to connect a cluster of operator consoles (Apollo workstations and IBM PCs) with utility computers (NORD minicomputers and IBM PCs). Coordinators are geographically distributed around the 28 km ring at the eight intersection regions. LEP has chosen to use VME-based 68000 multiprocessor systems in this role. Equipment crates (VME and G64) for each subsystem are connected to regional coordinators by the 1553 serial bus.These diagrams of control systems in other laboratories represent simplifications. Important nuances, such as the degree to which intelligence is distributed in equipment crates, are glossed over.In some cases, equipment crates contain no intelligence, only I/O registers. The figures have been presented in the particular way they have in an effort to emphasize the topological differences and similarities between systems. We have made a further attempt to quantify the 'degree of flatness' of the different system architectures by counting the worst case number of links required to communicate from a console to an equipment crate, or from one equipment level processor to another. The results are shown in Table 3.6.2.For example, in the case of LEP, Operator to Equipment messages require two hops - from Op to C (on the Token Ring) and then from C to E (on a 1553 bus). In the case of FNAL, equipment level to equipment level messages may require up to four 'hops' - from E to C, from C to U, from U to another C, and finally from C to the destination E. In a fully flat topology, one hop is always enough.We are aware that actual systems may not in fact pass messages as described, and emphasize again that the attempt is to illustrate and then quantify different architectural possibilities. It is clear that systems having a range of different 'degrees of flatness' have been successfully implemented and perhaps noteworthy that the most recent - LEP - is among the 'flattest'.-  3 -20  -  Table 3.6.2Characterization of Control Systems TopologyType Operator to EquipmentEquipment to Equipment *Hierarchical 4 6FNAL 3 4SLAC 3 3PS 2 3TRISTAN 2 3LEP 2 3IUFlat 1 1* Not all these systems have protocols that support equipment to equipment communications. These numbers are intended to give a measure of the topology and not its particular implementation.Fig. 3.1 Fully H ierarchical TopologyLevel 4Utility, ServicesLevel 3 ConsolesLevel 2Data ConcentratorsLevel 1EquipmentControllersFig. 3.2 Flat Topology- 3-22 -Fig. 3.3a TRIUMF 72Fig. 3.3b CERN PS 7 7 /7 8- 3-23 -Fig. 3.3c FNAL Upgrade 8 0 /81Fig. 3.3d Tristan 80 /81- 3-24 -Fig. 3.3e SLC 8 2 /8 3Fig. 3.3f CERN LEP 8 5 /8 6- 4-1 -4.0 Reference ModelThe preceding chapters have discussed specific and general requirements for a KAON Factory control system as well as the technology available in mid-1987 for its implementation. In this chapter this data is applied to the formulation of a reference model, and in the following chapter possible approaches to the implementation of this model are discussed.We have seen that in a modern control system having processes widely distributed among many processors, the problem of system design is one of providing hardware and software to facilitate communication, or message passing, between processes. The transmission system could be based upon LANs or buses, or a combination of both, and it could be relatively hierarchical or flat. Many such combinations are possible and the model developed here should be considered only a starting point for discussion.The advantages as described in Section 3.6 of a flat topology lead us to propose its use. As suggested in that section and in Appendix C, this choice implies the use of a LAN, rather than a bus technology such as serial CAMAC (such as serial CAMAC) for the communications backbone.Such an approach has several advantages:- it provides a flexible democratic interconnection scheme between all components of the control system. Direct communication can take place between network nodes.- standard network products, both hardware and software, are widely available.- there are few, if any, geographical constraints on the positioning of equipment.- the system may be configured into a number of autonomous parts for installation, trouble shooting and maintenance.- the system as a whole is more tolerant of faults.- the system is highly modular and can evolve and grow in newdirections to support new or changing requirements and new technologies.- the practical data throughput rate can be comparable to that of more tightly coupled schemes.The use of a LAN-based communications backbone does not allow direct, fast, access to individual I/O modules and their registers. However, as local intelligence at the crate level or below can be easily and cheaply provided to perform all routine checking, setting and closed loop control, such access may not be so essential. Operator interaction with the system will result in the transmission of high level commands overthe network rather than requests for remote manipulation of I/O registersdirectly. Examples of such commands would include loading a function generator with a ramping function, or measuring a beam profile. In other words, one trades responsiveness to random accesses at the register level in exchange for higher level functionality.- 4-2 -Although the raw bandwidth of buses is typically a factor ten higher than that of current LANs this is not felt at the moment to be a restriction. The use of a segmented LAN structure using bridges can reduce loading problems by allowing simultaneous traffic on several segments in parallel. International standards, in particular FDDI, are being developed which will offer at least an order of magnitude increase in bandwidth over existing IEEE 802 LANs. Hence LANs will be available with raw bandwidths comparable to those of many present day buses. A more complete discussion of bandwidth considerations is given in Section 5.Having opted for a relatively flat, segmented LAN based model, it remains to determine the segment topology, and the distribution of processors and equipment on the network. We have already seen (Figure 3—2) a generic flat topology having no segmentation. Many segmentation schemes are possible. Segments could group together equipment by ring (A, B, TRIUMF, etc.), by subsystem (RF, magnets, vacuum, etc.) geographically (equipment building A, northwest quadrant, etc.) or in a wide variety of combinations of these.Geographic segmentation is required for large machines such as LEP, SLAC or the SSC. In the case of the KAON Factory however, backbone segmentation should reflect first the anticipated commissioning schedule (A and B ring first; C and D rings later; E ring possibly later still) and secondly, the desired subsystem (e.g. RF, magnets, vacuum, diagnostics) independence requested so emphatically by the designersresponsible.We begin therefore with a LAN consisting of three segments - one for rings A and B and TRIUMF (ABT), one for rings C, D and E, (CDE) and a third for the main control room (MCR) (Figure 4-la). (If even greater accelerator independence is required, a separate segment for each of the six accelerators could be provided.) The segments appear as buses in the drawing, although they could equally well be interconnected rings, as is the case for LEP. The bridges between segments are assumed to be transparent at the packet level.Directly attached to the central segment we have shown a cluster of utility processors responsible for the top level functionality, as well as primary and secondary operator consoles. Secondary (reduced function) consoles could also be attached directly to the segments devoted to the accelerators (ABT or CDE).To each of the two accelerator segments, we propose to attach segments devoted to large subsystems such as the RF or magnet systems (Figure 4-lb). This particular choice was made to satisfy the requirement for subsystem autonomy. Many others are possible. TRIUMF may itself be considered as an important subsystem - the injector - of the A ring, and a segment attaching to the existing TRIUMF control system is shown bridged to the AB segment. This set of interconnected segments forms the communications backbone of the control system. The concept of- 4-3 -segmentation minimizes interference between accelerators and subsystems during commissioning and maintenance, reduces message traffic on individual segments, and facilitates fault diagnosis. Other segmentation schemes are possible without affecting the basic model. A final choice will depend upon actual traffic and equipment distribution and partitioning.In each subsystem segment we have attached a coordinator computer, whose role is to organize and coordinate subsystem activities, support stand-alone subsystem operation where required, maintain the local subsystem data base, generate first level displays and messages, and collect and reduce subsystem data for higher level use.To these subsystem segments are also attached equipment crates. The choice of equipment crate is not constrained by the model. Several attachment schemes are possible. Single crates or crate clusters can be attached to the network, as can subsystems based on alternatives to LAN topology, such as serial CAMAC. In this case access to equipment crates would be via the coordinator, acting as subsystem front-end. Subsystems having processors housed within equipment such as power supplies are also allowed by the model. These local device controllers could be connected using an economical serial bus either to equipment crates or directly to the coordinator, or directly to the LAN itself. Because equipment crates, and in many cases local device controllers, are connected directly to the LAN backbone, the model proposed is flatter than any of the implementations described in Section 3.6.2.Finally, we envisage that secondary consoles, fixed or portable, could be attached either to subsystem LAN segments or even at the level of equipment crates, providing autonomous control at the geographically local or subsystem level for commissioning and maintenance.Four categories of processor have been identified in the reference model. The utility machines and all consoles are classified as back-end computers. The front-end consists of equipment processors and coordinators.We wish to reemphasize that the particular choice of segmentation strategy described here is only one of many possible. It is our best suggestion at the present time, given our limited understanding of detailed requirements. Segments devoted to individual rings is another possibility. Special segments devoted to particular processes might even be considered - for example, monitors for measuring closed orbits might share a segment with orbit correcting magnets to allow autonomous closed orbit corrections.The technologies proposed in the following chapter for the implementation of this model would allow relatively easy reconfiguration of segments as required by evolving needs. None of these alternatives affect the underlying philosophy of the mode. Indeed it is precisely this- 4-4 -flexibility in the face of only preliminary accelerator requirements that is a major strength of our proposal.The model as described deals only with processes taking place in computers, and the transmission of digital messages. As we have indicated elsewhere in this report, the transmission of timing signals, analogue signals, as well as video and voice are equally essential to the operation of the KAON Factory. Although these could all, including the digital messages, be carried on a single broadband cable, they are logically separate and have been so indicated in the completed model diagram, Figure 4.1-c.- 4-5 -_Q)V  W O C  C/3 o c O  oo >N>> o" aCDD cEo CDo T Jx. CD *X_CL in mII II IIQ_ ina)o* o -4—'X- oO X.o aX-Oc<uc<D■+->DE EQ-C* ox_13 =3 oc r c r oLxJ LxJ oII II IICD LxJ oFigure 4 - laThe three—segment skeleton of the control systeLOWER LEVEL EQUIPMENT BUS OR LAN.- 4-6 -The KAON Factory reference model- 4-7 -_0© sn  O c O  oo  ^>v DL^T7 O  C  ^  c o cnt o n  i— a> *u_o_ co mCA oo o~o -+->»- oN  AD o  Oc  c a) a) DcCL ■+ ll’5 '3  Rcr cr oLxJ Lxl OO  LxJ OFigure 4— lcReference model augmented by timing, video, analogue and voice systems.- 5-1 -5.0 ImplementationIn the preceding chapters we have developed a reference model for the KAON Factory control system. In this chapter we suggest possible approaches for the implementation of that model.Most users will interact with the control system through its human interface. The nature of that interface influences the choice of software and hardware used to implement the system behind it. For that reason, we begin with a discussion of an implementation strategy for the human interface (Section 5.1).A software implementation strategy follows next (Section 5.2). A major fraction of the cost of the control system will be in software development. In order to reduce such costs, software should, whenever possible, be bought rather than built and should adhere to international open standards. In most instances, the availability of appropriate software should determine the choice of hardware.Having suggested an approach to the control system software implementation, we proceed to suggest a possible implementation of the hardware components of the reference model (Section 5.3). Once again the themes of 'buy-don't-build' and open standards dominate. The relatively long multiphased nature of the project must be viewed against the rapidly changing technology used to build the control system. Flexibility is required to allow for both changes in accelerator specifications and evolution in computing and electronics technology.Section 5 concludes with a section on methodologies proposed for the implementation of the reference model (Section 5.4) and finally with a brief discussion of the organization of the controls group required to carry out this demanding responsibility (Section 5.5).5.1 The Human InterfaceA control system is, or perhaps, seems, only as good as its human interface. The operators have to be given the right tools and appropriate environment in which to use these tools. The range of needs is great ranging from the exploration of new operating modes to the diagnosis of faults to the routine monitoring of a correctly running machine. Each of these activities places different requirements upon the operator interface which, despite these differences, should present a consistent and coherent method of interacting with the accelerator at all times.- 5-2 -5.1.1 The Main Control RoomThe principal environment for the human interface is the Main Control Room (MCR). This room should be centrally located in order to facilitate communications, simplify cabling and to reduce the time spent in going between the MCR and many other places on site. A poorly placed MCR can result in a proliferation of expensive secondary control rooms.We strongly recommend that operation of the TRIUMF cyclotron, or KAON Factory injector, be from the main control room of the new facility. TRIUMF is an integral part of the new accelerator complex, and the cyclotron tune is critical to subsequent acceleration. Tuning of TRIUMF will be an important aspect of tuning the KAON Factory.Consideration should nonetheless be given to maintaining the TRIUMF control room for injector maintenance and timing, and for operation of TRIUMF as a meson factory.Moving TRIUMF controls to a new location will not be easy or inexpensive. H- extraction controls have already been built into the TRIUMF system. Nonetheless these costs must be compared with those of manning two control rooms in perpetuity.The MCR must be uncrowded, comfortable and quiet. This means that all equipment (such as utility computers, discs, video or analogue multiplexers, etc.) not normally directly used by denizens of the control room should not be in the MCR but in an immediately adjacent room to which there is easy access. A particularly effective arrangement is to have the equipment room immediately below the MCR.In both these rooms the under floor space should be deep enough to accommodate air conditioning ducts and still leave plenty of space for cables. Since the MCR is a focal point for activity it is also a focal point for visitors and the design of the room must be such that visitor traffic does not interfere with operations.In addition to one or several immediately adjacent control equipment rooms there is also the need for nearby rooms for at least several controls people, hardware and software, as well as a small conference room which could also be used to house printed documentation.Altogether about 750 m^ should be allocated to the MCR and ancillary areas. (The KAON Factory proposal appears to allocate 560 m2.)The MCR should act as a distribution centre for video signals generated at various places on the site, including the MCR itself. Facilities are also required to produce hard copies of displays as well as of data and programs.- 5-3 -5.1.2 Types of Control StationsThe reference model leads to the concept of two types of control station. First are the primary consoles. We envisage by analogy with the CERN PS six identical, full-featured general purpose primary consoles, all permanently located in the MCR. Each would have access to all parts of the accelerator, as well as to supplementary computing power, alarm and logging devices, analogue and video signals, etc.In addition, we propose the use of reduced function secondary consoles. Many of these secondary consoles would be portable, and could be attached to the LAN at any point as required for diagnostic and repair work carried out at irregular intervals at dispersed equipment locations. We also envisage some secondary consoles being permanently located at strategic sites with respect to equipment or subsystems. Such dedicated secondary consoles would have access to specialized analogue signals and the equipment necessary to analyze them, but would not be essential to normal running of the accelerator.Regardless of the console type users should be presented with a consistent and coherent interface to the control system. Similarly the application programmer should not need to be concerned with the particular consoles on which programs will run. This consistency and portability we call console coherence.5.1.3 The Operator Interface - HardwareThe operator interface has both hardware and software components. Here we discuss the hardware implementation of a general purpose console.The hardware at secondary consoles could be formed of subsets of the general purpose ones appropriately chosen to provide convenient, cost effective solutions to particular needs. We recommend the use of a powerful computer workstation at the heart of each console. Such workstations are available from traditional minicomputer manufacturers DEC, DG and HP, as well as newer companies specializing in w o rk s ta t io n s ,  such as Sun and Apollo. Each workstation is attached to the LAN and hence has access to all parts of the control system, i.e. the accelerator components that are measured and controlled and the other computing systems for modelling and simulations as well as historical data and programs. In addition experience has shown that each general purpose console should have a number of small screens and several oscilloscopes.A workstation has one or two high resolution colour graphics monitors along with a keyboard and at least one point and pick device such as touch panels, mice, tablets, track balls, joy sticks and light pens.At present mice have the widest commercial support.While a general desire for knobs has been expressed we feel that the need has not been fully established because operating modes that would- 5-4 -require knobs instead of other interactive devices have not been defined.At each primary console there should be a separate screen dedicated to alarms having roughly equal prominence to that of the workstation display. Interaction with the alarm system is with the same devices as for interaction with the workstation.TV pictures are supplied to the consoles by a video multiplexing system which distributes many different kinds of images. Examples include pictures from cameras looking at various areas and scintillator or oscilloscope screens. Also the coordinators will generate standard displays of their own activity for distribution on the TV system.Analog signal distribution and multiplexing has certainly been a problem at all accelerator sites. If real-time display is not required digital oscilloscopes or 'frame grabbers' could be used for a wide variety of analog signals. If real-time display is required then multiplexing signals with a bandwidth of much greater than 10 MHz will be extremely expensive — individual cabling will probably be required. As yet the number of signals of each kind is not known but, based on the PS, one should expect of the order of 2000. Each console requires clear voice communications with all the equipment buildings, local control points, experimental areas and other control consoles.5.1.4 The Operator Interface - SoftwareThe requirements for an operator interface distil to the need for natural, consistent, predictable and reliable behaviour of the control system. Predictability and reliability are in no small measure obtained by careful hardware design that has adequate capabilities. Naturalness, consistency and indeed, useability, are all dependent on the software environment and the discipline exercised in its creation and use.Paramount among the tools are a simple, straightforward and universally used method for interacting with the system and displaying information. The tools also include on-line help facilities, extensive data-bases, log analysis procedures and, as experience grows, expert systems especially for fault diagnosis and repair. As mentioned earlier modelling and simulation are important operational tools.Perhaps the most important emerging tool is X Windows which may offer a clear demarcation between an application program and its use of graphics display. X Windows contributes to portability of programs. With it programs developed (for example by equipment specialists) on secondary consoles can be easily moved to the primary consoles in the main control room.- 5-5 -This is a major software project. As stated at the beginning of this chapter, we estimate that software development will represent a major fraction of the KAON Factory control system budget, especially bearing in mind the high cost of software maintenance and support over a lifetime of 15 to 20 years. Most software development costs will be in applications specific to the KAON factory and cannot be bought. The model should be implemented in such a way as to allow the maximum use of available system software, communications software, graphics software, data base software, and so on. The major consideration in reducing development costs is the use of open standards. In the sections which follow, we are guided by this principle whenever possible.Three types of control system software can be identified. System software (15% of the CERN PS upgrade software effort) includes the operating system and drivers for different devices, network services, as well as editors, language compilers, and other program development tools. This is exclusively the province of the controls group.The application kernel (25% of the CERN PS upgrade software effort) provides a general tool box for writing specific applications programs.It provides a common framework on which all such programs are based, as well as standardized man-machine interfaces, graphics and logging facilities, standard routines for equipment access, etc. This too is provided by the controls group.Finally, there are specific application programs (60% of the CERN PS upgrade software effort). For example to verify the correct operation of a certain subsystem, to acquire and display data from beam diagnostic devices, or to set one or more power supplies to predetermined values.As we have seen, applications can in principle be prepared by physicists, operators and designers (Section 3.2.2). This has the advantage of distributing the very large task of applications programming and of giving the precise functionality desired by their users.5.2.1 The Software Environment - System SoftwareThe software environment in which the applications kernel and specific applications are both developed and run includes the operating system, the communications network protocols, the languages used and the development tools available. Each is discussed briefly below.5.2.1.1 Operating SystemsThe number of operating systems in use in the KAON Factory control system should be kept to a minimum. This may be more difficult than it sounds - there are at least twelve different operating systems or5.2 Software- 5-6 -multitasking executives at work in the TRIUMF control system! As a general rule, at least one person is required to support an operating system - more for larger systems, fewer for smaller.We have seen (Section 4) that the reference model identifies four categories of processor. The utility computers and consoles are classified as back-end, while the coordinators and equipment processors are front-end machines.The front-end processors require real-time multitasking executives for their principally I/O intensive and time sensitive tasks. These executives must be efficient at interrupt servicing, incorporate network communications, and have the ability to connect to a host.There is a wide variety of such real-time executives commercially available. These run on many different processors. There is VAXELN which runs in conjunction with VMS and also a number of systems supported by UNIX. The latter include VXworks from Wind River, RTUX from Emerge Systems and products based on NRC's Harmony from Microprocessor Toolsmiths. In choosing a real-time executive for the front-end processors a major consideration will be coherence with the back-end operating system.Back-end computers require full-featured operating systems. These systems - in particular the utility computers - must provide a suitable environment for software development, preferably for both front-end and back-end systems. This implies a need for cross-compilers, and for tools for remote debugging of front-end processors. The utility computer operating system should facilitate its role as a disc, tape, print, plot and compute server and it must of course be compatible with network communications protocol at all levels.Proprietary minicomputer operating systems such as VMS, which runs on the DEC VAX family, or AOS/VS, which runs on Data General's MV series of 32-bit processors, satisfy most of the listed requirements, as well as being comfortable to a large number of users. UNIX is the only attempt at a standard full-featured operating system. It is the system available on most candidate console workstations - the other back-end system component. It is to be hoped that an acceptable UNIX standard will stabilize, and that implementations appropriate to all levels (including real-time subsets) will become commercially available in time to produce a more homogeneous KAON Factory control system environment.5.2.1.2 Network SoftwareThe object of network software is to make the fact of distributed computing as transparent as possible at all protocol levels. Only two off-the-shelf packages are readily available - neither complies with- 5-7 -the evolving OS! standard. DECNET is proprietary and normally implies the use of DEC systems for all computers connected to the LAN - which is probably not possible (see below, Section 5.3.3). We recommend instead the use of TCP/IP. This U.S. Department of Defense driven open standard has stabilized and a number of interoperable products are available. Support from most major computer manufacturers is available, or will be shortly. At this time we also recommend adoption of the standard NFS (Network File System) which allows users to share files across a heterogeneous network in a transparent way. This standard is supported by DEC, Motorola, Sun, Apollo, HP and others. A standard technique for remote procedure calls should also be adopted. Such techniques have been developed at other laboratories.Fully-featured communications protocols may carry too high an overhead for all real-time applications, and it may be necessary to design a faster protocol bypassing several layers and offering reduced functionality. Such a protocol would have to coexist with TCP/IP, and probably derive from it.5.2.1.3 LanguagesWith the exception of operator interfaces, no topic falls deeper into the realm of religion than that of programming languages. The American DOD study which led to the adoption of ADA estimated that no fewer than 5000 languages and variants were in use in American military applications!! The guideline for the KAON Factory should be that a minimum number of languages should be supported. Or rather that no more languages should be approved for use than can be given full and equal support by the controls group. All resources supported for one approved language should be supported for all, and interfaces to system resources should be as like as possible.The maximum use of structured, high level languages should be enforced. No more Assembler should be used than is strictly necessary. Widely available for microprocessor systems, we propose the use of C for low- level system and applications programming.Having stated that physicists should be contributing to the library of applications and simulation software it follows that FORTRAN will be used. Because FORTRAN was not intended, and is not well suited, for controls applications, its support — a necessary evil — may be more difficult than for other languages.An additional high-level language should be recommended for use by programming professionals and by as many amateurs as possible. We have seen in Section 3.2.1 that Modula-2 and ADA are possible candidates.If appropriate products are available when required, and adequate performance can be achieved, we suggest ADA be given serious consideration.- 5-8 -Modula-2 is particularly attractive because tools exist to convert Modula-2 code to ADA when and if such a conversion seems desirable. It should be noted, however, that Modula-2 is not at present easily available and its selection could either narrow the possibilities for hardware selection, or, indeed, not be possible at all.Many laboratories, including TRIUMF, have found an interpretive language, preferably compilable, to be invaluable for test programs and maintenance. The same probably applies to the KAON Factory, although the emergence of very fast compilers may diminish this need. BASIC is the only interpreter to approximate a standard; however the distributed processing capabilities of NODAL make it a probable first choice. Further study is required to determine if, perhaps, the different features of PILS or interpreted C are more advantageous.Other languages will almost certainly be used. Expert System building tools such as KEE will be used for Expert system development, and the standard SQL should be used for data base management. Whatever suite of languages is adopted, the ability to mix and match language modules is vital. This means common calling mechanisms for procedures and common libraries.5.2.2 Applications KernelThe objective of the applications kernel is to create an environment in which applications programs can be written by non-computer professionals. The applications kernel is a framework on which applications can be built. One part of this framework provides error recovery procedures. Ideally, the application programmer should not have to know when he writes the source code where it will eventually run. This concept should apply to everything from file access to equipment a c c e s s , from  co n so le  g ra p h ic s  to  in t e r -p r o c e s s o r  communication. The programmer should be able to make use of all system resources from any (authorized and supported) programming language using a uniform set of procedure calls. We consider only a few representative aspects below.5.2.2.1 Console SoftwareWe have recommended the use of commercial workstations as the basis for operator consoles. This approach is attractive because these products make extensive use of standard software such as UNIX, X Windows and GKS (a standard graphics kernel). The use of these tools should greatly enhance productivity in the design and implementation of programs for operator interaction. Hewlett Packard, for example, provides a uniform programming interface to a number of interactive devices (mouse, knob, touch panel, etc.).The display of manipulated data - graphics or otherwise - should be independent of the console from which the request is being made. This- 5-9 -is the other side of the console coherence objective - consoles should look alike to high-level programs as well as to their users. This objective will be much facilitated by the use of X Windows.5.2.2.2 Equipment AccessThe reference model assumes that the descriptive data base of accelerator devices is widely distributed throughout the system (Section 4.3). Relevant parts of the data base should be located in the processors using them. The applications programmer should not have to know where data base information is stored. He should be able to access the data base in a standard way.A typical application involves three steps: acquiring data from thesystem; manipulating or formatting it; and then displaying or filing it. Again the applications programmer should not have to know where the data is, or how to acquire it. He should ask only for the required data in a standard way. He might also specify whether the data is needed once, or continually updated, and if the latter, at what rate. Actual data acquisition (from I/O modules) then takes place at the lowest possible level, asynchronous with other system activities. In general, no data should be transmitted on the network unless it is explicitly requested, or known to be needed, by another task on the network.All of these site-specific equipment access protocols are provided in the applications kernel. In addition to the data base itself, the kernel provides the routines required to use it in a standard way, using standard calling sequences. In the case of the KAON Factory, this concept extends to standard procedures for specifying timing and synchronization requirements.5.2.2.3 Alarms, Logging, Etc.The utility computers of the reference model should provide a centralized logging, alarming and archiving service. Alarms, wherever originated, should pass through a central alarms machine for distribution to all console alarms displays. This machine might also be capable of synthesizing diverse messages and possibly inferring a cause.Similarly, logging of all types should be centralized to facilitate subsequent data retrieval and analysis. The applications kernel provides a standard mechanism by which to invoke these services from any processor within the system.- 5-10 -5.2.3 Application SoftwareThe majority of the software task (60% in the case of the CERN PS upgrade) will be in the preparation of application programs. In the KAON Factory control system, all application programs should be written according to a specified template. Procedures for invoking a program, communicating with it, interrupting it, and ending it should be standardized and rigidly enforced. It is the strict adherence to an applications template, as well as the use of the facilities provided by the applications kernel, which make possible the successful writing of applications by a range of non-professional programmers.Some Sample ApplicationsIn order to give an impression of the range of application programs and a few very important considerations relating to their implementation, we offer the following brief list.Individual Control: Programs to attach individual parameters or relatedgroups of parameters to a console input device for operator adjustment, along with real-time display of relevant beam and associated device readback parameters. This will include remote procedure calls directly from a console workstation to an equipment microprocessor. In many cases, single parameter adjustment for the KAON Factory will mean changing a program contained in a function generator or equipment processor.Subsystem Control: Programs to set up complete subsystems, or indeed theentire accelerator complex for operation under previously established or newly calculated conditions. Such set-up may have to be carefully sequenced by a sequence master, probably subsystem coordinators. The status of the set-up sequence should be monitored and displayed at all times. These applications imply analogous programs for saving accelerator parameterizations as well as an efficient filing system for finding and retrieving them.Data Logging: A number of different logging programs will be required.Machine performance statistics logs are required by operators, management, and possibly funding agencies. To assist with fault diagnostics or with performance improvement some device parameters should be logged routinely, others only on request, or temporarily at requested intervals. Note that some data logs may be required at predefined intervals during a single acceleration cycle for which synchronization and time stamping will be required. Other logs include permanent logs of system messages or operator interventions, and 'post mortem' logs for fault analysis. All logging should take place at the lowest possible level initially and involve the minimum use of the network. However, as we have seen, logging must ultimately be done by a central facility and appeal made to the applications kernel to use it. Logging facilities- 5-11 -imply the development of off-line programs to extract their data, without which they can serve no purpose.Alarms: Programs will have to be developed which operate at all systemlevels to generate and display alarm conditions, and advise operators of appropriate action (or of action already taken). Once again scanning for alarm (or 'out-of-limit') conditions should take place in microprocessors as close to equipment as possible, and again use of the applications kernel is required to invoke the alarm system for message distribution and analysis. Different programs may be required to deal with beam-related alarms, equipment-related alarms, and control system-related alarms.Beam Diagnostics: A large number of application programs will bedeveloped to exploit beam instrumentation with a view to better understanding of beam behaviour. These programs will require rapid synchronized data acquisition, as well as sophisticated calculations and display. They may be required to invoke modelling. Associated displays should graphically show emittances, profiles, closed orbits, bunch density distributions, etc.This list represents only a sample of the types of application programs which will be required for KAON Factory controls. No matter how much we adhere to the principle 'buy-don't-build', all such programs will have to be 'built'. Success in this mammoth task will require strict adherence to appropriate software development methodologies.5.3 Components of the SystemHaving discussed approaches and made some suggestions for the implementation of software for use in the reference model, we are now ready to discuss possibilities for its hardware implementation. In Section 5.3 therefore we discuss choices for the implementation of the network, equipment crates, and processors of the reference model (Figure 4-lb).5.3.1 The LANWe have suggested the use of the open TCP/IP standard for the upper levels of the communications protocol (Section 5.2.1.2). Based on the discussion in Section 3.5 we now recommend the use of an existing IEEE 802 LAN for the lower levels of the KAON Factory communications backbone.We have seen (Section 2) that the intermediate size of the KAON Factory allows consideration of the 802.3 CSMA-CD (Ethernet) standard which can span distances of up to 2.5 km. At the moment this standard is the only one of the three in widespread use. It is the most mature and has the widest support and cheapest products. An interface chip set for- 5-12 -IEEE 802.3 costs about $100 in the summer of 1987, and that price can be expected to drop.There are several interoperable variants of the basic CSMA-CD specification offering a spectrum of products over a broad range of price and performance. We recommend that the communications backbone segments be implemented using either the original 'thick wire'Ethernet or the newer and more economical 'thin wire' Ethernet, or an appropriate combination of these.Bridges between 802.3 segments are now commercially available. They function adaptively and transparently at the packet level. In some implementations the propagation delay introduced by a bridge can be as small as 30 microseconds.We will see in the following sections the possibility of having local single device controllers attached directly to the LAN. The Starlan CSMA-CD variant would be a candidate for this application. Thus the choice of Ethernet for KAON Factory communications would make available a mature family of products with implementations appropriate to all levels of the model and a homogenous low-level protocol throughout.Collision detect schemes are inherently non-deterministic, particularly under heavy loading, and some have alleged that they are not appropriate for control systems for that reason. We believe this argument to be overstated. The model uses segmentation to control loading. More importantly, we do not believe that the messages which will be passed on the transmission backbone need be time-critical. Time-critical actions (of which there most assuredly will be many in a synchrotron control system) will be taken locally after triggering by independent timing, synchronizing or analogue systems. Fast abort systems must be dealt with in the same way.KAON Factory network bandwidth requirements are not yet fully understood. If the control system contained 50 screens, each updating 200 numbers of 5 bytes per number at a rate of 3 times per second over the network, the total load on the MCR segment could be a little over 1 Mbits/second, or 10% of the raw network capacity. This extreme rate would allow updating of graphic as well as dense alphanumeric displays.We have already noted that beam diagnostic systems could make severe demands on some local network segments. For example, if we assume that for each cycle of the D ring we wish to measure horizontal and vertical centering at all 48 diagnostic stations, and that these measurements are sent as individual packets on the segment to their coordinator, this amounts to about 0.25 Mbits/second. The real limitation in this extreme example would be in the coordinator software required to handle such a message rate.- 5-13 -At Fermilab the most congested parts of the message handling network routinely deals with 0.8 Mbits/second and occasionally copes with 1.6 Mbits/second.In some instances, network traffic may be reduced by distributing displays formatted close to the equipment over a video system rather than using the network.In the long term, the 10 Mbits/s imposed by all 802 LANs may prove to be a bottleneck. We anticipate that the emerging FDDI standard - with an order of magnitude bandwidth improvement - will be established by that time, and, because of its compatibility with 802 standards, could be implemented as an upgrade when and where necessary.5.3.2 Equipment CratesThe choice of equipment crate is unfortunately not as straightforward as is the choice of LAN. The equipment crate houses the I/O modules (such as ADCs, DACs, registers and function generators) which directly control physical devices, the processors responsible for low-level control, and possibly drivers for low level equipment buses such as CAMAC or IEEE 488. It is not the intention of the reference model to imply that all such low-level device control is necessarily 'cratified' in this way. Indeed, we recommend (see below) that certain classes of devices such as magnet power supplies be controlled by dedicated processors built right into the supply and connected directly to the LAN.The underlying philosophy behind either approach is to perform data acquisition, control and initial data reduction as close to the devices being controlled as possible. The advantages of such a distributed processing approach include autonomy, speed, flexibility and reliability.CAMAC is no longer the bus of choice for this role. It was not intended as a platform for microprocessors and is not supported by industry for this purpose. To be preferred is one of the new, microprocessor bus standards such as VME, Multibus II, Futurebus or Nubus. At present, the VME standard is the most evolved, has the widest acceptance, particularly in accelerator laboratories, and has the broadest range of available products. The perceived economic advantage of lower performance buses such as G64 and STD is rapidly disappearing. For these reasons and in spite of its acknowledged electrical deficiencies and present problems with interoperability between different manufacturer's products, we feel VME is the current bus of choice for KAON Factory equipment crates.The choice of a flat topology, with equipment crates or processors attaching directly to segments of the backbone LAN, implies minimum use of lower-level equipment crates and buses.- 5-14 -Nonetheless, two important exceptions should be anticipated. The particular catalogue of modules available in CAMAC - such as TDCs or transient recorders — may leave this established system as the bus of choice for certain applications - in particular, beam diagnostics. We therefore anticipate some subsystems being instrumented in CAMAC, with CAMAC highways being driven from VME crates using 'off-the-shelf' products. Note however, that these highways could be driven directly by a coordinator or other dedicated computer, or, indeed, be connected directly to the LAN. Secondly, the extensive use of laboratory instrumentation geared to the IEEE 488 (GPIB) bus is inevitable. Analogue and digital oscilloscopes, fast Fourier analysers, and digital voltmeters are likely examples. This instrumentation bus would also be driven from VME crates.Although we recommend extensive use of VME equipment crates, we feel that in many instances it will be cost effective to package processors and I/O controllers (DACs, ADCs, registers) directly within equipment. The workbook contains a cost analysis of 'cratified' control versus separate embedded processing as applied to magnet power supplies. Primarily because of cabling costs, the 'cratified' approach is nearly twice as expensive. There are numerous other advantages to local device controllers, notably local autonomy, reduced bus or LAN traffic, and easy fault isolation. We therefore recommend the use of such an approach wherever applicable.The discussion of equipment crates and embedded processors leads to the question of the boundaries of the control system. In a 'cratified' system, a reasonable boundary (provided a liberal and flexible interpretation is allowed) is at the front of I/O modules in a crate. The idea of embedded processors muddies this concept somewhat. The controls group responsibility should extend to the interface between a device and its local controller. Selection of the processor, its operating system and language, as well as the specification of its ancillary I/O devices, should be done by the controls group. Applications running in these processors, if not written by the controls group itself, should adhere to standards and methods chosen by them.5.3.3 ProcessorsBy recommending Ethernet, we have chosen a standard which can be applied throughout the reference model. As we have already seen (Section 5.2.1.1) the same homogeneous ideal cannot easily be achieved in the choice of operating systems. The same is unfortunately true for the four categories of processor identified in the model.Traditional minicomputer manufacturers such as DEC, Data General and Hewlett Packard, as well as newer companies specializing in workstations, such as Sun and Apollo, can provide hardware and- 5-15 -operating systems appropriate for the utility computers and the consoles (the back-end systems) and, in many cases, for the coordinator functions. None provide economical microprocessor packages appropriate for equipment control. Moreover, the choice of VME for equipment crates carries with it an implication of the use of Motorola 68000 family processors - already identified as running suitable real-time multitasking executives - at that level.Because these lowest level processors are the easiest to determine, we consider the choice of processors from the bottom up. 68000 family processors could serve as embedded processors, and, in many commercially available packages, as VME based equipment crate processors. Several appropriate operating systems are available.The question then becomes: to what height in functionality can onetake this front-end technology? The coordinator function could easily be imagined as being implemented as a 68000-based multiprocessor system, packaged in VME. We feel that conventional workstations may not be sufficiently flexible for use in the coordinator function. It may be difficult to add processors or special 1/0 boards to these relatively fixed configurations, and the real-time performance of UNIX is also a concern. Alternatives offered by traditional minicomputer manufacturers are relatively expensive. The desirability of using the same operating system in the coordinator as in the VME-based equipment processors leads us to prefer a 68000-based multiprocessor solution. This provides a homogeneous approach to the front end.The back-end consists of consoles and utility computers. We have already indicated that the consoles should be based upon commercial workstations, and noted that these can be supplied by traditional or specialized workstation manufacturers. Most support UNIX, TCP/IP, NFS and X Windows. Some use 68000 and VME technology, but this is giving way to newer RISC implementations, and cannot be counted upon to provide homogeneity between the front-end and the consoles.The need for support at all levels, both for development and at run­time, suggest a utility cluster running UNIX and TCP/IP. The cluster could be made up of workstations such as are used for the consoles, and of traditional minicomputers. The use of UNIX for the utility computers could provide more homogeneity, but possibly at too great an expense in comfort . A final decision must be based upon further research.A homogeneous system using UNIX and UNIX based real-time operating systems would offer many advantages. Nonetheless, one cannot ignore the reality of VMS at TRIUMF and in the physics community. The present control system, experimental data acquisition systems and central data analysis centre all run VMS and will probably continue to do so. In all likelihood, there will be VMS machines in the KAON factory control- 5-16 -system. The most probable applications will be at the utility level, where KAON factory modelling and simulation codes and extensive graphics support is already available. The essential is that VMS be integrated with the system, that it employ the same communications protocol, and that it have access to all common resources. It is likely that DEC will support TCP/IP, X Windows and NFS under VMS as they now do under ULTRIX.The same cautions apply to the ubiquitous IBM PC. Extensively used by CAD manufacturers and instrument suppliers such as Tektronix, it is another reality which cannot be ignored, and which will require careful integration. However TCP/IP, X Windows and NFS will again be our suggested route to integration.5.3.4 Parting ShotsIn conclusion, we propose as the basis for initial discussion and implementation of the reference model (Figure 4-lc) an Ethernet LAN running TCP/IP; utility computers supplied by workstation specialists or a traditional minicomputer manufacturer; consoles based on commercial workstations running UNIX: coordinators and equipment crates using board level 68000 processors packaged in VME, and local equipment controllers using 68000 family processors.It should be reemphasized that the above choices have been made from many possibilities. They are presented as a basis for discussion and a starting point for further research and development (Section 7.3).They will stand or fall on the basis of that research, and as a result of technological evolution.5.4 MethodologiesMethodologies are the general principles and procedures which are followed in the specification, design, implementation, commissioning and maintenance of a system. Following appropriate methodologies will facilitate building an effective and cost efficient control system for the KAON Factory, while increasing reliability and modiflability.5.4.1 Site StandardsThe foremost need is to establish site protocols and standards very early on in the KAON Factory construction period. Widely available national or international standards should be chosen unless there are compelling reasons not to do so. If standards are not defined and adhered to then the control system will consume greater resources. It is a given that it is the exceptions to the general rules that take the most time and effort. During operation exceptions lead to problems of robustness and certainly make maintenance more difficult.The spectrum of topics where standardization should be enforced is wide. For example, analog signal characteristics, interfaces to power- 5-17 -supplies, buses, local area networks, applications programming techniques and languages are just a few of the many possibilities. The Controls group should play an important role in the setting of these standards.Standards do not come for free. Initially there is the effort of setting them up. It is sometimes possible to make arguments to the effect that doing a particular job the standard way is out of the question because of scheduling or subsystem budget constraints. These tendencies should be strongly resisted.Whenever possible a policy of buy-don't-build should be adopted. The true cost of developing and maintaining in-house hardware and software is often grossly underestimated. Where products are not available off-the-shelf TRIUMF should always consider working closely with industry to specify and produce them.It is essential to specify and document all components, both hardware and software, extremely carefully. This is true whether considering off-the-shelf purchases or designing new equipment. All information relating to the controls system should reside in a central database. Where this is not practical, for example manuals and schematics, information should at least be catalogued on the database and stored centrally.5.4.2 Software ImplementationThe size and complexity of the software required to implement a KAON Factory control system requires the use of software engineering techniques from the start. Many man-years are required to produce reliable and maintainable software. This must be recognized as a project in its own right.5.4.2.1 Software EngineeringThe concept of software engineering was introduced to cure the so called 'software crisis'. It includes the concepts of:- specification and design of software- structured programming- software development methodologies- appropriate hardware support for the development environment The main goals of software engineering are:- to manage program complexity- to improve the quality of the program- to facilitate program production- to ease program maintenance- to reduce software costs- 5-18 -Structured programming is a combination of structured analysis and structured design. The analysis starts from the creation of a model, for example data flow diagram or process description, based on user requirements. The design consists of expressing the data flow and the processes in terms of software modules. The design must keep a low coupling between the modules, but a strong cohesion inside a module.This approach emphasizes the importance of the interaction between users and programmers. The result of this, the analysis and design phase, represents the first level of program documentation. The programmer responsible for implementation should be obliged to follow this outline.Software development methodology combines management practice, technical methods and automated tools. The implementation of the software must be supported during the coding (text editors, syntax directed editors), testing (debuggers) and optimization (performance and coverage analyzers) phases.Modern trends show a close integration of the software engineering environment with professional workstations.5.4.2.2 Program Definition and PriorityThe first step in the implementation process is to identify and list all programs required by users of the control system, together with the modules necessary to support the production and running of these programs, and the system software and libraries necessary to provide communication between application programs, equipment connected to the control system and operator consoles.The group responsible for program definition must include software specialists and users of the final system. Users should include equipment specialists, machine physicists, operators and maintenance people. The group should be lead by a software coordinator.At all times an effort should be made to maintain a complete list of programs and their required completion dates. The detail required for each program increases as the completion date approaches. Such a list provides the basis for the time and manpower estimates made by the software coordinator.The definition phase should be followed by the assignment of priorities. The system software, library subroutines and application kernel modules need to be implemented first in order to support the production of application programs. The basic work must be carried out well in advance in order that the tools used in writing application programs can be well tested and documented.- 5-19 -One can roughly define the priority of the programs for each part of the accelerator building schedule (for example, A and B rings, C, D, and E rings, and experimental areas) as follows- modules to control each type of equipment.- programs to test the equipment.- programs including logging and alarms to allow basic operation of first beams.- programs for modelling and simulation to allow machine physicists to improve and optimize accelerator performance.- operational programs to allow comprehensive control of the accelerators and to exploit the full power of the control system.- programs which ease day—to—day operation of the accelerators, including expert systems.5.4.2.3 Application Program Production SpecificationBefore application programs can be produced they must be specified at the level of user requirements. User requirements imply a simple definition of program goals, the man-machine interface, the displays to be generated, the time synchronization required with respect to the accelerators, system routines required, plus a first description of the structure of the program.The initial program specification will allow the software coordinator to appreciate the program complexity and resources required to produce it. It gives him the opportunity to split up a program into a set of well defined modules.Programming TeamsThe actual production of the software should be undertaken by a number of programming teams. Each team should be typically comprised of 5/10 people. The composition of programming teams will be varied. It could range from system software specialists to equipment builders with little or no programming experience. It could also include people from software houses and other short-term contract personnel. A team leader is essential in order to give overall coherence to a team.- 5-20 -Program MonitoringProgress monitoring should be carried out regularly by the software coordinator to check the work of each team. Progress is typically monitored according to a number of well defined milestones.- detailed design- software design- coding- simulated test- testing with equipment- testing with beam- completion of documentation and delivery to usersFor the process control application software at the PS the design accounted for 40% of the implementation time, coding 10%, testing 40% and documentation 10%.Program AcceptancePrograms will have a lifetime of many months or even many years. They should be jointly tested by the programmer, the main users and the eventual maintainers. Acceptance procedures must assure that the original goals of the program have been met, that all site standards and procedures have been followed and that complete documentation is available. Good documentation is vital, not only for the correct functioning and use of a program but also for subsequent maintenance.5.4.3 Controls HardwareAll equipment supplied to TRIUMF should come with adequate documentation, schematics, diagnostics, etc. Test and acceptance procedures should be agreed between TRIUMF and the equipment supplier; it should be possible for both parties to run mutually agreed equipment test procedures.A properly equipped and staffed test and maintenance group adequately equipped with automatic test equipment must exist to check out hardware components prior to installation. All equipment should be 'burned in' for a period of at least a week. Equipment should be tested not only to see that it functions but that it conforms to specification. This whole area is crucial to the reliable operation of the controls system. The complexity of the system will not allow a policy of 'throwing modules together and making it all work'.Serious consideration must be given to minimizing the number of different types of components used to build the control system. Experience at other laboratories has shown software costs are directly- 5-21 -related to the multiplicity of different components used. Test and maintenance costs also scale in a similar way.In those cases where equipment needs to be designed in-house use should be made of the appropriate CAE/CAD tools. CAD should also be used for planning and keeping track of cable installations, rack layouts, etc.The purchase and installation of racks and cabling for the whole KAON Factory needs to be considered on a site-wide basis as early on as possible. Proper planning and labelling, etc. is crucial and installation should be carried out in a professional way. All information must be accessible in a central database.It is important to provide non-interruptible power supplies for much of the control system. Experience has shown that power outages, dips and surges can be extremely disruptive. Many electronic equipment breakdowns occur during powering up and down. Inadequate air conditioning leads to erratic behaviour and premature breakdowns.It is important to build in diagnostic and test facilities at both the system and individual component level. For example, in an intelligent power supply controller it should be possible to loop back analogue outputs to analogue inputs. At a system level, crates must be provided with power supply and fan failure warnings as well as display and diagnostic modules. Network traffic should be monitored and watchdog checking should be implemented on all processors throughout the system.It is essential to provide easy-to-use software tools for testing, fault finding and repair. An interpreter should be used for this purpose. It should be possible to run the same programs on equipment in a stand-alone lab environment as on equipment installed and integrated into the control system proper. It must be possible to easily take equipment off-line and isolate it from the rest of the control system, for trouble-shooting, upgrading and maintenance. The key to building a maintainable system is to provide an easy switch over from full autonomy to full integration.Finally, system design should provide for regular performance monitoring. Such reports provide information about unsuspected or potential problems and also show the most effective way to improve performance.5.5 The Organization and Role of the Controls GroupThe control system of the KAON Factory must be designed, built and implemented by a strong and correctly structured controls group. Whilst we recommend a flat, non-hierarchical topology for the control system we also recommend that the group constructing it be strongly hierarchical.Its leader must be able to impose throughout the life of the project a- 5-22 -set of rules, standards and methodologies. This principle should be accepted from the very beginning of the project. The controls group must have equal weight and status in decision making with other important participants in the KAON Factory project.The design and implementation of the controls system requires three kinds of activities which can strongly influence the organization of the controls effort. They are as follows:Wide-based ActivitiesThese are activities which require, for their accomplishment, the efforts and knowledge of generalists or a number of experts from different disciplines including those with overall responsibility for controls. Examples are the scheduling of construction and commissioning activities, the configuration and use of the main control room and consoles, roles of controls, safety and alarm systems and how they interact. A particularly important activity of this type is the setting and enforcing of standards.Narrow-based ActivitiesThese are activities in which subsystem experts implement and link up their systems to the control system. Such work requires close collaboration with people well versed in the capabilities and operation of one or more aspects of the control system. Examples are the on site automated testing of accelerator components, cabling and hardware installation, accelerator diagnostics development, analog signal display, expert systems besides, of course, power supplies, RF stations, vacuum systems, etc.Internal ActivitiesThese are the activities that can be carried out with only occasional reference to the particularities of the control system. The wide-based activities lead to decisions which require general preparatory work to be done before the narrow-based activities can be completed. Examples include electronic testing, design and maintenance, general software for systems, networking, data bases, graphics, log formation and analysis as well as general system documentation and verification.Each subsystem group, Vacuum, RF, Magnets, Beam Diagnostics, Safety, Operations etc., should have one or more controls people assigned to them on a permanent basis. It is expected that much of the application code will be written by equipment designers and builders. The controls group should determine and supply the tools needed to do this work.These tools should, as much as possible, be common to all subsystems.The controls group should be responsible for overall coordination of applications software and should ensure a common man—machine interface between this software and its users. It should also have a major say in- 5-23 -matters of techniques used and equipment purchased to make sure wherever possible that site standards are used.It should be recognized that the controls group must contain a significant number of computer scientists and electrical engineers. Retreaded physicists are necessary but not sufficient. Many of the tools used in synthesizing contemporary controls systems are complex and require considerable knowledge of the underlying theoretical basis.-  6-1 -6.0 Resources RequiredThe work done so far does not allow a fully creditable estimate to be made of required resources. Such an estimate will be obtained only as the result of a much more detailed specification and design for the whole system. However, the numbers presented below are in general agreement with those incurred atprojects of comparable size and complexity.6.1 ManpowerThe CERN PS accelerator control system upgrade is a comparable project for which a detailed manpower breakdown exists. We therefore draw on this to provide a preliminary manpower estimate.A total of 240 of man years was expended on the PS upgrade by thecontrols group. This included the design, prototyping, development and installation up to and including the CAMAC crates. Not included was the work done by the accelerator subsystem groups in installing their equipment and then connecting it to the CAMAC system. Maintenance for both the operating PS control system and the new upgrade equipment consumed an additional 50 man years over the 5 year life of the project. Our estimates also do not include this operating and maintenance work.One hundred and twenty man years out of the 240 were accounted for in application software. This included work done by both CERN staff members, visitors and people under contract to the organization. The project took over significant parts of the SPS controls system including the hardware and software for the network, the Nodal interpreter and part of the main console hardware and software. As a result only another 20 man years were required for systems work making a total of 140 for the software.The hardware effort expended was 100 man years. This took account of the design, prototyping and installation phases but did not include the manpower used for module construction (which was done outside CERN).We conclude that the required manpower to develop and implement a KAON factory control system is likely to be at least 250 man years. This assumes that the efforts for hardware and application software are similar for the two projects and that much of the systems software can be purchased. The estimate does not include the maintenance and upgrade effort for the present TRIUMF controls or the new control system maintenance.While the analogy with the PS is useful it must be pointed out that the CERN project was an upgrade, albeit a very comprehensive one, and as a consequence the accelerators and their needs were much better defined than is the case for the KAON Factory. Hence the 250 man year estimate should be considered a lower boundary which will likely increase.- 6-2 -The number of people working on the PS Controls System varied sharply as a function of time. At the planning and specification stage of the hardware and software there were around 18 full-time participants. Of these, six were dedicated to application software. At one time there were as many as 40 people writing software for the project. This suggests that at peak activity the production of a control system for the KAON factory could occupy as many as 80 people. A possible manpower distribution for a five year period might be:year 1 20 full-time equivalentsyear 2 40 full-time equivalentsyear 3 80 full-time equivalentsyear 4 55 full-time equivalentsyear 5 55 full-time equivalents6.1.1 TRIUMF StaffIn order to accommodate the needs of the KAON Factory the efforts of many TRIUMF people will have to be redirected. The control system requires the application of advanced high technologies, some of which will be new to TRIUMF. It is essential that TRIUMF personnel be given the opportunity to prepare for and participate in these new challenges. New staff as well as TRIUMF staff will all require training in the needs and operational characteristics of the KAON Factory.TRIUMF will have to embark on a major recruitment effort to staff the KAON factory controls project. The size of the project requires good management using sophisticated techniques. The complexity of the system and the advanced technology used dictates that only the very best people be employed. In trying to recruit the best we are competing in a market where the demand for good electrical engineers and computer scientists outstrips supply. To attract and retain the people needed it will be necessary to offer not just an exciting technical challenge but also competitive salaries.To quantify the remarks made in the last paragraph the Salary Schedule for Professional Engineers in B.C. has been used to calculate some typical salaries.1. An engineer in his early to mid-thirties with a master's degree and ten years experience. Someone who might be part of the team doing the detailed design and planning for the KAON factory controls system. $51K p.a.2. A design engineer for electronics circuits with a bachelor's degree and three years experience. $36K p.a.- 6-3 -3. An engineering graduate with no experience. $29K p.a.It should be noted that these are average salaries. The best people can ask and get 30% more. At the moment TRIUMF salaries are well below these mean values.6.1.2 The UniversitiesWe have three nearby universities, all with expertise in computing and electronics, and it is natural to ask if and how such a resource can be used. An initial comment must be that the complexity and scientific importance of the KAON factory demand that it be given the highest priority by people working on the project, teaching commitments notwithstanding. University faculty members involved are often relieved of their teaching responsibilities for appropriate periods of time. There are many areas where very useful work can be carried out in university departments. It would be unwise to underestimate the full-time commitment required for constructing a KAON factory control system or the difficulties of university people in being able to make this commitment, given their other activities and responsibilities.6.1.3 Canadian IndustryThere are excellent prospects for collaboration with Canadian industry and experience during TRIUMF construction showed that there is likely to be significant spin-off to local firms. A number of high technology companies are established in Vancouver and elsewhere in Canada and have the resources and know-how to contribute to the implementation of a control system. This is particularly true if the KAON Factory control system takes advantage of mainstream electronics and computing products in common use in industry and commerce. It will be important to identify very early those areas in which local industry is best equipped to help. This should be a high priority for the next phase of detailed design and planning. Any effective participation by industry has as a prerequisite the existence of properly documented needs and s p e c i f i c a t i o n s .6.1.4 Participation by People from Other LaboratoriesThe KAON Factory Review Committee in its report stressed the need to 'recruit additional highly qualified scientific and technical personnel'. While some of these experts may come from Canadianindustry, the inevitable conclusion must be that many will have to be tempted to come to TRIUMF from other nuclear and particle physics laboratories.We have dealt already with the subject of salaries, pointing out TRIUMF has at least to pay the going local rates for engineers and computer experts. The salary issue is perhaps even more crucial when poaching- 6-4 -from other labs! While it may not be possible to match salaries south of the border or in some European labs it should be recognized that Vancouver is an expensive city in which to live, especially for housing, and that there may be a reluctance on the part of many prospective employees to lower their living standards.If it is not possible to recruit the necessary experts as staff members, then consideration should be given to medium term secondment from other laboratories and universities to TRIUMF. The present practice of using short-term consultants could also continue.6.2 Equipment Cost EstimatesTable 6.1 gives the capital costs of the back end computer systems. This includes utility computers and consoles of various types, including the primary consoles in the MCR. Since most of the items listed are available off-the-shelf from manufacturers this pricing should be quite reliable. The primary console has been built around a high end workstation with colour graphics. To this price has been added three oscilloscope type devices and a number of supplementary TV monitors. Beyond this little provision has been made for primary console hardware customization. The price of multiplexing and cabling systems to collect and distribute analogue and video signals on a site-wide basis is not included in this table.Table 6.2 shows a cost estimate for the front-end systems. This includes the provision of subsystem coordinators, equipment crates and cards, and microprocessor software tools for both the coordinators and for other embedded processors.The very preliminary and incomplete equipment inventory carried out makes a precise costing of equipment crates and cards highly problematical. We have chosen to cost in terms of CAMAC crate equivalents for two reasons. First it is a known technology so it is possible to reliably estimate the likely price of a fully equipped CAMAC crate. Secondly in comparing and relating the KAON Factory scale to that of TRIUMF and other labs CAMAC is the most convenient yardstick to use.The number of 250 CAMAC crate equivalents is certainly of the right order. It is close to the CERN PS and is five times the number in TRIUMF's present single accelerator system. Making the front-end cost estimate using the inventory as now understood and a cost per function approach leads to a cost consistent with the 250 CAMAC crate approach. Table 6.2 takes no account of spares and maintenance, neither does it contain any cost estimate for cabling from the equipment to the equipment crates. Maintenance contracts for the back end computers cost typically 10% of the purchase price. For front-end equipment we would foresee 5% spares.- 6-5 -In Table 6.3 we present a crude grand total price for a KAON Factorycontrol system. Included are:- manpowerback- and front-end systems site-wide analogue and video systems local area networks- test and development toolsspares and maintenance during development- contingencyOnly some of the costs for the safety and machine protection systems areincluded. The following items are explicitly not included in the totalprice:- cabling from the control system to accelerate subsystems buildings, racks and air conditioning- uninterruptible power supplies- MCR infrastructure- site-wide voice systemPreliminary cost estimates for the control system total $38.1 M. Since some major and many minor components have not yet been fully defined this number should be treated as a lower bound. When compared to the overall KAON Factory cost estimate we found, not unexpectedly, that the construction of the controls system is manpower intensive. Manpower costs for both hardware and software represent about 17% of the overall manpower cost estimate while equipment costs are about 7.7% of the estimated accelerator costs. A major contributor to the costs is application software which will take about 120 man years - roughly one-half the total manpower estimate.6.3 Implementation TimescalesFirst beams are expected in the A and B rings three years after funding for the project starts and 30 GeV beams are scheduled after a further two years. This means some form of basic support must be offered in the first year of construction.This imposes tight time constraints on the design and construction of the control system. A detailed planning phase lasting 12 to 18 months and involving around 18 full-time people will be required to produce a complete design based on extensive prototyping and including full documentation. Furthermore in several areas hands-on experience within the framework of a research and development program will be essential before a final choice of techniques, equipment and supplies can be made.Recruitment of new personnel will take time but without them it will not be possible to carry out significant further work.- 6-6 -The immediate aim must be to conserve at least some of the momentum generated by the current design study so that when approval for the KAON Factory is given, and funding starts, the control system effort can be quickly ramped up. If this is done there can be every expectation that, given adequate funding and the capability to attract a significant influx of talented technicians, engineers and computer experts, a well thought out effective control system can be delivered on time.TABLE 6.1ItemMain consolesSecondaryconsolesOther (portable) consolesUtility computer cluster with VAX 8600 performanceAdditionalsoftwareBack-End ComputersUnitImplementation Price QuantityHigh-end $160K 6Professional workstationwith multiple screensplus 3 oscilloscope typedevicesLow-end $ 20K 15Professional workstationPersonal computers $ 5K 30Twin processors with $500K 1shared disks, magnetic tapes and printersSoftware tools, languages, data bases, expert systemsPrice$960K$300K$150K$500K$250KTOTAL $2.160KTABLE 6.2ItemSub system co-ordinatorEquipment crates and cardsSoftwareMicroprocessordevelopmentsystemsFront-End SystemsUnitImplementation Price QuantityMultiprocessor $50K 20VME crate includes video drive capability plus mass storageAssume CAMAC crate $35K 250packagingReal-time operating systems, languages, debuggersStand-alone set-up for $60K 3embedded PROM basedprocessors(including in-circuit emulation features)Price$1,000K$8 ,750K$ 1G0K$ 180KTOTAL $10,030K- 6-9 -TABLE 6.3Grand Total EstimateITEM ESTIMATE1. Manpower 250 man years at$60K per man year2. Back-end computers3. Maintenance for back-end computers (assume 10% of purchase price per year for 3 years)4. Front-end systems5. Spares for front-end systems (assume 5% of $8.7M)6. Local area networks including bridge7. Test and development tools8. Site-wide analogue and video distribution system9. Contingency 15%$ 15.0M$ 2.2M$ 0.6M$ 10.0M $ 0.5M$ 0.8M$ 1.0M$ 3.0M$ 5.0MTOTAL $ 38.1M- 7-1 -7.0 Conclusions7.1 General RemarksMuch has been achieved as a result of the design study carried out over the last six months. We have been able to review rather thoroughly the activities and trends in other laboratories. The current status and future prospects of the electronics and computing technologies required to build a control system has been examined in a broad way. Particular attention has been focused on non-proprietary open standards where cautious optimism can be expressed that manufacturers are at last beginning to appreciate and accept the need for interoperability between different vendor's products.A necessary ingredient for success is a close relationship with industry. So far our efforts have met with a mixed reaction. The majority have responded enthusiastically even if the technical questions could not always be answered locally. One or two potential suppliers showed much less willingness to give us the technical data required for us to make informed judgements.It is of paramount importance to understand the requirements of the wide community of people who will use and rely on the KAON Factory control system. Here a good start has been made and there is a much clearer picture now than existed a few months ago. However, in many areas needs are unclear and will remain so until more detailed designs are completed by equipment specialists and accelerator builders. Only by continuing to work closely with the whole KAON Factory community will we be able to deliver the right systems and support at the appropriate time. Needs must be progressively refined and honed until a complete, well documented picture emerges.Hands-on experience is necessary in many technical areas before a clear understanding of the performance and acceptability of some solutions can be achieved. Acquiring this experience should proceed hand in hand with an ongoing evaluation of user needs and an in-depth overall control system design.The main conclusion of this study is that work should continue and even accelerate. In Section 7.3 we present a program of future work. We have become acutely aware of the scale and complexity of the KAON Factory accelerators and the systems needed to control them. The KAON Factory is certainly big science but the control system is just as surely state ofthe art high tech! It is important to get into the game early. Wesuggest that a control system representative be included in appropriateKAON Factory study and planning groups.The constraining factor in producing this report has been manpower. This problem is likely to continue and will become aggravated unless steps are taken to redefine current priorities. There are many areas where the- 7-2 -necessary technical expertise does not exist in-house. This is both a short term problem and a major long term concern for eventual KAON Factory construction. A first and necessary step in solving this problem is to support the involvement and retraining of more TRIUMF staff. It will also be necessary to involve a significant number of additional experts in several areas - networking, expert systems, data bases, software engineering, microprocessor hardware and software, etc.7.2 Current Proposed DesignIn this section we review our current preferences for how we would implement a KAON Factory control system. It must be emphasized that this is but a snapshot on the road to the final system. Nevertheless this is the approach we favour as of July 1987.In implementing the control system maximum use should be made of open international standards and a buy-don't-build approach should be adopted. Too much dependence on a single manufacturer and his (proprietary) products should be avoided.The control system should have as its backbone a segmented IEEE 802.3 standard local area network. Most equipment should be directly connected to the LAN to produce a flat system topology.We favour the use of TCP/IP as a high level network protocol standard. TCP/IP can be considered the dominant non-proprietary network protocol available today. Eventual compliance with OSI standards should take place when the necessary products are widely available.Motorola 68000 based VME systems should be used at the equipment crate level supplemented, where appropriate, by the CAMAC and IEEE 488 buses. VME systems are also favoured at the moment for use as equipment coordinators. Local device controllers would also be based on the Motorola 68000 family. We would aim to use the same UNIX-based real-time executive throughout the front-end systems. There are several such real-time executives including one from a new Canadian company. Further study is required before the choice is made.For the primary consoles we would select professional workstations using X Windows and the UNIX operating system. For convenience and cost—effectiveness we would choose portable secondary consoles based on personal computers.As yet the range of use of UNIX within the control system is unclear.Much depends on the outcome of current efforts by major computer manufacturers to agree upon a common standard. Our guess is that user demands will result in a useful agreement being reached.- 7-3 -A number of VMS based systems would be used as utility machines. The role and extent of VMS will depend upon the state of UNIX standards at the time of starting the detailed design.As far as practicable we wish to have choices for vendors for most parts of the system.C, FORTRAN and an interpreter will be supported. Serious consideration will be given to the use of newer languages such as Modula-2 and ADA.Selection of a data base management system, expert system building tool, code management system and methodology all require further study. The data base management system choice should be made first and would be strongly influenced by the results of a study now being carried out by the TRIUMF Controls group. This choice would then influence the selection of other systems.7.3 Further Work - A Program of Research and DevelopmentIn this section we list a number of important topics where further work needs to be carried out.7.3.1 Overall DesignIn parallel with practical hands-on experience there is a need to continue and expand activities associated with the overall control system design. In this area a careful consideration and definition of the protocols used between all components of the system is perhaps the most important aspect, followed closely by the need to identify and list the applications programs that will be required. It is as part of this overall design process that many of the site-wide standards will be defined.7.3.2 Timing and Synchronization of the Accelerator ComplexThis is an area where the talents and expertise of many people, accelerator builders, controls people, and others will be required.The goals should be to define in detail the timing and synchronization required in all areas of the KAON Factory and to translate these needs into hardware and software specifications from which a prototype system can be built.7.3.3 Analogue and Video Signal Collection, Distribution and DisplayConventional techniques used in other laboratories appear to be prohibitively expensive for a large number of signals. The goal is to determine a cheaper and effective alternatives.The latest generation of oscilloscopes offer remote operation and display acquisition via the IEEE 488 bus and often a significant level- 7-4 -of local processing, for example enveloping, measurement of risetimes and frequencies. There is a need for practical investigations to determine whether it is necessary to multiplex a large number of raw analogue signals into the MCR or whether oscilloscopes and other analogue signal measurement devices could be situated remote from the MCR, near the signal sources.CATV technology is both mature and readily available. Studies should be carried out to determine the applicability of off-the-shelf products to the site-wide collection and distribution of TV images.7.3.4 General Software EnvironmentGiven the goal of extensive use of open international standards the activities of the X/OPEN committee should be closely followed and testing carried out of implementations of the standards they specify. X/OPEN's intention is to create a free and open market whose programs are portable at the source code level onto many vendors' machines. X/OPEN group members include AT&T, DEC, HP, Philips and Siemens. Their Common Applications Environment is based on UNIX V, OSI networking standards, ANSI's C and FORTRAN and C-ISAM (a data base product). The relevance to the control system is readily apparent.7.3.5 The Use of Workstations and Personal Computers as ConsolesMany laboratories are abandoning traditional consoles in favour of systems based on professional workstations or personal computers. One or more workstations and personal computers should be acquired and studies carried out to determine to what extent man-machine interfaces for a KAON Factory control system can use standard off-the-shelf products and to what extent additional special features need to be provided.Suitable products can be purchased from Apollo, Apple, Data General, DEC, Hewlett-Packard, IBM and SUN. Hewlett-Packard is at the moment the only manufacturer to offer UNIX with the real-time extensions which may be required for some console applications.7.3.6 VME Hardware and SoftwareThe case for the extensive use of VME in a controls system looks to be very strong. TRIUMF should acquire VME equipment for evaluation as soon as possible. The provision of an effective software environment for multiprocessor program development together with an appropriate real-time executive should be investigated and likely candidates should be tried out. Two are of particular interest from Wind River and Microprocessor Toolsmiths which are based on real-time kernels from Hunter-Ready and NRC respectively. At the moment the most convenient host system for them would be a SUN workstation.- 7-5 -7.3.7 Local Device ControllersStudies and prototype designs of local device controllers (embedded processors) should be carried out and their integration into the LAN understood.7.3.8 LanguagesBASIC style interpreters will be of considerable importance, especially for set up and testing during the initial stages of the project.TRIUMF should acquire and evaluate NODAL and PILS, both available from CERN free of charge. Versions exist for a wide range of different hosts including 68000-based systems and the VAX family.The possible utilization of Modula-2 and ADA should be investigated.7.3.9 Modelling and Expert SystemsExperience from other laboratories has demonstrated the importance of both on-line simulation and expert systems in the field of accelerator control. TRIUMF should acquire the basic tools required to obtain experience in both of these areas. Systems used at other laboratories have been run on both SUN and DEC VAX workstations.7.3.10 Data BasesThe use of commercial data base products should continue to be investigated to see to what extent they can meet the needs of the control system. Consideration should be given to an overall data base system for all aspects of the KAON Factory construction, not just the control aspect.7.3.11 Integration With the Present TRIUMF Control SystemPlans should be drawn up for an upgrade of the present TRIUMF control system. These should permit a smooth integration with the new KAON Factory control system. Some of the techniques proposed for the KAON Factory could very usefully first be applied to the upgrade of the cyclotron control system. In this way the control system upgrade could act as the prototype of the KAON Factory control system.Figure 7.1 shows a possible platform on which to carry out practical aspects of the R and D program. It is comprised of an Ethernet segment connecting two workstations (WS1 and WS2), two personal computers (PCI and PC2) , two VME crates containing one or more 68000 based processors and some I/O modules (VM1 and VM2) and a network performance analyser (PERF). The platform is bridged to the existing site Ethernet which could be used as a connection path to the present TRIUMF control system. The bridge would also allow evaluation of how well existing DEC VAX computers could be incorporated into a heterogeneous environment. The- 7-6 -approximate price of this test platform would be $200K and at least eight people should be fully dedicated to the study prior to the full funding of the project.7.4 Final RemarksIt has often been said that these are heroic times in particle physics.Few would deny it. However, progress in physics more and more isdependent upon the use of advanced technology. The Nobel prize winning experiment of Rubbia should underline two things. Firstly, without the use of the latest technology and its disciples there would have been no prize. Secondly, Rubbia's co-recipient of the Nobel prize is an engineer who writes his own software.The implementation of a control system for the KAON Factory will require the careful application of the latest techniques in computing and electronics. It is important that this is realized from the start and that the appropriate resources are allocated. A well planned and executed system is unlikely to cost any more than an ill conceived ad hoc approach. In all likelihood it will cost less in the longer term. It isappropriate in a bilingual country to end this design study with abilingual recommendation, 'do it properly, pas de bricolage'.- 7-7 -SITE-WIDE ETHERNETFigure 7.1 Platform for futher studies- A-l -APPENDIX A CONTRIBUTORSKAON Factory Control System Study GroupR.W. Dobinson (Chairman)D.A. DohanD.P. Gurd G.H. Mackenzie Ch. Serre M.K. Craddock (ex-officio)W.K. Dawson (ex-officio)Top Down Group Bottom Up GroupW.K. Dawson R.W. Dobinson D.P. Gurd R. Keitel S. Sarkar Ch. Serre J. StewartB . EvansE. Klassen R. MooreR.W. Dobinson (ex-officio) D.P. Gurd (ex-officio)Editorial GroupW.K. Dawson R.W. Dobinson D.P. Gurd Ch. Serre- B-l - APPENDIX B PRELIMINARY DEVICE INVENTORYKAON FACTORY DEVICE INVENTORY TOTALS rev 2- B-2 -rrI 16 BITSev2 CMCDrD<<o£CDCNCD CD-t-<_ l<h - 10 BITS	e	e 2 v2oo8 BITSe ev _J< 16 BITS CDCDCDCM e I—or12 BITS 	eeee2vo-I-'orJ 10 BITS 	<<8 BITS 	 v	 to e	v(/<1“c/e- CD 1	 ee2 rr00CMOCD 	v 2	veCONTROLBITS 	v2 rCMCD e 2CDCD veSYSTEMS   !"#" ! $#%««tn<&oi— TOTALS... 24283 10214 2554- B-3 --13156 2s i° H  O <!U’ S T< WOT W>»o £ £C M C«POT3- B-5 --13159*** DEVICES ***B-6 -O HJUL 87- B-7 -ACO NE P T ULPDPSE** S3DIA3CI ***h- ^£ « (yl°5i►—uua <■ on <q u j  u 2: 3SagS»'3MAY 87- B-9 -- B-10 -<n ______c/3_30  (73H ^  WS o pI T O0<Cmu ^  K ^  HO ^ QL M EUH.?u. ^ w^ y 2O  £ a  <<HD b i d Q <JUL- C-l -Appendix CBuses Versus Local Area NetworksBuses and local area networks provide communications paths between different components of a distributed processing system. In this section their basic properties are compared and contrasted. Table C.l is used as the basis of these discussions.There is a fundamental difference in the type of device which buses and LANs interconnect. The former normally link parts of computer systems, the latter more complete computer systems which always contain their own local intelligence. Buses allow individual memory locations or registers within a device to be accessed while in contrast LAN permit only reference to be made to a device.The relationship between devices attached to a bus and a LAN differs significantly. On a bus there is a clear distinction between masters, who can initiate information transfer and slaves who cannot. In contrast all devices on a LAN are equally able to initiate transfers and communication proceeds on a peer-to-peer basis. Furthermore, the initiator of a bus transaction both sends and receives information (write/read) as part of a handshaken exchange. In contrast a device on a LAN is write only and there is no low level handshake.In general the basic unit of information transferred on a bus is a byte or word; LANs in contrast are designed for the transmission of messages (many bytes or words).Buses and LANs differ markedly in the typical distances they can span. Amicroprocessor bus such as VME typically runs over a fraction of a meter whilein contrast, the IEEE 802 LAN standards cover a few kilometers. Serial CAMAC is one of the few standards in existence which has many bus—like properties while extending LAN-like distances.Buses and LANs differ markedly in the physical path they use. While buses usemultiple lines in parallel, often up to 100 separate conductors, most LANs useserial transmission over a single wire. Beyond a few tens of meters the use of parallel buses becomes expensive in terms of the cost of cables and their installation. As distances spanned increase so does the chance of noise and induced errors and the need to detect and correct for them. Most LANs address this problem while most buses do not.Buses for the moment possess a significantly higher raw bandwidth than LANs. However, the effective transfer rate between two devices is in both cases far below the theoretical maximum. Table C.2 summarizes practical interprocessor performance figures for two microVAX II computers (1 Mips machines), running VAX ELN (a real-time operating system) and communicating over Ethernet. The distance over which interprocessor communication is carried out is a few metres. Bus interprocessor communications have a practical bandwidth that is about three to four times that of a LAN over short distances.- C-2 -LAN performance is distance independent up to the maximum extent of the LAN.In contrast most buses cannot span large distances and those that do suffer an increase in the overhead to send each byte due to the time for the bus handshake to propagate back and forth. Over distances of a few hundred metres the performance for long messages is similar for buses and LANS.Table C.lA Comparison of Bus and Local Area Network Network TechnologiesFEATURE BUS LANDistance spanned few tens of meters a backplane, one or several cabinetsa few km a building a production line a campusType of device being interconnectedparts ofcomputer systemscomputer systemsAddress granularity fine (a memory location) coarse (a computer)Data transmission speedhigh10 to 500 Mbpsmedium1 to 100 MbpsTransmission width 10 to 100 lines parallel transmission1 channelserial transmissionError rate on transmission mediumvery low lowError detection often not implemented always implementedTopology bus bus, tree, star, ringDevice relationship hierarchical peer to peerRole of transaction initiatorwrite/read write onlyResponse inherent, low level delayed, high-levelTransferred unit of word messagedata- C-3 -Table C.2Type of Inter-ProcessCommunicationBasicMessageOverheadmsTimePerByteusTime for 2 BytesmsMessagesPerSecondTransferRateMbpsTime for 1500 Bytes msMessagesPerSecondTransferRateMbpsTwo processes in the same machine; no data copying1 0 1 1000 0.016 1 1000 8Inter-processor using a bus and shared memory (Intra-processor if data is copied)1 .8 1 1000 0.016 2.7 450 5.4Inter-processor using 10 Mbps local area network4.5 1.6 4.5 224 0.004 6.9 145 1.7

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.51833.1-0107821/manifest

Comment

Related Items