VEPP-4 Control S ystem
A.Ales haev, A.Ba trakov, S. Belov, A.Dubrovin, Yu.Eidelman , A.Kalini n, S.Karna ev, M.Koll egov,V.Koza k, E.Kuper , A.Ledene v, B.Levic hev, Sv.Mi shnev, A.N aumenkov, G.Piskunov ,I.Prot opopov, D. Shatilov, E.Simonov, V.Smaljuk , A.Smirno v, S.Tarar ishkin, Io .Zaroudnev
Budker Institute of Nuclea r Physics
Prospe kt Lavrent jeva, 11, Novosibirs k, 630090, Russia
Abstract
The VEPP-4 contro l system includes twelve CAMAC- embedded 24-bit in-hou se develo ped ODRENO K comput ers(CC24) [1], interc onnected in a star networ k. The centra l node provides the boot for the periph eral comput ers, intert ask
commun ications betwee n them and file server functi ons. Real-t ime interc ommunicati ons betwee n some of thecomput ers are based on point- to-point interf aces. Equipm ent contro l electr onics is mostly CAMAC (nearl y 60 crates ).
A real time multit asking OS permit s runnin g up to 10 tasks with fast dynami c change of core image. Contro l of VEPP4 is accomp lished by the simult aneous perfor mance of more than 50 tasks. PCs are used as operat or consol es, dataproces sing comput ers, printe r server s and back-u p system s.

1 INT RODUCTION
The VEPP-4 accele rator facili ty [2] is compos ed of a 6 GeV collider VEPP-4 M of 365 m in circum ference, a 2GeV multi- purpose storag e ring VEPP-3 and a 350 MeV electr on/positro n inject or. The inject or consis ts of a 50 MeV
LINAC and a 350 MeV B-4 synchr otron. The LINAC RF is suppli ed by pulsed GIROCO N genera tor. There are pulsed
transf er lines from the LINAC to B-4, from B-4 to VEPP-3 and from VEPP-3 to VEPP-4 M (Fig.1 ).

Fig.1 VEPP-4 facilities and control computers layout.

The collider provides the experi ments with electr on/positro n beams, back-s cattered Compto n g quanta andsynchr otron radiat ion. VEPP-3 is an inject or into VEPP-4 M and is used simult aneously for experi ments withsynchr otron radiat ion and a polari zed gas intern al target .
The up-to- date contro l system has been develo ped since 1986 at the same time as the upgrading of the VEPP4M main ring. All hardwa re and softwa re have been develo ped and produc ed in the Budker Instit ute of Nuclea r Physic s.

2 ARC HITECTURE
2.1 S tructure
The contro l system has three levels : the centra l node, the local comput ing layer and the equipm ent layer.
The local comput ing layer is compos ed of 11 intell igent CAMAC crates contai ning ODRENOK comput ers
which are interc onnected in a star networ k. All comput ers are connec ted to the centra l node via 250 kbit/s serial -links.
The node provides for the initia l downlo ading of the comput ers, file servic e and “slow” interp rocess commun ications via
a mail box. Specia l point- to-point 1.5 Mbit/s serial -links are employ ed for high-s peed intert ask commun ications indiffer ent local comput ers.
Usuall y each subsys tem of the accele rator facili ty is contro lled by its person al ODRENO K. An overvi ew isshown schemat ically in Fig.2. All the active crates and the centra l node are locate d in a contro l room, except for thecomput er which contro ls the VEPP-3 magnet system . Table 1 presen ts the up-to- date config uration.
The front end electr onics is mostly distri buted among passiv e CAMAC crates connec ted to the active crates
throug h serial -link driver s and contro llers [3]. The distan ce betwee n the active and the passiv e crates is up to 150 m.
Specia l serial contro llers are employ ed for connec tions with non-CA MAC electronics , used for contro l of the RFsystem s and for beam diagno stics in the transf er lines. Coaxia l cables are used for all links. The equipm ent contro l layer
is disper sed around the facili ty.
The magnet ic system of the VEPP-4 M ring is contro lled by distri buted intell igent contro llers [4] connec ted
with CAMAC by MIL-15 53-B links (Fig.2 ). The use of these contro llers gives us improv ed contro l of the magnet
system during the rise of the beam energy from 1.8 GeV to 6 GeV.

