February 4, 1999
AutoTune is an X Window application that displays a set of SWIC profiles relevant to a particular beam line, and allows the operator to adjust the beam position by directly manipulating the profiles on the screen. When the profiles have been adjusted to the operator's satisfaction, pressing the ``Do Tune'' button will cause AutoTune to determine which magnet settings need to be changed, and then to make the settings. The SWIC profiles are updated every T6 + 8 seconds, so the effects of the changed settings should be shortly visible.
The program is divided into two parts: A server part and a client part. The server part is a detached process that runs on some node in the DISNEY VAX cluster. The server is responsible for doing all data acquisition and settings. It communicates with the client part via the network. There is one server process dedicated to each beamline.
The client part provides the (Motif based) user interface. When it is started, the client connects to the desired server (see section 1, below). The server monitors the beam position, and sends the data to the client for display. The user may use the client to move the beam (as described above); the request is fowarded to the server, which makes the settings, and reports the results back to the client for display. Note that the server is written in such a way that any tune request from an account other than OPS will be rejected.
To run AutoTune, select ``AutoTune Proton'', ``AutoTune Neutrino'', or ``AutoTune KTev''from the second page of the general user menu. Similar items are available on the OPS menu. An AutoTune client will be started that will connect to the indicated server. If the user running the client is the OPS account, then the user may use the client to control the beam. Otherwise the user may only monitor the beam's position.
Alternatively, the AutoTune client may be started in such a way as to bypass the server. In this mode, the client does not connect to a server, but does all of the necessary data acquisition and settings by itself. This is called standalone mode. Standalone mode is intended for beamline physicists to use when testing new control files. The ability to do tunes in this mode is dependent on one's PIG privileges.
To start the client in standalone mode, type ``@epicure_programs:autotune'' with the following parameters:
@epicure_programs:autotune proton_test.ctl rfd$disk1:[gutierrez.mtune]
To exit AutoTune, select ``Exit'' from the ``File'' pull-down menu.
When the AutoTune client starts, it automatically connects to the appropriate server (depending on which item you selected from the menu). You may change servers at any time by selecting a new server from the ``Server'' option menu on the main screen.
As a special case, the option labelled ``Stand Alone" can be selected to put the client into standalone mode (see section 1).
To load a new control file, select ``Open'' from the ``File'' pull-down menu. A file selection dialog box will pop up containing a list of control files from which to choose. By default, the program searches the following directories for control files:
DISNEY::USR$DISK1:[OPS.NMTUNE]This will cause the server to load the specified control file. This feature is disabled if the user running the AutoTune client is not OPS.
In standalone mode, any user may load a control file.
The main screen displays an array of SWIC profiles. One horizontal and one vertical profile is displayed per SWIC. The set of SWICs that are displayed is determined by the control file that is currently loaded by the server. A vertical slider to the right of each pair of profiles allows one to select a particular scan to view. The calculated position of the scan being displayed is shown in a label above each profile. The position is calculated relative to the marker, or to the center if there is no marker. Underneath each profile is a horizontal slider, with which one may move the profile by up to 10 wires in either direction. The profile will automatically track the slider as it is moved. If a slider is disabled (grayed out), then the corresponding profile is not controllable.
If there are more profiles than will fit on the screen, then one may either make the window larger, or use the scroll bars provided to scroll the display.
If a profile has a large ``X'' drawn over it, or if the marker lines are missing, then either the scanner, or the FIFO device has returned an error status. Section 10 explains how to get more information.
If the calculated position is not shown (that is, if a straight line is drawn through the field that would normally contain the position,) then the beam intensity is too low to permit an accurate calculation. See section 11.
To see an expanded view of a profile, select ``Closeup'' from the ``Options'' pull-down menu. Then, from the sub-menu, select the name of the desired SWIC. A dialog box will pop up that shows a larger view of the selected SWIC's horizontal and vertical profiles.
The closeup view also prints each profile's position relative to the marker (or center), and the marker positions.
After using the sliders to adjust the position of each profile, press the ``Do Tune'' button to cause the settings on the appropriate magnets to be adjusted and move the beam. A dialog box will pop up that displays progress messages as the program performs each step in calculating and changing the settings. These messages are also written to a log file (see section 12 for more details about the log file).
This dialog box can be popped up at any time by selecting ``Server Progress'' from the ``Options'' pull-down menu. The dialog box will save the results from previous tunings; a scroll bar is provided so that all of the previous messages can be seen.
Note that the server will reject a request to move the beam that comes from any account other than OPS. The ``Do Tune'' is disabled for non-OPS users.
In standalone mode, any user may press the ``Do Tune'' button. But if the user does not have the necessary PIG privileges, then one or more settings will fail, and an error message will be displayed.
The progress dialog box contains an ``Abort'' button. Pressing this button after a tune has started, but before any settings have been made ( at time T3), will cause the tune to be aborted (that is, no settings will be made).
If the ``Abort'' button is pressed after the settings have begun, or after they have finished, then there will be no effect.
An option menu in the upper-left corner of the screen shows the mode of the server. (The modes are described in the following subsections). This option menu is disabled for non-OPS users, unless the client is in standalone mode.
In ``Manual'' mode, the operator must explicitely request all changes (by setting the sliders, and then pressing the ``Do Tune'' button).
In ``Semi-Automatic'' mode, the program will monitor the beam position, and if/when the beam strays off of a marker (or center, if there is no marker), the program will pop up a dialog box that asks for permission to make the changes.
When the dialog box is popped up, the terminal will beep, and if the program is iconifed, it will de-iconify itself.
Each section of a beamline area has a SEM associated with it in the control file. If the reading from the SEM is below a threshold value, also set in the control file, then the program will not attempt to tune that section.
The following buttons are displayed at the bottom of the dialog box:
Note: After pressing the display button, the operator may modify the changes by adjusting the sliders on the main screen. In this case, the ``Do Tune'' button will include the changes in the tune, but the ``Accept'' button will send the proposed changes without the modifications.
If the operator does nothing, then the program will wait, but will keep the dialog box updated to reflect the current beam conditions. If the beam corrects itself (or if the operator adjusts the magnets via another mechanism), then the dialog box will be unposted.
In ``Automatic'' mode, the server will monitor the beam position, and if/when the beam strays off of a marker the server will make the settings necessary to correct the beam. A dialog box will pop-up showing the progress messages from the tune (see section 7, ``Do Tune''). Note that the server will continue to automatically tune the beam even if there is no operator watching the server. The following constraints are placed on the server when it is in automatic mode:
If an erorr occurs while reading a SWIC scanner, then a large ``X'' is drawn over the profiles. If an error occurs while reading a FIFO device (the FIFO devices are what the program uses to read the marker positions), then the marker lines will not be drawn for that SWIC.
To find out more information, select ``SWIC Status'' from the ``Options'' pull-down menu. A dialog box will pop up containing the most recent status message from each device.
Note: If a SWIC scanner is set up to collect fewer than ten scans, then the empty scans will be marked with an ``X'' if you try to view them. If the status dialog box shows a success status for a profile that has an ``X'' drawn over it, then that scan is not being collected by the scanner. For example, if a SWIC is in fast spill mode, and is only collecting six scans, then scans seven through ten will be marked with an ``X''. The SWIC will also be marked with an ``X'' if it is out of the beam.
The control file associates a SEM and a threshold value with each beam area. If the reading from a SEM is below the threshold value, then the program will not try to tune that area when in Semi-Automatic mode. This is to prevent false alarms when the beam is off or at low intensity. The user may still tune those areas manually. Also in this case, the calculated positions displayed on the main screen will be replaced with a straight horizontal line.
To see the current reading and thresholds for the SEMs, select ``SEM status'' from the ``Options'' pull-down menu.
AutoTune needs to have certain logicals defined in the job logical table (for the client), or the system logical table (for the server). These logicals are automatically defined by the startup file in the Epicure programs area (see section 1). This list is included for completeness, and will probably not be useful to the general user.
A dialog box will pop up with this message if the AutoTune client loses the connection to the server. The name of the server and the node that it was running on will be included in the error message. The probable reason for the error is that the server has crashed, or been restarted. The EOPERATOR account can be used to see if the server has crashed (``check autotune''), and if necessary restart the server (``restart autotune''). Use the ``Server'' option menu on the main screen of the program to reconnect to the server once it is restarted.
A dialog box containing this message will pop up if the AutoTune client is unable to connect to the selected server. This can happen on startup or when the user selects a new server via the ``Server'' option menu. If a server that is supposed to be running is not, it can be restarted via the EOPERATOR account (see above).
If the server is in Semi-Automatic mode, the beam is out of position, and the program is not reacting, it may be because the designated SEM has too low a reading. The control file associates a SEM and a threshold value for each SWIC in the control file. If the reading from the SEM is below the threshold, the the program will not propose a tune based on that SWIC. This is to prevent the program from trying to move the beam when the intensity is too low for an accurate measurement of the position.
If a SWIC profile has a large ``X'' drawn over it, then that SWIC is returning an error status. Select ``SWIC Status'' from the ``Options'' pull-down menu to pop up a dialog box that contains the most recent status message from each SWIC. If the status for the SWIC is good, but the ``X'' is still drawn, it may be that the SWIC is set up to collect fewer than ten scans. Try adjusting the ``Scan'' slider on the main screen.
If a SWIC profile shows no markers, but the cable TV display does show markers, then there is a problem reading the FIFO (A FIFO device is associated with each SWIC scanner, and is used to read out the markers, as well as other infomation). Select ``SWIC Status'' from the ``Options'' pull-down menu to pop up a dialog box that contains the most recent status message from each FIFO.
If the AutoTune client pops up a dialog box announcing that a tune is in progress, and you never pressed the ``Do Tune'' button, then it means that either: somebody else (from the OPS account) has started the tune; or the server is in automatic mode, and has decided on its own to move the beam. When the server is not in automatic mode, then only the OPS account can tell a server to start a tune, but the progress messages are sent to all clients that are connected.
The ``Do Tune'' button, ``Mode'' option menu, and the ``Open'' button in the ``File'' menu are disabled when the AutoTune client connects to a server and the user is not OPS.
Non-OPS users can move the beam by using the ``Server'' option menu to put the client into standalone mode, and then loading the appropriate control file. Note that such users will still need PIG privilege to make the required settings.
While a tune is in progress, until T6 + 8 secs after the tune is done, the program will disable the horizontal sliders under the profiles that are used to adjust the beam. This is done because the displayed profiles are not current while the tune is in progress.
If the calculated position of the beam on the main screen is missing (that is, if it is replaced by a straight horizontal line), then the beam intensity is too low to permit an accurate calculation. See section 10. The calculated position is also not shown if the SWIC is out of the beam.
The automatic button is disabled if the client is in standalone mode. It is also disabled for non-OPS users when connected to a server (in fact, all of the mode buttons are disabled in this case). Only the OPS account is allowed to change the server mode.
If the beam is at any point more than four wires away from the desired position, then it will ask for permission to move the beam, as though it were in semi-automatic mode. This is to prevent the program from automatically making radical changes.