changes

highlights of modifications for spec release 4.05

RELEASE 4.05.10-4

These notes summarize the cumulative changes made for spec release 4.05.10-4 as of November 6, 2000.

PCA-3/PCA-Multiport MCS-Mode Fix

A bug, dating from the original 1993 version of the code, where the number-of-passes preset in multi-channel scaling (MCS) mode was not set correctly, has been fixed.

RELEASE 4.05.10-3

These notes summarize the cumulative changes made for spec release 4.05.10-3 as of October 29, 2000.

New Home Option For chg_dial()

The chg_dial() function for motors now takes an optional third argument when used with the home-search options. If present, the value of the third argument is used to set the motor's dial position when the home or limit position is reached. (A home-search is initiated on motors that support them when the second argument to chg_dial() is "home", "home+", "home-", "lim+" or "lim-".) The home macro now also takes an optional third argument, which, if present, is the dial position to use with chg_dial().

Home Commands Implmented For OMS Controllers

spec now implements home commands for the Oregon Microsystems motor controllers. See the oms help file for details.

RELEASE 4.05.10-2

These notes summarize the cumulative changes made for spec release 4.05.10-2 as of October 25, 2000.

New Binary Output Options For ser_put() and gpib_put()

The ser_put() and gpib_put() functions can now take a data array as the second argument. The binary values in the array will be output. By default, the entire array (or subarray, if specified) will be sent. An optional third argument can be used to specify the number of array elements to send. For short and long integer arrays, the data will be sent using native byte order. The "swap" option of the array_op() function can be used to change the byte order, if necessary. For the typical string-valued second arguments, an optional third argument would specify how many bytes to write.

New String-To-Data-Array Assignment Implemented

It is now possible to assign strings to any type of data array. The ASCII value of each character in the string is assigned to successive elements of the array. Only as many characters of the string as will fit in one row of the array will be assigned. The null byte at the end of the string is not assigned.

New Options For image_par() and Fix For image_get()

Three new options are available for image_par(). The "info" option prints the native data type, the number of rows and columns, the current binning values and the current region-of-interest values. The "bin" option can be used to set row- and column-binning to the same value. When used to get a value, it returns the current binning if row- and column-binning are the same, or -1 if they are different. The "roi" option can be used to set all four region-of-interest values in one call. The values should be given in the order: beginning row, ending row, beginning column, ending column. Also, an oversight in the code for image_get() that prevented sub-array arguments to work properly has been remedied.

Small Problem Fixed For Ortec Counters

A problem with the Ortec NIM-bin counters, where the "display" option of counter_par() (used to read the number of the channel being displayed) could cause a segmentation fault when used with certain versions of the National Instrument GPIB driver, has been corrected.

RELEASE 4.05.10-1

These notes summarize the cumulative changes made for spec release 4.05.10-1 as of September 28, 2000.

Fix To Restore Tty State When spec Is Killed

If spec is linked with the readline library, then the readline input routine changes the tty modes, including turning off echo. Previously, spec did not restore the tty state changed by readline when killed via a SIGQUIT or SIGTERM signal sent by another process. That problem has been fixed.

More Multiplexors Allowed With CAMAC E500 Motor Controller

Support for the homemade multiplexor used with the CAMAC E500 motor controllers has been modified to allow up to three of the 16-motor multiplexors to be run from the same E500 channel. Contact CSS for details.

RELEASE 4.05.10

These notes summarize the cumulative changes made for spec release 4.05.10 as of September 27, 2000.

Support For Burleigh 6200ULN Inchworm Controller

The Burleigh 6200ULN Inchworm motor controller is now supported over the Burleigh 671 ISA PC-card interface. See the burleigh help file for details.

New em_io() Function For SPring-8

The new built-in function em_io() is available when spec is linked with the SPring-8 Equipment Manager RPC-based hardware support. See the new equipman help file for details.

Support For NI GPIB-ENET on Linux

spec now supports configuration of the National Instruments GPIB-ENET hardware on The NI software and the Linux system must first be configured correctly. spec must also be linked with the cib.o file included with the NI distribution.

Support For FAST ComTec MCD/PC Board MCA

Initial support for the FAST ComTec MCD/PC Board MCA is now included with spec. The MCA communicates using a PC parallel port.

Bug Fix For Rigaku Controllers

