changes

highlights of modifications for spec release 3.01

RELEASE 3.01.06

These notes summarize the cumulative changes made for spec release 3.01.06 as of December 18, 1994.

mca_sel() Changes

The reconfig command no longer performs an automatic mca_sel(0), unless the currently selected MCA-type device is no longer configured. Also, mca_sel() now returns the number of selectable MCA-type devices when passed a valid argument.

Block-Mode CAMAC Transfer Implementation

spec now has its first implementation of CAMAC block-mode transfers for reading MCA-type CAMAC modules. Currently, block mode is only implemented for the Kinetic Systems 3929 SCSI CAMAC controller on HP platforms using either the Kinetic Systems software or the CSS software. Currently, only the LeCroy 3588 Histogramming Memory Module makes use of block-mode transfers. Other CAMAC controllers and CAMAC MCA modules will be converted to use block mode transfers in the future.

New mca_put() Function

A new function mca_put(g, e) is available to load values from spec data group g, element e into the currently selected MCA. Currently, this function is only implemented for the LeCroy 3588 Histogramming Memory Module.

New data_info() Function

The new data_info(grp, s) function returns data group configuration information. See the data help file for more information.

Comments Allowed In data_read() Files

The data_read() function will now ignore lines in the input file that begin with the character #.

Motors and Counters Can Be Disabled for cdef()

A new option for the counter_par() and motor_par() functions allows individual motors and counters to be disabled, presently, only for the purposes of having portions of a cdef() macro keyed to the motor or counter mnemonic selectively included or excluded in the cdef()-macro definition. The function motor_par(mot, "disable", [1|0]) disables the motor mot if the third argument is nonzero. Otherwise a disabled motor is enabled. If only two arguments are present, the functions returns 0 if the motor is enabled and 1 if the motor is disabled. A -1 is returned if the mot is not a valid motor. Rereading the config file reenables all motors and counters. Similar syntax applies to counter_par(). In the near future, motors and counters that are disabled will not be accessed by spec.

The Nucleus PCA-3 Supported and PCA-Multiport Improved

The Oxford/Tennelec/Nucleus PCA-3 multichannel analyzer PC board is now supported in spec. This board is a replacement for the PCA II, and is the board of the choice for new purchases. Unlike the PCA II, the PCA-3 does not require a kernel driver to count to presets or perform dead-time correction. In addition, spec now includes additional functionality for the PCA Multiport module. See the pca help file for more information.

Support For KS 3116 16-bit D/A

The Kinetic Systems 3116 16-bit can now be used as a DAC motor.

E/ISA Bus Support On HP 700

spec now supports E/ISA port access on suitably equipped HP 700 platforms. spec's port access functions port_get(), port_put(), etc., and the built-in support for all the PC card motor controllers, counters, etc., that don't require a driver on PC UNIX systems, are now available on the HP. See the file aux/README.hp for information on setting up the system configuration files.

National Instruments GPIB now supported on HP 700

spec can be linked with National Instruments GPIB support modules (cib.o files) on HP 700 platforms. Currently, only the GPIB-ENET module and software has been tested.

Improved Support For the KS3929 SCSI-To-CAMAC on HP 700

spec now includes direct support for the KS3929 SCSI-to-CAMAC controller on the HP 700 platforms. It is no longer necessary to purchase the expensive KS software package.

Can Use 19200 and 38400 To Indicate Baud Rate

The strings 19200 and 38400 are now recognized by spec and the configuration editor as synonyms for the baud rates previously specified by exta and extb.

New Version Info File

spec distributions now include a Version file that contains version numbers for all the files used to create the spec distribution. This information should aid in the communication between CSS and local spec administrators in determining exactly what version of the package is installed.

vi-Mode Code Now Included With GNU Readline Library

The optional GNU readline library source code aggregated with the spec distribution now also includes the modules to support vi-editing mode. Use ESC-^J or ESC-^M to switch between emacs- and vi-editing modes while running spec. To start up in vi-editing mode, put the line

set editing-mode vi

in the .spec_keys file in your home directory.

Bug In Creation Mode of hdw_lock Fixed

A bug in the per-diffractometer hardware-locking feature, whereby the initial copy of the hdw_lock file was created with the wrong access modes, has been fixed. With the wrong modes, hardware locking would be in place only for the same user who created the initial hdw_lock file. The mode of existing hdw_lock files will be corrected when spec is updated. To fix existing installations, change the mode of each userfiles/hdw_lock file to 0666. Per-diffractometer hardware locking was introduced in spec release 3.00.07.

RELEASE 3.01.05

These notes summarize the changes made for spec release 3.01.05 as of September 14, 1994.

Protection Against Funny Characters In File Names

