Operating System Linux As Developing and Runtime Platform for Control System of Particle Accelerator

Operating System Linux As Developing and Runtime Platform for Control System of Particle Accelerator

OPERATING SYSTEM LINUX AS DEVELOPING AND RUNTIME PLATFORM FOR CONTROL SYSTEM OF PARTICLE ACCELERATOR A.S. Chepurnov, Institute of Nuclear Physics, Moscow State University, 119899, Moscow, Russia F.N. Nedeoglo, D.V. Komissarov, Department of Physics, Moscow State University, 119899, Moscow, Russia Abstract To upgrade old fashion control system of a race track microtron (RTM) injector we have used Linux for the first What operating system to choose is a common problem time in 1996 [1,2]. Single PC under Linux replaced five necessary to solve during development of control system old-styled LSI-11 minicomputers. We ensured that Linux for particle accelerator. It would be very attractive to use is a stable and reliable OS and it could be used in the the same operating system as for development of software control systems more widely after two years of successful components of control system as for runtime both for real- exploitation of the system. So, the Linux was chosen as time and non real-time applications. Remote boot-loading uniform developing and runtime platform for our new capabilities, mature software development tools, and other control system of “industrial style” which is under final advantages of Linux make it very useful for development development now together with newly designed high of software components of modern control system for beam current electron continuous wave linac [3]. particle accelerators. Our experience lets us to propose application of Linux operating system as for non real-time 2 LINUX BASED CONTROL SYSTEM high levels as for real-time middle level of control system. Real-time extension of Linux - RTLinux is used for real- 2.1 General layout of control system. time applications. This choice allowed us to utilize effectively performance of x86 compatible computers, to The control system for the linac consists of two have uniform hardware and software environment. Linux classical levels (Figure. 1) - non-real-time top level and operating system have been used on different levels of real-time front-end level. Both levels use Intel-compatible control system of electron linacs as for gradual upgrading computers. of the old control system as for development of new control system for newly designed compact accelerator. Software drivers for CAN-bus adapters together with DeviceNet library have been developed under Linux. 1 INTRODUCTION Linux operating system (OS) has become more and more popular as dynamically developing modern Unix- like OS. Many of famous hardware and software manufacturers such as IBM, SGI, Oracle, National Instruments and others have support this OS. Linux brings an attractive alternative to operating systems traditionally used in the field of accelerators control. The basic advantages of Linux OS against traditional operating systems are the open developing model and free of charge. There are thousands of developers and testers that take part in the developing of the OS. Open source availability allows anyone to Figure 1. Layout of the control system. implement new features and new applications not from scratch but based on the existing code. Front-end level supports fast control algorithms, Wide spectrum of compilers, high-level programming hardware locking, fast feedback loops, and signal languages, cross-platform libraries, developing tools and conditioning hardware. The basic functions of top level real-time extensions allow to use Linux at all the levels of are bootloading of front-end computers, supporting of the control system as development platform as runtime man-machine interface and providing necessary database environment. capabilities. 1832 Proceedings of EPAC 2000, Vienna, Austria Top level and front-end PCs communicate via Ethernet of writing and reading messages to or from special fibre optic link, to provide galvanic isolation between character device file. The driver can handle up to four levels of control system. CAN-bus-ISA adapters simultaneously. CAN-bus fieldbus is the second key component of our The DeviceNet compliant protocol stack provides Slave control system. DeviceNet was selected as well-defined capabilities for various types of front-end controllers and and consistent version of CAN application layer (CAL). Master capabilities for host personal computer (PC) The CAN-bus-ISA adapter is installed into PC to provide running under Linux OS. computer access to CAN-bus network. Home designed To support the protocol stack for different hardware CAN-bus-ISA adapter for PC is based on Philips SJA1000 platform it was developed in the form of software library CAN-bus controller and provides fast access to the CAN (Figure2) and consists of the following components: controller by direct memory mapping. • the library kernel, • the module with system dependent functions, 2.2 Top level. • the module with interface to CAN-bus. PC compatible computer runs under Linux 2.2.x at the top level of control system. To improve interaction Library API (interface to user code) between operator and accelerator we use knobs-type Library Kernel modules and plan to use touch screen. The module Kernel mechanisms constructed around single-chip micro-controller consists Candrv: interface to CAN of encoder, two lines of high brightness LCD, and four Sysdrv: system specific bus (setup, read_msg, functions (timers, LED) keys with corresponding LEDs. The modules (up to four write_msg) in our case) could be assigned dynamically with any adjustable or controllable parameter of accelerator. The Figure 2. The structure of the DeviceNet library. modules communicate with top level PC via CAN-bus. 2.3 Front-end level. This partitioning scheme ensures portability of our software to platforms with poor resources (micro- At the front-end level the diskless PC runs under Linux controllers) as well as platforms with rich resources such 2.2.x with RTLinux 2.2a (real-time extension of Linux). as PCs. The library kernel contains the protocol stack only Diskless PC boots operating system via BOOTP protocol and interface to the application program. All dependencies from the top-level PC. Then root file system is mounted to particular environments are located in the two other with the help of NFS protocol. parts of the library. So if ones kernel module has been CAN-bus-ISA adapter installed in front-end PC debugged and tested under Linux, it can be used in controls embedded controllers that belonged to a family of DeviceNet compliant devices, developed for other “Smart Devices”--intelligent controllers which support platforms. To port the library to a new platform it is functions of real-time digital feedback control, data necessary to modify system dependent functions (module acquisition and processing [4]. called Sysdrv) and interface to CAN-bus (called Candrv). Various versions of DeviceNet library have been tested 3 SOFTWARE DESIGN ISSUES including Intel-compatible PC under Linux, single-chip micro-controllers from Microchip (PIC16C7x/87x) and Control system software was developed with the GNU DSP from TI (TMS320C2xx ). development tools only under the Linux OS. The GNU C compiler (GCC) with standard GNU C library (GNU LIBC), GNU Debugger (GDB) and Concurrent Version 3.2 Software support of real-time. Control system (CVS) were used. Real-time extension of Linux OS - RTLinux allows 3.1 Software support of CAN-bus. developing software components, which have got hard real-time capability [7]. The real-time processes are CAN-bus is used at both levels of control system. To implemented in RTLinux as lightweight threads and run in ensure high level of compatibility and ability to use as the kernel memory space. RTLinux coexists with Linux home made as “off the shelf” components DeviceNet high OS and Linux kernel operates as separate real-time level protocol for CAN-bus was used [5]. We did not find process with the lowest priority using a virtual machine neither appropriate support of CAN-bus nor DeviceNet layer in RTLinux. software stack under Linux. So, DeviceNet compliant RTLinux version 2 consists of core component and protocol stack and different CAN-bus device drivers were several optional components. The core component is developed [6]. distributed as Linux kernel patch. The core component To support CAN-bus-ISA adapters under the Linux allows registering low interrupt handlers that cannot be kernel a Linux kernel mode driver has been developed. Application software interfaces with the driver by means Proceedings of EPAC 2000, Vienna, Austria 1833 preempted by Linux itself. The optional components Modules of application software watch and control an provide: accelerator through a segment of DSM. Mirroring • pure priority based scheduler, mechanism of DSM segments lied hidden from • set of functions to work with system clock and application software. Software components accessing the timers, segment of DSM, and not responsible for mirroring, might • support for POSIX IO interface know nothing about inter-level communication (read/write/open/close) for real-time device construction and were not concerned with the appearance drivers, of data. This approach ensured rather clear application • real-time FIFOs, that connect a real-time process program interface, which simplified work of programmers and Linux user space process through a special and made possible, the independent development of parts character device file so the Linux process can of application software as mirroring algorithm for read/write to real-time component, different types of hardware. • shared memory between real-time components and Linux processes. 4 CONCLUSION RTLinux uses the loadable kernel module mechanism The newest features of last RTLinux versions such as implemented in Linux OS to load as real-time processes POSIX compatible interfaces appeared since our last as optional components into the memory [8]. publication [3] and our last experience has strengthened Figure 3. Interaction of RTLinux components in control the belief that RTLinux is usable for accelerator control. system software. During the last three years the new control system has Linux User Linux Application Memory Space been developed as a result of our efforts in the fields of Linux OS and CAN-bus applications.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us