Content from this work may be used under the terms of the CC-BY-4.0 licence (© 2023). Any distribution of this work must maintain attribution to the author(s), title of the work, publisher, and DOI

12th Int. Beam Instrum. Conf.
ISBN: 9 7 8 - 3 - 9 5 4 5 0 - 2 3 6 - 3

IBIC2023, Saskatoon, Canada
JACoW Publishing
ISSN: 2 6 7 3 - 5 3 5 0d o i : 1 0 . 1 8 4 2 9 / J A C o W - I B I C 2 0 2 3 - T U P 0 2 9A HYBRID APPROACH TO UPGRADE HARDWARE FOR THE PROTONSTORAGE RING FAST KICKER
T. Ramakrishnan, J. Duran, H. Watkins
Los Alamos National Laboratory, Los Alamos, USAAbstract
The Los Alamos Neutron Science Center (LANSCE) Proton Storage Ring (PSR) needs precise timing to ensure successful extraction of the bunched protons. The current control system’s hardware is obsolete and unmaintainable. Thetask was to replace the 1980’s era CAMAC control andtiming system for the PSR extraction kickers. This included a system which halts charging of the kickers after aduration without firing to prevent equipment damage. Ahybrid approach was taken to integrate a Berkeley Nucleonics Corporation (BNC) pulse generator that was controlled by a soft input/output controller (IOC) and National
Instrument (NI) compact Reconfigurable Input/Output(cRIO) IOC. This allowed for flexibility and modularity ofthe software and hardware development. This approach
built the framework to streamline robust deployment of hybrid systems and develop a solution for upgrades of other
LANSCE kickers.

pulses to the Blumlein. The hybrid approach also extends
to the controls software implementing (a) soft IOC to control the BNC 577 and (b) NI cRIO based IOC that has afield programable gate architecture (FPGA) [7] backplaneinteracting with the modules for high-speed data acquisition.

INTRODUCTION
Proton Storage Ring
The LANSCE proton storage ring (PSR) [1], Fig. 1, isused to collect and bunch protons. The alignment and frequency of the protons are changed continuously to keepthem inside the ring for multiple cycles which are thenejected to the Lujan Mark IV target [2] to produce neutrons
which are used in several experiments.

Fast Kicker Purpose & Controls Upgrade
The storage fast kicker (SRFK) [3] system consists of aDC power supply, a Blumelein [4] that acts as a capacitor,
and two plates (SRFK71 and SRFK81) as well as a control
system that directs and monitors certain functionality. The
fast kicker system is responsible for extracting the bunched
protons from the PSR and sending them down the beamline towards the neutron producing target.
The control system that was upgraded used an obsolete,1980’s, CAMAC form factor. It is worth mentioning that it
had no safety mechanisms in place for over charging thefast kicker Blumlein which is holding the charge that is being provided in a pulsed fashion by a DC power supply.
The newly deployed and functionality advanced control
system utilizes a hybrid approach by using two commercialof the shelf systems (a) BNC 577 pulse generator [5] forgenerating delayed pulses and (b) cRIO [6] for reading
back the status of an RF switch and keeps track of charging___________________________________________* This work was supported by the U.S. Department of Energy through theLos Alamos National Laboratory. Los Alamos National Laboratory is operated by Triad National Security, LLC, for the National Nuclear Security
Administration of U.S. Department of Energy (Contract No.
89233218CNA000001). † tyagir@lanl.gov, LA-UR-23-30144

Figure 1: LANSCE Proton Storage Ring with magnet locations.

PSR TIMING STRUCTURE
LANSCE has a distributed Master Timer system [8]which provides timing gates to different systems across theaccelerator facility. A subset of these gates is for the PSR
operating at a nominal 20 Hz rep rate. The ones of interestfor the kickers are Extraction Kicker Charge Gate (EKCG),Storage Ring Extraction Window (SREW), and Extraction
Kicker Long Fire (EKLF).
The beam pulse structure is known as Long Bunch Enable Gate (LBEG). Within each LBEG pulse, there are~2000 pulses mini pulses whose period is designed to beequal to the time for 800 MeV beam to circulate in the PSR
at a rate of 2.8 MHz. The mini pulse is high/present for
270 ns and low/absent for 90 ns. This creates a gap in thebeam which allows for the bunched protons to be extracted
without interacting with incoming beam.
The EKLF gate is responsible for firing the kickers andextracting the beam. Two conditions must be met to extract, first the SREW much be high and second the EKLF
pulse is synchronized with 2.8 MHz reference. These ensure the incoming and outgoing beams will not interact.

