Data management and analysis of HLS control system Data management and analysis of HLS control system

Data management and analysis of HLS control system

  • 期刊名字:核技术
  • 文件大小:185kb
  • 论文作者:LI Jing-yi,LIU Gong-Fa,LI Wei-
  • 作者单位:National Synchrotron Radiation Laboratory
  • 更新时间:2020-12-06
  • 下载次数:
论文简介

Vol.11 No.2NUCLEAR SCIENCE AND TECHNIQUESMay 2000Data management and analysis of HLS control systemLI Jing Yi, LIU Gong-Fa, LI Wei-Min, DIAO Cao Zheng,ZHOU An-Qi, LI Yong Jun(National Synchrotron Radiation Laboratory, University of Science and Technology of China,Hefci 230029 )AbstractThe control system of HLS (Hefei Light Source) is based on EPICS.The control data is held in a distributed database, which resides in several IOCs. AnEPICS tool, AR, is used to archive the control data. A data management systern isdeveloped to manage the archived data. A number of CGI programs make it casyto access the data via WwW, and the programs also provide several functions foranalyzing the data. The results can be displayed in various modes.Keywords Control systern, Databasc, CGI prograruningCLC numbers TP393, TP392, TP2741 IntroductionThe Hefei Synchrotron Radiation Light Source (HLS) is a second generation ded-icated light source. It consists of three parts, a 200 MeV linac, an 88 m long transportline and an 800 MeV electron storage ring. As a task of the NSRL phase I project, thecontrol system of HLS is upgraded under EPICS. By now the upgrade has been partlyfinished in some subsystems. A large variety of control data are held in a distributeddatabase, which resides in several IOCs. It is necessary to archive these control data fora wide variety of purposes. For the storage ring, there is one power supply (PS) for abend magnet, 8 power supplies for the quadruple magnets and three power supplies forthe sextuple magnets. The power supplies have two operating modes, ramping mode andstable mode. It is necessary to archive the set-point value and status of each PS duringthe process of ramping2]. The archived data will also be very useful in determining thereason that caused beam losing. The beam current is another value that needs to bearchived. With the archived beam current, we can get the differential life-time at dif-ferent time, with which we can get the machine status by some comparison. The valuesof closed orbit positions measured by BPMs also need to be archived for historical use.By comparing with the reference of a closed orbit, one can decide whether the orbit hasbecome worse. There are several archivthat arn, s1ready available in theEPICS toolkit. In our case, AR is used中国煤化工a. A TCL script isdeveloped to transform the AR- archivedMHC N M H GDescribe Data Set)format described in section 2 for easy managing and accessing. Nowadays, a large num-ber of people are familiar with World Wide- Web (WWW) and web browsers(I. TheManuscript received date:1999-12-09No.2LI Jing-Yiet al; Data managerment and analysis of HLS control systenn141W WW-technologies, including HTML, CGI, JAVA applet, and so on, make it easy toaccess data on the web regardless the platform used. In this paper, data managementsand methods for accessing data are described in details, which include a number of CGIprograms and JAVA applets. A number of analysis methods will also be described.2 Data management2.1 Data archivingAn EPICS tool, AR, was used to archive the control data from a number of IOCs.AR is based on the client/server model and driven by an event, i.e. it is invoked onlywhen the value of related channel changes. At present, only channels of the subsystemsthat have been upgraded with EPICS can be archived. A TCL script is used to transformthe archived data into the files described below, using SDDS protocol developed at theArgonne National Laboratory (ANL).2.2 Database structureIn order that the archived control data were well managed, a database managementsystemn was developed. The data structure in the database is to some extent like theUnix file system tree. Fig. 1 shows the data structure.The data were divided into several groups depending on which system it belonged toor anything else the database builder wanted. For example, all the data for closed orbitpositions belonged to the same group. The data in this group were also subdivided intoseveral groups. At the top level, there was a root entry that described all the informationof all the subentries and data in next level. There was also a subentry for each groupof data and sub-subentry under this group. Database entries were held in fles namedxxIndex. sdds, e.g. root entry in rootindex.sdds and COD (closed orbit distortion)entry in codIndex.sdds, in which theytreated data and entries as the same thing.Root entryIn the present version, each entry consistsSubentryof three parts, NAME, TIME and PATH.Sub-subentryNAME is a string used to identify thedata. TIME is the time, the data cameinto being. PATH is the string like“num-Databer@filename". In the string, filename isthe name of the fle where data or entryrests, number is the page number of re-Fig.1 Database structurelated data in this file. The following is asample of codIndex.sdds.中国煤化工SDDS1MHCNMHG¶rmeter name= =par1, type=long, &end&column name=coll, type=string, &end&column name=col2, type=string, &end&column name= =col3, typc=string, &end&dn奶数cii, &end! page number 1142NUCLEAR SCIENCE AND TECHNIQUESVol.11“Q1SF00 Q1SF01 Q1SF02 Q1SZ01 Q1SZ02”“{9:26:12 5/18/1996} {9:27:14 5/18/1996}{ 9:28:165/18/1996} {9:24:58 5/18/1996} {9:23:54 5/18/1996}””1@Q1S.sdds 2@Q1S.adds 3@Q1S. sdds 4@Q1S.sdds5@Q1S.sdds"A data file, Q1S.sdds, looks like the following.SDDS1¶meter name= =par1, type=string, &end¶meter name= =par2, type=string, &end¶meter name=par3, type=string, &end&array name=arrData, type=float, dimensions=2, &end&rcolumn name=colData, type=string, &cend&data mode= =asci, &end! page number 1Q1SF00“9:26:12 5/18/1996”“NAMEXYV1V2V3V4”27 6 ! 2-dimensional array arrData:1.64784396e +004.97545385e+00 1.20467997e +01 1.22145948e+01 7.28581285e+009.37109280e +00... other 26 rows of data"BQ3E BQ4E BQ5E BQ6E BQ7E BQ8E BQ8SBQ7S BQ6S BQ5S BQ4S BQ3S BQ2S BQ1SBQ1 W BQ2W BQ3W BQ4W BQ5W BQ6W BQ7WBQ8W BQ8N BQ6N BQ5N BQ4N BQ3N"3 Data access3.1 Methods to access the databaseThe data access is based on HTTP and WWw browser. Fig.2 ilustrates how thedata is accessed via the Internet. Anyone who is authorized can access the database viaa web browser. The HTTP server, i.e. HTTPD, provides a basic HTTP based service.There are a number of CGI programs written in TCL language, which provide an interfacebetween the HTTP server and the database. When a request, i.e. a CGI form, from thewWW browser comes, a CGI named form.tcl will parse the form's contents. Then thescript will call other scripts depending on the commands parsed from the form to retrievedata and analyze it if needed.3.2 Interactive homepage for data accessingFig.3 is a sample screen of Netscape web browser where data is displayed in forn of2-dimensional curve. The Netscape window is divided into three areas, i.e. three frames.Frame 1 is used to display the entries at中国煤化工- shows all the entriesfor a closed orbit. If an entry is selectedin frarme 2. Frame 2is used to display data. In the defaultMYHCNMH Gmmensional curve. Itcan also display the data in text and a 3- dimensional curve if specified. Frame 3 is usedto do more complex analysis. It can send a set of commands in a CGI form to the server.With these combined commands, the system can do many data comparing and analyzingworks. For instance, when analyzing closed orbits, one can first set a reference orbit, andNo.2LI Jing- Yiet al: Data management and analysis of HLS control system143then plot the displacement of a certain orbit with respect to this reference orbit. Onecan also display a set of orbits in a 3-dimensional curve, or plot a set of orbits in a samecoordinate.Web browser↑InternetCOD Guved q5Fo0e (02m 12 SVIR/1P)HTTP servercoDchrehxbuieionDatabase interfaceDatabaseFig.2 Method for accessingFig.3 Sample screen of netscape web browserthe database3.3 Graphical displayThere are two JAVA applets that is used to plot data on a www browser in variousmodes.. plot.class, used to plot 2D and 3D curves.bar.class, used to plot 2D bars for the data.3.4 System securityIt is always necessary to pay much attention to security problers. We use twomethods to restrict users accessing the database. One is the user-name checking and theother is the IP address checking. Only a small number of authorized users, who use thecomputers only in the local network of the lab, are permitted to access the database.4 ConclusionThe HLS control system has a modest scale. This system of data managing andanalyzing meets the basic demands of many people involved in this type of research work.We will improve the communication methods using JAVA. We will also improve the dataarchiver, which will directly build the data into the database. In this way, the delay tirmebetween archiving and database building will be reduced.References1 Li W M, The control system of the main中国煤化工L,ICALEPCS'99,Triste, Italy, 1999TTH. CNM HGEpcs97, Bejinig2 Jeram B et al. A control system based on-.. n ......China, 1997

论文截图
版权:如无特殊注明,文章转载自网络,侵权请联系cnmhg168#163.com删除!文件均为网友上传,仅供研究和学习使用,务必24小时内删除。