Conversion of the TISOL Control System to EPICS
J. Lam, G. Waters and R. Keitel
TRIUMF, 4004 Wesbrook Mall, Vancouver, B.C., V6T 2A3, Canada
Abstract
As part of the preparation for the ISAC radioactive beamfacility at TRIUMF, the control system of the small on-line
isotope separator TISOL was upgraded using the EPICS
toolkit. This upgrade served several purposes: a) to train
control personnel on EPICS, b) to familiarize future ISAC
users with a prototype of the ISAC control system and c)
get an early user feedback on the control system to thecontrols group. Previously, TISOL was controlled from a
PC using custom software and Optomux I/O hardware. Thenew system maintains the existing I/O hardware and uses
an EPICS IOC to drive the Optomux loop. Optomux
hardware support was integrated into EPICS and theexisting software functionality was recreated using theEPICS tools. The cost and benefits of converting thislegacy system to EPICS will be discussed.
1 Introduction
TISOL is an on-line isotope separator test facility at
TRIUMF which was built in preparation for the ISAC
radioactive beam facility, which is currently underconstruction. TISOL was first commissioned in 1986. It
consists of a target ion source and a mass-analysing beamline. A low intensity proton beam (a few µA) from theTRIUMF cyclotron produces short-lived radioactive
isotopes in a hot massive target by spallation reactions.
These isotopes are ionised and extracted from the source at apotential between 10 and 20kV. This ion beam is massseparated by a dipole magnet and transported to a small
experimental area switch-yard. The Control system provides
control for the vacuum system, ion source and beam optics.
An overview of the TISOL beam line is shown in Fig. 1.
2 Original system
2.1 Hardware
The existing TISOL control system was built on an
extremely low budget using an IBM PC compatible personal
computer and Optomux I/O hardware. The Optomux system
contains 12 analogue and 17 digital I/O-boards on a multidrop RS422 line. Each I/O-board accommodates 16 I/Ochannels.
2.2 Software
TISOL is presently controlled by the TICS software
package [1,2]. It runs on the PC under MS-DOS, using aninternal multitasking executive. It provides device selection
and basic open-loop device control through the numeric
keypad. The display uses simple character graphics. Theflexibility of the TICS system is derived from the use of an
ASCII data base which specifies:•Device properties•
Conversion tables•
Hardware commands•
Interlocks•
Alarms•
Logging•
Display layout.
Figure 1 shows a TICS database entry for an Ion Gauge withinterlock conditions.

Gauge IG5Commands
On b251 p3 c10
Off b251 p3 c11
Condition RV8 off
Condition GV8 open
Condition RP4 on
Read_status b252 p1 c12
Read_value b255 p1 c37
Fig. 1: TICS data base section3 Upgraded system
Since its original design, the TISOL control system has
been upgraded several times to accommodate new beamlines and to include new features such as sequencing andEthernet support for remote control. It has, however, clearlyreached its limits and new user requirements made an
upgrade necessary. Given our limited resources, it wasdecided to retain the existing Optomux I/O hardware and toupgrade the software using the EPICS toolkit. EPICS had
recently been chosen for the control system of the ISAC
accelerator facility. This approach has several advantages:a) It facilitatates the integration of the upgrade with theongoing experimental program, because switchingback and forth between the old and new system can beachieved in a matter of minutes.
b) The new TISOL system will provide important feedback for the designers of the ISAC system from theoverlapping user community.
c) The new system will be embedded in the main-streamof TRIUMF control system development, thus
providing for integrated maintenance.
3.1 Hardware upgrade
The new system will use one VME crate as EPICS
input/output controller (IOC), one SUN Sparcstation as
application server, and one or more PC’s running XWindows software as operator terminals. As CPU for theEPICS IOC, we chose the MVME162 which is also used forthe ISAC control system [3]. The Optomux serial connection

Fig. 2: Section of CAPFAST schematics
will initially be connected to the second serial port of theMVME162. Future performance enhancements are possible
by changing the Optomux topology from one to multiple
independent loops using, for example, industry packs withmultiple serial ports.
3.2 Software upgrade (EPICS)
The software upgrade consisted of the following tasks:Writing C code for integrating the Optomux system
into EPICS.
•Using EPICS tools to convert the TICS database toEPICS databases•Using EPICS tools to replace the TICS operator
interface screens with EPICS screens.
•3.2.1 Optomux integration
EPICS device and driver support for the Optomux
hardware was developed using the C language. TheOptomux serial communication is very slow (In our oldinstallation we are limited to 19200 baud.). Instead ofwriting asynchronous EPICS device support with call-backfunctions, we opted for a separate polling task which isspawned when the EPICS driver level is initialised. Thistask polls the Optomux system using the vxWorks serial port
driver and interacts with the EPICS device support via
memory-resident data structures.
3.2.2 EPICS database
We use the CAPFAST schematic drawing package [4] as
the primary tool to build EPICS databases. Drawing on theexperience from our first EPICS project [3] and the ongoingwork for the ISAC control system, we use a schematichierarchy of the form
Sub-system >> device >> component >> EPICS primitves.
In this scheme, device functionality is constructed fromreusable components whereever possible. Macro substitution
is used to define device specific operating parameters,

hardware type, etc. at the device symbol level. Thisapproach allowed us to very quickly convert the TICS
database of 170 devices. As an example, figure 2 shows asection of a CAPFAST sub-system schematic drawing
which corresponds to the TICS database section shown infigure 1. A calculation record is used to describe theinterlock conditions for an ion gauge.
3.2.3 Operator interface
Because of their high performance, the EPICS tools
edd/dm were selected over medm for creating and displaying
operator screens. Standard open-loop device control is done
from synoptic displays of the different sub-systems, such as
vacuum, beam optics, etc. In addition, for each device a
detailed control panel can be called up which shows all
device parameters and all interlock information. In order tobypass the tedious process of interactively constructing
many of these panels, a utility was written which generates
panel instances using template files and instancespecifications contained in a spread-sheet.
4 Project status
The Optomux driver and its integration into EPICS arecompleted and were tested on a small system underlaboratory conditions. Conversion of the TICS data baseinto a working EPICS function block data base is 90%
complete. A first set of operator interface screens has been
completed and is currently being tested together with thedata base in simulation mode. Installation and testing on
TISOL will begin early next year. As a by-product of theconversion to EPICS, improvements to the existing
functionality, such as better mass-scanning, improved
sequencing capabilities, and remote access to the control
system will now be possible with little effort.
5 Conclusion
This conversion project proceeded at low priority inparallel with the ongoing development of the ISAC control
system, which supplied some usable screen templates and,above all, debugged EPICS data base components. Becauseof this and the seamless integration of the existing controls
hardware very few resources were needed to produce theupgraded system which is ready for testing. Up to now, twoman-weeks each were spent on screen design and thedevelopment an EPICS data base which reflects most theTICS functionality. Optomux driver development andintegration into EPICS consumed approximately five manweeks. Although there is still work left in the areas ofalarming and loggin, our present experience with thisupgrade encourages us to consider converting other TICS
based systems to EPICS in the future, especially theCAMAC based secondary channel control system.

Acknowledgements
We gratefully acknowledge the work of Jan Leykum for hiswork on the Optomux driver.
References[1] R. Keitel and L.Wilson, IEEE Trans. Nucl. Sci. (1989)
849[2] R. Keitel and D. Harrison, Nucl.Inst.Meth. A293(1990)
164[3] R.Keitel, M. Leross, and G.Waters, contribution P152 tothis conference[4] Phase Three Logic, Inc. Beaverton, Ore.