GEOMETRY CODE
The geometry code and macros for the various surf
diffractometer configurations, as used at NSLS X20 and X22, CEA
in France and at Exxon have been rearranged to ease maintenance
and installation of each version.
The NSLS X20 monochromator macros and geometry code have been
isolated from the four-circle code, so that references to the
monochromator will only be made if the monochromator option is
selected at installation time.
The four-circle code now allows sector 1 to be used in modes
4, 5 and 6.
The four-circle code now prints an error message when a user
tries to calculate reciprocal lattice positions with both
chi and phi at zero in zone mode, as the
current method of doing the calculations cannot handle that case.
The three-circle mode with phi=0 has been generalized
to a phi-fixed mode. Also, the frozen modes now include
phi fixed.
A new scan macro, aziscan, is available in four-
circle mode to scan the azimuthal angle in azimuthal mode.
Bugs in the zaxis geometry code calculations have been
fixed.
HARDWARE
The internal code implementing hardware support in
spec has been substantially revised to simplify
adding support for new types of hardware. The revisions for the
most part should be transparent to the user. If a particular
hardware device fails to perform as it did in previous versions,
notify CSS at once, (unless the difference is an improvement).
Support for the Kinetic Systems 3912 CAMAC crate controller
is now provided on DEC Q-Bus based systems.
Support for the Kinetic Systems 3988 GPIB CAMAC crate
controller is now included. This module can only be used if a
National Instruments GPIB controller is also installed. The
board can be used in either interrupt-driven or polled mode.
Interrupt driven mode is preferred, but if interrupts are lost in
the GPIB driver, polled mode can be selected.
Support for the Ortec 974/994/995 counters and counter/timers
is now provided over both GPIB and RS-232C interfaces.
Support for the Klinger MC4 motor controller is now provided
over both GPIB and RS-232C interfaces.
Support for the Advanced Control Systems MCU-2 motor
controller is now provided over an RS-232C interface.
Persistent timing problems with the Kinetic Systems 3388 GPIB
CAMAC module seem to be fixed now.
spec now recognizes the Joerger SMC 2601
otor controller, which allows for programmable velocity and
acceleration.
The code for the TS201 CAMAC timer/counter model now uses
timer 2 to gate counter 2, making it no longer necessary to use
an external cable to gate counter 2.
The "new and improved" E500 modules that use the
F(10) A(0) command to clear the module LAM are now supported.
The E500 LAM service routine has been modified to use fewer
FNA commands and to recheck for additional LAMs from the E500
before returning. The latter change improves performance when
several motors in the same E500 complete their motions at nearly
the same time.
The code that reads the LeCroy 2301 MCA unit has been changed
to read the device faster. (On a 25 MHz 386 using the DSP 6001,
the change is from 0.36 seconds previously to 0.16 seconds now
for reading 1024 channels.)
Many options for use of the National Instruments GPIB
controllers formerly set by each site using the ibconf
program are now set by spec at run time.
Specifically, spec sets the timeout period to 3
seconds, the EOS byte to a newline ('\n'), reads to
be terminated on EOS using an eight-bit compare, REN to be
asserted and the board to be the system controller. The board's
primary address is set to 0 and the signal to be sent on service
request (if using the board with a GPIB-to-CAMAC controller) is
set appropriately. You may still use ibconf to set
whether EOI will be asserted with EOS and/or with the last byte
of a write.
The length of a string that can be read using
gpib_get() has been increased from 64 to 255 bytes.
The GPIB functions gpib_get() and
gpib_put() no longer generate an interface
clear (IFC) message on the bus, unless a previous transaction
had resulted in an error. The old code that sent an IFC before
each transaction not only slowed down I/O, but also caused some
devices to time out. In addition, a brief delay is inserted
after an IFC is sent to accommodate slow devices. (These devices
did not follow GPIB standards and used the IFC message to reset
internal functions rather than just interface functions. The
device were often not yet ready to respond to the next interface
message after the IFC period was over.)
If the National Instruments GPIB code has errors on two
transactions in a row, the GPIB device is reset by closing and
reopening the /dev/gpib0 (or whatever is configured)
special file. If this feature causes more problems then it
solves, inform CSS immediately so we may begin work on
alternatives.
Use of the ser_get() function to read RS-232C
devices has been changed to increase its flexibility. See the
serial help file for details.
spec used to silently enforce a rule that
only one GPIB controller, MCA or timer was allowed at a time. A
message is now printed if the config file requests more
than one GPIB controller, CAMAC controller, timer or MCA. The
first device of each type encountered in the config file
is the one that will be used.
Now that scaler numbers are assigned in the config
file, it is possible to configure more than one type of scaler
device at a time. Each scaler should use hardware gating from
the master timer. Software gating does take place, although
there can be substantial latency between receipt of the time-
complete signal from the master timer and disabling of the
scalers. Note also that for a number of combined timer/counter
units, the scaler assignment for the seconds and monitor channel
are hard coded into spec.
For versions of spec on most platforms,
memory is allocated for the maximum number of motors (and
scalers) at program startup, so that it is no longer necessary to
restart the program to increase the number of motors (or scalers)
after editing the config file.
UTILITIES
A stand-alone version of the C-PLOT
scans.4 user function, called scans, is now
provided for extracting a data set from a spec
data file. See the README file in the aux
subdirectory of the distribution.
ADMINISTRATION
Version 2.14 has a new installation procedure, that is based
on the new Install script in the distribution directory.
A README file explains the use of the script.
The CAMAC drivers on all systems should be replaced with the
new versions in the drivers subdirectory of the
distribution. Versions of spec prior to version
2.14 should work with the new drivers, but spec
2.14 will not work with old versions of the drivers. Changes to
the drivers are as follows: The new drivers can be configured at
run time for the signal to send to the user process when a LAM is
generated. The Q and X response of each dataway transaction is
now communicated by the driver to the user process in a way that
does not depend on which CAMAC controller is installed.
The camac.h include file has been revised to
accommodate CAMAC drivers on BSD 4.3 and ULTRIX operating systems
and to include added functionality. The copy of camac.h
in the directory /usr/include will be updated
automatically if you install the new CAMAC driver.
On System V/386 systems, a new nap driver is included
that performs fractional second sleeps. Run the shell script
install_nap in the drivers subdirectory as super
user to perform the installation.
The GPIB driver for the National Instruments PCII board for
the VENIX 286 system must be replaced with the new version of the
driver in this release. Run the script install_gpib in
the drivers subdirectory as super user to perform the
installation.
Another command file can be automatically read on startup.
This file is named site.mac and resides in the auxiliary
file directory (SPEC) as, for example,
/usr/lib/spec.d/site.mac. If this file exists, it will be
read every time a user starts the program, not just when starting
fresh. The site.mac file is also read when the
newmac macro is run.
More work has been done on the edconf program. In
particular, if you exit before saving any changes, you will be
asked to confirm whether you really want to quit. Also, there is
now a fourth screen used to configure scaler assignments. The
number of configurable scalers on the devices screen has been
increased to three. The CAMAC slot assignments in the
config file now begin with CA_ rather than
C_, as in the old versions. The old format is still
recognized on reading, but the new form will be written out.
Arrow key sequences are now read from the terminal capability
data base, and so edconf can be used with arrow keys on
non-vt100-compatible terminals. In addition the vi
hjkl motion keys are now recognized.
The hardware support in spec has been
completely modularized. The u_hdw.c file contains a
simplified hook mechanism to select the installed hardware. All
other references to a particular hardware device are now
contained in a single source file, allowing sites to add support
for new devices, without requiring access to the complete source
code. (At present the edconf program cannot be changed at
site to add new hardware types.)
When spec starts out it executes a call to
nice(-20). This call raises the priority of the
process, but only when being run by root or if the process is
owned by root and has set-user-id execute mode set. After
raising the priority, spec resets the effective
user and group ids to that of the real user, so there is no
danger of the user spawning subshells or creating files as root.
If spec is not set-user-id root, it will behave
as before.
If the settings file can't be opened for writing when
spec starts up, or if there are read or write
errors accessing that file, spec switches to
simulate mode and suggests the user get assistance.
MISCELLANEOUS
spec is now available for the IBM PS/2
running the AIX 1.2 operating system. CAMAC support is currently
only through a Kinetic Systems 3988 GPIB-to-CAMAC crate
controller.
spec is now available for DEC MicroVax
computers running ULTRIX or UCB operating systems. CAMAC drivers
are available for either the Kinetic Systems 3912 or DSP DCC-11
crate controllers.
spec is now available for SCO Xenix 286
2.2.3 and SCO Xenix 2.3.2 operating systems. (Use on a 286
platform is discouraged, though.)
The motor number indirection array mA[] is now
reinitialized when the config macro is invoked,
using the _assign macro that is defined in each
geometry's standard macro file. Thus, if motor numbers are
reassigned while editing the config file, the macros that
list motors in specific order (wa, wh,
...) will still list the motors in the same order after
_assign is run.
The print command with no arguments will now
print a newline. In previous versions, such usage was reported
as a syntax error.
The number of command files that may be queued for reading
has been increased from five to eight.
BUG FIXES
A design flaw, introduced in version 2.11, and having to do
with reads of the motor controller registers, has been corrected.
The problem was that spec could lose track of
motor positions if the motor controller registers were changed
using a remote control pod, or if they were cleared due to loss
of power, while spec was running. If any of the
commands that read the controller registers
(getangles) or changed the settings file
(chg_dial(), chg_offset()), were
executed before executing a sync command, the motor
positions would likely have gotten scrambled.
A bug, whereby the results calculated using the background
subtraction feature were incorrect, has been fixed.
All motor mnemonics are now freed when executing the
reconfig command and then reestablished on rereading
of the config file. Previously, a motor mnemonic, not
used in the geometry code, that was removed from the
config file would remain as an immutable symbol until you
ran spec with the -f flag for a fresh
start.
A bug where motor control would hang when trying to start a
motor on a Joerger SMC motor controller that had both limits open
has been fixed.
A bug with the TS201 timer/counter where LAMs would sometimes
be lost during updated counting has been fixed.
A bug with the TS201 timer/counter where readings of certain
count times (30 seconds, for example) would indicate the wrong
period (although the period over which the module counted was
correct) has been fixed.
A bug where values assigned to variables declared
local within a statement block sometimes affected
variables of the same name outside the statement block has been
fixed.
A potential bug where defining a macro recursively would
cause a program crash has been fixed by limiting the amount of
input push back to 64 Kbytes. (This limit is arbitrary and can
be increased by CSS if found to be too low.)
A bug where log file names containing a slash were not
treated as log files has been fixed.
An old bug, where reference to the string constant and then a
number constant of the same value, particularly with a value of
zero, would cause unexpected results, has been fixed. In
previous versions, the code:
|