A bug in the code for the Rigaku RINT-2000 motor controllers, where moves of the AC/DC motors used to control the sample changers, slits, etc., caused problems such as read timeouts on subsequent commands, has been fixed.

RELEASE 4.05.09-6

These notes summarize the cumulative changes made for spec release 4.05.09-6 as of August 27, 2000.

New Calculations For kappa and psic Geometries

A calc() function is now available in the kappa and psic geometries to calculate pseudomotor positions from real motor positions and vice versa. The macro calcP_fromR is defined as calc(8, 0) and fills in the pseudomotor positions A[] array with angles calculated from the real motors values in A[]. The macro calcR_fromP is defined as calc(8, 1) and calculates real motor positions from the pseudomotor positions.

New Error Behavior For kappa Geometry

The kappa geometry code has been revised to no longer return to the main prompt in the event of an error associated with the reciprocal space calculations. Instead, the calc() functions underlying the definitions of calcHKL, calcA, etc., return a nonzero value on errors. The code for the other geometries will be modified similarly in the near future.

RELEASE 4.05.09-5

These notes summarize the cumulative changes made for spec release 4.05.09-5 as of August 6, 2000.

Support For the JVL Motor Controller

The JVL Industri Elektronik (Denmark) Model SMI20-B stepper motor indexer is now supported.

Tsuji Motor Controller Support Expanded

spec now supports the Tsuji Electronics (Japan) new model PM16C-04 motor controller. In addition, the ethernet interface, available on both the -02 and -04 models, is now also supported (in addition to the already supported GPIB and RS-232C interfaces).

Phytron Motor Controller Initialization Changed

spec now uses a more robust scheme for insuring the Phytron parameters are set correctly.

RELEASE 4.05.09-4

These notes summarize the cumulative changes made for spec release 4.05.09-4 as of July 6, 2000.

Old edconf Bug Fixed

An old and rarely seen bug that caused the configuration editor edconf to core dump upon failure of a terminal data-base library call has been fixed.

RELEASE 4.05.09-3

These notes summarize the cumulative changes made for spec release 4.05.09-3 as of July 5, 2000.

New Option For Motor slop Parameter

Normally, if the optional motor parameter slop is set, spec silently resolves discrepancies between the hardware motor reading and spec in favor of the hardware. Now, if the slop parameter is set to a negative number of steps, spec resolves discrepancies smaller than the absolute number of steps in favor of spec's position by modifying the hardware position register.

RELEASE 4.05.09-2

These notes summarize the cumulative changes made for spec release 4.05.09-2 as of June 16, 2000.

Internal Bookkeeping Bug Fixed With array_op("swap")

An old bug where twenty calls of array_op() with the "swap" argument within the same statement block would result in an "Out of temporary cells" message has been fixed.

RELEASE 4.05.09-1

These notes summarize the cumulative changes made for spec release 4.05.09-1 as of June 13, 2000.

Compumotor SX Controller Support Updated

The spec code for the Compumotor SX Indexer has been updated to work properly with encoderless motor configurations.

RELEASE 4.05.09

These notes summarize the cumulative changes made for spec release 4.05.09 as of June 7, 2000.

The gpib_get() Function Can Read More

The gpib_get() function can now read up to 8,192 bytes. The previous limit was 512 bytes.

Associative Arrays Can Now Be Assigned

spec now allows associative arrays to be assigned to and to be returned by macro functions. When an existing associative array is assigned to, all previous elements of the array are deleted.

The dcb() Function Is Upgraded To 32 Bits

The little-used dcb() function that returns the decimal equivalent of its binary-coded-decimal argument now handles 32-bit arguments. Prior behavior was to limit arguments to 24 bits, dating from the old CAMAC days.

ESRF CCD Support Updated

This spec release includes the current ESRF CCD camera built-in support.

RELEASE 4.05.08-7

These notes summarize the cumulative changes made for spec release 4.05.08-7 as of May 10, 2000.

New cdef'ed user_Fheader and user_Pheader Macros

New macros called user_Fheader and user_Pheader are included in the standard _head macro. They are designed as hooks for users to insert commands to print to the data file and printer, respectively. Unlike the traditional Fheader and Pheader macros, these new macros are to be maintained using the chained-macro function cdef(), so that portions of the definitions can be selectively added and removed.

Motor and Counter Mnemonics Checked

