Chapter 5. Advanced AccelNET Topics

Table of Contents

1. Manual Pages
2. Environment Variables
3. Directory Structure
4. Manipulation of the Accelerator Runtime Database
4.1. Saving the Entire Accelerator Runtime Database
4.2. Saving a Particle Run from the Accelerator Runtime Database
5. Using the Accelerator Scaling Program
6. Terminal Server Configuration

1. Manual Pages

The content of this manual does not cover every command and configuration of the AccelNET system. Manual pages have been created for a large percentage of the commands and other aspects of AccelNET. To access them, use the man command, browse the AccelNET web interface, or use the X manual pages menu item from the AccelNET menu.

2. Environment Variables

Shell Variables

USER_TREE

Pathname to the AccelNET tree.

CONF

Pathname component to contract specific subdirectories.

DBMAN_HOST

Host where dbman/pgman runs.

DOSE_HOST

Host where DOSEserv runs.

LOG_HOST

Host where printer is served from.

MBS_HOST

Host where MBSseqTask runs.

DBman Variables

DB_SIZE_FILE

Configuration file for master database size.

AUTH

Authorization file.

Xcrt Variables

DISPLAY

Host where the Xserver is running.

ASSIGN

Host where the assign service is running.

KNOB

Host where the knob service is running.

METER

Host where the meter service is running.

TREND

Host where the trend service is running.

CRT_SIZE_FILE

Configuration file for crt database size.

3. Directory Structure

$USER_TREE/sbin

Path name to executables.

$USER_TREE/$CONF/startup

Startup scripts.

$USER_TREE/$CONF/asm

Configuration files for meter/knob/assign/fp4d services.

$USER_TREE/$CONF/config

AccelNET configuration files.

$USER_TREE/db/$CONF/db

Database files.

$USER_TREE/db/$CONF/data

Data files used by individual programs.

$USER_TREE/sys/machcmds

General purpose shell scripts and programs.

$USER_TREE/$CONF/machcmds

Contract specific shell scripts and programs.

$USER_TREE/$CONF/CmdFiles

Command files containing parameters and values for machcmds scripts.

$USER_TREE/$CONF/ScaleLists

Parameter lists for save, restore, and status operations.

$USER_TREE/$CONF/tftpboot

Terminal server startup and configuration scripts.

4. Manipulation of the Accelerator Runtime Database

In order for information to be saved, restored, scaled or otherwise manipulated, an empty directory must first be created in which to work. The Linux command "mkdir <directory name>" is used for this. It is suggested that the directory name be used to identify the particle run. Linux directory names may be up to 255 characters long. For example, "Au+++3.0MeV" could be the name for a triple plus gold run at 3.0MeV particle energy.

Next change into the directory just created by typing: cd <directory name>

Many of the commands described in the previous section use the current directory as a place to read from and write information into. Most of them are also implemented using Linux shell scripts (please see the Linux manual pages for bash). They in turn use the programs "ReqPar" and "dbmod" in order to communicate with the control system.

The program "ReqPar" reads from a list of tag names and asks the control system for the current values. The values obtained are written into a disk file along with the tag name.

The program "dbmod" may be used to send values to the control system from files created by ReqPar. The files containing the lists of parameters to obtain from the control system and the lists of parameter values obtained are text files and may be created or edited by a standard text editor such as vi.

4.1. Saving the Entire Accelerator Runtime Database

This is a save of all of the tables in the database. Each table is stored in a seperate disk file. The disk files have as their names "<table name>.sav" The commands "up" and "updaemon" are used to save the tables. The command "down" is used in place of "dbload" at startup time in order to reload the saved database. The format of the command is: down all sav

Saving the complete database is most useful in cases where it is desirable to restore the system to a running state without going through a cold start process. For example, if the computer crashes in the middle of a run.

The program "up" is a voluntary save. The operator enters the program and a menu appears asking which tables to save. The usual method is to save of all the tables. The program may then be exited or left running to resave tables when the operator desires. Usually only the DATA table will need to be resaved.

The second program "updaemon" is a one minute interval DATA table save. When the program is invoked, all of the tables are saved. After that, the DATA table is resaved at one minute intervals until exited. The program is exited by pressing "ctrl-C".

A listing of the saved database may be obtained by using "listit".

4.2. Saving a Particle Run from the Accelerator Runtime Database

A particle run is saved by retrieving the values of individual parameters from the runtime database. The saved parameter values are stored in disk files and may be sent to the control system later in order to recreate a run of the same type. They may also be processed by the scaling program to create a run for another energy or ion species.

The program "request <arg>" is used to obtain lists of values from the running database.

The program "send <arg>" is used to send previously obtained lists of values to the running database. The machine parameters are organized by sections of the machine. For example, typing "request S2sav" obtains a list of all values from source 2 to the entrance of the machine.