TUP029250

05 Longitudinal Diagnostics and Synchronization

IBIC2023, Saskatoon, Canada
JACoW Publishing
ISSN: 2 6 7 3 - 5 3 5 0
d o i : 1 0 . 1 8 4 2 9 / J A C o W - I B I C 2 0 2 3 - T U P 0 2 9Figure 2: Software and hardware architecture for SRFK upgrade.

HARDWARE ARCHITECTURE
In the following we describe the hybrid hardware architecture in more detail. The complete hardware architecture
is presented in Fig. 2, where it details the two major hardware controls the BNC 577 configuration shown in
Table 1, and the NI cRIO which interact with the timing,
power supply, synchronizer, switch, diodes, and fast protect system. The BNC pulse generator, Fig. 3, that the user
can set pulse widths and delays for generating the pulses
used to time the kicker. The delay and charging of the kickers are dependent on the length of the Blumlein cables
which vary kicker to kicker. The LANSCE Master Timersystem gates that the entering and exiting beam does notinteract. When the BNC receives a timing gate, EKCG or
ELKF, it triggers and delays an output pulse to the kickers.
The Fast Protect system ensures that there is always a successful discharge of kickers which in turn eliminates radiation spill by shutting off the beam if it is not extracted
from the PSR.

Figure 4: 8 card NI cRIO.
Table 1: BNC Specifications
FeatureChannels
Resolution
Accuracy
RMS JitterVoltage
Pulse WidthMemoryDescription
4 or 8 ind. channel outputs
250 ps
1 ns + .0001 x setpoint< 50 ps (channel to channel)
5 V for TTL; 45 V for Adjustable
10 ns – 1000 s
12 Storage Slots

Table 2: NI cRIO 9038 Specifications

Figure 3: BNC pulse generator.

FeatureNI 9425
NI 9401
NI 9205
NI 9262
NI 9485
NI 9485
NI 9485
NI 9264

Description
Binary Inputs
Counters
Analog Input with delays
Pulse Generation
Binary Outputs
Binary Outputs
Binary Outputs
Analog Outputs

TUP02905 Longitudinal Diagnostics and Synchronization

251

Content from this work may be used under the terms of the CC-BY-4.0 licence (© 2023). Any distribution of this work must maintain attribution to the author(s), title of the work, publisher, and DOI

12th Int. Beam Instrum. Conf.
ISBN: 9 7 8 - 3 - 9 5 4 5 0 - 2 3 6 - 3

Content from this work may be used under the terms of the CC-BY-4.0 licence (© 2023). Any distribution of this work must maintain attribution to the author(s), title of the work, publisher, and DOI

12th Int. Beam Instrum. Conf.
ISBN: 9 7 8 - 3 - 9 5 4 5 0 - 2 3 6 - 3IBIC2023, Saskatoon, Canada
JACoW Publishing
ISSN: 2 6 7 3 - 5 3 5 0
d o i : 1 0 . 1 8 4 2 9 / J A C o W - I B I C 2 0 2 3 - T U P 0 2 9

The 8 card NI cRIO, Fig. 2, handles readbacks and tracks
counts with a delay using the NI 9401-counter card, NI9205 analog input card that is triggered after a 7500 µs delay, NI 9485 binary command card, and NI 9264 analog
command cards, all the NI cRIO module configurations areshown in Table 2. The delay is based on the charge gate andis needed to ensure that the readback voltage is sampled at
the peak of the charge ramp. The counters ensure that thenumber of charge and fire pulses are the same. If there are
more charge pulses than fire pulses, the NI 9485 is closed
which flips an RF switch to prevent further charge timing
pulses from reaching the BNC. This is how we ensure thatthe fast kickers are not over charged. The NI 9264 is used
to change the setpoint voltage of the kickers.

