spec

Software for Diffraction

changes

highlights of modifications for spec release 5.05

February 14, 2005 - RELEASE 5.05.05-9

Support For ULS3020 Counter/Timer

spec now includes support for the ULS3020 NIM-module counter/timer from the Korean company ULS, Inc. See www.uls.co.kr for hardware details.

OMS MAXp Problem Introduced In Last Release Fixed

Some ill-considered changes in the code for the OMS PCI MAXp motor controller added in spec release 5.05.05-8 that prevented the controller from working as it should have been undone.

February 4, 2005 - RELEASE 5.05.05-8

New Formatting Options For date()

spec now allows an optional argument to the date() function to specify the format of the date string. The syntax of the argument follows that of the standard C library strftime() function, with the additional spec-added option of specifying a format for fractional seconds. See the funcs help file for details.

New Options For Error-Logging Features

There are a couple of new features associated with the error-logging facility. If the spec_par() option "elog_timestamp" is set to less than a second (units are minutes, so the value must be less than 1/60), every message written to the elog file will be preceded by a time stamp, and the time stamp will print the epoch time to microsecond resolution (as obtained from the system gettimeofday() function). This feature is to accomodate users requiring relatively precise time stamps associated with each command. In addition, a new spec_par() option "elog_level" is available. The default value of 1 prints commands typed at the keyboard to the elog files as before. At level 2, commands read from command files will also be logged.

Updates For HANARO KISIM USB Acquisition Module

spec now supports multiple HANARO KISIM USB modules. Also, the module's one dimensional mode is now supported. See the updated kisim help file for details.

Fix For Potential PCI Memory-Mapping Problem

A bug with the masking of memory base addresses obtained from PCI configuration space that could cause problems with some of the PCI cards supported by spec has been fixed. A problem had only been observed in one spec installation with an OMS MAXp card.

January 11, 2005 - RELEASE 5.05.05-7

New Options To ser_par()

A new "device_id" option to the ser_par() function returns the name of the associated serial device. A new "responsive" option returns a value that indicates whether the associated device was opened successfully. These options parallel options with the same names available with motor_par(), counter_par(), mca_par() and image_par(). See the serial help file for details.

Fix For piper Mode

A minor fix to the code that interfaces spec to the optional command-line editing libraries has been made to allow the piper method of controlling spec through another program to work when spec is linked with the libedit library. Another fix now allows (for the first time) the piper method to work when spec isn't linked with an external command-line editing library. Note, however, the piper method is no longer recommended for interfacing other programs to spec. The spec server mode is preferred. See the server and piper help files for more information.

December 18, 2004 - RELEASE 5.05.05-6

Support for HANARO KISIM USB Module

This spec release includes preliminary support for the HANARO KISIM USB Module. The device was developed at KAERI to interface with the ESRF N110 TDC device used with 2D detectors. See the kisim help file for details. (Note, this is the first piece of USB hardware to be supported by spec.)

Support for Hecus ASA-32 MCA Card

This spec release includes preliminary support for the ASA-32 ISA acquisition card, which is part of the Hecus SAX/SWAX X-ray system. See the hecus help file for details.

wait Macros Updated

New global variables WAITING_MOVE, WAITING_COUNT and WAITING_ACQ are now part of the standard macros. These variables are incorporated into the waitall, waitmove, waitcount, waitacq, chk_move, chk_count and chk_acq macros to hold the most recent result of a wait(0x21), wait(0x22) and wait(0x24), respectively. The latter calls are made in the chk_* macros. Such results are useful in macros such as user_getangles or user_getcounts to determine whether moving or counting is still active without incurring the overhead of an additional hardware poll, particularly during updated moving or counting.

December 8, 2004 - RELEASE 5.05.05-5

Fix For New Focus 8750/53 Small Moves

A problem where spec didn't properly detect the end of small, fast moves for the New Focus 8750/53 motor controllers has been fixed.

Fixed Bug With Server-Mode status/ready Property

A bug in the implementation of the status/ready property (sent by the spec server to indicate when the server is available to execute commands either received from a client or typed in at the keyboard), where the values sent before and after keyboard input were opposite of what was intended, has been fixed. The behavior of this property is now as documented in the server help file.

Improved Socket Debugging Display

When debug mode 0x400000 (hexadecimal dump) is added to debug mode 0x40 (basic hardware), repeated lines of identical values are now condensed to minimize generated output. The hexadecimal dump mode is currently only used with socket debugging, including socket communications between spec server and clients.

November 6, 2004 - RELEASE 5.05.05-4

More Workarounds For New Focus 8750/53 Firmware

