next up previous contents
Next: Control Mode: Controlling the Up: Instrument Control Program (ICP) Previous: Getting Started


Prepare Mode: Setting up Runs

  Once you have selected the Prepare Mode ICP will display a screen which is similar to that in Figure 3. The upper half of this screen is again a menu.

Figure 3: The initial screen in Prepare Mode.
\epsfig {figure=bt1scr2.eps,height=3in}

To select a buffer, press the arrow keys until the desired buffer is highlighted and then press ENTER. As soon as you move the highlighted bar down, the menu will scroll automatically and the remainder of the buffers will appear. Not all of the parameters for each buffer are displayed, but the information you can see should help you select a buffer for further editing. The buffers are stored in a file within each instrument subdirectory, so your changes will not affect the buffers defined by users working in other directories. Each buffer initially contains default values until it is edited; the new values are retained until they are changed again by yourself or another user within that subdirectory.

Assume we want to change buffer no. 3. Move the highlighted bar to the corresponding line and press ENTER. ICP now displays all the parameters associated with the buffer, as shown in Figure 4. The cursor is at the beginning of the comment field. Use the arrow keys to jump between fields. To change the values in a field, type over them. If the input is correct the new data will be displayed and the cursor moves to the next field. If the input was incorrect the entire field will be filled with dashes and a warning bell should tell you that an error has occurred.

Figure 4: Editing buffer number 3.
\epsfig {figure=bt1scr3.eps,height=3in}

The fields used at BT-1 are defined as follows:

This field is used to provide a text description for the run. The first five letters plus three digits are used to create the filename. If an invalid sequence of characters is used (for example, if one of the first five characters is a space) the name is set to DEFLTnnn.BT1
This provides the value of motor 3 (\( \phi \), or sample table) in degrees for the first data point. This is almost always 0 for BT-1.

An increment added to the value of motor 3 at each point. This is almost always 0 for BT-1.

The value of motor 3 for the last point in the pattern. This is almost always the same as A3-beg for BT-1.

The value of motor 4 (2\( \theta \)) in degrees for the first data point. This defaults to 3.0 for the Cu(311) and Si(531) monochromators and 1.3 for Ge(311). You are strongly encouraged to use the default value.

An increment added to the value of motor 4 at each point. This defaults to 0.05. You are strongly encouraged to use this default value. It makes no sense to use a smaller value; however, a larger step size is useful for a rapid scan to check sample quality.

The value of motor 4 for the last point in the pattern. This defaults to 13.0 for the Cu(311) and Si(531) monochromators and 11.3 for Ge(311). You are strongly encouraged to use the default value.

This is the number of data points to be collected for each detector. This defaults to 201, allowing complete overlap for all but the first and last detectors. You are strongly encouraged to use this default value. This number is coupled with the scan range and step size.

The target data collection temperature. The meaning of the value depends on the temperature controller. Most NCNR controllers use Kelvin, but the high temperature furnace uses Celsius. This value is ignored if 0 or if the T$-$ flag is set (see the TDEV command).

An increment to be added to the temperature at each data point. The is almost always 0.0 at BT-1.

This value specifies a maximum delay (in minutes) to be applied any time the temperature goes outside the range T0 \( \pm \)Err (particularly at the start of a run). As soon as the temperature is within the range, the run resumes. Thus, there is usually no penalty for making this number large.

This determines the maximum error in the temperature setting before introducing a delay (if Wait is non-zero). You probably don't want this number to be too small, as you will lose data collection time if random fluctuations bring the sample temperature outside the range.

This value specifies a delay (in minutes) to use before starting the scan. This delay occurs after the set-point temperature has been reached, so this is commonly used to allow time for a sample to equilibrate after changing temperature.

This is a delay applied before each point. Always leave this value as 0; any other value just wastes data collection time.

This invokes a menu for setting magnetic field conditions. This is seldom used at BT-1.

This value along with Prefac and M-typ sets the data collection time for each data point (see below). If M-typ is Time, Monit is a value in seconds. If M-typ is Neut, Monit is a number of monitor counts.

Each measurement is repeated Prefac times, and if Prefac is 4 or greater, the measurements are checked for statistical consistency and additional measurements are made until consistent measurements are obtained. Note that the actual data collection time is determined by Monit \( \star \)Prefac .

The monitor type can be either Time or Neut. If Time is selected, data points are counted for fixed time periods of Monit \( \star \) Prefac seconds. If M-typ is Neut, data points are counted for fixed incident beam flux and Monit \( \star \)Prefac monitor counts are used for each data point. Use of Neut is recommended except for cases when a sample with severe preferred orientation intensity problems is run with a sample spinner.

This brings up a menu (see section 2.1) that can be used to estimate the Monit value needed so that a run will finish at a given time (see below).

Not used at BT-1.

Whenever a buffer is opened for editing, the starting and ending angles and step size for motor 4 (A4-beg, A4-end and Inc-4) as well as the number of data points are set to the appropriate default value for the monochromator in use. You are strongly encouraged to use these defaults, but use of the Control Mode command A$-$ will disable the setting of these defaults.

After you are done editing, do one of the following:

When a new filename is entered (by setting the first five letters in the Comment field) an Electronic Logbook menu is opened to record sample information (See Fig. 5.)

Figure 5: Electronic Logbook menu example.
\epsfig {figure=bt1scr5.eps,height=3in}

The Automonitor (AMON) Menu

  The AMON menu is used to compute the monitor setting required so that a run can be completed in a particular amount of time (See Fig. 6.) To use the Automonitor utility, move the cursor to the AMON field and hit RETURN. The beam must be opened so that the monitor rate can be measured; this menu can be accessed only from the privileged session.