Previously, neither the spec executable nor the edconf hardware configuration editor checked whether motor and counter mnemonics contained disallowed characters. Mnemonics containing disallowed characters are now rejected.

NT-2400 Bug Fix

An old bug in the code for the LEC NT-2400 motor controller, where the config file backlash parameter was used as the base-rate parameter, has been fixed.

New Command to Set DXP Gate Behavior

The external gate on the the XIA DXP modules can now be enabled. See the dxp help file for details.

Sleeping Message Cleared in do_sleep

The do_sleep macro now clears the last "Sleeping 1" message from the screen after the sleep has finished.

RELEASE 4.05.08-6

These notes summarize the cumulative changes made for spec release 4.05.08-6 as of April 19, 2000.

PAGER Detection Fixed (Again)

Another bug that prevented proper detection of the version of less and subsequent assignment of the proper string to the PAGER variable has been fixed. Symptoms appeared on platforms with version 332 or earlier of the less utility.

RELEASE 4.05.08-5

These notes summarize the cumulative changes made for spec release 4.05.08-5 as of April 15, 2000.

Minor Improvements For sock_io()

spec now sets the SO_KEEPALIVE socket option on all sockets created by sock_io(). Also, the host name part of the hostname:port argument no longer has to be an actual host name for a socket opened in "listen" mode. The host name part can now be any string and is used only to identify the connection for subsequent sock_io() calls. Also, for sockets opened in "listen" mode, spec now sets the SO_REUSEADDR socket option, which does away with the several minute delay often observed to be needed before a socket could be reopened for listening after a spec restart.

RELEASE 4.05.08-4

These notes summarize the cumulative changes made for spec release 4.05.08-4 as of April 13, 2000.

Fixes For Multiple VME Controllers

On-site testing revealed a few minor bugs that prevented a second VME controller from completely working correctly. Those bugs have been fixed.

RELEASE 4.05.08-3

These notes summarize the cumulative changes made for spec release 4.05.08-3 as of April 3, 2000.

Local Associative Array Bug Fixed

A problem with local associative arrays declared within macro functions that are called more than once within a statement block has been fixed. Previously, the commands print, for (var in arr) and if (var in arr) would show any associative array elements previously referred to in prior calls to the macro during execution of the surrounding statement blocks. Although the elements shouldn't have been recalled at all, they would be recalled with a number value of zero, or a string value of the null string. Now any previously used array elements will not be included in the array commands above, unless, of course, they have been set within the current macro function invocation.

sock_io() Bug Fixed

A bug introduced in spec release 4.05.05, where the implicit newline end-of-string character was often not recognized during a sock_io() "read", has been fixed.

POLL Option For Software Timer For Buggy Sun

The software timer on Solaris platforms in spec versions built using threads has a new implementation to work around operating system bugs. The software timer can now be configured as INTR or POLL mode in the configuration editor. When in INTR mode on Solaris with threads, only integral counts times are allowed. In POLL mode, any count time is allowed, but accuracy in count times is sacrificed. Note, POLL mode can be selected on any platform, but should not be, due to the accuracy problem.

Small edconf Bug Fixed

An old and insignificant bug in the configuration editor, where the display of the user position with non-zero offset did not update correctly on the screen when the step-size parameter was changed, has been fixed.

ESRF TACO MAXE Bug Fixed

A small bug in the code for the ESRF TACO MAXE device server for motors with encoders, where the values were truncated rather than rounded to integers when converting from encoder reading to motor position, has been fixed.

RELEASE 4.05.08-2

These notes summarize the cumulative changes made for spec release 4.05.08-2 as of March 30, 2000.

Support For SPring-8 Equipment Manager RPC-based Counters

Prelimiary support for the counter/timers built and used at the SPring-8 synchrotron in Japan is now included in spec.

RELEASE 4.05.08-1

These notes summarize the cumulative changes made for spec release 4.05.08-1 as of March 17, 2000.

sock_io() Fix For HP Platform

A bug, which prevented the "listen" mode of the sock_io() function from working on HP platforms, has been fixed.

RELEASE 4.05.08

These notes summarize the cumulative changes made for spec release 4.05.08 as of March 9, 2000.

Fixed Some Old Input Parsing Problems

A very old problem related to using a backslash \ to continue a line or to escape a space or tab character on input has been fixed. The problem only occurred when typing arguments to a macro, where the macro definition referred to the arguments by argument number ($1, $2, etc.).