One peculiarity to note in regard to the bending magnets is that when using S1sav, S2sav, etc as arguments to "request," the field strength setting parameters for the bending magnets must be set to agree with the field strength reading from the hall probe. The field strength setting is sent to the control system when the file is sent, thus invoking the magnet tune routine.

When the machine scaling parameter lists are requested (S1, S2, 1B, etc), the hall probe reading is retrieved and the field setting is generated, therefore this is not a problem.

The program "extract <arg>" may be used to obtain a parameter list from a database previously saved by "up" or "updaemon".

The recommended procedure for saving a particle run using S2 is:

  1. Make a directory to hold the run.

  2. Change to the directory just created.

  3. Check to make sure the magnet field settings match the hall probe readings.

  4. Check to make sure selected ion source, selected beam line, particle name, input mass, output mass and charge state have all been set.

  5. Check to make sure the double slit position settings match the position readbacks and set if necessary.

  6. If running in slit mode check to make sure TRV is set to match GVM.

  7. Type "request S2sav"

  8. Type "request MACHsav"

  9. Type "request 1Bsav"

  10. Type "request DS"

It might be helpful to use "vi" to make a file containing notes about the run. For example, the stripper gas and source heater settings.

It also might be helpful to use "up" or "updaemon" to save all the tables. This can be helpful later if the run needs to be scaled, someone wants to look at an odd parameter value, or get a listing.

5. Using the Accelerator Scaling Program

The scaling program allows the particle energy, particle species, and other such parameters to be changed. The current values of the machine parameters can be retrieved from the running database, changed, and sent back to the running database. Alternately, parameters saved from a previous run may be scaled and sent to the running database.

The preacceleration components may be changed seperately from the post acceleration and machine components, thus allowing the injection energy to be changed to obtain a "match" into the accelerator.

Preacceleration and ion source parameters from a run may be combined with post acceleration parameters from another run in order to create a run on a new target beamline.

The scaling process is divided into three parts:

  1. Obtaining the current parameter values.

  2. Scaling the values.

  3. Sending the newly scaled values to the running database.

The scaling process uses parameter lists to do its job. A parameter list is a disk file with lines of text containing the tag name and value of the parameters. The scaling program reads the parameter list file and outputs a new file with the same format containing the newly scaled values.

Parameter lists to be scaled may be obtained from three sources:

  1. A retrieved list from the running database using the "request" command.

  2. A previously retrieved list from the "request" command.

  3. A previously saved database from either the "up" or "updaemon" command. In order to use this source, the "extract" command must be run to convert the saved database to the proper format.

When the scaling program is invoked, a copy of the entire database is read into memory. As each parameter in the list is processed, a scaling key is looked up in the database. The scaling key tells how to process the parameter to obtain the new value.

The scaling program must be provided with information that tells it the current particle energy, mass, and other needed values in order to function properly. This information is read in from a file called "MACHval" when the program is invoked. The file is obtained from the running database by typing "request MACH" or from a database save by "up" or "updaemon" by typing "extract MACH". Either way, it must be present in the current directory for the program to run correctly.

The program changes parameters such as the charge state, mass, and particle energy via a menu.

The accelerator is divided into three regions: preacceleration, machine, and post acceleration. Each region has a particle energy, charge state, and mass associated with it.

The energy relationship between the areas is TotalPartE = InjPartE + MachPartE. The scaling program allows any one of the three variables to be manipulated in the following way:

TotalPartE

If a new value is entered, InjPartE remains constant. MachPartE = TotPartE(new value) - InjPartE

MachPartE

If a new value is entered, InjPartE remains constant. TotPartE = MachPartE(new value) + InjPartE

InjPartE

If a new value is entered, MachPartE remains constant. TotPartE = MachPartE + InjPartE(new value)

The preacceleration region contains all of the beamline components from the ion source to the entrance of the accelerator. When components in this machine region are scaled, the values of all components affected by a change in InjPartE are recalculated. This includes the bending magnets, einzel lenses, and steerers. Also, the cathode, extractor, and deck bias for a SNICS source. For an RF source, the focus, extractor, and deck bias.

The machine region contains the components needed to set the machine to a given terminal voltage. When components in this machine region are scaled, the values of all components affected by a change in MachPartE are recalculated. This includes TRV and corona probe position. The charging voltage is reset to the value needed for no beam operation if it is included in the list to be processed. (The charging voltage is not currently in the parameter lists, therefore it should be reset by hand).

The post acceleration region contains all of the beamline components after the machine region. When components in this machine region are scaled, the values of all components affected by a change in TotPartE are recalculated. This includes all post acceleration optics and the in tank quads and steerers.