spec can now optionally prevent you from (accidentally) creating files with names containing nonstandard characters. By default, this protection is enabled. Use the function spec_par("check_file_names", 0) to disable the feature. When the feature is enabled, if a file name passed to the on() or open() functions contains any of the characters ()[]{}|$'`*?;!&<>\@, the space character, any control characters or any characters with the eighth bit set, and the file doesn't already exist, spec will print a error messages and reset to command level.

Some Old Problems In Four-Circle Phi-Fixed Mode Fixed

Some singularities in the angle calculations in phi-fixed mode for the four-circle geometry, particularly at phi = 0, are now avoided.

Fixed Some Recent Bugs In the Installation Program

Versions of the spec installation script dating from April 1994 until now weren't installing the high-resolution filter programs properly. That bug has been fixed.

Some Fixes To x-axis Labels In Plots

A bug in the automatic ranging of the x-axis numbering for reversed ranges that caused the ranges not to encompass all the data points has been fixed. In addition, incomplete erasure of previous numbers when the x-axis ranges change in updated plots has been mostly fixed.

Small Improvement to High-Res Plot y-Axis Labels

The formatting of the y-axis labels has been modified to prevent truncation of long label strings.

Bug In Using Two High-Res Filters Fixed

A bug where not doing a plot_cntl("open") after a plot_cntl("filter2") could cause a segmentation violation has been fixed. Now, when the second high-resolution filter isn't explicitly opened, ASCII plots will be drawn by the plotting functions when the second filter is selected.

Bug In Data Group Code Fixed

A difficult-to-manifest bug in the data group code where the data points could become scrambled when data groups were freed should now be fixed.

More Serial Devices Allowed

The number of user-level serial devices allowed in spec has been increased from three to eight.

Small Improvement To Ortec 9XX Timer Code

Code has been added to help prevent the Ortec timer from hanging when operating in updated counting mode.

Bug In Ortec 994 Blind Timer Mode Code Fixed

A bug, where when counting to monitor counts using the blind timer mode, the number of elapsed seconds at the end of the count time was not correctly estimated from the software clock, has been fixed.

Fix For ACS MCB-4 Bug

A bug in the Advanced Control Systems MCB-4 motor controller, where the controller occasionally and unexpectedly sends a null byte at the start of a string has been accommodated in spec.

Support For the MicroControle ITL09 Motor Controller

Initial support for the MicroControle ITL09 motor controller on GPIB and RS-232C interfaces is now available.

Optional Angular Unit Parsing Available

The command spec_par("parse_units", 1) enables parsing of unit suffixes. By default, unit-suffix parsing is disabled. Numbers typed as input to spec's parser with one of suffixes in the table below appended will automatically be multiplied by the corresponding factor.

1r  = 57.2958      radian
1mr = 0.0572958    milliradian
1d  = 1            degree
1md = 0.001        millidegree
1mm = 1            millimeter
1um = 0.001        micrometer
1m  = 0.0166667    minute
1s  = 0.000277778  second

Note, however, suffixes on numbers converted from strings or entered using the getval() function are not parsed. The only known use for unit-suffix parsing is with the user-contributed macros in the file macros/units.mac. These macros require that unit suffixes be supplied for all motor position arguments in the standard spec macros.

SPECD Environment Variable Used By Utilities

The utilities showscans and tidy_spec will now use the value of the environment variable SPECD, if it is set.

tidy_spec Revised

The tidy_spec utility that reports on and cleans up user state files has been revised so that any user can use the utility to report on state-file disk usage and clean up one's own state files. The owner of spec's auxiliary file directory (normally specadm) and the super user may clean up anybody's state files using tidy_spec. Type tidy_spec - from the shell to see tidy_spec's usage.

RELEASE 3.01.04

These notes summarize the changes made for spec release 3.01.04 as of June 12, 1994.

New motor_num() and cnt_num() Functions

New functions motor_num(mne) and cnt_num(mne) that return the motor or counter number corresponding to the mnemonic or number given as as argument have been added. If no motor or counter is configured with the given mnemonic, the function returns -1. The argument can either be a string or a number.

New Automatic Hardware Polling

On platforms with polled motor controllers, timers or acquisition devices, spec can now automatically poll the devices to determine when they are finished. The polling occurs while waiting for keyboard input at the main prompt. When using the GNU readline library, the polling occurs while waiting for each character to be typed. When using the standard spec history, the polling occurs only before the first character is typed. Automatic hardware polling can be disabled using the "auto_hdw_poll" option to the new spec_par() function described below.

New spec_par() Function To Set Internal Parameters

A new function spec_par(option [, value]) is available to set miscellaneous internal operating parameters of spec. Typing spec_par("?") lists the available parameters and their current values. Option settings are saved in the state file.

Default Plot Options Changed