psic Geometry Fixes

Several more numerical problems in the calculations for certain psic geometry modes have been fixed.

Bit-3 Linux Drivers Now Supported

spec now supports use of the SBS Bit-3 PCI-to-VME adapters on Linux using the drivers provided by SBS Bit-3. Note, currently the SBS driver is known to work only on Red Hat 6.0 and 6.1 systems.

Phytron IXE-A Motor Controllers Supported

The Phytron IXE-A motor controllers work very similarly to the IXE-C controllers that spec already supports. However, the IXE-A controllers require a multiplier factor for time-related quantities, such as motor speed and acceleration. spec now includes that factor. The controller type is detected automatically from the version string returned by the instrument.

Home Search Added For Tsuji PMC-16C Controllers

spec now supports home search on the Tsuji PMC-16C Motor controllers.

Recently Introduced OMS VME-58 Bug Fixed

A bug, introduced in the recent VME modification for spec release 4.05.06-2 and that made the Oregon Micro Systems VME-58 unusable, has been fixed.

RELEASE 4.05.07-1

These notes summarize the cumulative changes made for spec release 4.05.07-1 as of February 25, 2000.

KS-3929 SCSI-To-CAMAC Now Supported On Linux

The Kinetic Systems 3929 SCSI-to-CAMAC controller is now supported on Linux platforms.

Clarified Error Message With I/O Port Access

Previously, if no I/O ports were configured, access with the port_get() and port_put() functions would neither access the given port nor produce an error message. spec now prints the missing error message.

RELEASE 4.05.07

These notes summarize the cumulative changes made for spec release 4.05.07 as of February 23, 2000.

wiz_passwd Improved

The wiz_passwd utility, used to make changes to the spec_wiz password, now prints an error message and exits immediately if the user doesn't have permission to write the SPECD/passwd file. Also, the super user no longer needs to enter the current spec_wiz password in order to change it.

Warning In gethelp() When PAGER Is Bad

If the program assigned to the PAGER variable returns an error code, spec now prints an explanatory error message that suggests what the the user should do to view the spec help files.

Linux Drivers Adapted For Greater Range Of Kernel Versions

The spec kernel-level drivers for Linux now compile and install on a wider range of kernel versions. Note, for most installations, the Linux kernel-level drivers aren't required, as spec offers user-level support for the specific hardware involved.

Support For Compumotor AX Motor Controllers

The old Compumotor AX motor controller is now supported.

Support For PMC Corporation DCX-100 Motor Controllers

The PMC Corporation DCX-100 motor controllers are supported in a number of configurations as both PC boards and as RS-232C devices. These boards are used as OEM components in motor controllers made by Dynaoptic Motion.

Support For Pacific Scientific MA-6420 Motor Controllers

The Pacific Scientific model MA-6420 motor controller is now supported over the RS-232C interface.

Support For SCIPE Detectors

The SCIPE detectors, as used at the APS DND CAT, are now supported.

RELEASE 4.05.06-3

These notes summarize the cumulative changes made for spec release 4.05.06-3 as of February 4, 2000.

Bug In Presence Test For SBS Bit-3 On HP and Sun

A bug, associated with the new feature which allows multiple VME controllers and that prevented spec from working with the SBS Bit-3 drivers on HP and Sun platforms, has been fixed.

Bug With Joerger VME Scaler Fixed

Another bug, associated with the recent VME changes and that resulted in a segmentation fault when counting using the Joerger VSC16/8 VME scaler, has been fixed.

RELEASE 4.05.06-2

These notes summarize the cumulative changes made for spec release 4.05.06-2 as of January 18, 2000.

Bug In sscanf() Function Fixed

An old bug in spec's sscanf() function, where the "Out of temporary cells" error message would appear if too many data-array items were given as arguments, has been fixed.

RELEASE 4.05.06

These notes summarize the cumulative changes made for spec release 4.05.06 as of January 5, 2000.

Multiple VME Controllers Allowed

