changes

Highlights of modifications for spec release 3.00

RELEASE 3.00.07

These notes summarize the changes made for spec release 3.00.07 as of February 12, 1994.

New Startup Macro File Name

If a file named site_f.mac exists in the SPECD directory, it will be read when spec starts fresh, but not otherwise.

motor_par() Changes

The "base_rate" and "acceleration" parameters may now be changed using the motor_par() function. In addition, changes to the "velocity" parameter are no longer restricted to values between the base-rate and steady-state-rate as set in the config file. spec does no checking on the values passed for any of these parameters. It is entirely up to the user to choose values that are usable by the motor controller.

Orientation Matrix Directly Accessible

For spec configurations that employ orientation matrix calculations (fourc, five, sixc, etc.), the orientation matrix values are available in the built-in array UB[]. Matrix values are stored in the UB array row wise, i.e., UB[0], UB[1] and UB[2] correspond to the first row, and so on. When assigning values to UB[], note that the calcG macro which is incorporated into many of the standard macros will recalculate the orientation matrix using the current lattice parameters and orientation reflections.

New data_anal() Options

The options "i_<=_value" and "i_>=_value" are now available in the data_anal() function to return the point number of the nearest data point at or below or at or above a given value. See the data help file for more information.

Driver Support For Nucleus PCA II Card

spec now provides a driver for the Oxford/Tennelec/Nucleus PCA II multichannel analyzer card. The driver enables dead-time corrections to be made to the PHA mode count times. The driver also will generate interrupts at the end of preset real- or live-time count intervals and after a preset number of MCS-mode passes. Of course, use of the driver ties up an additional PC interrupt line. See the README file in the drivers directory of the spec distribution for installation information.

Driverless Support For DSP 6001/2 CAMAC Available

You can now use the DSP 6001/2 CAMAC controllers with the PC004 interface card on PC systems in a polled, user-level I/O mode. No CAMAC driver needs to be installed and no modifications need to be made to the 6001/2 module in this mode of operation. Interrupts should be disabled on the PC004 board.

High-Res Graphics Speed Up For MCA-Type Plotting

The data_plot() function now uses a faster algorithm for redrawing a plot when the same group of points is being redrawn. The "big-dots" and "error-bar" options must be turned off, though. The fast mode is particularly appropriate for updating the screen while acquiring MCA data. The function plot_cntl("mca") must be called before each call to data_plot() to engage the faster algorithm.

X-Axis Log Plotting

The function call plot_cntl("xlog") will cause the x axis to be drawn using a logarithmic scale. The call plot_cntl("-xlog") will disable that mode.

Additional Installation Parameters

The Install program now prompts for five additional configuration parameters. These parameters select whether the internal data should be stored as single-precision (float) or double-precision values, whether to link in the optional GNU readline history and command editing library, whether to include VME hardware support and where two National Instruments hardware object modules for GPIB and VME are located if they are to be used.

Per Diffractometer Hardware Locking

If a second version of spec associated with a particular config file is started up while a prior running version has control of the hardware, the second version will be forced into simulate mode. Such hardware locking has been implicit in versions of spec which use CAMAC drivers, in that the hardware driver has always only allowed one process at a time to open a particular device node.

New prompt_mac Built-In Macro

If a macro named prompt_mac is defined, its contents will be executed before spec issues a fresh prompt. If an error is encountered while the contents of the macro are running, the macro will be automatically undefined.

New getline() Function To Read From a File

A simple version of a new built-in function named getline() is available. This function will read an ASCII file a line at a time and return a string containing the characters read. Values can be picked out of the string using the new sscanf() function described below. See the funcs help file for more information.

Bug In split() Function Fixed

Previously, the split() function would modify the string that was split. It does that no longer.

OMS Configuration Designation Changed

The OMS motors and motor controllers are now selected with the characters OMS rather than PCX, as before. The edconf program will automatically convert to the new designation.

ACS MD8 Multiplexing Support With E500 Motor Controller

Support for a particular home-made multiplexor used with a CAMAC E500 motor controller, a CAMAC I/O module and the ACS MD8 motor current source is now available. Only one E500 channel can be multiplexed to up to 16 motors. Contact CSS for details on the multiplexor setup.

Added Support For DSP CC-488 GPIB-To-CAMAC Module

The DSP CC-488 GPIB-to-CAMAC module is now supported.

RELEASE 3.00.06

These notes summarize the changes made for spec release 3.00.06 as of December 19, 1993.

Quoted Strings Can Be Passed To Macros

Escaped quotes, as in \" or \', can now be used in arguments to macros to pass literal quotes to the macro. The previous treatment of \" as an argument to a macro had been undefined.