The startup default colors for high resolution plots have been changed from those appropriate to VGA terminals to those appropriate for X11 windows. You can still type def_colors after the global variable GTERM has been set to select the default colors appropriate to the current graphics device. Also, the startup default plotting options have been changed to enable low-resolution screen plots during and after each scan and to disable printer plots after each scan.

Renamed Startup Macro File

The name of one of the startup macro files that spec will read if it exists has been changed from conf/site.mac to conf/conf.mac, where the directory conf is the name by which spec was invoked, while the second conf is literal.

New cdef Function

A new function to create "chained" macros has been introduced. See the funcs help file for more information.

Improvements Made In wait()

Previously, the wait() function would poll all busy devices, even when asked to wait for only moving or counting to finish. Now, only hardware that is busy doing that which wait() is being asked to wait for will be polled.

New quit Command

There is now a command called quit that will cause spec to terminate, just as ^D does. The command must be at the beginning of a line either typed on the keyboard or read from a command file. Including quit in a macro definition will not work.

New Workaround To Configure Extra Devices

Some installations require more motor controllers or serial devices than spec's configuration editor edconf allows. Now edconf has been changed so that spec administrators can add extra devices to the config file by hand. Although the extra devices won't appear on the edconf screens, they won't be eliminated from the config file as before, and will be available to spec. Eventually, edconf will be upgraded to handle as many devices as needed.

Code For Scientific Solutions GPIB Board Improved

The user-level code in spec that drives the Scientific Solutions (Tecmar) GPIB board has been tightened up and made to run faster. Note that this is the only GPIB board supported on linux platforms.

Code For Compumotor 4000 Motor Controller Improved

Problems with the code for the Compumotor 4000 motor controller when running on a GPIB interface faster CPUs have been fixed.

Support for Kinetic Systems 3512/3514 ADC

The Kinetic Systems 3512/3514 16-channel ADC CAMAC modules may now be used as counters with spec. When configuring these counters on the scaler screen of the configuration editor, selecting a negative scale factor will treat the ADC contents as twos-complement data. A positive scale factor means to treat the ADC contents as unsigned binary data.

Driverless Support for KS 2926 CAMAC Controller

Joining the trend of using user-level, polled code rather than kernel drivers for spec hardware devices, the Kinetic Systems 2926 can now be used in a driverless configuration. The board interrupt should be disabled in this case.

Support For the NSK Megatorque Motor Controller

The Nippon-Seiko Megatorque DC motor controller is now supported by spec over a RS-232C interface.

Support For the Physik Instrumente DC Motor Controller

The Physik Instrumente C-804/C-812 DC-Motor Controller is now supported by spec over a GPIB interface.

The kappa Geometry Is Now Usable

The geometry code for the kappa configuration is now available.

Software Timer on SYSVR3 Platforms Improved

The software timer on System V/386 3.2 now reports updated time with subsecond resolution. Note, however, the accuracy of alarms on the version of UNIX fluctuates by almost a second.

More Install Options

The Install program now prompts for additional parameters relating to special hardware options, namely whether an SICL GPIB driver is being used and whether the Kinetic Systems SCSI-CAMAC driver is being used.

Bug in Install Fixed

A bug in the new multiple geometry installation feature introduced in the previous release, that made the feature not work if the target name differed from the standard name, has been fixed.

Bugs in MotionMaster 2000 Fixed

A couple of bugs in the most recent versions of the Klinger MotionMaster 2000 code have been fixed.

input(0) From Pipe Works

The function input(0) when used with spec invoked with the -p flag can be used to see if any input characters are available on the input pipe. When the input is from the pipe, the function returns the number of characters available to be read. When the input if from the keyboard, the function returns the null string if no characters are available, or the first character available if the user has typed something.

Messages Used With the Pipe Input Option Changed

The messages sent back to a program (such as a GUI) that run spec through a pipe are being reorganized. Contact CSS for details.

RELEASE 3.01.03

These notes summarize the changes made for spec release 3.01.03 as of May 9, 1994.

New Macro Hooks Available

New hooks into the standard macros are now available. The macros waitall, waitmove and waitcount now include calls to user_waitall, user_waitmove and user_waitcount respectively. These are defined as empty macros when spec starts fresh. In addition, the new macros

def chk_move  '(wait(0x21) || USER_CHK_MOVE)'
def chk_count '(wait(0x22) || USER_CHK_COUNT)'
def chk_acq   '(wait(0x24) || USER_CHK_ACQ)'

replace the wait() calls in the updated moving and counting macros, with the new standard global USER_CHK_ variables available to the user. Also, the move_em macro is now defined by default to include the new user hook macros as follows:

def move_em '
    user_premove
    move_all
    user_postmove
'

New COUNT_TIME Global Variable

The count_em macro now saves the count time in the new standard global variable COUNT_TIME to make the value available to any other interested macros. The count_em macro is the lowest level counting macro called by the standard macros.