It is now possible to have more than one VME controller in use simultaneously. In the configuration editor, use ^F and ^B to display additional entries on the interfaces screen for the up-to-four controllers. The default controller is controller zero. To specify VME addresses for motor controllers and counters that use the additional VME controllers, enter the address in the configuration as the controller number followed by a colon and the module address, as in 2:0xfc00 for a module using VME controller number 2 at address 0xfc00. For the user-level functions vme_get(), vme_put() and vme_move() use the same notation as above for entering the controller unit number. Note, though, the address arguments will have to be passed as strings, as in vme_put("2:0xFE00", 0x12). Note also, the CSS bit3.o driver used on Linux systems still only supports one 616/7/8 module. CSS awaits the imminent release of the SBS Bit-3 driver for Linux, which will support multiple modules.

Support For the Orsim MCA 7700 Included

Initial support for the Seiko EG&G Ortec model Orsim MCA 7700 is included with this release of spec. Both the ethernet and GPIB interfaces on the MCA are supported.

Support For Meteor Frame Grabber On Linux Updated

The support for the Matrox Meteor PCI frame grabber card has been improved. See the meteor help file for details of the current functionality.

Updates For XIA DXP MCA CAMAC Modules

The code for the XIA DXP MCA CAMAC modules has been updated. spec now includes the XIA library functions in the spec distribution. It is no longer necessary to enter the names of the XIA object files during installation. Several bugs in the XIA library have been fixed, allowing new DXP configuration files to be loaded without restarting spec. See the dxp help file for information.

Presence Test For Jorway 73A Improved

The presence test for the Jorway 73A SCSI-to-CAMAC module previously gave false positives. That behavior has been corrected.

Workaround For EPICS Motor Record RES Not Posting

Previously, spec had been monitoring the RES process variable, intending to handle motors with and without encoders in a simple way. That was ineffective as changes to RES are in fact not posted by the EPICS motor record. spec now instead monitors both MRES and ERES and fetches the new RES value when either of the two change.

Typo In psic.src Fixed

The definitions for the F_QAZ and F_NAZ macros were reversed and have been corrected.

Old Bug With sleep() Fixed

A bug, where the deprecated use of sleep() with a negative integer argument (for the number of clock ticks) resulted in a pause for the time specified by the argument, followed by a pause of random (perhaps very long) duration, has been fixed. Use of negative arguments is still deprecated - use fractional arguments to specify sleep times of sub-second precision.

Bug With PAGER Detection Fixed

The check in the start-up command files that assigns a default value to the new PAGER variable introduced in spec release 4.05.02 contained a number of errors, making the check useless. The commands have been fixed.

Bug Fix For Wizard Mode

A bug introduced in release 4.05.04, where the spec_par("specwiz", 1) function that prompts for the spec wizard password was broken, has been fixed.

Bug Fix For ca_cntl()

A bug, where the ca_cntl() function was completely ineffective in sending the "init" (or "Z") and "clear" (or "C") commands, has been fixed. The bug has been present since ca_cntl() was introduced in spec release 3.02.01 (ca. 1995).

RELEASE 4.05.05

These notes summarize the cumulative changes made for spec release 4.05.05 as of November 8, 1999.

Number Of Motors Increased From 99 to 160

The built-in limit on the number of configured motors has been increased from 99 to 160. Note, this limit is not a fundamental constraint. If there are sites that require more than 160, please contact CSS - the limit can be easily raised. Eventually, the artificial limit on the number of motors will be removed altogether.

New EOS Option For Socket Reads

The "read" mode of the sock_io() function now accepts an optional end-of-string (EOS) argument. If present, characters will be read from the socket until either characters that match the EOS arrive or the read timeout expires. See the sock_io help file for details.

Minor Bug Fix For Riso ECB Controller

A bug, where the message displayed on ECB-motor hardware errors was slightly garbled, has been fixed.

RELEASE 4.05.04

These notes summarize the cumulative changes made for spec release 4.05.04 as of October 14, 1999.

Contents of A[] and S[] Restored On Start Up

The contents of the motor position array A[] and scaler value array S[] are now restored from the state file on start up, as was the case prior to release 4.04.01.

Debug Level Changes Can Take Effect Within Statement Blocks

Values assigned to the debug variable DEBUG now take affect immediately. Previously, the level of the debugging messages would only reflect changes to DEBUG after a return to the main interactive prompt.

Better Input Processing While Reading Strings From Keyboard

The character processing done when the keyboard is read for the input(), yesno() and getval() functions now handles the special erase, kill and EOF characters consistently, with both backspace and delete recognized as erase characters.

