SPEAR Control System Applications Overview
Version saved: Wednesday, January 13, 2010
Process name: ACM Integral
Program name: ACM
Batch queue: INJ02 (direct access to ACM values)
Source file: [INJECTOR.CMSLIB.KERNEL] ACM.C
Description: Read LINAC and BTS ACM values (from local injector control system) and calculate different electron charge integrals. (see detailed calculation flow chart in ACM flowchart.pdf)
Devices/Files: ACM flowchart.pdf
Input PVs: LIN_ACMx.CURRENT_AM
(three LINAC ACMs)
BTS_ACMx.CURRENT_AM (three BTS ACMs)
LIN_KLY2.MAXWELL_HV_AM
LTB_B1.CURR_AM
LINAC:ScreenLTBStatus
BOO_IKICK.VOLT_AM
BOO_ISEPT.CURRENT_AM
BOO-QM:RunRatio
BOO_EKICK.VOLT_AM
BOO_ESEPT.VOLT_AM
BTS:FaradayCupStatus
Update
PVs: LIN_ACMx.INT_C_AM (update) (three integrated linac ACMs)
BTS_ACMx.INT_C_AM (update) (three integerated BTS ACMs)
LIN_ACM.INT_C_AM (update)
LTD_ACM.INT_C_AM (update)
LTB_ACM.B1_INT_C_AM (update)
LTB_ACM.NOB1_INT_C_AM (update)
BOO_ACM.NOINJECT_INT_C_AM (update)
BOO_ACM.NOEJECT_INT_C_AM (update)
BOO_ACM.3GEV_LOSS_INT_C_AM (update)
BOO_ACM.EJECT_INT_C_AM (update)
BTS_ACM.INT_C_AM (update)
BTS_ACM.CUP_INT_C_AM (update)
BTS_ACM.NOCUP_INT_C_AM (update)
Process name: ALARM_HANDLER
Program name: ALARM_HANDLER
Batch queue: SYSTEM_SPEAR3 & SYSTEM_SPEAR1 & INJ02
Source file: SPEAR_ROOT:[MONITORING]ALARM_HANDLER.C
Description: Reads alarm messages (special format) from mailbox ALARM_MBX, stores them in the SPEAR event data base, and generates notifications as required.
Devices/Files: ALARM_MBX (created and read by this program)
SPEAR_DATA:EXTERNAL_ALARM.DAT
Defines notification actions to be performed for each alarm message. This file
is read for each message, i.e. modifications take immediate effect on the next
message.
SPEAR_EVENT_DB (name of RDB data base)
Process name: BEAMINT
Program name: BEAMINT
Batch queue: SYSTEM_SPEAR3 (direct access to xx-blocks)
Source file: SPEAR_ROOT:[BEAMINT]BEAMINT.C
Description: Calculate all SPEAR beam integrals, stored in xx-blocks. Program updates integrals every second. Current is set to zero when ring stoppers are found to be IN.
Input PVs: SPEAR:State
SPEAR:BeamCurrAvg1S
OrbInt:RingStopperState
Update PVs: spr:BI1/XX1
Process name: BL_INTRLK
Program name: BL_INTRLK
Batch queue: SYSTEM_SPEAR3 (direct access to all ion gauge values)
Source file: SPEAR_ROOT:[MONITORING]BL_INTRLK.C
Description: Calculate and monitor the integrated bremsstrahlung for each beamline (around the beamline source point). Calculate a 1 hour boxcar average and a 24 hour boxcar average. If either one exceeds a given threshold, close the particular beamline. Accumulate data for the integral only when the beamline is open. The EDM "Integrated Currents" panel displays the average values.
Calculate short term (1
hour) boxcar average of product of beam current (DCCT) and beamline vacuum (maximum
vacuum pressure value of three ion gauges around beam source point). Updates
integrals every two seconds. When a beamline’s integral is above 10.0 nTorrA,
the corresponding beamline stopper is closed.
Also, calculate long term (24 hour) boxcar average from 1 minute averages from
short term data once every minute. When a beamline’s integral is about 1.0
nTorrA, the corresponding beamline stopper is closed.
Input PVs: SPEAR:BeamCurrAvg1S
VGxx/AM1 (three ion gauge readbacks per beamline)
Update PVs: spr:BI1/XX2
Output
PVs: BLxx:StopEnableSetpt (xx = 01 to 11 )
Process name: IVUN_GAP_INTRLK
Program name: IVUN_GAP_INTRLK
Batch queue: SYSTEM_SPEAR3
Source file: SPEAR_ROOT:[MONITORING]IVUN_GAP_INTRLK.C
Description: Protect the BL12-2 and BL15insertion device in vacuum magnets from radiation from uncontrolled beam. For stored beam currents above 20 mA, the ID is protected by the orbit interlock. For beam currents below 20 mA, the ID gap has to be open to at least 20 mm, otherwise the beam must be dumped and injection prevented.
When the ID gap is less than 20 mm, prevent injection into SPEAR by turning off
the injection septum. Also, when the ID gap is less than 20 mm and there is
between 0.1 mA and 20 mA current measured by the DCCT, dump the beam in SPEAR
(by tripping the RF, or, if this is not possible, by running the dipole power
supply to zero).
Input
PVs: SPEAR:BeamCurrAvg1S
BL12-2:Gap
OrbInt:BTSStopState
OrbInt:BeamCurrState
BTS-B9V:State
Output
PVs: BTS-B9V:StateSetpt
SRF1:STN:AIM:FRCFLT
MS1-BD:CurrSetpt
Process name: CALSERVER
Program name: CALSERVER (Channel Access Light Server)
Batch queue: SYSTEM_SPEAR1
Source file: SPEAR_ROOT:[EPICS.CALSERVER]CALSERVER.C
Description: Listen to special port and return EPICS PV values using simple line-oriented protocol. This program is used by some SSRL webserver applications. Once a request for a pv value is made, the program keeps the connection to the IOC alive for 2 minutes. If no new request is received, the connection is then dropped. If several request for the same pv are received by this program, it channels them all through the same channel access connection.
Devices/Files: Listens to TCP/IP port 4568 for EPICS value requests
PVs: any pv requested by client program
Process name: CRATE_MONITOR
Program name: CRATE_MONITOR
Batch queue: SYSTEM_SPEAR3
Source file: SPEAR_ROOT:[MONITORING]CREATE_MONITOR.C
Description: Program listens to (booster) CAMAC crate serial line console ports via LAT terminal servers. When a MicroVAX crash is detected, the program sends a break and a boot command to the console to reboot. It generates alarm messages on every action.
Devices/Files: Listens to LAT serial ports on terminal servers:
$CON_CCB7C2
$CON_CCB7C3
$CON_CCB7C4
$CON_CCB7C5
$CON_CCB7C6
$CON_CCB7C7
Process name: CURMON
Program name: CURMON
Batch queue: SYSTEM_SPEAR1
Source file: SPEAR_ROOT:[CURMON]CURMON.C
Description: Program generates the SPEAR current display depending on the operator selected display mode.
It also changes the SPEAR status value when it detects a beam loss (and sounds an alarm). A beam loss is detected when:
- machine is in BEAMS mode,
- current has been greater than 20 mA,
- current is less than 10 mA.
Input PVs: SPEAR:Energy
SPEAR:BeamVacuumQuality…
SPEAR:BeamLifetime…
SPEAR:BeamLossRate…
SPEAR:BeamCurrSlope…
SPEAR:BeamCurrOffset…
SPEAR:BeamCurrAvg1S
SPEAR:BeamTimeMid1SHist
BLxx:OpenState
Update PVs: SPEAR:State
Output PVs: MPS:BeamlossAlarmAudio
Process name: CURR_INTRLK
Program name: CURR_INTRLK
Batch queue: SYSTEM_SPEAR3
Source file: SPEAR_ROOT:[MONITORING]CURR_INTRLK.C
Description: Program implements several orbit interlock and beam current related interlock functions.
- Program limits the maximum current in SPEAR. It turns the Linac chopper off when the maximum current is reached. Currently, the maximum current for SPEAR is 200 mA and this interlock will stop injection at 216 mA.
- If the current in SPEAR reaches 18 mA and the orbit interlock has not been reset (shows BPLD fault), this program turns the Linac chopper off (prevents an RF trip at 20 mA).
- If there is a discrepancy between the DCCT current readback and the current threshold indication in the orbit interlock chassis, it dumps the beam. Discrepancies are:
o DCCT > 10 mA, orbit interlock < 2 mA
o DCCT > 21 mA, orbit interlock < 18 mA
o DCCT > 23 mA, orbit interlock < 20 mA
o DCCT < 10 mA, orbit interlock > 20 mA
Beam in SPEAR is dumped by tripping the RF system. If this pv is not available, the program runs down the dipole power supply.
Input PVs: SPEAR:BeamCurrAvg1S
OrbInt:BeamCurrState
OrbInt:BpldEvent
Output
PVs: LINAC:ChopStateSetpt
118-DG1:KickStateSetpt
SRF1:STN:AIM:FRCFLT
MS1-BD:CurrSetpt
116-BPM:history.RARM
132-BPM:history.RARM
Process name: HISTORYLOG_CA
Program name: HISTORYLOG_CA
Batch queue: SYSTEM_SPEAR1
Source file: SPEAR_ROOT:[HISTORY]HISTORYLOG_CA.C
Description: Program monitors thousands of pvs according to history database configuration and records them into SPEAR history database. This program acts as the Channel Access client. It gets the monitoring configuration from the shared memory section, created by HISTORYLOG_RDB and records the data into a ring buffer in the same section.
Input PVs: all pvs defined for history
recording in history database
Process name: HISTORYLOG_RDB
Program name: HISTORYLOG_RDB
Batch queue: SYSTEM_SPEAR1
Source file: SPEAR_ROOT:[HISTORY]HISTORYLOG_RDB.C
Description: Program reads the data recording configuration from the database into a shared memory section, which is used by HISTORYLOG_CA. It then writes the data from the section ring buffer into the database tables.
Process name: TC_INTRLK
Program name: TC_INTRLK
Batch queue: SYSTEM_SPEAR3 (direct access to all CAMAC TC values)
Source file: SPEAR_ROOT:[MONITORING]TC_INTRLK.C
Description: Program monitors ALL SPEAR thermocouple values. Depending on the thermocouple temperature values, the temperature pv alarm level will be set to NORMAL, HIGH, or HIHI (pager messages). The program internally maintains another alarm level, CRITICAL. When this level is reached, the beam in SPEAR is dumped by tripping the RF system. If the RF pv is not available, the program runs down the dipole power supply.
Temperature monitoring is suspended while the magnets are being standardized or when the SPEAR energy is less than 2.5 GeV.
Input PVs: all
CAMAC thermocouple values (TGxxRxCxx/AM1)
PS:StandardizeNum
SPEAR:Energy
Output
PVs: all CAMAC thermocouple alarm states
MPS:TempAlarmAudio
SRF1:STN:AIM:FRCFLT
MS1-BD:CurrSetpt