RD Controls Software Release Note 141.5<P> <b> BeamLoss</b>

RD Controls Software Release Note 141.5

BeamLoss

John DeVoy

October 2, 1996

BeamLoss is an X Window application that graphically displays loss monitor and SEM readings. This program is intended to assist beamline physicists and operations personnel with monitoring and tuning beam in the experimental areas.

Features include:

To run BeamLoss, select ``BeamLoss'' (item 26) from the menu, select ``EPCR BeamLoss'' from the Epicure pull-down menu in the session manager, or type ``run epicure_programs:beamloss'' in any DECterm or DCL window.

BeamLoss saves user customizations in files called ``views.'' A view contains such things as a list of loss monitors and SEMs, normalization constants, preferred normalization modes, etc. By default, views are stored in the directory pointed to by the logical BEAMLOSS$FILES. More than one view may be stored in this directory; for example, the user may want to create separate views for each beamline area. The default file extension for a view is ``BL$DAT.'' See the description of the ``Save As'' menu item on the main screen for details on saving views. If the logical BEAMLOSS$DEFAULT is defined, and points to a view, then BeamLoss will try to load that view when it starts. If BEAMLOSS$DEFAULT is not defined, then the first view found in the directory pointed to by BEAMLOSS$FILES is used as the initial view.

BeamLoss has online help avaliable. There are four types of help:

The types are similar in that, when invoked, they all cause a help dialog box to pop up. A help dialog box consists of two parts: the upper part is a window containing the help text; the lower part is a list of additional, or related topics. Double clicking on an additional topic will cause the text associated with the new topic to appear in the upper window. In this way the user can browse through an extensive (hierarchical) set of topics.

All four types of help are available from the help pull-down menu of the main screen. ``Help on Context,'' ``Help on Window,'' and ``Help on Help'' are available from the help pull-down menu of the summary screens. If a screen has only a help button in the lower right corner (i.e. all other dialog boxes,) then ``Help on Window'' is invoked by pressing the button.

``Help on Context'' provides help on speciific items in a window. ``Help on Context'' is invoked by selecting ``Help on Context'' from the help pulldown menu. The cursor will change to a question mark. The user should then move the cursor to the item in question, and press MB1. A help dialog box will pop up displaying help on a topic related to the item that was clicked on. If the item is one that reacts to user input (e.g. a text box, or selection box) then the user may also invoke help on context by clicking on the item, and then pressing the help key on the keyboard. The latter method can be used in dialog boxes that do not have a help menu.

``Help on Window'' provides general help on a particular window as a whole. It is invoked either by selecting ``Help on Window'' from the help pulldown menu, or pressing the help button in the lower right corner of a dialog box. A help dialog box will pop up displaying general information about the screen or dialog box, and a list of topics containing more general information.

``Help on Version'' provides information about the specific version of BeamLoss that is running. It is invoked by selecting ``Help on Version'' from the help pulldown menu on the main screen.

``Help on Help'' provides information about how the help system works. It is invoked by selecting ``Help on Help'' from the help pulldown menu of any window that has a menu bar.

The remainder of this note is organized according to the various screens defined by the program. Each major section is devoted to one screen. The pull down menus defined by a particular screen are described in subsections.

Main screen

The main screen (figure one ) contains the two graphs (in the form of histograms) displaying the loss monitor and SEM readings, and assorted control buttons that affect how the data is displayed.

The graph on the left shows the loss monitor readings. If the display mode is absolute, the y-axis is labeled with a range of zero to ten volts, otherwise it is labelled as a percentage (the display modes are described later). The height of each bar is proportional to the reading of the corresponding device. If the reading is below a certain value, called the warning threshold, then the color of the bar is the normal color (the default is green). If the reading exceeds the warning threshold, the color of the bar changes to the warning color (brown). If the reading exceeds another value, called the alarm threshold, the bar changes to the alarm color (red). The warning and alarm thresholds are individually settable for each device using the the modify loss monitor dialog. If a particular device returns an error status, (such as LINKABORT) then the bar fills with diagonal lines to show the error (device ME2LE1 in figure one is in an error state.) The text of the error message is available on the loss monitor summary screen.

Each bar in the graph is labelled with the name of its device, using sideways text. Above each label (between the label and the bottom of the graph) is a toggle button. This button controls whether the background reading is subtracted from the device's reading before the data is displayed. The background is subtracted if the button is pushed in (this is the default).