Two input values are required by the AMON menu: the number of days that will end before the run is completed and the ending time for the run. Times are specified on a 24 hour basis. For example, if the time of day is 10:30 [am] and the run should last four hours, enter 0 days and an end time of 14:30. If the time is 22:30 [10:30 pm] and the run should again last four hours, use 1 day and an end time of 2:30. Based on the current time, the requested end-time, the number of points to be measured, the observed monitor rate, and the number of prefactors (Prefac) the program will calculate the appropriate monitor setting and set Monit accordingly.

N.B. it appears that there is a bug that prevents AMON from operating correctly when a non-zero value is used for Wait. First execute the AMON function, and then set the wait time.

Figure 6: Automonitor example.
\epsfig {figure=bt1scr4.eps,height=3in}

Buffer Operations

  Whenever you press F18 while you are in Prepare Mode you arrive at a level that allows you to make the same changes to all buffers at once, or copy one buffer into another, reset a buffer to its default values, etc. Assume you want to have all buffers contain a temperature value of 77 K. Instead of repeating the procedure mentioned above for each buffer, select Buffer Oper by pressing F18, then simply type T= 77, hit RETURN and observe the temp fields in the menu. 77.0 appears in all buffers. To get a list of all the commands in this mode type HELP at the Command > prompt. The commands and their syntax are listed below as well.
    FIELD = value   (field =  An, AnF, In (n=3,4),
                     MON, MPF, MT, T, TW, TER)
    RESET n1[-n2] (Reset all buffer fields to default values)
    COPY n1[-n2],m (Copy buffers n1 to n2 into m, m+1, ...)

Separate multiple instructions by commas. When done with all parameters return to the previous screen by pressing F20.

Define Sequence

  Once you have edited all the buffers you need, you can define a sequence of commands by pressing F19. Most of the commands from Appendix A can be entered. Nevertheless, be careful because your input is not fed to the parser and therefore not checked for typing errors and invalid commands. It would be a shame to lose a night's data due to a misspelled command. To start with an empty list, delete the sequence by typing DEL. The lines above the RS= should immediately reflect that command by saying: Defined Sequence: NONE. Now enter the commands as you want to have them executed. Use a semicolon to separate commands. The screen is updated every time you hit RETURN. Should you have a number of buffers to execute more than once, i.e.,three times RI1, RI2, RI3, RI8, you can type 3(RI1-3;RI8), and everything within the parenthesis will be repeated three times. Note that multiple run commands like RI1-3 appear unfolded in the command sequence. When finished, press F20 and you return to the previous screen (see Figure 3).

You can also define a sequence in Control Mode, but there you won't see the buffers as a guide in the upper half. Type RS = `command'; `command'; ...then hit RETURN. To have a look at the defined sequence type PRS and hit RETURN. You may check the buffers with the command DRIn which will display the angles as they are used during the execution of buffer n. Angle limit checks are performed during the Dry Run commands so that the user can check for obvious errors. The command DRS will check the defined run sequence for syntax errors.

A more powerful and flexible way to automate running the instrument is to set up a command sequence file within Control Mode. Just type EDIT <filename-of-your-choice> and hit RETURN. You will find yourself in the VMS full screen editor (see Appendix C) where you can enter your commands; type C and hit RETURN to obtain the full screen option. Here is an example of a command file when using the automatic sample changer:

!skip sample 4

This command sequence executes increment buffer 1, changes to the next sample position, executes increment buffer 2, etc., skipping sample 4. Note that multiple commands may be placed on each line if they are separated by a semicolon. Lines beginning with an exclamation point are ignored. The command file may contain only commands in the ''expanded format'' in which run sequences are normally stored; 4(RI1,RI7) is not acceptable.

ICP uses a ``*'' in the command file (here just after the ``ri3'' command) to indicate the program's present position in the command sequence. The * can be moved either to skip a command or to re-execute a command, and of course commands can be edited, deleted or added. To finish with the editor and return to Control Mode in ICP, use Ctrl-Z and then type EXIT. After the editor is exited the new, revised command sequence file will be the active one (with a higher version number). You should be certain that ICP does not need to access the command sequence while you are editing it; otherwise the * will be in the wrong position in the revised file as compared to the original, unedited command file, which is the active file until the editor is exited. It is of course the user's responsibility to assure that the commands are correct in the command file, and that they will do what you intend. The command DRSF <filename> will check for obvious syntax errors in the command file, so that you can check for typos.

RSF <filename> will cause ICP to execute the command file specified by filename. This can only be executed from the privileged ICP terminal. After the command sequence is running, the file can be edited by logging in from any non-privileged terminal, either from another x-window on the PC, or in fact from anywhere in the world over the network. The sequence file can be edited directly from the VMS prompt by invoking the editor, or from within a non-privileged version of ICP. The buffers can also be edited from within a non-privileged version of ICP; ICP only reads a buffer at the time that the buffer is actually to be executed. This gives the user a lot of flexibility to adjust the experiment as it progresses.

The Howlong command

  The ``howlong'' command can be used to estimate the time it will take to execute a series of commands. For example, howlong i2-5 will calculate the time to execute each of the buffers numbered 2 to 5, including temperature holds, and the total time. For a command file sequence, one types howlong/f The command mrat/s to obtain the monitor rate should be executed before the howlong command so that the correct monitor rate is stored in the computer.

next up previous contents
Next: Control Mode: Controlling the Up: Instrument Control Program (ICP) Previous: Getting Started
Brian Toby