changes

highlights of modifications for spec release 5.03

July 17, 2003 - RELEASE 5.03.02-1

Bug Fix For IMS MDrive Motor Numbering

A bug in motor numbering for the IMS MDrive motors in party-line mode has been fixed. The correspondence between spec config file motor channel numbers and physical motor address was intended to be channels 1, 2, ..., 9, 10, 11, 12, ... correspond to physical motor addresses 1, 2, ..., 9, A, B, C, ... The bug was that addresses for channels 10 and above were shifted by one, so that channel 10 corresponded to address B, etc. The bug has been fixed, and the channel numbering is now as intended. Sites that have configured MDrive motor channels 10 and above should edit the config file by hand or via the edconf configuration editor and add one to those MDrive motor channels before running this new spec release.

July 3, 2003 - RELEASE 5.03.02

New File Argument Available for array_dump() and data_dump()

An optional initial argument to the array_dump() and data_dump() functions can now be used to specify an output file, which makes it unnecessary to use the on() and off() functions or related macros when writing arrays (or data groups) to a file.

array_read() Now Respects Array Wise-ness

The array_read() function will now assign values read from a file by rows or by columns, depending on whether the array argument is a row-wise or column-wise array. Previously, array_read() would only assign by rows. See the arrays help file for more information.

"auto_clear" Implemented For Additional MCAs

The "auto_clear" option to mca_par(), which instructs spec to clear the MCA prior to starting, is now implemented for additional MCA models. The MCA devices for which "auto_clear" is newly implemented are the Nucleus PCA II, PCA-3, Multiport and Microfast; Fast Comtec MCD; MBraun PSD-50M; Silena 7328 and 7329; Roentec XFlash MAX; Labo 2400; the EPICS MCA record and the TACO (ESRF) MCA device server. Local macros that explicitly clear the MCA before each run should be revised to eliminate the extra overhead of clearing the device twice. Devices for which the auto-clear mode had already been implemented are the XIA DXP, Ortec Trump MCA (ISA and PCI) and MCS (PCI), Seiko EG&G MCA 7700 and Amptek 8000 and 8000A. Note, the "auto_clear" mode is set at start up and after each hardware reconfiguration.

w21v Geometry Update and Consolidation

The w21v geometry has been updated to include variations for the ESRF ID10B and ESRF D32 beamlines. Also the geometry from geo_gmci.c has been folded into geo_w21v.c. The geometry names w21v, id10b, gonio and gmci are recognized and select the different motor mnemonics and psuedomotors associated with each implementation of the otherwise similar goniometers. See the geo_w21v.c source file and the w21v.src macro file in the spec distribution for details.

Support For PMC DCX-PCI300 Motor Controller

spec now supports the PMC model DCX-PCI300 motor controller, a PCI-bus motor controller card that can control up to eight motors.

Minor Newport MM4000/4005/4006 Update

Possible loss of precision in communicating motor positions with the Newport MM4000/4005/4006 motor controllers has been addressed. spec now uses nine-digit precision (previously it was six) when sending motor positions, and rounds (rather than truncating) the lowest order digit (after multiplying the user-units position by the configured step size) when reading positions. It's not expected users will notice a difference.

June 12, 2003 - RELEASE 5.03.01-5

SCIPE Counters-Only Support

The SCIPE detector device units can now be configured as either counter/timers or counters only, thus allowing multiple SCIPE servers to be included in the counter configuration. (SCIPE is a protocol for device control developed at the DND CAT at the Advanced Photon Source.)

June 4, 2003 - RELEASE 5.03.01-4

Improved Sleeping For Short Intervals

The spec C code for sleep times less than ten milliseconds has been revised. On most platforms where spec is used, the system calls that allow a process to sleep by releasing control of the processor have an effective resolution of ten milliseconds. Previously, spec implemented sleeps for intervals smaller than 10 milliseconds only on Linux platforms using a user-level busy-wait loop. The revised code still uses a busy-wait loop, but is a bit more accurate and is now available on all platforms, not just Linux. Both user-level sleeps with the sleep() function and built-in sleeps, like those used while waiting for hardware to complete, use the new code. Note, the default hardware poll interval, set with spec_par("hdw_poll_interval"), is ten milliseconds. Because that is above the busy-wait threshold, the sleeps may take longer due to operating system latencies. To minimize per-point dead time during scans (at the cost of increasing the CPU load imposed by spec), one can set the hardware poll interval to values less than the default ten milliseconds.