The user may select a particular loss monitor by clicking the left mouse button anywhere in the label or bar corresponding to that loss monitor. The loss monitor is indicated as selected by having its label in reverse video, and the background of its bar in black. The loss monitor may be unselected by clicking the left mouse button on the label or bar a second time. Only one loss monitor may be selected at a time. For the remainder of this note, any reference to the selected loss monitor will refer to a loss monitor selected in this way.

The position of a loss monitor in the graph may be changed by pressing and holding the left mouse button in the label or bar, dragging the loss monitor left or right to the desired position, and then releasing the left mouse button.

Underneath the graph is an option button allowing the user to select the loss monitor display modes. There are three display modes: absolute, normalize to SEM, and normalize to constant (illustrated in figure one). In absolute mode, the voltage reading of the loss monitor is displayed. In normalize to SEM mode the value that is displayed is normalized to a SEM. The particular SEM to be used, along with the normalization constant, is settable for each loss monitor using the modify loss monitor dialog. In normalize to constant mode the value that is displayed is normalized to a constant. The constant is settable using the modify loss monitor dialog.

Underneath the option button is a push button labelled summary. Pushing this button will cause the loss monitor summary screen to pop up.

The graph on the right of the main screen will display the SEM readings. Note that the graph is not constrained to contain only SEMs; the user may include other devices, such as scintillation counters or ionization chambers, as desired. For convenience, all of the devices in the SEM graph are referred to as SEMs, with it being understood that some may actually be other types of devices. There is no relationship between the number of SEMs in the SEM graph and the number of loss monitors in the loss monitor graph. The user may include as many or as few devices as are necessary to provide the needed information.

Like the loss monitor graph, the bars of the SEM graph are color coded, with the user able to set alarm and warning thresholds independently for each device. To allow for the fact that too little beam is as much a reason for concern as too much, the user is also able to set alarm and warning thresholds for readings that go too low.

The labels, background subtraction toggle buttons, and summary buttons are all similar to the corresponding features of the loss monitor graph. A SEM may be selected and repositioned in a manner similar to that of the loss monitors.

The display mode option button will allow the user to select one of two display modes: absolute, and normalize to request. In absolute mode, the logarithm of the reading from the SEM is displayed. In normalize to request, mode the reading is normalized to the requested value for a beamline or beamline area. The particular beamline or area to use, along with the normalization constant, is settable for each SEM using the modify SEM dialog.

On the bottom right of the main screen, there is a time stamp. It contains the time at which the data currently being displayed was collected.

On the bottom left of the main screen, there is a toggle button labelled ``Pause.'' Pressing the pause button causes BeamLoss to stop updating the display as data arrives, and enable the two arrow buttons next to the pause button (figure one shows the main screen in pause mode.) Pressing the left arrow button will cause the display to move back in time, allowing the user to view up to five previous readings. Pressing the right arrow button will cause the display to move forward in time. A number between the arrow buttons indicates the relative time of the reading being displayed: zero indicates the most recent reading (this is the reading that was being displayed when the pause button was pushed,) ``-1'' indicates the reading prior to the zero reading, ``-2'' indicates the reading before that, etc. Pressing the pause button a second time causes the display to resume updating as data arrives.

To the right of the arrow buttons is a button labelled ``Print''. Pressing the print button will cause a screen dump to be sent to a printer or file. The particular printer or file must be selected in advance using the printer options dialog box, which is popped up by selecting ``Printer Options...'' from the options menu. The printer and file name will be stored; they only need to be set once. Note that while the display is in color, the screen dump is always converted to black and white before printing. ``Light'' colors will be printed as white pixels on a white background, which is not very useful. It may take some experimentation to discover which colors print well. The default colors all are printable.

A set of pull down menus are available on the menu bar of the main screen. In order, from left to right, they are:

File menu

The file menu contains items related to creating, loading, and saving views.

New:
Remove all of the loss monitors and SEMs, leaving two empty graphs on the main screen. Select this item if you want to build a view from scratch. If the old view has been modified and not saved, you will be asked if you want to save the old view.
New Window:
Create a new, empty main screen. The new main screen will be entirely independent of the first.
Open...:
Load a new view from a file. A file selection box will be popped up, from which you may select a view. If the old view has been modified and not saved, you will be asked if you want to save the old view.
Open in New Window...:
A file selection box will be popped up, from which you may select a view; a new main screen will be created containing that view. Selecting this item is equivalent to selecting ``New Window'', and then, in the new main screen, selecting ``Open...''.
Save:
Save the view. The view will be saved to the same file from which it was originally read, unless a different name was specified using the ``Save As...'' option. If the view has not yet been given a name, then this option will not be available.
Save As...:
Save the view, but to a file different than that specified when the view was opened. A file selection box will be popped up, with which you may select the name. This option effectively names (or renames) the view.
Close View:
Destroy this main screen. If no other main screens have been created (with ``New Window'', or ``Open in New Window,'') then this is equivalent to exiting the program. If other main screens have been created, then they will not be affected. If the view has been modified and not saved, you will be asked if you want to save it.
Exit:
Exit the program, closing all main screens. This is equivalent to selecting ``Close View'' on each main screen individually. If there is only one main screen, then ``Exit'' is equivalent to ``Close View.''

