FAQ: Control System & EPICS
Question:
What is the PV for bunch length?
Answer:
At the moment we use pyros as indicators of the bunch length. They are uncalibrated.
Normally we use
BLEN:LI20:3014:BRAW
This is beam synchronous so you can acquire it on a shot by shot basis.
Question:
How do I see what a PV is reading?
Answer:
From a command line on any mcc computer (or signed into facet-srv01) type:
cvget PVNAME
If there are multiple PVs, list them:
caget PVNAME1 PVNAME2
You can also "probe". Type probe at a command prompt (on facet-srv01). The video I linked to explains how to use it.
Of course, there are other ways because people have created screens within facethome to look at them...
Question:
What is a PV?
Answer:
A PV is a Process Variable and is essentially what any other person just calls a variable. The variable is a bit of data and it has other things associated with it like timestamps, physical units, array size, alarm state etc.
My favourite intro to EPICS (which covers this) is here.
Question:
What can I do with PVs?
Answer:
caget - see what a PV is reading. caget PVNAME
caput - set a PV to a particular value. caput PVNAME VALUE
camonitor - everytime the PV updates, the value returned is updated. Until you Ctrl-C to stop the monitor. camonitor PVNAME
All accept –h to display usage and options
Question:
How do I watch a PV change with time? (aka strip-tool)
Answer:
There is a little video here on using the striptool. Basically, open it up from facethome (at the time of writing, it is the fifth button down in the right hand column on facethome). Write the PVs in and go...
Often, operators like to put in the transverse beam size and watch it with time as they tune (hopefully go down!). It can also be used to watch pressures when you vent systems. Useful.
Question:
What devices can I acquire "beam synchronous" and what is their PV name?
Answer:
At FACET, we can acquire data on a pulse-by-pulse basis from multiple devices. These devices are specially set up with hardware that allows us to tag the data with a unique pulse id that means that we can collect the data in the DAQ and guarantee that the data collected for a specific pulse really is all related to the same pulse.
Not all devices in the FACET controls system is set up such that this is possible. If the device doesn't have an "event receiver", which is a particular piece of hardware, then it is not possible to get pulse-by-pulse, id tagged data. These devices are often things like pressure gauge controllers and temperature sensors where pulse by pulse information isn't useful anyway.
Devices that are available on a pulse-by-pulse basis tend to be camera images and ADCs. A full list of devices (except for cameras) that can be acquired this way is available here:
https://seal.slac.stanford.edu/aidaweb/dispatchQuery?Query=FACET%2F%2FBSA.rootnames&Query+Action=Get+Data
The "root_name" relates to the nomenclature used in the control system. For a handy guide to what these mean in a practical sense, you can compare it to the device map.
Please note that if you are not getting data on a pulse by pulse basis with BSA, this is a problem that should be reported. It may indicate a hardware failure.
Question:
How do I acquire BPMs or Toroids or Bunch Length Monitor beam synchronously?
Answer:
BLEN:LI20:3014:BRAW is unscaled integrated sum signal from the sector 20 foil+pyro. BLEN:LI20:3014:BIMAX is nominally the bunch length derived from this number, but in the absence of a calibration, BIMAX = BRAW.
Note that at this moment, the toroid channels available by BSA are only the uncalibrated ones -
GADC0:LI20:EX01:AI:CH0:HST__
GADC0:LI20:EX01:AI:CH2:HST__
GADC0:LI20:EX01:AI:CH3:HST__
For now, these calibration values live here:
SIOC:SYS1:ML00:AO033 %TORO 2452 Slope
SIOC:SYS1:ML00:AO034 %TORO 2452 Offset
SIOC:SYS1:ML00:AO035 %TORO 3163 Slope
SIOC:SYS1:ML00:AO036 %TORO 3163 Offset
SIOC:SYS1:ML00:AO037 %TORO 3255 Slope
SIOC:SYS1:ML00:AO038 %TORO 3255 Offset
Use those calibration numbers to scale the BSA ADC readings to real charge values.
Below is an example of how to do the BSA acquisition, in case people aren't familiar. Please make sure to release the event definition; if the acquisition bombs, do it manually on the Event/Global panel on facethome.
% define some PV names
blen_root = 'BLEN:LI20:3014';
blen_pvs = strcat(blen_root, {':BRAW'; ':BIMAX'});
toro_root = 'GADC0:LI20:EX01:AI';
toro_pvs = strcat(toro_root, {':CH0:'; ':CH2:'; ':CH3:'});
% reserve and set up an edef
masks = {{'TS5'} {} {'DUMP_2_9' 'NO_EXT_ELEC'} {}}; edef = eDefReserve('Nate BSA example'); eDefParams(edef, 1, -1, masks{:}); % third argument = -1 makes it acquire forever
% start edef
eDefOn(edef);
% do other acquisition here....
pause(5);
% stop edef
eDefOff(edef);
% retrieve BSA data
blen_data = lcaGetSmart(strcat(blen_pvs, 'HST', num2str(edef))); toro_data = lcaGetSmart(strcat(toro_pvs, 'HST', num2str(edef))); pulseid = lcaGetSmart(strcat('PATT:SYS1:1:PULSEIDHST', num2str(edef)));
% free up edef
eDefRelease(edef);
Question:
How do I use Correlation Plot?
Answer:
See this Correlation_Plot_GUI_help.pdf. If this guide gets updated by the author, this particular link won't get updated! He keeps the guide in the CVS repository. If you know how to access that and discover that the guide has been updated, send me the up-to-date version and I will upload it. Thanks, Christine.
update 2/1/2016:
New help here:
http://ad-ops.slac.stanford.edu/wiki/index.php/High-level_Applications
Question:
How do I use the Profile Monitor Plot?
Answer:
See guide Profmon_GUI_help.pdf. The author keeps the guides in CVS so if it gets updated, the version on this website won't. If you know how to look into CVS and spot that the guide there is a newer version, please send me the new version so I can keep this up-to-date. Thanks, Christine.
Question:
How do I use the emittance GUI?
Answer:
See guide Emittance_GUI_help.pdf. The author keeps the help files in CVS so if he updates it, this version here won't be up-to-date. If you know how to look in CVS and you see that the help file has been updated, send me the newest version so I can replace the one here. Thanks, Christine
Question:
How do I do my own programming?
Answer:
There is a programmer's guide programming_guide_matlab_facet.pdf. The version that gets updated resides in CVS. If you know that it has been up-dated, please send me the new version.
Question:
Is there a general page that describes the high level applications?
Answer:
http://ad-ops.slac.stanford.edu/wiki/index.php/High-level_Applications
Question:
How do I use the Timing System?
Answer:
The trigger panel for the experimenter screens has been redesigned to be more User Friendly but should you find yourself faced with a different trigger panel or timing issue or you are just looking for more information... This is a presentation by Kukhee Kim that ought to help clarify matters.
Question:
How does the timing system work?
Answer:
FACET_timing_schematic.pdf