Use Of Calculational Pseudomotors Made More Robust

For the calculational pseudomotors introduced in spec release 5.03.01, if the _calc() macro function called the built-in functions wait() or read_motors() either directly or indirectly through other macros, macro recursion would result. It is inappropriate for the _calc() macro function to call those functions or any functions that cause hardware access. Calls to wait() or read_motors() from the _calc() macro function are now blocked, and an error message will be printed when such calls are attempted. See the mac_hdw help file for details.

Shared-Array Utility Code Now Included In the Distribution

The file sps.c is now included in the standard distribution. The C code in that file provides functions for connecting to spec shared data arrays. See the code in that file and the sps_debug target in the make.dist file for examples of how to use the interface.

Support for MEN M-41 VME Counter/Timer

spec now supports the MEN Mikro Electronik GmbH M-Bus model M-41 Counter/Timer. The current support is based on the M-41 module being installed in an MEN A201S 6U VMEbus Carrier Board. Only counting to time presets is supported for this hardware. Also, if the scale factor for the time-base channel is set to 8e6 in the config file, spec will use the internal time base, which allows count times up to just over 2 seconds. For any other scale factor, spec will assume an external time base is provided with the scale factor indicating the rate. Maximum count times are determined by how long it takes to overflow the 24-bit scaler with the given time base.

Update For Updated EPICS Motor Record With Encoders

Changes in EPICS motor record release 4.5 required modifications in spec that affect use of EPICS motors with encoders. Those modifications are included in this release.

Bug Fix For unix() Function

A bug, apparently introduced in release 5.01.02-9, where about twenty repeated calls of the unix() function with two or more arguments inside a curly bracketed loop would result in the "Out of temporary cells" error message, has been fixed.

array_fit() Reenabled

An accidental disabling of the array_fit() function in late 1996 has been reversed.

Bug Fix For Screw-Type sixc Geometry

A bug, introduced in release 5.02.03-2, which broke use of the gamma pseudomotor for the screw-type six-circle configuration, has been fixed.

April 17, 2003 - RELEASE 5.03.01-3

EPICS and TACO spec Libraries Now Included With All Distributions

The spec libraries needed for the EPICS and TACO environments (libEPICS.a and libESRF.a, respectively) are now included with all spec distributions.

New "immcat2" Binary Output Format

Another custom binary output format called "immcat2" is available for the fmt_write() function. Although the details of the format may be of limited interest to general spec users, the method of implementing a custom output format as illustrated in the fmt_immcat.c source file may be of didactic value.

Recent Bug With Near-Zero Acceleration Fixed

A bug, introduced in spec release 5.03.01, where an acceleration parameter set with motor_par() to be between zero and one could result in a floating point fault and a core dump, has been fixed.

Follow Up Fix On Motor Position Rounding Bug

The fix of an obscure motor rounding bug in spec release 5.02.03-5 had the unintended consequence of sometimes causing nonzero user angles with nonzero offsets to print with decimal parts on the order of 1e-9 and angles at zero to print with decimal parts on the order of 1e-16. Those artifacts no longer appear.

April 6, 2003 - RELEASE 5.03.01-2

Fix For file_info() Group Access Test

Previously, when testing file read, write or execute access permissions, the file_info() function compared only the group mode bits with the user's effective group ID, but did not examine the groups to which the user could belong, as configured in /etc/group. The access() system call is now used to check permissions rather than the mode bits, resulting in a more comprehensive group-access test.

Support For the National Instruments PCI 6601/6602 Counter/Timers

The National Instruments PCI 6601/6602 counter/timers are now supported by spec. These cards offer four and eight 32-bit counter channels, respectively. Any channel can be designated as the preset timer. See the ni660x help file for details.

Support For the Caen V260 VME Counters

spec now supports the Caen V260 VME counters. This module has sixteen 24-bit counters. spec will pair adjacent channels to form 48-bit counters if the number of counters on the Devices screen of the configuration editor is eight or less. Otherwise, up to 16 24-bit counters will be available.

Support For the Caen V462 VME Gate Generator

