Beamline elements (former "MSetPoint") is a system designed to control a beam
line at an accelerator facility using the EPICS Channel Access interface. It is
inspired by the SetPoint system from PSI, Switzerland, but implemented as a
custom page within MIDAS, complemented by a general EPICS front-end program.
Usage
The Beamline elements system utilizes two pages for controlling a beam line with
multiple elements. The Beamline_elements page allows users to adjust the demand values
for all elements. In contrast, the Beamline_elements_config
page is designed for experts to configure the entirety of the beam line elements.
Beamline_elements
To modify a value for an element, click the number in the Set value column.
After making your change, press return. The Beamline_elements Frontend program will then
promptly send the new value to the beamline element via EPICS Channel
Access. If the Beamline_elements Frontend isn't active, you can still change the value,
but there will be no effect. Ensure the program is running by checking the
"Programs" page. If the Beamline_elements Frontend isn't active, a warning will appear
at the top of the page.
Beamline settings can be saved in two ways:
On the server where MIDAS is running. These files then go into the
$MIDAS_DIR/userfiles/Beamline_elements subdirectory and can be loaded from there.
The $MIDAS_DIR environment variable will be defined during the MIDAS
installation above. The advantage of this method is that everybody
connected to the same Beamline_elements on browsers on various different
computers will see the same set of files.
Via Import / Export on your local computer. This allows to store a file
locally where the browser is running. The advantage is that you can open
the JSON-encoded setting file with other programs and process it
further.
The interface also permits direct command sending to devices, such as turning a
device on and off. To execute this, select one or more devices by clicking on
their names (press or to select multiple devices) and then click
on "Command". A predefined set of commands will appear. By clicking on one,
the command will be dispatched to the chosen device(s).
When a settings file is loaded or imported, the values appear in the File value
column. However, they aren't applied to the actual element immediately. To apply
them, click on the right arrow at the top of the window. A dialog box will then
open, allowing you to input a scaling factor. This factor will be applied to all
magnet elements, facilitating easy tuning of the beamline to various momenta. If
you retain the default value of one, the values from the file will be applied
directly without any change. To apply values to only certain elements, ensure
you select those elements before clicking the arrow.
Beamline_elements_config
The page contains one line for each beamline element. You can define various things:
Name is the name shown on the Beamline_elements page
Description is an optional description shown in the Description column of
Beamline_elements. If no description is defined here, the element type will be
shown in the Description column.
Group flag. If this is checked, the element starts a new group with a
bold horizontal line separating the new group from the previous one on
the Beamline_elements page
Type specifies the type of the beamline element from a pre-define set of types
Unit is the unit shown next to the demand and measured values. For
magnets this is typically A for Ampere
Format specifies how a value is formatted. A value of %f2 for example
shows a value with two digits after the period. A complete list of
formats is listed on the MIDAS custom page documentation.
+/- These values will be used by the + and - buttons on the Beamline_elements
page to increment and decrement a demand value. Some elements are
usually changed by one unit, other elements maybe by 0.1 units or 10 units.
Warning threshold is the deviation between the demand and measured
value when the measured value will turn red. Ideally, demand and
measured values are equal, but many devices have some nose on the ADC
side so the measured value fluctuates a bit. To avoid annoying red boxes
for normal situations, this value should be set slightly higher than
the normal noise on a device readback.
PV name is the EPICS Channel Access Process Variable name for the device.
Set is the EPICS Channel to set the demand value of a channel. This is
concatenated with the PV name to form the channel name. In the example
above the demand channel for device #1 would be QSF41:SOL:2. This naming
scheme is specific to PSI and might be different at other labs.
Get is the EPICS Channel to read a measured value from a channel. This is
concatenated with the PV name to form the channel name. In the example
above the measure value channel for device #1 would be QSF41:IST:2.
This naming scheme is specific to PSI and might be different at other labs.
Status is the EPICS Channel to read the status from a channel. This is
concatenated with the PV name to form the channel name. In the example
above the status channel for device #1 would be QSF41:STA:2. This naming
scheme is specific to PSI and might be different at other labs.
Com is the EPICS Channel to send direct commands to a channel, like for
turning the device on and off. This is concatenated with the PV name to
form the channel name. In the example above the command channel for
device #1 would be QSF41:COM:2. This naming scheme is specific to PSI
and might be different at other labs.
History specifies the MIDAS history panel shown when one clicks on the
history button (the buttons at the very right with the waveform on them
on the Beamline_elements page). The history panel has to be specified as
pointing to the ODB at /History/Display/.
Alternatively, a 1 can be specified here to show directly the
history of that element (Demand and Measured values).
The top row lets you change the main title of the MIDAS installation and the
EPICS gateway. The Filename is set automatically if a configuration file gets
loaded. This can be done with the Load button (from the sever) and the Import
button (upload from the client). Configurations can be saved with the Save and
Export buttons similarly. The format of the configuration file is simply the ODB
Dump of the subtree /Equipment/Beamline_elements/Settings in JSON format, which
can also be loaded with the odbedit program as odbedit -c "load xxx.json".
Beamblocker status meaning
The number in the beamblocker status encodes information via bitmasks. For
convenience, the table below shows the meaning of each status number.