spec

Software for Diffraction

1.2.1. - Starting Up



In this introduction to the basics of spec, as in most of this manual, the standard four-circle diffractometer configuration is used in the examples. Other specialized diffractometer geometries are available, but all configurations function in a similar manner.

To start up the four-circle version of the spec package from a UNIX shell, type:
% fourc
(In this manual, input from the keyboard will be indicated in bold-faced type.) You will see output similar to the following:
		   Welcome to "spec" Release 6.05.02
	 Copyright (c) 1987-2017 Certified Scientific Software
			  All rights reserved
			  [2017-01-29-101010]

(Portions derived from a program developed at Harvard University.)
(Linked with BSD libedit library for command line editing.)

Using "/usr/local/lib/spec.d" for auxiliary file directory (SPECD).

Getting configuration parameters from "SPECD/fourc/config".

Using four-circle configuration.

=
Type h changes for info on latest changes.
Browse to http://www.certif.com for complete documentation.
=

Reading file "SPECD/standard.mac".
Warning:  No open data file.  Using "/dev/null".
Type "mstartup" to initialize data file, etc.

Reading file "SPECD/four.mac".
Warning:  Using default lattice constants.
(UB recalculated from orientation reflections and lattice.)

1.FOURC> 

The welcome message identifies the geometry configuration (fourc) and the release number of the program (6.05.02). The directory name that contains spec's auxiliary files is then identified (/usr/local/lib/spec.d). That name is assigned to spec's interval variable named SPECD.

A configuration file is then read to obtain the hardware configuration (hardware devices and types, stepper motor parameters, etc.). Various messages are printed as the specific hardware devices are initialized. During the start-up hardware configuration, spec reads the current diffractometer angle settings from the motor-controller hardware registers and verifies that they agree with the positions stored in a settings file associated with the diffractometer. If there is a discrepancy, you will see output similar to the following:
E500 at 0 steps (.1 user), spec at 24431 steps (12.3155 user)
on motor 1, slot 6, "Theta".  Modify the E500 registers?
The E500 is one of many different motor controllers available. Since the controller shows 0 steps, it probably has been powered down, and the program value is probably correct. Type yes or y to modify the controller registers. If you are uncertain what to do, the safest thing is to immediately terminate the program without updating the motor settings files by typing the quit control character (usually a ^V on IBM AIX platforms and a ^\ on most others), and then seek help.

A news file is displayed each time the program starts up. In this example, the Spec Hot Line message is from that file. The spec administrator can keep the news file up-to-date with messages for local users.

The first time you run spec, standard command files from the auxiliary file directory are automatically read (SPECD/four.mac and SPECD/standard.mac). These files contain the standard macro definitions used to operate the diffractometer. There are also some commands that assign default values to the variables used in the macros. The displayed warning message about no data file being open is produced by these standard macros, along with the message that suggests running the startup macro.

Finally, you are prompted for input. The prompt indicates the geometry configuration and includes a prepended command sequence number that is used with the command recall (or history) feature. You can exit the program by typing a ^D (control-D) at the prompt:
1.FOURC> ^D
Bill's state is stored for /dev/console. %
The closing message confirms that your spec state is saved. The spec state consists of all your current macro definitions, variables, open output files and command history. Each user has a unique state associated with a particular terminal. Your saved state is automatically restored the next time you run spec from the same terminal. (See 2.3.11 in the Reference Manual to see how to start spec with a state from another user or terminal.)

spec is built around an interpreter that has a C-like syntax and recognizes over a hundred built-in commands and function names. However, you will typically be invoking the standard macros. These macros are written to do specific jobs using the built-in commands and functions and require minimum keyboard input. If you just want to move motors, count photons and do scans, you will only have to learn the few standard macros presented in this Beginner's Guide.