Edit menu

The edit menu contains items related to adding, modifying, and deleting loss monitors and SEMs from the graphs.

Add/Modify Loss Monitor...:
Causes the Add/Modify Loss Monitor dialog box to be popped up. The Add/Modify dialog boxes are described in sections three and four.
Add/Modify Sem...:
Causes the Add/Modify SEM dialog box to be popped up.
Delete Loss Monitor...:
Causes a selection box to be popped up, from which you may select a loss monitor to be deleted from the graph. If a loss monitor is selected on the main screen when this option is chosen, then that loss monitor is preselected in the dialog box, and all you need to do is confirm.
Delete SEM...:
Like ``Delete Loss Monitor...'', but applying to the SEM graph.

Options menu

The options menu contains items related to setting miscellaneous parameters.

Colors:

Used to set the colors of the bars in the loss monitor and SEM graphs. A sub-menu will be popped up, from which you may select ``Normal,'' ``Warning,'' ``Alarm,'' ``Error,'' or ``Select.'' Selecting one of these will cause a color mix dialog to pop up, with which you may set the bar colors for the normal, warning, alarm, and error states, and the background color to use when a bar is in the selected state. Note that ``light'' colors will not print well. See the note at the end of the description of the printer options dialog below.

Reading Times:
Used to set the times at which the foreground and background readings are taken for each device. A sub-menu will be popped up, from which you may select ``Primary,'' or ``Background.'' Selecting either of these will cause an FTD dialog to pop up, with which you may specify the FTD to use for the foreground (primary) or background reading. The FTD dialog is described in section five.
Axes...:
Causes the axes dialog box to pop up, with which you can specify the maximum and minimum values that the graphs can display. The axes dialog box is described in section six.
Printer Options...:
Causes the printer options dialog box to pop up. Use the printer options box to select the printer to be used for screen dumps. The dialog box contains a list of known PostScript printers to choose from. If the desired printer is not in the list, then you may type the name of the printer in the text field below. You may also specify the following additional printer options: The name of the file in which the dump is stored before it is printed, whether to delete this file when printing is complete, whether to include the window manager frame in the dump, and whether or not to invert the image. Note that while the display is in color, the screen dump is always converted to black and white before printing. ``Light'' colors will be printed as white pixels on a white background, which is not very useful. It may take some experimentation to discover which colors print well. The default colors all are printable.

Summary screens

The summary screens (figures two and three) provide the user with the exact readings of the devices shown on the main screen. The loss monitor summary screen (figure two) is popped up by pressing the summary button on the loss monitor side of the main screen. The SEM summary screen (figure three) is popped up by pressing the summary button on the SEM side of the main screen. Each summary screen consists of three parts. The first is a label that identifies the view (``Test'', in figures two and three.) The second part is a time stamp that gives the time that the last reading was made.

The third part is a window containing an entry for each loss monitor. On the loss monitor summary screen each entry is a line of text containing the following, in order: The name of the loss monitor, the current reading, the reading normalized to a SEM, the name of the SEM (in parentheses,) the reading normalized to a constant, and the constant (in parentheses.) If the background reading is being subtracted from the loss monitor, then the string ``(subtr)'' will appear before the loss monitor's name. If a particular loss monitor is reporting an error status, or if a SEM or constant was not specified for a normalization mode, then that reading is replaced by a text string that indicates the error.

On the SEM summary screen each entry contains the following: The name of the SEM, the current reading, the reading normalized to a request, and the request and normalization constant (in parentheses.) If the background reading is being subtracted from the SEM, then the string ``(subtr)'' will appear before the SEM's name. As with the loss monitors, if a particular SEM is reporting an error status, or if a request or constant was not specified, then that reading is replaced by a text string that indicates the error.

