SCAN: A beam tuning application<P> Software Release 55.0

SCAN: A beam tuning application

Software Release 55.0

Bruce Baller


This application will vary the setting or position of a device while monitoring the intensity in several SEM's, ion chambers or paddle counters. The application may be used to optimize beam transmission through magnets and collimators, to position production targets, and to align electrostatic septa. SCAN will collect data at a rate determined by the user and will vary the device setting during the spill. The collected data may be viewed in columnar form or graphically.

In the following document, the term 'SEM' denotes any intensity monitor, 'scan device' denotes a magnet power supply or a motor controller, and 'readback position' denotes a magnet power supply set point, a motor controller analog readback or the analog readback position from a device associated with a motor controller. SCAN will recognize any device controlled by 150, 151, 044, and 154 modules. The 1045 module will be supported in the near future.

Required user input

The user must enter the following information on the main screen: the scan device name, an input SEM name, an output SEM name, the device OFFSET, the device DELTA, the desired STEP size, and SEMMIN, the minimum allowable beam flux per data point. An additional SEM name may also be specified at this time. The main scan screen is shown in Figure 1. To enter the information, move the cursor key around using the cursor arrow keys, and write in the screen fields which are delimited by arrows, i.e. . Text written outside these modifiable fields is ignored by SCAN. After entering the required input, the user must hit the carriage return key.

Whenever the carriage return key is hit, when the main screen is in view, the following happens:

All device names are read in and checked with the data base. Identified names are echoed back to the main screen in bold face, and unrecognized names are flagged with an error message near the name.

The scan device module type is extracted from the database to verify that the controlling module is a 150, 151, 154, or 044 module.

The scan limits are also read in and checked. You are ready to scan when all modifiable fields (except for TRP/RDY and ON/OFF) are in boldface type.

At this time all device read lists are executed and the screen is updated to reflect your device choices. If you are scanning a magnet, you will see the default Level 4 magnet setting directly above the Level 0 set field, and three device control fields to the right of the magnet readback field. You may RESET the magnet, and turn it ON/OFF, but you may not set the magnet DC/RAMP.

Two status fields are shown in Figure 1. The PROGRAM STATUS field lets you know what state SCAN is in, such as STOPPED, WAITING FOR T6 TO SET MAGNET DC, SETTING DEVICE, SCAN COMPLETE, etc. The BEAM STATUS field displays either WAITING FOR BEAM, or FLAT TOP.

The bottom line of the main screen is reserved for epithets to tell the user that he has done something illegal. An example is attempting to start a scan without entering valid device names. These comments are erased after 10 seconds so the user is not continually reminded of his foolish habits.

To start a scan, the user must hit the "Do" key to move the cursor to the menu bar, hit the carriage return on the SCAN selection, and hit the carriage return again on the SCAN/START option. The scan will begin at

(initial setting) + OFFSET - DELTA

and will increase the device setting by STEP, until

(initial setting) + OFFSET + DELTA

is reached.

General scan procedure

The scanning procedure is the same for magnets and motor controllers. After the user has supplied the required information, the scan device is set to (initial setting)+OFFSET-DELTA. When the device reaches the setpoint, the SEM readings are saved. To simplify the explanation, let be the saved reading of the input SEM. At each successive read, the integrated beam intensity into the scan device is calculated, . When this exceeds SEMMIN, the intensity in the second SEM, , is calculated. If a third SEM was defined, then is also calculated. The setpoint, and the 's are stored in an internal array along with the device position. If the GRAPHICS/ON menu bar option has been selected, the ratio is plotted at this time. The set point of the scan device is incremented by STEP, and the procedure described above is repeated until (initial setting) + OFFSET + DELTA is exceeded, at which point the scan is complete. Finally, the device is set to the initial setting.

Scanning magnets

Scanning a magnet is complicated somewhat by the need to vary the power supply setting during the spill. It is only possible to vary the settings of 150 and 151 modules during a spill if they are in DC mode. Consequently, SCAN must ramp the magnet between spills. Another complication is that putting a power supply into DC immediately sets the supply to 0 amps, despite the setting of the DC setpoint, Level 0. Finally, when a supply is set to RAMP, the supply does not go to RAMP mode until T0.