Fig.2 VEPP-4 control system architecture.

Table 1VEPP-4 control s ystem conf iguration.

1234567891011ODRENO KnameAlloca tion

MSV4BEAMV4MSV3RFV3BEAMV3UPO
IPO
CHAN
CONTRO L
LUMINO SRADIAC

contro l of VEPP-4 M
beam diagno stics at VEPP-4 M
contro l of the magnet ic system of VEPP-3
contro l of the RF system of VEPP-3
beam diagno stics at VEPP-3
contro l of the pulse inject orpulse inject or monito ring
contro l of VEPP-3 - VEPP-4 M transfe r linevacuum system monito ringlumino sity monito ring at VEPP-4 Mradiat ion monito ringTotal

Number ofCAMAC CAMAC output scrates
module s
129524948323617050492132754765
241024467

370
1253013510135805

inputs
950
280
290
151003011011015040362111

2.2 L ocal compu ting layer
The local comput er layer is based upon the CC24-c omputer, named ODRENO K. This comput er was design edin 1983-1 985 as an autono mous CC24 crate contro ller emulat ing the instru ction set of ODRA-1 300 (a clone of the ICL1900 series mainfr ames) comput er. The main featur es of ODRENO K are as follow s:- word length
24 bit ;- addr ess space
4 M wo rds;
- RAM size
64K 24 -bit words ;- perf ormance
0.5 MI PS;- hardware imple mentation of floatin g point op erations;- USER /SYSTEM mo des, multi tasking su pport, vir tual memor y;- exte nsions to the initia l ICL-1900 architect ure: firm ware imple mentation ofOS ker nel, CAMAC -oriented instructio ns, vector instructi ons;
- 2M C AMAC modul e installe d in the c ontroller position;- micr oprogram i mplementat ion on the AMD 2900 bit-slices
Each active crate has a four-p ort RS232 module for connec tion of up to four alphan umeric termin als, a number of color
graphi c displa y contro llers, a RAM-em ulated module (768 kb or 1.5 Mb), a networ k interf ace, and periph eral crate
driver s. Now the alphan umeric termin als are gradua lly being replac ed by IBM PCs, which are used as operat or interf acesand supple mentary disk machin es.
2.3 E quipment c ontrol lay erA basis for the equipm ent contro l layer is a series of CAMAC module s develo ped at BINP. The series includes
differ ent types of DACs and ADCs [5], switch es, etc. Tables 2 and 3 list the main parame ters of some module s.
Sixtee n-output switch es with electr omagnetic relays are used to turn on and turn off power suppli es and for interl ocks.
This type of CAMAC module has a 1ms switch ing time.

Table 2Parame ters of C AMAC embedded ADCs
Type o f ADC
Conver sion type
Conver sion time
Scale (binary)
Input voltage (V )Number of inputs
On-boa rd memory (kbytes)
Module width

20-256integr ation
2 - 24 0 ms
13-20±81, MUX control
31M

101-SKfast
1 ms - 2 ms
12± 1.2 - ± 10
4122M

850-SKZIIS-4 M
fast
fast
50 ns - 2 ms < 2 ms
810± 1.2 - ± 10±24432M
1M

Table 3
Parame ters of C AMAC embedded DACs
Type o f DAC
Type o f output
Scale (binary)Output range
LSB
Number of output s
Module width

CAP-16analog16± 6.5V
200 mVCAP-20analog
19 + s ign± 8.2V
15.6mV

162M

11M

GVI-8M
delay pulse
160 - 83 8 ms
.1 ms - 12.8
ms
82M

PKS-8pulse- width
160 - 6. 55ms.1ms
82M

3 SOF TWARE
3.1 Program envi ronment
A multit asking real-t ime Operat ing System (OS) ODOS [6] was specia lly design ed for ODRENO K. It enable s
us to run up to 10 indepe ndently-co mpiled memory -resident tasks. This OS suppor ts intert ask synchr onous andasynch ronous messag e transf ers, remote file access , connec tion of up to 4 local termin als and one “syste m” virtua ltermin al attach ed throug h the networ k. The OS permit s indepe ndent dynami c loadin g, runnin g and termin ation of tasks.
TRAN (FORTR AN versio n) with an in-hou se develo ped compil er is used for applic ation progra ms. UnderODOS its featur es fit well for memory mappin g and real-t ime module contro l.