Both summary screens can also show the five previous readings for each loss monitor or SEM. If the user double-clicks on the entry for a device, then that entry will be expanded, with the previous readings shown under the current readings (the next entry is moved down to make room, if necessary.) In figure two, the entry for device ME1LM2 is expanded; in figure three, device ME1SEM is expanded. Double-clicking on an entry that is already expanded will cause it to collapse, thus hiding the previous readings from view.

If there is not enough room in the window for all of the entries (especially if they are all expanded,) then the user may either use the scroll bars to see the obscured parts, or resize the window to make it large enough.

The readings on both summary screens are updated along with the display on the main screen; if the main screen is paused, then the summary screens are also paused. Stepping the main screen backward and forward in time has no effect on the summary screens (since the previous readings are always available anyway.)

A set of pull down menus are available on the menu bars of the summary screens. In order, from left to right, they are:

File menu

The file menu contains only one item: ``Close.'' Selecting close will cause the summary screen to be popped down. It may be popped back up at any time by pressing the corresponding summary button on the main screen.

View menu

Expand All:
Selecting this item causes all of the entries to be expanded.
Expand Selected:
Selecting this item causes the entry for the selected device to be expanded. If no device is selected, then this item will not be available.
Collapse All:
Selecting this item causes all of the entries to be collapsed.
Collapse Selected:
Selecting this item causes the entry for the selected device to be collapsed. If no device is selected, then this item will not be available.

Add/Modify Loss Monitor Dialog

The Add/Modify loss monitor dialog (figure four) is used to add a loss monitor to the loss monitor graph on the main screen, or to modify the parameters for a loss monitor that is already there. This dialog is popped up when the user selects ``Add/Modify Loss Monitor'' from the edit menu on the main screen. The display is divided into three parts. The first part, on the left, is used to specify the loss monitor. A selection box is provided that contains a list of all of the loss monitors currently in the database. The user may select one of the loss monitors from the list, or may type the name of the loss monitor directly. If the loss monitor is selected from the list, then all of the other fields on the dialog are automatically filled in with the current values. If the user typed the name manually, then the reset button should be pressed to update the fields.

Underneath the selection box are two text fields for the user to specify the readings at which the device should be put into a warning or alarm state. The user should just type the appropriate numbers.

The second part of the display, in the middle, is used to specify a SEM to normalize to. When the loss monitor graph on the main screen is in ``Normalize to SEM'' mode, the reading from the loss monitor is divided by the reading from the SEM, and the result multiplied by a constant. A selection box is provided that contains a list of all the SEMs, ionization chambers, and scintillation counters in the database. As with the loss monitor, the user may either select a device from the list, or type the name of a device directly. Note that there is no requirement that the SEM be one of those that happens to be displayed in the SEM graph on the main screen; it may be any SEM whatsoever.

Underneath the selection box is a text field for the user to specify the normalization constant. The user should type the appropriate number. Underneath the normalization constant are two text fields for the user to specify the alarm and warning thresholds.

The third part of the display, on the right, is used to specify a constant to normalize to. When the loss monitor graph on the main screen is in ``Normalize to Constant'' mode, the reading from the loss monitor is divided by the specified value. The user is provided with a text field, into which the appropriate number may be typed. Underneath the normalization constant text field are two text fields for the user to specify the alarm and warning thresholds.

All three parts of the display contain a text string at the bottom that identifies the formula used for that normalization mode. They are intended to be a reminder for the user; they cannot be changed.

Across the bottom of the dialog are four buttons labelled ``Ok,'' ``Apply,'' ``Reset,'' and ``Cancel.'' Pressing the ok button will cause the indicated loss monitor to be added to the loss monitor graph, or to be updated if it is already there. The Add/Modify loss monitor dialog will then be popped down. Pressing the apply button will cause the indicated loss monitor to be added or updated, but the dialog will remain up. Pressing the reset button will cause all of the fields on the dialog to be filled in with the values currently being used by the indicated loss monitor on the main screen. If the indicated loss monitor is not on the main screen, then the fields are filled in with string ``Undefined.'' Pressing the cancel button will cause the dialog to be popped down without updating anything on the main screen.

Add/Modify SEM dialog

The Add/Modify SEM dialog (figure five) is used to add a SEM to the SEM graph on the main screen, or to modify the parameters for a SEM that is already there. This dialog is popped up when the user selects ``Add/Modify SEM'' from the edit menu on the main screen. The display is divided into two parts. The first part, on the left, is used to specify the SEM. A selection box is provided that contains a list of all of the SEMs, ionization chambers, and scintillation counters currently in the database. The user may select one of the devices from the list, or may type the name of the device directly. If the device is selected from the list, then all of the other fields on the dialog are automatically filled in with the current values. If the user typed the name manually, then the reset button should be pressed to update the fields.

