Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

EVent Generator Graphical User Interface (EVGUI)
Introduction
The EVent Generator (EVG) has the task of generating signals that coordinate many pieces of the control system to do what is wanted on each of 360 pulses per second. Typically there are several types of things we can do on a pulse like, nothing, send beam to the LCLS electron dump or send beam to end station A. Each of these things happens on different pulses. Each has a rate (e.g. 60 Hz) at which it happens and that rate can be quickly changed by operator actions or hardware inputs from operator buttons, the beam containment system or the machine protection system.
This GUI allows the user to define patterns (also known as modifier bits) that are used to execute the above. These modifier bits are then used in other places to decide on e.g. whether to trigger a device or read a BPM. This GUI is not used for day-to-day control. Rather it is used a few times per run to define the rates at which various beams can be run.
Note that all data changed in this GUI remains local to the GUI until you press the "Save to IOC & SCORE" button near the bottom of the screen or the "Put Checked Rate Groups to EVG" button near the top of the "Define Rate Groups" tab. Of course, in addition to saving to SCORE, one can load a previous setup from SCORE with the adjacent button. The setup presently in use in the EVG is always the gold SCORE configuration. 

The GUI is divided into five tabs. We will cover them one-by-one.

...

5. Define Patterns Tab
It is on this tab that one defines what modifier bits will come out when for each Beam rate in each beam rate group.
On the upper left is a rate group selection box that lets one select the rate group to display and change. Just to the right of that, you can choose whether to display 0.2 or 2.0 seconds of the modifier bit pattern. The 2.0 second choice slows down display updates considerably.
The next section of the display lists the six timeslots in the first column. The second column is for display purposes only and shows which timeslots the selected rate group uses. This can be changed on the "Define Rate Groups" tab. The third column, labeled "Display Pattern" is used to set which timeslots should be displayed in the lower part of this tab. The settings have no effect on the actual setup of the EVG. They just affect this display.
Next come one section for each rate in the rate group. This list of rates was defined on the "Define Beam Rates" tab of this GUI. Each of these sections has buttons to add or remove modifier bits. The line for each modifier bit allows one to setup the pattern that bit should have for that rate. Note that patterns MUST repeat every two seconds. There is no way to make, for example, a bit which is on once every 10 seconds. The individual columns are described below
Modifier Bit Column
Here one can select from a drop down list the name of a modifier bit. These names were defined on the "Define Modifiers" tab of this GUI. Any modifier bit whose pattern is not defined here on the "Define Patterns" tab will always be zero unless it is a bit handled special by the EVG (described in a later section)
If Column
The pattern of the modifier bit defined on this row will only come out if the hardware bit specified in this column is active. The BCSFAULT modifier bit uses this feature to make it so modulators fire on standby when there is a BCS fault. Note than an "If" defined for a modifier bit applies to all rates in the rate group even if it is only entered for one of the rates.
Frequency Column
Enter the frequency in Hz at which this bit should come out. While the interface will accept any integer, it is only reasonable to enter numbers that divide evenly into 720. Otherwise you will not actually get the exact frequency you request. In case of the 'beam_code' modifier bit, if you do not enter a valid frequency value, you will receive an error message when you try to put the checked rate groups to EVG. The valid frequency values are 1, 10, 30, 60 and 120. Also, if the beam code TMSK value is not a subset of the Active Klystrons and sub boosters TMSK value, you will receive an error message and will not be able to save the configurations to EVG.
Also note that if you request a bit to be output on timeslots not used by this rate group, you will receive a warning and that output will NOT actually occur.
Offset (1/360 sec) Column
The pulses (and columns on the right side of this display) are numbered from 1 to 720 for a 2 second period. By definition, pulses 1, 7, 13… are on timeslot 1 and pulses 2,8,14… are on timeslot 2 etc. This offset gives the number of the first pulse that should be set to the value given in the next column. It will be set for this pulse number and for pulses numbered N*int(360/frequency)+offset for all pulses numbered 720 or less. That two second pattern then gets repeated forever.
Value Column
This gives the value the bit field should be set to.
Handling irregular patterns
Sometimes it is desired to have an irregular pattern. The canonical example of this for the LCLS is the NO_GUN_PERM bit. We always output the beam code at 120 Hz and turn on the NO_GUN_PERM modifier bit on pulses where we don't want beam. So to get beam at 10 Hz, NO_GUN_PERM must be on 110 times per second. These are not evenly spaced. Rather it is a 120 Hz pattern with every 12th one missing. This can be done by putting the same modifier bit on two or more adjacent rows. The pattern starts out all zeros and the effect of each row is merged in, in order. An example will make it clear.
Image Removed Image Added
Note that the second NO_GUN_PERM line has the desired pattern which is what the EVG will output.
Special modifier bits
Some modifier bits are used so universally and are so important that the patterns are hard coded into the EVG and it is unnecessary to set them up via this GUI. These include

...