Raw Mode Turned Off On Exit

spec now makes sure terminal raw mode is turned off when exiting. Previously, if spec exited via a quit or terminate signal while still in raw mode (as from an input(0) call), raw mode did not get turned off.

$$ Recognized As Documented

The spec manual has long documented that $$ would produce a single $ in a macro. That behavior is now implemented.

Behavior Of FRESH Variable Modified

The FRESH variable introduced in release 4.04.05 is still nonzero while reading the start-up command files and executing the start-up macros if spec is starting fresh, but its value is reset to zero before the first main interactive prompt. That insures the start-up macro files that do initializations using if (FRESH) will not do the initializations (possibly resetting parameter values already modified by the user) if the macro files are read a second time.

Optional Type Argument For epics_get()

The EPICS-related function epics_get() can now take a second argument to specify what type of data to retrieve via channel access. Such a feature may be useful when a number value for a process variable of type ENUM is needed, as otherwise the string value is returned. See the epics help file for details.

Generic Serial Device Support Through EPICS Available

spec now supports the EPICS generic serial record. Thus, the EPICS serial record can be selected for use with spec's generic ser_get() and ser_put() functions. In addition, any motor controller, timer/counter, etc. which runs over a serial interface for which spec already has built-in code can be configured to use the EPICS generic serial record.

RELEASE 4.05.03

These notes summarize the cumulative changes made for spec release 4.05.03 as of September 20, 1999.

Recent Bug in port_get()/port_put() Functions Fixed

A bug, introduced in release 4.05.01, which resulted in segmentation violations if the functions port_get(), port_get2(), port_put() or port_put2() were called, has been fixed.

Some Minor Enhancements To Install Program

The install_data file, which contains the site-dependent installation parameters, is now used as dependency for u_hdw.o and u_hook.o in the make-file, to help insure that spec gets rebuilt when the installation specifications are changed. Also, the get_opts program now accepts a ^D command to jump out of the specifications queries at any time.

Fixes For Stand-Alone Help Utility

The stand-alone help utility chelp will no longer change tty modes if the output is to a file or a pipe, and will no longer include the character sequences that indicate highlighted text if output is to a file.

The gpset Comments No Longer Are Written To Screen

The standard gpset macro that documents changes to geometry parameters no longer prints messages to the screen, but does still write comments to the data file if one is opened and to the printer if one is configured.

Additional Standard Macro File For surf Geometries

