  The PEP-II storage rings at SLAC each have 3492 'buckets' into which
electrons and positrons can be injected into the high- and low-energy rings.
Equipment to measure the currents of all the individual buckets was originally
provided by the Lawrence Berkeley Laboratory and is implemented in VXI-based
hardware. Data from this equipment as well as high precision direct current
measurement provide the hard data for the Bunch Injection Controller. A large
number of parameters determined by injection design considerations as well as
set by operators for different circumstances are also used by the software
algorithms to determine the desired bucket injection order and charge quantity
for each injection pulse. These requests are then passed on to the venerable
SLAC master pattern generator, which provides beams for other applications as
well. This highly visible and highly successful system is implemented using the
EPICS toolkit, and fits well into the merged SLAC EPICS/SLC control system. The
Bunch Injection Controller hardware is a VME-based EPICS IOC, which makes
extensive use of shared memory for communicating with the VXI measurement
equipment and the SLAC master pattern generator.