robust approach to setting up disparate pieces of hardware
using a single type of IOC flavor.
The NI cRIO software involves an object-oriented programming (OOP) FPGA code written in LabVIEW thatgenerates a bit file. This bit file is used by a C++ device
support code that assigns the data received from the device
asynchronously to the EPICS PVs. We then use EPICS
templates to define the attributes of the PVs in the database.
The IOC in this case is the physical NI cRIO that is deployed on to the field. This approach differs from the soft
IOC case because we require high speed data from the NIcRIO FPGA for controlling some of the devices that require faster responses. Hence, it is beneficial to have theIOC integrated with the cRIO system.

SOFTWARE ARCHITECUREHYBRID APPROACH

The complete software architecture for the LANSCEcontrol system (LCS) is presented in Fig. 2 interacting withthe hardware. At LANSCE we use the Experimental Physics and Industrial Control System (EPICS) architecture [9].
EPICS is a set of open-source software tools, libraries, andapplications developed collaboratively and used worldwide to create distributed soft real-time control systems forscientific instruments such as particle accelerator, telescopes, and other large scientific experiments. It gives access to various levels of functionality for IOCs using process variables (PVs) which can have multiple user defined
attributes that are available to other users who would liketo access the system. Users can set/change values and areable to get readbacks using PVs which are ascribed to control a feature of a specific equipment. The PVs are housed
inside the database located inside an IOC which allow theusers of LCS to access the PVs across the site on consolesthat are connected to LCS.
The BNC pulse generator has a serialized communication protocol using a MOXA [10] serial to ethernet adapter.
The serial commands are interpreted by a stream-protocol
file which associates the commands to the process variables (PV). The stream-protocol is designed to handle asynchronous data using EPICS. The input/output PVs configured in the stream-protocol is then associated with a database file that sets attributes to the PVs such as description,units, etc. Databases are important for EPICS to function
because they are necessary to define PVs and can be generated either manually or programmatically through a template. In this project we handle calculation inside the database using calc and calcout record types. The PVs handle
multiple types of input and output data, in this project weused analog output, analog input, binary output, and binaryinput.
The PVs for the BNC 577 were handled via stream-protocol and were housed in a virtual soft IOC called srfkSoft,Fig. 3. Soft IOCs are created as virtual instances of an IOC
rather than a physical controller such as a NI cRIO. Thiscan be housed in remote servers which allows the developers to access it remotely from all consoles on the LCS. Soft
IOCs have been instrumental in reducing the number ofphysical sites to house hardware and provides a clear andThe hybrid approach that was undertaken for this projectfocused on establishing versatility for system design byhaving two simple approaches to hardware and softwarearchitectures that were both integrated in the larger LCS
framework. The ability to create PVs using soft IOCs on
virtual machines for the BNC 577 pulse generator andphysical IOCs using NI cRIO’s FPGA backplane. This effort flows well with our long term LANSCE modernization[11] project that is focused on reducing the number of disparate control systems to a more unified approach. We used
this homogenous approach principle to incorporate a soft
IOC to handle the stream device input/output control PVs
and use an existing deployed cRIO to handle the readbacks,counters, and set time delays for the pulses.
A hybrid approach by incorporating stream device protocol for BNC pulse generator accompanied by a soft IOC
and an industrial input output (IIO) using cRIO with a selfcontained IOC helped us easily upgrade the legacyCAMAC system that was used to control the SRFKs forover a decade. The flexibility this approach offers without
introducing additional complexity to providing solutions
will be useful moving forward with upgrading control systems at LANSCE and at other accelerator facilities that relyon the EPICS architecture.

CONCLUSION
The results have shown that the new hybrid system consisting of the BNC 577 pulse generator and cRIO is functionally equivalent to the CAMAC system it is replacing.
Further we now have better control of the counters to time
the kicker more accurately than in the past, which protects
the equipment from being over charged. All these improvements will be beneficial as our organization is transitioning
LANSCE away from its legacy hardware.