In order to allow multiple versions of the surf geometry to exist in the same installation directory, spec now recognizes an additional standard macro file with a name of the form conf/conf4.mac (where conf is the name by which spec was invoked and conf4 is the first four letters of that name.

Further Developments For the psic Geometry

Further work on the psic geometry includes the following: The cut points for all the diffractometer angles can now be set by the user. A preliminary implementation of sector transformations is available. Also, the first draft of the psic help file is included.

Support Non-encoder Version of IMS Motor Controller

The initial version of the code for the Intelligent Motion Systems motor controllers assumed use of an encoder. Users can now choose IMS or IMS_E in the configuration editor to select whether particular motor channels have encoders available. The difference in the code is whether the current position is read back from the IMS module with a z or a Z command.

Workaround Implemented For OMS Firmware Limit Bug

A workaround for an OMS motor controller firmware bug that prevented a clean recovery after hitting a limit switch is included. After hitting a hardware limit, the first command spec would send to move to a position in the opposite direction did not always work. The workaround is to explicitly send a command to move in the opposite direction, then to send the command to move to the specific position.

Support For a Channel Multiplexor With OMS Motor Controllers

Preliminary support for a one-to-sixteen channel multiplexor is now included with the OMS motor controller support. Contact CSS for implementation details.

Support For SPring-8 Equipment Manager RPC-based Motors

A motor controller built and used at the SPring-8 synchrotron in Japan is now supported in spec.

New spec_par() Option To Set Default EPICS Timeouts

The default timeout for the EPICS channel access ca_pend_io() call can now be set using spec_par(). See the epics and spec_par help files for details.

RELEASE 4.05.02

These notes summarize the cumulative changes made for spec release 4.05.02 as of July 11, 1999.

Modified _updateHKL Macro

The _updateHKL macro, used by the ubr and umk macros to display the updated position of motors and reciprocal space position during moves, has been modified to print as many of the diffractometer motors as is possible to fit in the width of the screen. Previously, no more than five motors were shown.

New user_scan_tail Hook In Standard Macros

The standard _tail macro, called at the end of each scan, now includes a call of user_scan_tail, which local users can define to perform special actions at the end of scans. By default, user_scan_tail is defined as an empty macro using cdef().

Fix For Certain GPIB Driver and Motor Controller Combinations

A problem with internal buffer overruns with certain motor controllers when used with some GPIB drivers has been fixed. Affected motor controllers include the Huber SMC 9000, the Newport/Microcontrole ITL09 and MM2500, the Advanced Control Systems MCB, the custom controller MMC-32 used at NSLS and the custom MURR controller used at the Missouri Research reactor. The National Instruments GPIB driver version for Linux was confirmed to exhibit the behavior, although other drivers may behave similarly. Symptoms of buffer overruns often appear as random crashes or unexpectedly flaky behavior in the software.

RELEASE 4.05.01

These notes summarize the cumulative changes made for spec release 4.05.01 as of June 13, 1999.

New Go-To Feature For Command Files

The dofile() and qdofile() functions, used by the do and qdo macros, now take an additional optional argument to specify a starting line in the command file. If the argument is an integer, the number specifies at which line to start reading the file. (Currently, only positive integers are allowed.) If the argument is anything else, it is considered a search string, and text is read from the file starting at the first line containing that search string. The metacharacters *, which matches any string, and ?, which matches any single character, are allowed in the search string. Initial and trailing white space is ignored in the file.

New Option To Keep Going After An Error In a Command File

You can now tell spec to keep reading and executing commands from a command file no matter what errors occur. The new "keep_going" option to spec_par(), if set, will tell spec not to return to command level and the main interactive prompt on any type of error. Instead, the next line from the current command file will be read. Note, depending on where the error is in a file, reading subsequent lines may generate more errors, particularly if the error occurs inside a statement block.

New Error Recovery Options For GPIB and Other I/O

It is now possible to arrange that various hardware errors will not cause spec to reset to command level. If the variable HDW_ERR exists, it will be assigned a hardware error number, currently defined as follows:

1 - Generic error
2 - GPIB no listener
3 - Timeout
4 - A non-fatal error
5 - Function called with bad argument
6 - Trying to access unconfigured hardware
7 - Function called with bad address

If the value of HDW_ERR is -1 before the call to the user-level hardware access function, no reset to command level will take place for any errors. Otherwise, traditionally fatal errors (all errors other than timeouts or the explicitly "non-fatal" errors) will still be fatal. The following functions currently may set HDW_ERR: ca_get(), ca_put(), gpib_get(), gpib_put(), gpib_poll(), gpib_cntl(), port_get(), port_getw(), port_put(), port_putw(), ser_get() and ser_put().

New show_state Utility

A new utility called show_state that can display the more interesting contents of the saved state files (command history, variable assignments and macro definitions) is available. Note, the state file is only updated when a spec session is terminated or the user types the savstate command. The utility is designed to be able to read state files from all platforms, regardless of native byte order. Type show_state - to see usage options.

Backwards Compatibility For Previous State File Versions

spec will now try to maintain a measure of compatibility with prior versions of the saved state files, such that updates to new releases of spec will less often require a fresh start.

New Option For Error-Log Files

A new kind of log file is available that records typed commands, error messages and optional time stamps. The file is intended to be useful to administrators trying to diagnose user problems. A file opened for output named elog or that ends in .elog is such a file. Commands entered at the spec prompt are logged prefixed by a #C. Error messages produced by the built-in C code, or generated by the new eprint or eprintf() built-in keywords (described below), are logged prefixed by a #E. If time stamps are enabled (via the new spec_par() option described below), the UNIX epoch and the corresponding date string are logged (at the time-stamp interval) prefixed by a #T.

New eprint and eprintf() Built-In Commands

A built-in command eprint and built-in function eprintf() are available that can be used with the new error-log files. The behavior is exactly the same as print and printf(), respectively, except that if an error-log file is open, the generated strings will also be written to that file, in addition to any other files or devices turned on for output, as usual. The strings written to the error-log files will be prefixed with the #E characters. If the error message is more than one line, only the first line will have the special prefix.

Macros Revised To Use eprint and eprintf()

Most (but not yet all) of the standard macros have been modified to use the new eprint and eprintf() output commands for printing error messages. There is no difference in behavior, except that if an error-log file is open and turned-on, the error messages will also be logged to that file.

New "elog_timestamp" Option For spec_par()

The time interval for the optional time stamps for the new error-log file capability is set using the spec_par("elog_timestamp", value) where the units of value are minutes. The default value is 5 minutes. Note, time stamps are only added before a command or error message is logged, so that the interval between time stamps can be greater than that specified if no commands are being typed or errors generated.

New array_op() Option To Tag Shared-Array Type

Shared arrays can be tagged with a type that will be available to other processes accessing the array. Usage is array_op("tag", arr, arg) where arr is the array and arg is "mca", "image", "scan" or "info". Use array_op("untag", arr) to remove the tag information.

New array_op() Option To Swap Bytes

The command array_op("swap", arr) will swap the bytes of the array arr. The command can change big-endian short- or long-integer data to little-endian and vice versa. For most built-in data collection, spec automatically swaps bytes as appropriate, but this new function is available for other cases that may come up.

New Option To Set Help File Pager Program

spec will now examine the environment variables SPEC_PAGER and PAGER, in turn, to obtain the name of a program to use for paging through spec help files. Such a program can be an alternative to spec's built-in paging code, allowing searching and line-by-line perusal. A new built-in variable PAGER can be also be assigned to directly, overriding the environment variables. If a version of less greater than version 332 is installed on the spec platform, the standard macros will assign the PAGER variable a string that invokes the less utility with some special flags if the PAGER variable is otherwise unset.

New motor_par() Options To Retrieve config File Values

New options to the motor_par() function, "config_step_size", "config_acceleration", "config_velocity", "config_base_rate" and "config_backlash", return the values for the associated parameters as were originally read from the config file. Such a feature might be useful for restoring these values after macros had made some changes for a particular scan.

Warning Message On Moving Motors With Wizard Powers Suppressed

The warning printed when motors are moved using wizard powers has been turned into a debugging message printed when the warning-message debug level is turned on.

Warning Message On Output Left On Suppressed

The warning messages about output files being left on after errors has been eliminated as it seemed to confuse some users.

Scan Header Warns If No Data File Open

The scan header information printed to the screen with the standard macros now warns that no data files is open if the DATAFILE variable have either the value "null" or "/dev/null".

Bug In Optional Read Mode For Motors Fixed

A bug, where the new feature introduced with release 4.04.01 that allowed control of when motor position-register were read by spec by selecting a read mode on the optional motor configuration screen of the configuration editor didn't have actually have any effect, has been fixed.

Bug In Contents Display In scans.4.c Fixed

A recently introduced bug in the data file contents displayed with the contents utility and the scans.4 C-PLOT user function, where the month was off by one, has been fixed.

Improved External Signal Handling

When the spec process is sent a SIGINT signal from another process while the spec process is waiting for user input in the readline library routines, spec now does complete ^C-type processing. Previously, moving, counting and other acquisition would be aborted, but the other ^C-type processing, such as executing cleanup macros or closing output files would not be done.

Linux Drivers Updated For 2.2.x Kernels

The four kernel drivers pca.c, bit3.c, dsp.c and pio.c that are sometimes used with spec have been modified to be compatible with the Linux 2.2.x series kernels.

Fixes For Newport PM500 Motor Controller

Some fixes in the code supporting the Newport PM500 motor controller are included.

New CCD Support in ESRF Distribution

Some new CCD device support is included in the ESRF version of spec.

Fixes For psic Geometry

A number of fixes in the geometry calculations for the new psic geometry are included. More fixes are expected in the future.

Updates To surf Geometries

A new CMC configuration is included for the surf geometry for the diffractometer to be installed at the CMC CAT at the APS.

New Support for Opaque Data Type In esrf_io()

The "opaque" data type is now supported by the esrf_io() function, but only in transferring data to spec and only to the data-type array variables. One must be sure to declare an array of the type appropriate to the data and also to arrange for byte swapping, if necessary.

Fix For ESRF TACO Device Initialization

A one second delay has been added between successive dev_free() and dev_import() library calls in spec's ESRF TACO support to workaround a bug in the OS/9 system that is not otherwise handled by the device server library or drivers. The delay should fix the problem with the message "Can not import device ID/foo/0" appearing on every other reconfig.