The TRV setting is reset by changes in MachPartE. In turn, when TRV is changed, the corona probe position is recalculated. If TRV is changed by a large amount upward, it may be wise to put in a preacceeleration cup and turn off the chains before sending the new values. Wait for the corona probe to reach its new position before turning the chains back on. This prevents unnecessary sparking while the probe is moving to the new position.

The field strength of the magnets is calculated on the basis of MfieldR (the current hall probe value) and the new value is MfieldC (the magnetic field setting value). When the new MfieldC values are written into the running database, the magnet autotune routine is invoked causing the magnets to be retuned to the new field strength.

InjPartM is used to calculate preacceleration optics. TotalPartM is used to calculate post acceleration optics.

The runtime system calculates:

InjPartE = InjPartV * abs(InjChgState)

MachPartE = (GVM * (OutPartM / InjPartM) * abs(InjChgState)) + (GVM * abs(OutChgState))

TotalPartE = InjPartE + MachPartE

InjChgState, OutChgState, InjPartM and OutPartM are entered by the operator as part of the machine setup information.

This is an example of how to do a scaling run. We are going to reduce TotalPartE by changing the terminal voltage. Ion source S2 and beamline L6 are being used for the run.

The initial conditions are:

  1. TotalPartE = 12.2 MeV

  2. InjPartE = 0.055 MeV

  3. MachPartE = 12.145 MeV

  4. OutChgState = 3+

  5. InjPartM = 197

  6. OutPartM = 197

  7. TRV = 3.036 MV

The steps are:

  1. Make an empty directory.

  2. Change to the directory just created.

  3. Check to make sure particle mass, ion source selection, etc have been entered on the machine setup page.

  4. Type "request MACH" to obtain the current machine operation values.

  5. Type "request L6" to obtain the current post acceleration component values.

  6. Type "scale L6" to enter the scaling program and scale the post acceleration components.

  7. Type "a" to select TotPartE from the menu.

  8. Type "12.0<cr>" to enter the new value.

  9. Type "r" to scale the L6 parameter list.

  10. Type "x" to exit the scaling program.

  11. Type "scale MACH" to enter the scaling program and scale the machine components.

  12. Type "r" to scale the MACH parameter list.

  13. Type "x" to exit the scaling program.

  14. Type "send MACH" to send the new machine operation values.

  15. Type "send L6" to send the new post acceleration component values.

Note

It is not necessary to reenter the desired particle energy after the first invokation of "scale". When "scale" is exited, a file named "scaenv" is written into the current directory. This file contains the setup information for the scaling program. If the file is present, it is reloaded the next time "scale" is invoked.

If the scaling process is repeated by using "request" to obtain new values from the running database, "scaenv" should be removed before invoking "scale".

This is another example of how to do a scaling run. In this example we are going to reduce the injection energy by 5 KeV. The initial conditions are the same as the last example.

The steps are:

  1. Make an empty directory.

  2. Change to the directory just created.

  3. Check to make sure particle mass, ion source selection, etc have been entered on the machine setup page.

  4. Type "request S2" to obtain the current preacceleration component values.

  5. Type "request MACH" to obtain the current machine operation values.

  6. Type "request L6" to obtain the current post acceleration component values.

  7. Type "scale S2" to enter the scaling program and scale the preacceleration components.

  8. Type "c" to select InjPartE from the menu.

  9. Type "0.050<cr>" to enter the new value.

  10. Type "r" to scale the S2 parameter list.

  11. Type "x" to exit the scaling program.

  12. Type "scale L6" to enter the scaling program and scale the post acceleration components.

  13. Type "r" to scale the L6 parameter list.

  14. Type "x" to exit the scaling program.

  15. Type "send S2" to send the new preacceleration component values.

  16. Type "send L6" to send the new post acceleration component values.

6. Terminal Server Configuration

This is the setup procedure for the terminal servers.

  1. Turn on power and wait for unit to boot.

  2. Log into the unit and become the super user.

    1. Username> kitchen (this name doesn't matter)

    2. Local_1> su

    3. Passwd> system

  3. Return to boot program.

    1. Local_1>> init noboot

    2. Wait for boot program to come up.

  4. Restore factory defaults.

    1. Boot> flush nvr

    2. Wait for reboot.

  5. Perform initial configuration.

    1. Username> kitchen

    2. Local_1> su

    3. Passwd> system

    4. Local_1>> def server ipaddress 192.168.2.6

    5. Local_1>> def server startupfile "192.168.2.1:/tftpboot/contract-t1.strt"

    6. Local_1>> init noboot

  6. Prevent rarp and bootp.

    1. Boot> set server bootp disable

    2. Boot> set server rarp disable

    3. Boot> init 451

    4. Wait for reboot.

  7. System should now be ready to use.