The New Focus 8750/53 firmware bug that has been the subject of previous spec workarounds is reported to have been fixed in firmware version 1.5.6, so the spec workaround is now only activated for firmware versions 1.3.1 through 1.5.5. Also, spec now sends the "JOF" (joystick off) command on initialization, as controllers with recent firmware versions don't seem to work properly otherwise. (The command should do no harm with earlier firmware versions.)

Workaround For Source-Forge Linux GPIB 3.2 Anomalies

The Source Forge Linux GPIB project (successor to the deprecated linux-lab GPIB project) appears to be usable with spec using the cib.o configuration option. However, the 3.2 release of the package (for 2.6 Linux kernels) appears to have broken the compatibility of the National Instruments standard ibonl() interface function. This spec release contains a workaround for that broken behavior. See the nigpib help file for information on configuring spec to use this library. (See http://linux-gpib.sourceforge.net for downloads and documentation of version 3 of the Linux GPIB project.)

October 14, 2004 - RELEASE 5.05.05-3

cdef() Query Syntax Updated

In previous releases, the syntax to print out the pieces of a cdef() chained macro was cdef(name, "", "", "?"), although the documentation indicated cdef(name, "", "?"). As of this release, a "?" as second, third or fourth argument will print out the macro parts.

edconf Allows VME Addresses Of Zero

Prior releases of the edconf hardware configuration editor were inconsistent with respect to allowing a value of zero for the base address of a VME module. The current release will allow a zero value, and such behavior should continue in future releases.

Fix For Recent Obscure Server-Mode Bug

A bug that could lead to a segmentation fault and associated mainly with features added for server mode in spec release 5.05.05-1 has been fixed. The fault could occur when the server tried to send a delete event for a watched array element that had been created in a macro function where the array name had been passed to the macro function as an argument.

October 12, 2004 - RELEASE 5.05.05-2

Fix For OMS ISA Support

Updates to the OMS support in release 5.05.03-1 included some modifications to the low-level interface code. The changes apparently fatally affected some sensitive timing for at least one ISA card, namely the PC39. This spec release readjusts the low-level OMS interface code so that the PC39 again works properly.

September 20, 2004 - RELEASE 5.05.05-1

New Motor Parameters To Set Powder-Mode Speed

Powder-mode uses spec's move_cnt command to gate counters open while a designated motor is rocked at each point of a scan. (See the setpowder help file for more information.) Previously, the powder-mode motor rocking speed was set to the motor's base rate. To accommodate users needing a faster rocking speed that requires accelerating from a base rate, the following motor_par() motor parameters are now available: "powder_base", "powder_slew" and "powder_acceleration". The values for the first two parameters are set to the motor base rate and the last to the motor acceleration when spec starts up and on every reconfig command (or config macro invocation). If the "powder_slew" value is less than the "powder_base" value both the base and slew rates are set to the "powder_slew" value. (Certain motor controllers, namely the 18011, CM3000, CM4000, E500, ES_OMS, ES_VPAP, HUB9000, IP28, MC4, MCB, SIX19, SMC and XRGCI_M, do not currently recognize these new parameters. Contact CSS to discuss the feasibility of adding support for the new parameters for any of these controllers.)

New Server Feature To Send Delete Events

The spec server will now send events to clients when registered global variables or associative array elements are deleted. See the server help file for more details. Note, the spec client currently takes no action on such events.

New Server Feature To Reinstate Watched Status

The spec server will now automatically reinstate the "watched" status of global variables and associative array elements that are registered by clients and subsequently made unglobal in the server and then made global again.

Client prop_watch() Command Improved

The prop_watch() command used by the spec client to register properties on which to receive events from the server will now re-register properties when invoked for a previously registered property. Previously, there was no way to re-register a variable that had, for example, been made unglobal on the server and then global again other than by exiting and restarting the client.

New Support For HANARO Motor Controller

Support is included for a new motor controller built and used at the HANARO research reactor at the Korea Atomic Energy Research Institute (KAERI).

Workaround For New Focus 8750/53 Firmware Bug Extended

Since the New Focus 8750/53 firmware bug first addressed in spec release 5.04.04-10 hasn't been fixed in firmware version 1.5.4, the spec workaround is now also applied to that firmware release.

Instability Associated With EPICS Motors Fixed

A double-free bug that could result in segmentation faults on some platforms, introduced in spec release 5.05.03-7 and only associated with the reconfig call for EPICS motors, has been fixed.

One More Revision Of the Algorithm For Determining EPICS Release

The method for determining the EPICS release (3.13 versus 3.14) in spec's Install script, most recently revised in release 5.05.04-8, has been rewritten once more and is now better than ever.

September 10, 2004 - RELEASE 5.05.04-9

Update To New Code For Micos Motor Controllers

The support for the Micos VENUS-2 compatible motor controllers added in release 5.05.04-6 has been updated to fix a problem with spurious error messages.

September 8, 2004 - RELEASE 5.05.04-8

Recent Client Segmentation Fault Fixed

A bug associated with the client/server updates of release 5.05.04-1, where a remote_eval() call that failed (due to an unreachable host, for example) could produce a segmentation fault, has been fixed.

Installation Root-User Test Modified

The Install installation script root-access test has been revised to not require write permission in the current directory if the standard shell command id exists. This change helps in a situation where root access is available, but not for writing to an NFS-mounted disk where the spec distribution might be located. Note, root access is required for installing spec on Linux boxes where I/O port or memory-map access is used for control of PC cards. Otherwise, installation only requires write access to the directories where spec is installed along with permission to overwrite any existing spec files.

Installation EPICS Release Specification Enhanced

Since release 5.05.01, spec can be linked with either EPICS release 3.13 or EPICS release 3.14. spec needs to know which, as different spec libraries are used for the different EPICS releases. Previously, the EPICS release was determined automatically by the Install script by examining the epicsVersion.h file in the EPICS base directory specified in the spec installation configuration. However, although some sites have the EPICS libraries available, the header files are not. Now, if the header files aren't available, the installation will default to EPICS release 3.13. However, by setting the shell variable EPICS_VER to 314 the spec administrator can force linking for the 3.14 release. Usage from the shell command line might be

EPICS_VER=314 ./Install -d

September 2, 2004 - RELEASE 5.05.04-7

MDrive Support Improved

The code to support the IMS MDrive motor controllers is now a bit more robust. Previously, replies to position and status requests were indistinguishable. Occasionally, an MDrive controller would miss a response and spec would get unsynchronized with respect to the requests and replies, leading to unexpected behavior. The MDrive controllers are now programmed to format replies to position and status requests such that spec can tell one from the other and resynchronize when necessary.

Fix For Recent Bug in ESRF CCD Support

An undocumented update to the ESRF CCD support in spec release 5.05.04-3 that removed the constraint on the number of units that could be configured, also introduced a bug that prevented the code from working properly at all. That bug has been fixed.

Fix For Opening Socket-to-Serial Interfaces

Code introduced in spec release 5.05.03-8 to do a sleep after opening a socket-to-serial device has been eliminated, as the sleep appears to have been unnecessary, but did noticeably add to the configuration time overhead.

August 31, 2004 - RELEASE 5.05.04-6

Support For Micos VENUS-2 Compatible Motor Controllers

Initial support for the Micos VENUS-2 compatible motor controllers is included in this spec release.

August 24, 2004 - RELEASE 5.05.04-5

Update To Server For Forward Compatibility

A fix had been made to the spec server, so that it will work with future clients that may use a newer version of the spec client/server protocol, as was originally intended. Unfortunately, spec releases prior to this update require clients of the same or earlier client/server protocol version.

August 17, 2004 - RELEASE 5.05.04-4

Implementation of Counters-Only Mode For spec Client

The "counters-only" mode is now usable as a device configuration on spec clients. The spec server will send events to the client when the associated scalers are updated during counting on the server. The client will copy the latest values received via events from the server to the S[] scaler array when the client getcounts command is executed. See the server help file for more information.

Minor edconf Fix

A bug in the edconf hardware configuration editor, where inappropriate serial-device prefixes (ESRF:, EPICS: or SOCKET:) could be included in the config file output for non-serial devices, has been fixed.

Fix For Setting Trinamic Current Parameters

A bug that limited the maximum peak current for the Trinamic QUADpack motor controllers to 800 mA when set from the config file has been fixed.

July 31, 2004 - RELEASE 5.05.04-3

Bug In Configuring OMS PCIx Controllers Fixed

A bug in the edconf hardware configuration editor (associated with the support added for the OMS MAXp in release 5.05.03-1), where the parameters for the OMS PCIx controller information were read incorrectly, has been fixed.

Fixes For New OMS Homing Feature

A couple of issues with the new "home_method" feature for OMS controllers have been addressed. A problem where the standard slew speed on moves following certain home sequences was not restored has been fixed. Another problem, where under certain circumstances, the first move command was ignored after a home search when the search ended at a limit switch, has been fixed.

July 22, 2004 - RELEASE 5.05.04-2

Fix For Trinamic QUADpack/SIXpack Speed Settings

A bug, where the speed parameters were sometimes not set correctly for cards beyond the first when multiple Trinamic QUADpack/SIXpack cards were assigned the same spec unit number, has been fixed.

Updated Counter Output Formats For Standard Scans

The counter printf() formats in the standard _loop and _upd_count macros have been modified to display non-integer values on the screen (and printer) when appropriate, and to include additional significant digits in the values written to the data file.

July 18, 2004 - RELEASE 5.05.04-1

New Associative Array Feature

A new syntax feature allows initialization of associative arrays by assignment and the passing of associative-array data to macro functions by value. The syntax uses a pair of square brackets to enclose a comma-separated list of colon-separated value pairs. The first item of each pair is the associative array index and the second item is the value of the array element. The examples below illustrate the usage:

1.SPEC> x = [ "val":123, 456:"data" ]

2.SPEC> p x
x["val"] = 123
x["456"] = "data"

3.SPEC> def test(x) '{ for (i in x) p i, x[i] }'

4.SPEC> test([ "val":123, 456:"data" ])
val 123
456 data

Improved psic Sector Calculation

A change in the psic geometry code (see geo_psic.c) makes another sector available for the naz- and qaz-fixed modes that have the constraint eta=del/2 or mu=nu/2. For sector 9 (which only involves transformation of the detector circles) the sample circle positions are now recalculated to maintain the constraints. This change provides more flexibility in positioning a psi-circle diffractometer.

Improved Connection Handling From spec Client To spec Server

Code has been added to better handle the loss of connection from the spec client to the spec server, including additional timeout checks.

Server-Client Communication Faster

The socket communication between the spec server and clients has been sped up by a significantly.

Fix For remote_eval() Return of Associative Arrays

A bug, where the spec client's remote_eval() (and remote_async()/remote_poll()) couldn't return associative arrays, has been fixed.

Server Errors Noted On remote_eval()

The spec server protocol has been revised to allow the server to flag clients when commands sent by remote_eval() (and remote_async()/remote_poll()) fail due to unrecoverable errors, such as syntax or divide-by-zero errors. spec clients will display the error messages provided by the server.

Client Can Create Associative Array Elements With prop_put()

The previous limitation on creating new associative array elements with prop_put() from a spec client has been removed. The command prop_put("host:spec", "var/x[3]", "value") can create the associative array element on a spec server, even if the element doesn't already exist. The associative array x[] must already exist on the server, though.

New Server Protocol Options For Executing Functions

The spec client/server protocol includes new commands to pass function names and arguments from client to server. See the server help file (or contact CSS) for additional information on the new SV_FUNC and SV_FUNC_WITH_RETURN commands.

July 11, 2004 - RELEASE 5.05.03-8

More Features For CANbus Interface

The built-in code to support CANbus devices has been improved with the addition of support for segmented SDO transfers and better reporting on SDO error returns.

Improvements For Socket-to-Serial Devices

Some models of Ethernet-to-serial interfaces generate a short stream of garbage characters when the initial socket connection is made, which caused presence tests for a number of serial devices in spec to fail. spec now attempts to flush out the garbage before the first command is sent.

July 5, 2004 - RELEASE 5.05.03-7

Fixes For EPICS Motor Record Support

A couple of old, minor problems with the spec support of the EPICS motor record associated with how spec maintains certain parameters in step units, while the EPICS data base maintains the parameters in engineering units, have been corrected. Previously, a negative step-size (or motor resolution) parameter would change the sign of motor base rate, slew rate and backlash in spec. The negative speeds would cause problems for the EPICS motor record code. Also, previously, if the initial connect events for motor base rate (VBAS), slew (VELO) or backlash (BDST) arrived before the connect event for the motor resolution (MRES), spec would, under certain conditions, maintain incorrect values for those parameters.

Several ERSF TACO Updates

The ESRF TACO support for CCD cameras will now assign dev_putget() error numbers to the global ESRF_ERR symbol, if it exists. Segmentation faults that could occur with spec hardware debugging turned on when TACO dev_putget() calls that returned strings returned null pointers without setting an error code are now prevented. Also, the TACO serial support can now set baud rates higher than 19,200.

July 1, 2004 - RELEASE 5.05.03-6

MDrive Channel Numbering Fixed Again

The intended fix included in spec release 5.03.02-1 for the IMS MDrive motor controller channel numbering for channels above number 9 turns out not to have been effective. This spec release has the true fix.

June 25, 2004 - RELEASE 5.05.03-5

Fix For Joerger VSC8/16 move_cnt Support

The code for the Joerger VSC8/16 VME scalers has been fixed so that the hardware responds as expected when used with the move_cnt command that gates scalers open for counting while a motor is moving.

Touch Up For Trinamic QUADpack/SIXpack Presence Test

The presence test for the Trianmic QUADpack/SIXpack motor controllers no longer tries other motors on a particular controller card if the first motor's presence test determines the card is unresponsive.

June 23, 2004 - RELEASE 5.05.03-4

New sock_par() Option For UDP Sockets

A new "connect_udp" option to the sock_par() function will create a socket using the UDP protocol, rather than the default TCP. See the sockets help file for more information.

New DAC Motor Device

The Measurement Computing PCI DAC 6702/6703 cards are now supported as DAC motors.

Update For Trinamic QUADpack/SIXpack Motor Controllers

Fixes and new features are included for the very recently added Trinamic QUADpack/SIXpack motor controller support. Problems with the base-rate and slew-rate units have been fixed, the ^C abort now works correctly, and the limit switches now function as they should. Also, new miscellaneous motor parameters for setting the peak and hold current are implemented. Type motor_par(mne, "?") for a list of supported motor parameters.

Preliminary Support For Encoders For Phytron Controllers

Preliminary support for encoders is included for the Phytron IXE, OMC and TMC motor controllers. Select IXE_E as the motor type and enter the encoder steps per degree on the optional motor-parameter screen to enable the feature.

Galil Support Now Available on Non-Linux Platforms

A bug that prevented the support for Galil motor controllers over Ethernet and serial interfaces added in spec release 5.02.02-1 from being available on platforms other than Linux has been fixed.

May 29, 2004 - RELEASE 5.05.03-3

Memory Mapping Fixes

Potential problems with the configuration of certain PCI cards supported by spec user-level code on Linux have been fixed. Previously, the spec code did not always make adjustments to the memory-map system calls if the PCI base-address values were not on a memory-page boundary (although the need for re-alignment is apparently rare). In addition, the code now does a better job of freeing mapped regions when hardware is detached during the reconfig operation.

May 27, 2004 - RELEASE 5.05.03-2

Preliminary Support For Trinamic QUADpack/SIXpack

This spec release includes preliminary support for the Trinamic QUADpack and SIXpack motor controllers.

Home-Search Update For Kohzu SC-2/4/800 Controllers

The code for the Kohzu SC-2/4/800 motor controllers now recognizes the optional home slew-rate, base-rate and acceleration motor parameters.

May 7, 2004 - RELEASE 5.05.03-1

OMS MAXp PCI Motor Controller Supported

spec now supports the new Oregon Micro Systems 8-channel PCI controller model MAXp. Each channel of this card can be used for stepper motors with or without encoders or for servo motors. See the oms help file for configuration details.

New Homing Procedure for OMS Controllers

A new highly configurable home search facility is available for the OMS motor controllers. See the oms help file for usage details.

May 7, 2004 - RELEASE 5.05.02-7

Fix For Using Single-Element Data Arrays

A bug introduced in spec release 5.02.01, where references to the single element of a one-element data array in certain contexts would result in an "Illegal reference to array" error, has been fixed.

New Commands To Access Digital I/O On NI 6601/6002

New counter_par() options are available to configure, write and read the eight digital I/O lines on the National Instruments 6601/6602 PCI counter/timers. See the ni660x help file for details.

Help With XIA HSC Serial Numbers

Some users have reported the XIA HSC (Huber Slit Controller) serial numbers in firmware don't always match the numbers stamped on the cases. The serial number must be entered in the spec config file, as spec must include the serial number in the command strings sent to the controllers. spec now displays the serial numbers read from the connected slit controllers that don't match serial numbers in the spec config file. That should help in diagnosing serial number problems. See the xiahsc help file for complete information.

April 29, 2004 - RELEASE 5.05.02-6

CAN Configuration Now Includes Baud Rate

The configuration for field bus controllers now includes a parameter for the baud rate.

New Support For CANnes PCI CAN Controller

spec now supports the Trinamic CANnes PCI CAN bus controller as a field bus controller type.

Update For Kohzu SC-2/4/800 Controllers

The support for the Kohzu SC-2/4/800 motor controllers has been revised to use the existing value of the controller's system setting 29, "Feedback Type" which controls whether position-maintenance mode is used when encoders are present. The previous spec version forced the parameter to zero. You must restart spec or type reconfig for spec to note a change in value made using the controller's front panel. Also, by default, spec performs backlash as a separate move. However, if optional "Generic Parameter 1" is set and is nonzero, spec will configure the controller to use its built-in backlash-correction feature. The built-in backlash correction appears slower than using a separate move, so spec does not automatically select the built-in feature.

April 26, 2004 - RELEASE 5.05.02-5

Fix For National Instruments PCII/A GPIB Controllers

Problems with the support for the old National Instruments PCII and PCII/A nec7210-based GPIB controllers added in spec release 5.05.01-4 have been addressed.

April 20, 2004 - RELEASE 5.05.02-4

Motor Mnemonic Length Enforced In Configuration Editor

The edconf configuration editor will now prevent the entry of motor mnemonics longer than the maximum seven characters accepted by spec.

Fix For Using Multiple National Instruments 6601/6602 Cards

A bug, which prevented using more than one National Instruments 6601/6602 counter/timer PCI card, has been fixed.

Fix For Updated Limit Behavior Of Huber SMC 9000

spec now recognizes the Huber SMC 9000 motor controller firmware update from November 2001 that changed the controller limit behavior. The old firmware would disable remote control when a limit switch was hit. The updated firmware allows the computer to move a motor after it hits a limit, but a new command is required to clear the limit status. This spec update will send that command when appropriate.

March 31, 2004 - RELEASE 5.05.02-3

Maximum Number Of Controllers In edconf Increased

The number of motor and counter devices that can be configured on the Devices screen of the edconf configuration editor has been increased from 24 to 40 for each.

Server/Client Enhancements For "Watched" Variables

Several improvements associated with "watched" variables set by the spec client prop_watch() function are included. Previously, the spec client wouldn't poll for asynchronous events, including events associated with changes to watched variables, unless the client was configured to use spec server motors or counters. That problem has been fixed. Also, redundant calls by the client to register watched variables on the server have been eliminated. Finally, the server will now stop sending events associated with a watched variable when all clients have unregistered the variable.

Fix For ANKA RST Generic Access

A bug, where spec would crash if an anka_put() or an anka_get() command were used when no ANKA RST motors or counters were configured, has been fixed.

Fix For Amptek MCA 8000/8000A

An adjustment to a timing loop for the Amptek MCA 8000/8000A has been made to accommodate an even faster PC.

Fix For Setting DAC Motor Limits

A rounding problem, where spec would generate an error message indicating the high limit was being reset every time a DAC motor was moved when the limit was set beyond the maximum, has been fixed.

Prompt Aesthetics Tuned

The placement of newlines in the vicinity of the spec prompt has been reengineered to present a more consistent appearance when using the libedit command-line editing library, particularly around ^C interrupts and when running in server mode.

March 22, 2004 - RELEASE 5.05.02-2

Update For Macro Hardware _config Routines

If the macro hardware _config() function explicitly sets an error return (by returning the string ".error."), spec will now mark the associated macro hardware controller (for the "ctrl" key) or motor or scaler channel (for the "mot" or "cnt" keys) as unresponsive. If the controller is unresponsive, all associated channels are considered unusable. spec won't attempt to access such channels, although that can be changed when the _config() function is called on the next reconfig.

Fix For Obscure unglobal and shared Bug

Improvements in the behavior of the unglobal command in spec release 5.02.02 had the unintended consequence of undoing the global scope of an array with the same name subsequently declared as shared in the same statement block. Now, a shared array will always have global scope.

New global array Syntax

It is now possible to preface a data array declaration with the global keyword. Array declarations in statement blocks default to global in any case, although, an unglobal statement for the symbol within the same statement block would force a subsequent array declaration to result in a local-scope array. The explicit global declaration gets around that problem.

March 13, 2004 - RELEASE 5.05.02-1

New Facility For Field Bus Interfaces

This spec release contains the first support for field-bus interfaces. Currently, only one field-bus (CAN) and one controller (MEN M51) are supported, although additional protocols and controllers are likely to be implemented in the future. Support for generic user-level access and for built-in field-bus hardware is included.

The user-level access to the field-bus is through the new fbus_get() and fbus_put() functions. The first argument to these function is the unit number of the intended field-bus controller, where unit numbers are assigned in the config file and currently run from zero to three. Currently only CAN bus is implemented, with the user-level functions currently behaving as follows. (Additional functionality is likely to be added in later releases.)

The fbus_get() function can take an optional second argument, namely the string "poll", which means to return immediately if no message is available. The function normally returns an unsigned long data array containing eight elements, which are filled with as many CAN packet elements as were provided by the CAN device. The data is returned from a first-in, first-out (FIFO) buffer of (currently) 100 elements. If the buffer is overrun, older elements are lost. If a global variable named HDW_ERR exists, it will be assigned a value zero if there is no error and data is available, a value three (TIMEOUT) if there is a timeout and a value of four (NONFATAL) if there is no data available with the "poll" argument.

The fbus_put() function can take up to nine arguments after the unit number, which are used to create the CAN packet that is sent out on the interface. The second argument is the CAN identifier. The remaining arguments are the packet data.

The built-in CAN support for motor controllers and other devices will use the same input buffer as the user-level functions. CSS recommends that CAN devices accessed through the above user-level functions be on a separate CAN interface from the devices supported by the built-in C code.

Support For MEN M51 Quadruple CAN Interface

spec now supports the MEN Mikro Electronik GmbH M-Bus model M51 Quadruple CAN interface. The device is selected in the new FIELD section of the Interfaces screen of the configuration editor. Each of the four CAN interfaces must be configured separately. (The address of each channel is offset by an additional 0x40 from the base address of the MEN module.)

Support For Mclennan PM595 CAN Motor Controller

spec now supports the Mclennan PM595 CAN-interfaced motor controller. Although the controller is based on the CANopen protocol, spec communicates with the device as a register-based CAN device, keeping the controller in the CANopen "pre-operational" state and using service data object (SDO) transfers exclusively. The homing method can be set with the optional "home_method" motor parameter.

New Rotary/Linear Optional Motor Parameter

A new "rotary" optional motor parameter is available on the second optional parameter screen of the configuration editor and as an argument to the motor_par() function. The parameter is so far used in the support for just one motor controller (MicroMo MVP-2001, see below). A nonzero value indicates a rotary stage.

Home Search Implemented For MVP-2001

The home search facility is now implemented for the MicroMo MVP-2001 motor controller. So far, these controllers have only appeared in spec applications in stages supplied by National Aperture, so the programming is geared for that hardware. The home search only functions for the rotary stages, and the optional motor parameter "rotary" should be set to indicate a rotary stage is being used. For the rotary stages, limits are disabled, but home searches are allowed. For the linear stages, limits are enabled, but home searches are not possible.

More Fixes For libedit With spec Server

A problem with the libedit readline-compatibility code dealing with setting the tty modes after the spec server receives an asynchronous signal from a client (generated by the client when aborting moving or counting, for example), has been fixed. The fix has not yet been submitted to the official libedit maintainers, as it is currently somewhat of a hack. However, the fix meets all the needs of spec.

March 8, 2004 - RELEASE 5.05.01-8

Fix To Accommodate TANGO Threads

Additional code has been added to accommodate linking spec with TANGO, a threaded object-oriented alternative to TACO, both of which are distributed computing environments developed at the ESRF.

March 2, 2004 - RELEASE 5.05.01-7

Plot Macros Now Automatically Grow Data Array

The standard plot macros will now automatically resize the SCAN_D data array by increasing the number of rows by 1,024 if the number of points in a scan becomes greater than the number of rows currently available. The initial default size for SCAN_D is 4,096 rows.

New setscans Option For Configuring Data File Contents

A new option is available in the setscans macro to have all the geometry-related motor positions saved at each point in the data file for regular, mesh, arc and radial HKL scans. Assigning a non-zero value to the new standard global variable _sav_geo_mot accomplishes the same thing. See the setscans help file for more information.

Bug Fix For Misconfigured EPICS PV Scalers

A bug, where spec would crash if EPICS process variable (PV) scalers were assigned channel numbers beyond the maximum configured, has been fixed.

February 26, 2004 - RELEASE 5.05.01-6

Update For ILL-2D Detector Support

A new Linux kernel driver to support a 24-bit digital I/O PCI card interface to the 2D detector electronics (ESRF model N110 TDC) used with some neutron detectors at ILL is included in this spec release. See the ILL_2d help file for more information.

February 23, 2004 - RELEASE 5.05.01-5

New wait() Options For Asynchronous Connections

It is now possible to wait until remote motors become fully connected and usable. (Currently, the only such motors are accessed via EPICS and the spec server interfaces.) Bit 3 in the argument to wait() that checks if remote_async() replies have all arrived will now also include checks on connections to spec servers and spec server and EPICS motors. See the updated wait help file for more information.

Fixes For libedit With spec Server

A flaw in the libedit readline-compatibility functions that produced extra prompt strings and left the terminal interface in the wrong mode after receiving remote commands from clients has been fixed.

Code For Tsuji CT16-01B Updated

spec code for the Tsuji CT16-01B counter/timer has been updated for the device's version 1.31 firmware.

New Focus 8752 Picomotor Controllers Supported

spec now supports the New Focus Model 8752 Intelligent Picomotor Ethernet controller in addition to the Model 8750 Intelligent Picomotor Network controller (using a serial interface), both to control the Model 8753 Picomotor Drivers.

February 18, 2004 - RELEASE 5.05.01-4

GPIB Sharing Recently Broken, Now Fixed

Modifications made for spec release 5.05.01 inadvertently disabled the feature to share control of GPIB controllers among multiple instances of spec. The ability to share GPIB controllers is now restored.

Direct Support Added For National Instruments PCII/A GPIB Controllers

spec now includes initial support for the old National Instruments PCII and PCII/A nec7210-based GPIB controllers using direct register access. No kernel-level driver is used.

February 17, 2004 - RELEASE 5.05.01-3

New "home_method" Optional Motor Parameter

A new "home_method" motor parameter is available on the first optional parameter screen of the configuration editor and as an argument to the motor_par() function. It is intended that this parameter will be used in a device-dependent manner to specify how to perform a home search. For some motor controllers that have a long list of numbered methods (the Kohzu SC-2/4/800, for example), this parameter will select one of those methods. For other motor controllers, this parameter may contain a command string to send to the controller to perform a home search (such as the Phytron IXE). For many motor controllers, this parameter will not be used.

Phytron Support Updated For OMC/TMC Models and Home Method

spec now includes support for the OMC/TMC Phytron motor controller models. Although there is a new entry to specify the Phytron OMC/TMC on the Devices screen of the configuration editor, the controller type on the Motor screen should be selected as IXE. In addition, the new "home_method" parameter can be used to specify the home-search string, rather than the first generic parameter (although that parameter will still be examined if "home_method" is not set).

Support For Kohzu SC-2/4/800 Motor Controllers

Initial support for the Kohzu SC-200, SC-400 and SC-800 motor controllers over RS-232C and GPIB interfaces is included in this spec release.

Support For MicroMo MVP-2001 Motor Controller

Initial support for the MicroMo MVP-2001 motor controllers (also branded as MicroMini by National Aperture) is included in this spec release.

Support For Physik Instrumente Model E710 Picomotor Controller

Initial support for the Physik Instrumente Model E710 picomotor controllers over RS-232C and GPIB interfaces is included in this spec release.

Byte Swapping Fix For ESRF Sensicam Support

spec now returns image data in the correct byte order on little-endian platforms (such as PCs) when reading data from the Sensicam CCD camera using the ESRF TACO device server.

February 3, 2004 - RELEASE 5.05.01-2

Fix For New Focus 8750/53 Support

The recent modifications for the New Focus 8750/8753 picomotor controller in spec release 5.04.04-10 inadvertently caused the motor channel numbering to be off by one. That problem has been fixed. Also the new unit/module/channel motor configuration is now implemented for this controller.

February 2, 2004 - RELEASE 5.05.01-1

Fix For Saving Pseudomotor Positions

A minor problem associated with pseudomotor positions has been fixed. Previously, the positions associated with calculational pseudomotors could be written to the settings file incorrectly as zero immediately after executing a reconfig command. If spec was quit before motor positions were recalculated, the zeroes would remain in the settings file, although the positions would be recalculated and saved in the settings file correctly the next time spec needed them.

Fix For Serial Devices In Simulate Mode

A minor problem, where if spec was started in simulate mode the ser_get() and ser_put() functions would generate errors, has been fixed. The errors did not occur if simulate mode was turned on after spec was started normally.

January 18, 2004 - RELEASE 5.05.01

Somewhat Revised Installation Procedure

The spec Install script no longer prompts for a system type - the system will be determined automatically. The platform types currently recognized (as seen in the return value of the standard uname utility) are Linux (x86), SunOS (Solaris 2), HP-UX (hp700) and Darwin (Mac OS X). (Support for OS X is still experimental.) Previously, the system type also included a prefix to indicate whether EPICS (epics_) or TACO (esrf_) support was to be linked. The choice of linking with TACO, TANGO or EPICS will now be made based on whether the new taco_home, tango_home or epics_home parameters are set in the install_data file.

New Option To Install

A new -f file option to the spec Install script allows specification of a file for the default parameters other than the default file install_data in the current directory.

Enhancements For Command-Line Editing

The optional capability to link spec with command-line editing libraries has been updated and enhanced. Previously, the spec installation could be configured to link with a version 2.0 release of the GNU readline library. Now spec may be linked (at the user's option) with all current and previous releases of readline, namely versions 2.0, 2.1, 2.2, 2.2.1, 4.0, 4.1, 4.2, 4.2a and 4.3.

CSS no longer aggregates a readline distribution with the spec distribution, since the readline library is now included with most modern Linux distributions and, in any case, can be easily retrieved (from ftp://ftp.gnu.org/gnu/readline/) and readily installed on any platform supported by spec.

Also, an alternative command-line editing package is included with the spec distribution, namely the NetBSD libedit library. While the readline library code is from the bash shell, the libedit library is rooted in the tcsh shell. Although most command-line editing and history-recall features are identical in readline and libedit, there are some small differences which may lead users to prefer one over the other. Either or neither can be used with spec. The choice is made at installation time based on an option selected when running spec's Install script. The default choice is libedit, since that library is included with the spec distribution.

Support For EPICS 3.14

spec now supports EPICS release 3.14. The current spec distribution includes support for both EPICS 3.13 and 3.14, although only one or the other can be linked with at a time. The path given as the "EPICS library directory" to the Install program (saved as the epics_home option in the install_data file) is examined to see whether it contains contains an EPICS 3.13 or 3.14 distribution, and spec links with the appropriate spec and EPICS libraries. The EPICS library directory parameter should be set to path name at the top of the standard EPICS distribution hierarchy, that is, the path should be a directory that contains a subdirectory named base.