When the user decides to scan a magnet, SCAN will only set a magnet DC between T6 and T4. The magnet is ramped down to zero amps at T6 and is ramped up to the setpoint at T4. If a scan is completed during a spill, SCAN will ramp the magnet down at T6, until the RAMP mode status is returned. For some magnets, the ramp up time of T4 is not appropriate. You may use the EXTRAS/MAG RMP TIME menubar option to change the ramp up time.

Magnet readback values rarely match the setpoint values, due to calibration errors. Hence when scanning magnets, a fixed time delay of 2 seconds is used to allow the magnet to reach a new set point. This time delay may be changed by using the EXTRAS/MAG DELAY menubar option.

Scanning motor drives

Scanning motor driven devices is complicated by the differing types of settings and readbacks. The 154 module has a readback device, usually a potentiometer, and a setting which is 0 when the drive has stopped. The user feeds the distance, in counts, that the drive must move. The 044A module has a readback device and goes to a drive counter setpoint. The 044M has no readback device and goes to a drive counter setpoint. There may or may not be a separately named readback device associated with the 044M. All of these motor drives are open loop, unlike the 1045 module which when given a desired readback position, will drive the motor under closed loop control until the readback position is found.

SCAN makes no attempt to position motor controlled devices to some readback value; the motor drives are simply moved and the readback position recorded.

When a device is chosen which uses the 044M module, a dialog box is created in which you may enter an alternate readback device name.

When a scan of a motor driven device is started, the device is immediately moved to (initial setting)+OFFSET-DELTA, regardless of the time during the accelerator cycle. Note that the values of (initial setting), OFFSET, STEP, and DELTA, should be setting values and not readback values. The user must be aware of the data base scale factors which are applied in translating from engineering units to raw units.

Menu bar options

The SCAN menu bar has 4 selections, SCAN, GRAPHICS, EXTRAS, and HELP!!, along with the usual PRINT and EXIT selections. To select one of these, hit the "Do" key, use the right and left cursor buttons to highlight the desired selection and hit the "Return" key. Items within the created pulldown menus are selected by using the up and down cursor control keys.

When using the menu bar, SCAN goes into a paused state, since data events are not processed. After a menu selection has been made, processing resumes. Therefore, when the user exits from the menu bar, old data events are first flushed before the screen is updated or the scan continued.


The three SCAN options are START, STOP and EXIT. You begin a scan by selecting the START option and you may abort the scan by using the STOP option. EXIT may be used to exit the menubar without affecting the current state of SCAN.


The four GRAPHICS options are ON, OFF, RESCALE, and EXIT. Selecting ON creates a graphics window on the workstation on which the data are plotted. The ratio is plotted against the scan device position. The bounds of the plot are estimated from existing data and magnet set values (if applicable). A dialog box is created in which the user may alter any of the plot bounds. The data are displayed as they are calculated. If the plot bounds are found to be inappropriate, they may be changed by using the RESCALE option. Choosing the OFF option closes the graphics window, and choosing EXIT exits the menu bar without affecting the current state of the graphics.




This option displays the data in the form:

device position ~ ~ ~ ~ ~

If a third SEM name was entered on the main screen, then and is also displayed. An example data display screen is shown in Figure 2. Up to twenty data points are displayed on one screen. Blocks of 20 data points are displayed whenever the carriage return key is hit. A final carriage return displays the main scan screen. Note that it is possible to view the data during a scan without affecting the scan. The data display is not updated however.


This option writes the data to a file called SCAN.DAT in the same format as it is displayed. The status portion of the screen indicates when the file writing is complete.


This option writes a UIS graphics metafile to METAFILE.DAT. With a suitable post processor such as the Dec product RENDER, you may generate graphics output on a laser printer. (NOTE: THIS OPTION IS TEMPORARILY DISABLED DUE TO INCOMPATABILITY WITH RENDER).


The user may alter the time delay between the time a magnet set is issued and SCAN begins the next data point. The default time is 2 seconds and must be an integer multiple of the data acquisition read time period (= 1 second).


The user may alter the time at which A magnet begins to ramp up to setpoint. The default time is T4 which is the usual magnet ramp time. Some magnets and power supplies may require more settling time so that the supply is stable at T5. The user may alter both the T time and the offset.


This option exits the menubar without affecting the present state of SCAN.


This option displays this document. Twenty lines of help text are displayed whenever the carriage return is hit, as shown in Figure 3. To prematurely exit from the HELP screen display, move the cursor to the right hand side of the screen near the QUIT field and hit the carriage return.

paragraph distribution: normal

Security, Privacy, Legal