spec

Software for Diffraction

changes

highlights of modifications for spec release 2.12

DESCRIPTION

These notes summarize the modifications made for spec release 2.12, as finalized on May 23, 1989.

CHANGES

A new scan-plotting option has been added at the macro level. You can choose to have a continuously updated plot made on the video screen as the points of the scan are collected. Use the setplot macro to select this mode.

The history-substitution mechanism has been expanded a bit. You may now append text to recalled items.

History is now retained when you exit the program and restored when you restart. The savstate command will include command history in the state file, and the getstate command will restore the command history from the last issued savstate.

A new powder-averaging mode for scans is available. When powder mode is on, the selected powder-average motor is run at its base rate a selected width about each point in each scan. The scalers are automatically enabled for counting during the time the motor is in motion. Powder mode works with all the angle scans and HKL scans. Use the macro setpowder to turn powder mode on and off. See the powder help file for details.

The command move_cnt has been added to make powder mode work. This command works similarly to move_all except the motors are moved at the base rate, no backlash is performed and the scalers are automatically gated while the motors move.

All the scan macros required slight modifications to make powder mode work. New global variables, _stype0 and _stype1 are assigned values to indicate the type of scan in progress. In addition, some of the statements in each scan loop have been gathered into a new macro named scan_move. The scan_move macro is assigned a different definition in powder mode. Also, the count macro called by all the scans has been made redefinable to accommodate powder mode. Study the macro files scans.mac, count.mac and powder.mac to see just how these things are done.

A new four-circle geometry mode has been added called phi fixed. This mode is similar to the existing three-circle (phi-zero) mode, except the value of phi no longer needs to be fixed at zero.

A new geometry configuration, named r2d2 after the high-vacuum surface chamber that it describes, is included in the distribution. The geometry code is in the file geo_r2d2.c.

spec has two distinct phases during the process of interpreting user commands: the parse phase and the execution phase. Previously, a macro definition assigned with def would be carried out in the execution phase, making the definition unavailable until the entire enclosing statement block had been read in and parsed. This method of handling macro definitions made it impossible to enclose any of the recently (release 2.10) redesigned standard scan macros within a statement block, since the same macro was both defined and invoked with the scan macro. To solve this problem, macro-definition assignments are now made as they are encountered during the parse phase. However, since several spec macros still require macro definitions to be made during the execution (or run) phase, a new command called rdef has been introduced. This new command behaves now like def used to. See the macros setplot, setpowder, lup or _head for examples of the use of rdef.

The maximum macro length has been increased a bit from 1536 to 1920 bytes.

Clock-tick sleeps are now available with spec on non-VENIX systems. Clock-tick sleeps are sleeps with sixtieth of a second resolution. New versions of either of the drivers dsp.c or oms.c must be installed, though, and the clock-tick sleeps will only work when the corresponding device has been opened. Clock-tick sleeps work well with the sleep-time variable UPDATE used in updated-move macros such as umv, umk and uwm.

spec is now supported on the AT&T 6386 platform running UNIX version 3.2.

The National Instruments GPIB boards are now supported for VENIX 286 and for the various 386 systems. Drivers for the 386 systems must be obtained directly from National Instruments.

The Scientific Solutions (Tecmar) GPIB support code has been rewritten following the sample programs provided by the manufacturer. In addition, this board can now be used on the 386 systems. On the 386 systems a supplied program called io_enable is automatically run the first time the board is used in order to enable the IO ports used by the board to be accessible from user-level programs.

The code to support the Kinetic Systems CAMAC GPIB board (KS3388) has been fixed. A timing problem in the code that rarely, if ever, manifested itself on the PDP and 80286 systems had made the module unusable on the 386 systems.

The driver files, formerly distributed in the subdirectories camac and oms are now distributed in the subdirectory drivers. Three master installation scripts, install_vnx, install_386, and install_att, are supplied that are invoked by driver-specific scripts, such as install_dsp for the DSP CAMAC driver, install_oms for the Oregon Micro Systems PCX driver and install_gpib for the National Instruments PCII GPIB driver.

A problem on the 386 systems, where using a number larger than the largest long integer in a print statement or expression would cause a floating exception and possibly a core dump, has been fixed.