3.2 Data-base organization
The DataBa se (DB) contai ns all the inform ation about the device s of the accele rator comple x. It has static anddynami c parts. The static databa se is stored in RAM-mo dules and on the hard disk of the centra l node. The dynami cdataba se is a number of arrays in the Reside nt Execut ive Progra ms (REPs) . DataBa se Editin g (DBE) progra ms provide
access to the static databa se, for saving the operat ion modes and modify ing the data files.
The organi zation of the static databa se is illust rated in Fig.3. The lower layer of the “topol ogy” and “devic es”
branch es is a linear array of text, intege r and real variab les, which includes names, addres ses, status flags and calibratio nparame ters. The “setti ng” branch includes the files, which are the operat ion modes for differ ent parts of VEPP-4
accele rator facili ty.

Fig. 3 . Static database organizati on

REP is the resident modula r program in each lo cal comput er (Figure 4). It co ntains the data, con trol algor ithms andcarefu lly optimi zed commun ication su broutines. All front end elect ronics are controlle d by REP w hich prote cts thesystem from impr oper opera tion. Any newly deve loped elec tronics ca n be easil y added to the progr am as plug -in
module s. Control actions a re perfor med by wri ting the r equired va lues into the dynami c database . REP allo ws us to h ave
about 2000 - 400 0 accesses /s to CAMA C modules.

Fig. 4 . Diagram of basic control s oftware in the ODREN OK compute r.
3.3 Ap plications
All applic ations were develo ped by the VEPP-4 staff requir ing about 15 person -years. In additi on, a large
amount of time was spent on the develo pment of specia l tools for commis sioning and modeli ng progra ms.
The Operat or Contro l Programs (OCPs) are implem ented to handle the device s of the facili ty. Contro l values
are entere d from the keyboa rd, data are displa yed as a column of digita l values of device parame ters. Saving and Settin g
progra ms (SSPs) save/s et the operat ion modes.

Graphi cal Survei llance Progra ms (GSPs) displa y the parame ters to be monito red in an illust rative color form. It
allows the operat or to identi fy easily any deviat ions from the assign ed operat ion parame ters. The status of the facili ty isshown in specia lly-config ured graphi cal displa y images .
High-l evel Contro l Progra ms (HCPs) provide the automa tic operat ion of VEPP-4 withou t operat or interv ention.
HCPs perfor m:a) electr on and positr on beam accumu lation and accele ration in the storag e ring;b) beam transp ort to the collider from VEPP-3 ;c) the rise of beam energy in VEPP-4 M from 1.8 GeV to 6 GeV.
A mailbo x in the centra l comput er is respon sible for connec tions betwee n the HCPs in differ ent comput ers. The
mailbo x consis ts of a number of module s, each of them corres ponding to a partic ular ODRENO K. Each module contai ns
status inform ation about the subsys tems contro lled by that ODRENO K (“oper ational ready” , beam energy , beams
curren t, etc.) and includes contro l comman ds for other comput ers (for exampl e, “rever se polari ty”, “rise energy ”, etc.)

4 CON CLUSION
Althou gh the presen t contro l system succes sfully provides for the operat ion of VEPP-4 , it is obviou s that an upgrade isnecess ary. The first goal is the instal lation of ethern et links betwee n the local proces s contro llers. This will allow us touse a top level based on workst ations with standa rd softwa re withou t loss of functi onality. The second goal is wide useof distri buted proces sors at the lowest contro l level.

5 REF ERENCES[1] G.Pisk unov, Autome tria, N4 (1986) , p. 32-38 (in Russia n).
[2] 1994 BINP Yearly Report , BINP, Novosi birsk (1995) , p. 81-87 (in Russia n).
[3] V.Koza k, Prepri nt INP 88-24 (in Russia n).
[4] S.Karn aev et al., Contro l of VEPP-4 M Magnet ic System , these Procee dings.
[5] E.Kupe r, A.Lede nev, ICALEP CS 1991, KEK, Tsukub a, Japan, p. 382-38 5.
[6] A.Ales haev, Prepri nt INP, Novosi birsk (1989) 88-24 (in Russia n).