spec now supports the Caen V462 VME gate generator as a timer. This module is not recommended due to its limitations. Its maximum count time is only ten seconds. Also, in the event a count is interrupted with ^C or stop(), the module can't be reprogrammed until the current gate time has elapsed. The module has two channels. spec use channel 0 or 1 according to value in the NUM column on the Devices screen of the configuration editor.

More Fixes For MDrive Motor Controller

The IMS MDrive 17/23/34 motor controller support has been revised yet again to better handle encoders and stall detection. To aid in tuning, the following generic optional motor parameters can be set from the configuration editor. The values will be sent to the MDrive controllers as follows (the corresponding MDrive command is shown in parenthesis):

Generic parameter 1 - Run current in percent (RC)
Generic parameter 2 - Hold current in percent (HC)
Generic parameter 3 - Hold current delay time in msec (HT)
Generic parameter 4 - Settling time in msec (MT)

Also, the standard optional motor parameter "DC following error" can now be configured. If set, its value will be sent as the stall factor (SF command).

March 16, 2003 - RELEASE 5.03.01-1

New Error Message When Constraints Disallow psic Angles

If angle cut points or a sector choice rule out the calculated angles for a particular reciprocal space position for the psic geometry, spec now prints out an error message. Previously, an error value was returned by the calc() function, but there was no error message from the C code.

New Timing Options For Compumotor SX Motor Controller

New "wdelay" and "rdelay" options to motor_par() allow configuring delays before commands are sent to or replies are read from the Compumotor SX motor controller. Units for the delays are seconds. Delays of 10 msec or so appear necessary on faster computers to communicate reliably with the motor controller.

Adjustments For Phytron Motor Controller

As spec support for newer models of the Phytron motor controllers has been added over the years, some commands were included that did not work with older Phytron firmware. Adjustments as to what commands are sent based on firmware version have been made, and the older Phytron models now work with the current spec release.

Fixes For MDrive Motor Controller

The preliminary support for the IMS MDrive 17/23/34 motor controllers has been revised to cope with incompatible updates made by IMS to the controller firmware.

Driver For PIO device Updated For Linux 2.4 Kernels

The pio.c driver used with the ILL 2D detector has been updated to work with version 2.4 Linux kernels.

March 16, 2003 - RELEASE 5.03.01

New Macro Hardware Facility

A major new feature in this release of spec is macro hardware support. This feature combines features of the built-in C code for motor control and counter control with the flexibility of user-defined macro functions. In addition, the macro motor support has special capabilities to ease the creation of calculational pseudomotors (that is, pseudomotors with positions that depend on real motors). See the mac_hdw help file for implementation details.

Better Handling Of Recalcitrant Hardware

When motors won't stop, the sync command will now clear spec's internal busy flags for the associated controller to avoid the endless waiting for the controller to indicate the motors have stopped. The sync command will now also clear the internal busy flags for non-responsive timers. Finally, spec is now also more willing to quit when busy hardware is not responding.

Previous "Fix" To edconf Step-Size Handling Reversed

A change made in spec release 3.02.01 (Feb 1995) to the edconf hardware configuration editor, where modifying the motor step-size parameter would change the dial position parameter, but leave the motor accumulator constant, has been reversed. The dial position will now remain fixed, and the motor accumulator value will be adjusted when the step-size is changed. The reason for the code change is that a modification to the step size seems more likely to be made in the delicate situation where a motor or motor controller is replaced and the position of the motorized component should remain unchanged. The case where the motor controller position register should remain constant seems less likely and less critical. Users with strong feelings otherwise, please contact CSS.

New Facility to Support the ANKA RST Gamma Software

spec now supports yet another control system that provides an interface to beamline control hardware via a unique protocol. This system is in use at the ANKA synchrotron in Karlsruhe Germany, and is an industrial control software called Gamma from RST Industrie Automation GmbH. Besides the new motor and counter/timer controller types, the interface has new user-level functions in spec. The new functions are called anka_put(), anka_get() and anka_par(), but are only visible if the Gamma hardware or connection parameters are configured. See the anka help file for details.

Support For Amptek Pocket MCA 8000/8000A

spec now supports the Amptek Pocket MCA 8000/8000A over a serial interface. See the amptek help file for details.

Support For New Focus Model 87XX Picomotor Controller

spec now supports the New Focus Model 8750 and 8753 Picomotor controller modules over a serial interface.