Underneath the selection box are four text fields for the user to specify the readings at which the device should be put into a warning or alarm state. The alarm or warning state will be set if the reading exceeds the corresponding value in the top two fields, or if the reading falls below the corresponding value in the bottom two fields. The user should just type the appropriate numbers.

The second part of the display, on the right, is used to specify a request to normalize to. When the SEM graph on the main screen is in ``Normalize to Request'' mode, the reading from the SEM is divided by the requested intensity for a beamline area, the reading from another SEM, or by a constant value. The result multiplied by a normalization constant.

A selection box is provided that contains a list of the names of all the requests in the request database, followed by a list of SEMs. The user may select the the name of a request or SEM from the list, or type a constant value into the text field.

The request database contains a list of the requested beam intensities for each beamline area. BeamLoss will check the request database at least once every cycle, since the values stored there may change as experiments change their requests.

Underneath the selection box is a text field for the user to specify the normalization constant. The user should type the appropriate number. Underneath the normalization constant are four text fields for the user to specify the alarm and warning thresholds.

Both parts of the display contain a text string at the bottom that identifies the formula used for that normalization mode. They are intended to be a reminder for the user; they cannot be changed.

Across the bottom of the dialog are four buttons labelled ``Ok,'' ``Apply,'' ``Reset,'' and ``Cancel.'' Pressing the ok button will cause the indicated SEM to be added to the SEM graph, or to be updated if it is already there. The Add/Modify SEM dialog will then be popped down. Pressing the apply button will cause the indicated SEM to be added or updated, but the dialog will remain up. Pressing the reset button will cause all of the fields on the dialog to be filled in with the values currently being used by the indicated SEM on the main screen. If the indicated SEM is not on the main screen, then the fields are filled in with string ``Undefined.'' Pressing the cancel button will cause the dialog to be popped down without updating anything on the main screen.

FTD dialog

The FTD dialog is used to specify the frequency-time descriptors that determine the times at which the foreground and background readings are taken. This dialog box is popped up when the user selects either ``Primary'' or ``Background'' from the colors submenu of the options menu on the main screen. Figure six shows an FTD dialog displaying the time T6 + five seconds. The user needs to specify three values: the mode, the event, and the delay (or interval).

The mode is specified using an option menu. The available modes are T-time, Tev Clock, and Frequency.

The event is selected by either typing the name of the T-time or Tev Clock event (as appropriate,) or by selecting one of the preset events in the preset event box. If the mode is T-Time, then the preset events will be T1 through T6. If the mode is Tev Clock, then the preset events will be 41, A2, A3, A4, 45, and 46. The preset event box also includes a button for the event ``NOW.'' The NOW event is equivalent to ``immediately.''

The delay (or interval) is set by typing the desired interval. The units for the interval field may be minutes, seconds, or milliseconds. An option box is provided to set the units.

Across the bottom of the FTD dialog are four buttons labelled ``Ok,'' ``Apply,'' ``Reset,'' and ``Cancel.'' Pressing the ok button will cause the selected FTD to take effect, and the FTD dialog to be popped down. Pressing the apply button will cause the selected FTD to take effect, but the FTD dialog will remain up. Pressing the reset button will cause the current FTD to be displayed in the dialog. Pressing the cancel button will cause the FTD dialog to be popped down without updating anything.

Axes dialog

The Axes dialog is used to specify the maximum and minimum values for each mode of the loss monitor and SEM graphs. This dialog box is popped up when the user selects either ``Axes'' from the options menu on the main screen. Figure seven shows an Axes dialog box. The dialog is divided into five areas, corresponding to the three normalization modes of the loss monitor graph, and the two modes of the SEM graph. In each area the user should type the desired maximum and minimum for the graph.

Across the bottom of the Axes dialog are four buttons labelled ``Ok,'' ``Apply,'' ``Reset,'' and ``Cancel.'' Pressing the ok button will cause the graphs on the main screen to be updated with the new values, and the Axes dialog to be popped down. Pressing the apply button will cause the graphs on the main screen to be updated with the new values, but the Axes dialog will remain up. Pressing the reset button will cause the current maxima and minima to be displayed Pressing the cancel button will cause the Axes dialog to be popped down without updating anything.

Keywords: RDCS, Loss Monitor, SEM, Beamline, tuning, X

Distribution: normal

Security, Privacy, Legal

rwest@fsus04.fnal.gov