CAMAC May Be Configured in Polled Mode

You can now run the CAMAC drivers in polled mode. Instead of CAMAC LAMs generating CPU interrupts to signal spec when moving or counting is finished, spec will poll the CAMAC driver approximately 20 times a second to obtain the current LAM status. Polling only takes place when the wait() function is called while moving or counting is in progress. Use the config macro to select polled or interrupt mode.

Binary Mode gpib_get() and ser_get() Improved

The values returned by the binary mode gpib_get() and ser_get() functions will now return the same values when running on both big-endian and little-endian machines. By default, the incoming data is treated as big endian. If the incoming data is little endian, use "int4_swap" or "int2_swap" as the second argument to the functions.

New sscanf() Function

A new built-in function sscanf is available. Its usage is

sscanf(string,  formatlvalue [, ...])

where string is literal string or string variable that contains data to be scanned, format is a literal string or string variable that contains format specifications in the same style as the C language scanf() functions, and the lvalue arguments are the names of variables or array elements. The function returns the number of items found in the string.

Unidirectional Powder Mode Option Available

The powder mode macros now allow for unidirectional scanning of the motor-mode (rocked) motor. See the powder help file for details.

Bug In data_anal() Fixed

A bug where the minimum and maximum values returned by the data_anal() function for start values not equal to zero may have been incorrect by including the values at point zero in the comparisons has been fixed.

Bug In data_plot() Fixed

A bug where the plots drawn for the data_plot() function for start and npts values not equal to zero may not have been the plots requested has been fixed.

RELEASE 3.00.05

These notes summarize the changes made for spec release 3.00.05 as of November 20, 1993.

Minor Bug In gpib_get() Fixed

When the second argument to gpib_get() is a number to indicate the number of bytes to read, previously the function would return early if the end-of-string character (a newline) was received. That bug has now been fixed.

Minor Change In GPIB Addressing

A redundant MLA (my listen address) used in the addressing sequence for reads of GPIB devices (the intended purpose of which is lost in the dim reaches of time) has been eliminated, as it made at least one instrument unreadable. The extra MLA was only used with National Instruments boards and the Iotech SCSI488/H controller.

Eliminated Historical 24-Bit Test On Motor Steps

The 24-bit limitation on values for motor controller dial positions has been eliminated. This check dated back to spec's original use with only motor controllers on the 24-bit CAMAC dataway.

Debugging Output Sped Up

Bottlenecks in printing debugging output to files and to the screen have been eliminated, speeding things up, particularly for debugging modes 256 and 1,024, associated with showing input pushback and macro expansion.

Reported Problems With Am9513 Counters Addressed

The Am9513 counter/timer chip (on the Keithley-Metrabyte CTM-05 and Scientific Solutions Labmaster PC boards) is now reset by spec before each count period, instead of just at start up. This seems to correct problems with incorrect count times or count values observed by some users.

Bug In rdef Fixed

A four-year old bug in the implementation of rdef has been fixed. The bug only occurred when the macro name was previously unused and the definition was an expression to be evaluated, rather than a string constant. The results of the bug were unpredicatable, as the bug was associated with memory allocation. It was possible for no ill effects to be observed.

RELEASE 3.00.04

These notes summarize the changes made for spec release 3.00.04 as of November 11, 1993.

New ser_get() Mode

A new binary-read mode has been added to ser_get() to read binary single-byte, two-byte or four-byte (unsigned) integers. See the serial help file for details. (A similar mode was added to gpib_get() for release 2.15+, though not mentioned in the update notes. See the gpib help file for details.)

Increased Maximum Number Of Counters

The maximum number of counters allowed has been increaseed from 20 to 128. The scaler screen of the configuration editor will scroll when more than 20 channels are configured.

Increased Maximum Number Of Data Points

The maximum number of data points allowed for all data groups has been doubled to 128K.

New printf() Format Option

The printf() function now recognizes the %u option format to print numbers in unsigned integer format.

Integer-To-Float Conversion On Intel Improved

When floating point values with a magnitude that exceeds the value that will fit in an integer are assigned to an integer in programs on some System V/386 systems, programs hang. Most cases of such assignment are now caught in spec on these systems. Values that would overflow are set to zero (the behavior on most systems).

Getting Data Group Status

The command data_grp(-1, 0, 0) will display the current data group configuration and will return a value of zero.

More Hardware Options For powder Mode

The code for the Oregon Microsystems PC board motor controller, the ACS MCU motor controller and the Am9513-based counting boards has been fixed to work in powder mode.

State Commands Made Obsolete

The new memory allocation scheme has made the "garbage collection" commands getstate, savstate and fixstate unnecessary. Currently, no error message is printed when they are used, but they now have no function. In future versions, the commands will be eliminated altogether.