ACKNOWLEDGEMENTS
We would like to thank Scott Baily for creating the IIOLabVIEW template and helping with the 9205 card’s timedelay as well as 9401 counter code troubleshooting whichwere instrumental in giving new capabilities to the storage
ring fast kicker that it has never had previously.

TUP029252

05 Longitudinal Diagnostics and Synchronization

IBIC2023, Saskatoon, Canada
JACoW Publishing
ISSN: 2 6 7 3 - 5 3 5 0d o i : 1 0 . 1 8 4 2 9 / J A C o W - I B I C 2 0 2 3 - T U P 0 2 9

REFERENCES[1] L.M. Earley, G.P. Lawrence, and J.M. Potter, “Rapidly
tuned buncher structure for the Los Alamos proton storage
ring (PSR)”, IEEE Transactions on Nuclear Science, 30(4),pp. 3511-3513, 1983.
[2] M. Mocko and G. Muhrer, “Fourth-generation spallation
neutron target-moderator-reflector-shield assembly at theManuel Lujan Jr. neutron scattering center”, Nucl. Instrum.
Methods Phys. Res., Sect. A, vol. 704, pp. 27-35, 2013.
[3] J.F. Power, B. Blind, and A.J. Jason, “The Los Alamos proton storage ring fast-extraction kicker system”, IEEE Trans.
Nucl. Sci., vol. 32(5), pp. 3021-3023, 1985.
[4] J. Tang, “Rapid cycling synchrotrons and accumulator rings
for high-intensity hadron beams”, Rev. Accel. Sci. Technol.,vol. 6, pp. 143-169, 2013.
[5] M.A. Mustafa, D. Shekhtman, and N.J. Parziale, “SingleLaser Krypton Tagging Velocimetry (KTV) Investigation ofAir and N2 Boundary-Layer Flows Over a Hollow Cylinder
in the Stevens Shock Tube”, AIAA Scitech 2019 Forum,p. 1820, 2019.
[6] D. Baros, “Upgrading the Data Acquisition and Control
System of the LANSCE LINAC”, in Proc. PAC'11, New

York, NY, USA, Mar.-Apr. 2011, paper MOP256,pp. 588-590.
[7] M. Pieck et al., “LANSCE Control System Upgrade Status
and Challenges”, in Proc. ICALEPCS'15, Melbourne, Australia, Oct. 2015, pp. 464-467.
doi:10.18429/JACoW-ICALEPCS2015-MOPGF161[8] R. Merl, R. Clanton, E. Bjorklund, S. Baily, and F. Shelley,“The LANSCE Timing Reference Generator (No. LA-UR13-26955)”, Los Alamos National Lab. (LANL), Los Alamos, NM, USA, 2013.
[9] M. Pieck, C.D. Hatch, J.O. Hill, H.A. Watkins, andE.E. Westbrook, LANSCE Control System’s 50th Anniversary, 2022.
[10] L.G. Foggetta, B. Buonomo, and P. Valente, “Evolution ofDiagnostics and Services of the DANE Beam Test Facility”,
in Proc. IPAC'15, Richmond, VA, USA, May 2015,
pp. 904-906.
doi:10.18429/JACoW-IPAC2015-MOPHA049[11] E. Bjorklund and S.A. Baily, “Tailoring the Hardware toYour Control System”, in Proc. ICALEPCS'11, Grenoble,France, Oct. 2011, paper THAAUST01, pp. 1171-1173.

TUP02905 Longitudinal Diagnostics and Synchronization

253

Content from this work may be used under the terms of the CC-BY-4.0 licence (© 2023). Any distribution of this work must maintain attribution to the author(s), title of the work, publisher, and DOI

12th Int. Beam Instrum. Conf.
ISBN: 9 7 8 - 3 - 9 5 4 5 0 - 2 3 6 - 3

Temporary page!
LATEX was unable to guess the total number of pages correctly. As there was some unprocessed data that should have been addedto the final page this extra page has been added to receive it.
If you rerun the document (without altering it) this surplus page will go away, because LATEX now knows how many pages toexpect for this document.