Installation Now Supports Multiple Geometries

spec's installation program now allows you to specify the geometries and names of up to 32 configurations that are to be installed together. One binary file will be created that includes the code for all the specified configurations. Each name configuration will be a hard link to that file.

More Plot Points Per Group

The maximum number of total plot points per group has been increased from 32,768 to 65,536. The total number of points allowed in all groups is now 262,144.

Plot Points File Now Truncated When Starting Fresh

The plot data file saved with the user's state file in the userfiles directory is now truncated when the user starts fresh or when the data in the file appears corrupted. Previously, the file would have to be removed to decrease its size. Note, the file can grow as large as the total number of allowed plot points times the number of bytes per point. For the default data format (single precision), the maximum size is currently one megabyte per user state file.

New Serial Device Configuration Option

To support serial devices that don't use the standard UNIX tty interface, (such as a serial board in a VME crate accessed through ESRF dev_putget() functions or EPICS channel access), the configuration editor provides a new field for serial devices. For the traditional serial devices, the characters <> appear in the field. Other serial interfaces can be selected by stepping through the choices. In the config file itself, the type of serial interface is indicated by prepending characters such as ESRF: or EPICS: to the device name.

RELEASE 3.01.02

These notes summarize the changes made for spec release 3.01.02 as of March 31, 1994.

Closing X11 Plot Window From Window Manager Works

Previously, it was necessary to type plot_cntl("kill") to clean up after closing the X11 plot window. Also, it was often necessary to kill x11filt processes that were left over after closing the window. spec now will automatically recreate the plot window the next time data is plotted if the plot window has been closed or killed from outside of spec. Also, the processes that create the window now trap "window-destroy" events and are much more likely to exit no matter how the windows are closed.

GPIB Sharing Improved

The code to share one National Instruments board with multiple copies of spec running on the same computer has been improved, particularly with respect to the code for the GPIB-to-CAMAC controllers. When a new process first accesses the GPIB driver, the driver resets the board, Although spec can not prevent that reset, the error checking and command retry in spec has been much improved, eliminating many of the problems observed by users.

Long Input Lines Won't Crash spec with readline

Previously, when using the optional GNU readline command line editing and history library, input lines longer than 512 characters would cause spec to crash. Now, input lines longer than 512 characters are safely truncated. In the future, there will be no restriction on input line length.

New stop() Function

A new hardware control function, stop(w), has been introduced to synchronously halt moving, counting or other asynchronous data acquisition. If the bit corresponding to w=1 is set, moving is halted. if the bit corresponding to w=2 is set, counting and other data acquisition is halted. If w is zero or missing all asynchronous activity is halted.

New atan2() Function

The math function atan2(y, x) returns the arc tangent of y/x using the signs of the arguments to determine the quadrant of the return value. The return value is in the range -PI to PI.

New port_putw() and port_getw() Functions

New functions for 16-bit I/O port access on AT-bus computers are available.

New Motor Parameters

The motor screen of the configuration editor now has additional subscreens for entering optional motor parameters. The optional parameters are used with some of the supported motor controllers. The parameter subscreens are accessed by typing the new m command. Optional parameters are entered by typing in a value. Parameters are deleted with the new ^D command. The additional parameters are added to the config file after the line that describes the basic motor parameters using:

MOTPAR:dc_gain = 1500

All of these parameters can be changed or assigned with the motor_par() function.

Klinger Motion Master 2000 Changes

The Klinger Motion Master 2000 motor controller can now be used with the PC port interface. The config file identifiers has been changed from KL2000 to MM2000. All of the optional parameters are now taken from the config file.

y-axis Significant Digits Adjusted

The number of significant digits shown on the y-axis numbers is now automatically adjusted to match the range in the data.

ACS MCU2 Changes

The slop parameter is now taken from the optional motor parameters available in the config file.

Huber SMC 9000 Supported

The Huber SMC 9000 GPIB motor controller is now supported.

RELEASE 3.01.01

These notes summarize the changes made for spec release 3.01.01 as of February 23, 1994.

VME Support

spec now supports VME. Currently, the only supported VME controller is the National Instruments VME controllers for SunOS 4.1.x S-Bus systems and System V/386 and System VR4.x PC platforms. The supported VME modules are the Oregon Micro Systems motor controllers and the Mizar MZ 8310 timer/counter.

Revised Signal Handling

Code to handle asynchronous signals from hardware and user interrupts has been revised (again). Signal blocking around hardware access has been improved.

Revised Sleep Handling

The implementation of the sleep() function has been redone to avoid the use of alarm signals and/or the interval timer, resulting in more robust performance.

HP SICL for GPIB Support

spec now supports the HP Standard Instrument Control Library (SICL) for its GPIB cards.