time() Fix For Sun Solaris 2

The time() function will now return fractional values on Sun Solaris 2 systems. However, all users must include /usr/ucblib in their LD_LIBRARY_PATH environment variable before starting spec.

Microvax GPIB Problems Fixed

A bug where the gpib_put() function didn't return the number of bytes written has been fixed. Also, the code now ensures the EOI signal is asserted with the last byte of data written to the bus.

RELEASE 3.00.03

These notes summarize the changes made for spec release 3.00.03 as of September 28, 1993.

Internal Memory Size Constraints Eliminated

spec's memory allocation and management has been redesigned to eliminate previous size constraints. spec will now allocate memory, as required, up to the system-imposed constraints. This change allows many more statements to be included within curly brackets to make a single parse tree. Also, the memstat command no longer reports memory fragmentation, but rather statistics related to the new memory allocation algorithm. In addition, the fixstate command for memory defragmentation is no longer needed and has been eliminated from the standard macros.

New Plot Title Variable

Previously, the current scan number was placed in the title position of spec's plots. A new global symbol T_L has been introduced to hold the title. The macros _head and getscan macros have been modified to write the scan number in T_L. Now, plots of data sets obtained with the getscan macro will show the correct scan number.

Reverse Video Standout Mode Shunned

spec uses "stand out" mode to highlight alternate fonts when displaying help files and other text on a video display. The preferred stand out mode is high-intensity text. Many terminal descriptions (in /etc/termcap or /usr/lib/terminfo) make reverse video the stand out mode, which doesn't work well with spec's text. spec will now automatically replace the ESC [ 7 m stand out mode string (reverse-video on ansi-derived displays) with the ESC [ 1 m high-intensity text string.

Ortec Timer Bug Fixed

A bug in release 3.00.02 where the times displayed in blind-timer mode with the Ortec 974 or 994 modules when counting to monitor counts was off by a factor of 10 or 100 has been fixed.

Alternate Command Line History Available

At the spec administrator's option, the GNU readline library may be used with spec. The sources to this library are provided in the readline subdirectory of the spec distribution. See the README file in that directory for instructions on linking. See the readline help file for a summary of readline's syntax. See the files in the readline/doc directory for a complete description of readline's features.

RELEASE 3.00.02

These notes summarize the changes made for spec release 3.00.02 as of September 1, 1993.

Automatic Globalization

Variables that are assigned values at the top level (outside of any curly brackets) are now automatically made into global variables.

Support For Ortec 918

Preliminary support for the Ortec 918 Multichannel Buffer NIM module has been added to spec.

Ortec Timer Bug Fixed

A bug in release 3.00.01 that made Ortec 974 and 994 timers unusable has been fixed.

Compumotor 4000 Bug Fixed

A bug in release 3.00.01 that resulted in various unpredictable errors associated with the Compumotor 4000 motor controller has been fixed.

RELEASE 3.00.01

These notes summarize the changes made for spec release 3.00.01 as of August 10, 1993.

String, Macro and History Size Limits Increased

The maximum length of a string constant has been increased from 2048 to 8192 characters. The maximum length of a macro definition has been increased from 1920 to 8064 characters. The maximum number of commands retained as command-line history as been increased from 100 to 1000.

New counter_par() Function

A new built-in function named counter_par() has been added to support non-standard features in particular counter/timer hardware. Currently, only the Ortec counter/timers make use of this function. See the ortec help file for more information.

New image_par() Function

A new built-in function named image_par() has been added to support 2D detectors. Currently, only the Photometrics Star 1 CCD camera is supported. See the star1 help file for more information.

New plot_cntl() To Return Current Colors

An option has been added to the plot_cntl() function to return the color assignments. The function plot_cntl("colors[numb]") where numb is a number between zero and 67. Pen numbers zero through three are those assigned to the bgnd, win, text and axis elements respectively (see the funcs help file). Arguments from 4 through 67 are assigned to the symbol colors for data elements zero through 63.

Ortec Counter/Timer Code Revamped

The code to support the Ortec 974/994/995/997 counters and counter/timers has been overhauled to greatly decrease the overhead time per point. In addition, it is now possible to use the model 994 as a blind timer. See the ortec help file for more information.

Fixed Bug With \x

A bug of long standing, where the character sequence \x did not produce the character x, where x was any character not part of a special sequence, has been fixed.

Memory Leak On Sun Fixed

A bug that occurred mainly on SunOS systems where the parser produced by the yacc program created code that caused the virtual size of spec to grow without bounds, has been fixed.

Bug With time() On Sun Fixed

A bug where the built-in function time() did not return fractional seconds on SunOS systems has been fixed.