spec

Software for Diffraction

changes

highlights of modifications for spec release 5.09

May 19, 2011 - RELEASE 5.09.02-4

Fix For Macro Function Assignment To Unset and Untyped Variables

An unintended side effect of the stricter associative array syntax checking introduced in spec release 5.09.02-2 prevented assignment of associative arrays to variables not yet used and not explicitly declared as associative arrays. Such usage was allowed in the past and is restored with the fix in this release.

May 13, 2011 - RELEASE 5.09.02-3

Fix For Macro Function Return Of Associative Arrays

A bug, where the ability to return an associative array from a macro function was broken in the previous release, has been fixed.

May 5, 2011 - RELEASE 5.09.02-2

New Command Line Option To Open Log Files

A new start-up option to specify an output file on the command line is available, as in

spec -l somefile.log

Output to the file will begin immediately, so will include the initial hardware configuration messages. The files will be opened even when starting fresh.

Support For USB DAC As DAC Motor

The Measurement Computing USB-3100 series digital-to-analog converter (DAC) modules are now supported as DAC motors in spec. See the dac help file for details.

Support For Digital I/O On DAC Devices

The PCI and USB DAC devices supported by spec as DAC motors usually include digital I/O lines as part of the hardware package. spec now supports configuration and control of the digital I/O lines directly using motor_par() commands. See the dac help file for details.

Fix To Associative Array Assignment

A syntax error, where assignment of an associative array (say A) to a single associative array element, as in x[0]=A, has been quietly ignored from the earliest spec releases. Since spec release 5.07.02-9, such a command would result in actual creation of invalid objects. The unallowed assignment is now detected, an error message is displayed and control returns to the main prompt.

Fixes To Array Assignment In Server

Use of the var property in the spec server for assignment to associative array elements has been cleaned up. Previously, the following (where A is an associative array with more than one element) was not detected as an error when received by a spec server:

prop_put("localhost:fourc", "var/x[1]", A)

In addition, an assignment of the sort

prop_put("localhost:fourc", "var/x[1]", A[3])

would assign to x[3] rather than x[1]. Finally, it had been previously possible to use the var property to create new elements in the spec server's built-in associative arrays, such as A or S, which is not allowed. All these issues should now be fixed.

Fixes For XIA DXP Support

A bug, introduced in spec release 5.08.06-1, which could break support for the XIA DXP modules if more than one MCA was configured, has been fixed. In addition, the CSS version of the XIA DXP support library, available at

http://certif.com/downloads/extras/xia_dxp_css.tgz

has been updated to work correctly when used with 64-bit binaries.

Reversion For User-level GPIB-ENET Interruptible Transfers

The feature allowing ^C interrupts during user-level GPIB calls, such as gpib_put() and gpib_get(), introduced in spec release 5.09.01-3, has been disabled for the National Instruments GPIB-ENET device.

Fix For Unintended Access To Unresponsive Controllers

In a fix for controller unit number assignments in spec release 5.06.02-8, a bug was introduced into the code for a number of motor controllers and timer/counters where the flag to mark an unresponsive controller was inadvertently cleared, resulting in wasted time doing presence tests on individual channels or on attempts to access unavailable hardware, resulting in spurious error messages. That problem has been fixed. Affected controllers were the Detel S21DC, Huber 9000/9300-LCD, JVL SMI20B, Kohzu SC-200/400/800, MURR counters, Micro-Controle ITL09, New Focus Picomotor 8732, Newport ESP300, Newport MM2000/2500/3000/4000/4005/4006, Newport PM500, Oriel Encoder Mike 18092, PI C-630/663/804/844/860/862/863, PI E710, PMC Corp DCX and Tsuji CT16/NCT08 models.

Small Fix For JVL Motors

The generation of a spurious configuration-time error message associated with the JVL motor support that could appear with particular hardware configurations has been fixed.

Small Fix For ACS MCB-4B Motors

An issue with the MCB-4B motor controller support, introduced in spec release 5.08.02-1, where if the configured value for the acceleration parameter was too big, spec programmed the controller with the minimum allowed value rather than the maximum allowed value, has been fixed.

Fix For Misspelled Parameter For Canberra MCAs

The mca_par() parameter "elapsed_counts" was misspelled in the Canberra Multiport II and Lynx MCA support with the position of the initial s and p characters reversed. The misspelled version is no longer recognized. Users should adjust any macros that relied on the mispelling.

Updated s1d2 Geometry For Pseudo Tau Rotation

The s1d2 three-motor geometry code (1 sample rotation, 2 detector rotations) now recognizes a configuration where the tau detector rotation consists of a two-motor configuration consisting of a translation perpendicular to the line from the detector to the sample and a rotation of the detector. Real motors corresponding to those motions should be configured as tauT and tauR. The tau motor will be a pseudomotor. New geometry-specific macros setlen to set the distance from the detector to the sample and settrack to turn on and off the tracking of tauR and tauT with tau are provided. See the geo_s1d2.c files and the s1d2.src macros for details.

March 1, 2011 - RELEASE 5.09.02-1

Fixes For Multiple Master Timers

An issue, where the first master timer in the config file was not necessarily the timer that gated software-controlled counters, has been fixed. When multiple master timers are used (a feature added in spec release 5.09.01-1), the first such timer device in the config file is the "supreme" master and will control when commands are sent to start and stop non-hardware gated counters and MCA- and CCD-type devices.

Updates For TACO VCT6 Device Server Support

The spec support for the TACO VCT6 device server has been updated to support multiple device server instances, with each instance allowed to contain a master timer. In addition, reading of the counter results is now more efficient.

Preliminary Support For Physik Instrumente E-712 Piezo Controller

This spec release supports the Physik Instrumente E-712 piezo controller over serial and Ethernet interfaces. See the E712 help file for details.

Updates For Newport ESP300/301 Support

The built-in code for the Newport ESP300 and ESP301 motor controllers now includes support for the following standard optional motor parameters: "deceleration", "home_base_rate", "dc_dead_band" and "dc_settle_time". Previously, the deceleration was programmed to the same value as the acceleration, and will still be, if the optional "deceleration" parameter is unset. The specific ESP300/301 parameter for "home_base_rate" was not previously programmed. The dead-time and settle-time parameters are associated with spec internal operation. If "dc_dead_band" and "dc_settle_time" both have non-zero values, spec will wait for at least the duration specified by the settle time after the controller indicates the move is done and also until the position is within the dead-band of the target position. If the motor doesn't settle into the dead-band within 5 seconds, spec will print an error message that the motor isn't settling.

Fix For Amptek MCA 8000A Support

A bug in spec's support for the new Amptek MCA 8000A firmware that sometimes resulted in a program crash when reading data from the MCA has been fixed.

Updates For USB udev Support On Linux

The spec Install script will now automatically install a rules file for spec-supported USB devices in /etc/udev/rules.d if the Linux platforms supports the udev feature. The rules file will ensure that all spec-supported USB devices will be accessible to ordinary users running spec.

Updates For Am9513-based Counter/Timers, Including USB Support

This spec release includes several updates to the Am9513-based counter/timer support. First, the Measurement Computing USB-4300 series models are supported (currently, only on Linux platforms). Second, the Measurement Computing PCI-CTR05/10/20HD are now fully supported (previously, counting-to-monitor didn't work). Finally, direct access to the digital I/O ports is available on all cards without requiring additional hardware configuration. Access is via counter_par() commands. See the updated am9513 help file for details.

Updates in Attocube ANC350 Support To Match Hardware Firmware Updates

Non-backward compatible updates in the firmware included in the ANC350 piezo motor controllers have been addressed, along with support for new parameters. The "poslooprange" is now only used with older firmware units. The new "poslooptime", "humpsensitivity", "humpstepsmin" and "humptime" parameters are available for newer firmware units.

Fix For Standard scan_head Macro

A problem with the standard _head macro (the default definition for scan_head), where an error occurred if doing a scan when no motors were configured, has been fixed.

Fix For config File Update During Install

Previously, when updating spec using the standard Install script, values for the optional hardware "read_mode" parameter would be reset to zero during the procedure where the installation checked for compatibility between the config file and the spec update. That issue has been fixed.

Fixes For Two libedit Issues

A bug introduced into the libedit package, where command history recall by number using the !N notation would return the command N+1, has been fixed in the upstream source and in the version distributed with spec. In addition, a patch to the upstream source to restore inclusion of the directory "/" indicator with filename completion, included in spec release 5.08.04-4 but inadvertently removed in release 5.09.01-1, has been put back.

December 15, 2010 - RELEASE 5.09.01-4

Updated Support For ULS Counter/Timer

The support for the Korean ULS 3020 counter/timers has been updated to work with versions 3 and 4 of the device firmware.

December 13, 2010 - RELEASE 5.09.01-3

New gpib_par() Command With "timeout" Option

A new gpib_par() command is available. The only option currently available is "timeout", which can be used to return or set the timeout value for user-level GPIB transfers. See the gpib help file for details.

User-level GPIB Transfers Now Interruptible With ^C

The user-level GPIB commands, gpib_get() and gpib_put(), can now be interrupted with ^C, although only with GPIB controllers configured to use spec's built-in GPIB support (National Instruments PCI-GPIB, AT-GPIB, PCII, PCIIA, GPIB-ENET and Scientific Solutions IEEE-488).

Fix For mca_sel("?")

A bug, where the mca_sel("?") command could cause spec to crash when the hardware configuration included a Canberra Multiport MCA with more than one MCA submodule, has been fixed.

Fix For surf Calculation

An old bug (since 1986) in the surf geometry code for calculating motor positions from reciprocal space coordinates for negative L has been fixed.

Warning Message Suppressed For Restored Socket Connections

When the user-level sock_get() and sock_put() functions detect a dropped connection, spec automatically attempts to restore the connection and complete the transaction. Previously, spec would print a warning message when this happened. Now the message is only printed if the print-warning-message debug level is enabled. However, an error message will be printed if the connection could not be restored.

Bug Fix and Updated Support For Mythen

A bug where spec did not send updated values for the threshold parameter for the Dectris Mythen 1K MCA has been fixed. In addition, preliminary support for the Mythen version 2.0 firmware has been added. See the mythen help file for details.

Updated Support For Huber SMC 9300

spec now supports the simultaneous start feature available on the Huber SMC 9300 stepper motor controller with firmware at level 1.1.97 or above. In addition, when using the command pass-through options of "read" and "send" with motor_par(), spec will automatically insert the channel number to a properly formatted command string. Also, the standard optional motor parameter "deceleration" is now supported for the 9300.

Fix For Newport Agilis Motor Controller

A formatting error in a command sent to the Newport Agilis motor controller that generated spurious error messages on models with newer firmware has been fixed. The error was ignored on earlier versions of the Agilis firmware.

Preliminary Support For Bruker Vantec-1 MCA

This spec release has initial support for the Bruker Vantec-1 MCA over a Ethernet interface.

Preliminary Support For Physik Instrumente E-816

This spec release has initial support for the Physik Instrumente E-816 piezo motor controller over a serial interface.

October 17, 2010 - RELEASE 5.09.01-2

New mca_par() Options For Amptek PX4

New mca_par() "slow_counts" and "fast_counts" options are recognized for the Amptek PX4/DP5 support. The "slow_counts" option is synonymous with "elapsed_counts". See the px4 help file for details.

Fix For tango_get() With "Extras"

A bug with the tango_get() feature that returns attribute information (such as data type and time stamp) in an associative array passed as an optional third argument has been fixed. Previously, use of that feature would likely corrupt spec's memory arena.

October 6, 2010 - RELEASE 5.09.01-1

Multiple Master Timers Now Supported

Preliminary support for multiple master timers is now available. However, currently, for most hardware only one master timer of a particular type is allowed. (The EPICS scaler record and macro-hardware counters do now support multipler masters of the same type.) Support for multiple master timers of the same kind will be added as needed and when feasible for additional controllers types. When multiple master timers are configured, spec will program each for the count interval and start each of them after enabling all counters. The functions that wait for the timer to finish will now wait for all the configured timers to finish. For counters and for MCA- and CCD-type devices configured in "auto_run" mode that are not hardware gated by a master timer, spec will halt those devices when the master timer that appears first in the config file reaches its preset.

Waiting For Acquisition-type Devices Improved

For acquisition devices (MCAs, CCDs) with "auto_run" mode enabled such that the devices are started automatically during counting, waiting for counting with the wait() function will also include waiting for those devices. See the wait help file.

spec Server Now Handles dofile() Sent From Client

Previously, when the commands dofile() or qdofile() (or macros that invoke the commands) were sent by a client as commands to be executed by a spec server, the command files wouldn't be read until a newline was typed at the server keyboard. That limitation has now been removed.

spec Server Now Handles reconfig and savstate Sent From Client

Previously, the reconfig and savstate commands were not supported when sent from a client to a spec server. Those commands are now available.

Increased Maximum Number of Motors

When the maximum number of motors was last increased (November 2003), it was mentioned that when a user hit the new limit of 200 motors, the code would be revised to remove any limit. Well, a user has hit the new limit, but the code rewrite will be deferred in order to more quickly release a version with a new maximum number of motors. The new maximum is 256 motors.

spec Will Continue When Too Many Motors Or Counters Are Configured

Previously, if more than the maximum number of motors or counters was configured, spec would abort hardware configuration. Now, spec will complete hardware configuration and simply ignore the configuration of motors or counters beyond the maximum allowed.

New ser_par() drain Option

A new "drain" option to the ser_par() function will cause spec to delay until all output written to the associated serial device has been transmitted. The call only works on built-in Linux or UNIX serial ports. See the serial help file for details.

Updated USB Support On Linux

On Linux platforms, spec now supports the udev (dynamic device management) method for accessing USB devices. The usbfs (also known as usbdevfs) file system method remains supported for older Linux distributions. In addition, if linked with the libusb library (currently only the 0.1 version is supported), spec will use that. For using udev method on Linux platforms, a spec_usb.rules file is now included in the spec distribution that can be copied to /etc/udev/rules.d. That file contains permissive permission configurations for all spec-supported USB hardware. When the system starts up, device permissions will be set so that all users can access the specified USB devices.

Fix For Reconnecting To extern Shared Arrays

A bug, where a second extern shared array declaration for the same array could generate a segmentation fault, has been fixed. The bug had been introduced with a shared-array fix for a different problem in spec release 5.08.01-1.

Fix For Crash With Certain Motor Controller Configurations

A bug, which resulted in a segmentation fault under certain conditions on certain platforms, has been fixed. The crash could occur if a channel number was equal to the number of channels configured for an EPICS motor controller (or three other little-used controller types: AGILIS, FC501A, IPS). The crash occurred on reconfig or on exiting spec and was only seen on Solaris platforms.

Recent Baud Rate Updates Now Working

Some of the baud-rate related updates announced in spec release 5.08.06-4 that weren't quite working are now fixed. In particular, setting non-standard baud rates of 7200, 14400 and 28800 now works on Linux platforms, and the "baud" option to ser_par() now correctly returns the baud rate. In addition, using ser_par() to change the baud rate will now print a fail message and return -1 if the change was ineffective, which can happen, for example, if the underlying driver does not support the requested rate.

scan_tail Now Included In timescan and loopscan Macros

The _timescan macro, which contains most of the code for the timescan and loopscan macros, now includes a call of the standard scan_tail macro, which, by default is defined as _tail. That macro calls various user hook macros, does end-of-scan plotting, and clears the scan-active bit of the _stype variable.

Fixes For startup and save Macros For Geometry-less Configurations

The no_hkl macro, invoked automatically in the standard macros for the geometry-less spec configuration, now properly defines null macros for the startgeo and savegeo which allows the standard startup and save macros to work when no geometry is included in the configuration.

The getscan Macro Fixed To Work With Plotting

The getscan macro now updates the global "last-data-point" symbol LDT to accommodate the plotting macros in the plotarray.mac file.

Fix For showUB and enterUB Macros

A 13-year old bug where the showUB and enterUB macros had the rows displayed as columns has been fixed.

Bug In TACO Error Reporting Fixed

A bug, where TACO errors associated with the built-in support for TACO devices would not be displayed after calls of the user-level taco_io() function when either of the global variable TACO_ERR or ESRF_ERR was set to -1, has been fixed.

Faster EPICS Monitor Checks

The overhead associated with the "monitor_check" option to an epics_par() call has been decreased from 0.01 seconds per call to something much less.

Less Overhead For EPICS Scaler and PV Counters

spec now uses callback events to keep track of values for EPICS scalers and PV counters. Previously, spec used channel access gets to retrieve the values when the getcounts command was executed. The callback method should decrease per-point overhead during scans.

Fix For wait(8) For EPICS Motor Connections

The documentation for the wait() built-in function says that if bit 3 of the optional argument is set, the function will wait for connections from spec servers and EPICS remote motors. The behavior was broken with respect to testing for EPICS motors, but has now been fixed.

Updates and Fixes For Dectris Mythen Support

Several issues with the initial support for the Dectris Mythen 1K MCA have been addressed. The current spec support is for Mythen firmware up to version 1.3.

New Check For Reset With Trinamic Motor Controllers

When power is cycled on the Trinamic motor controllers, a number of parameters need reprogramming. Otherwise, wild and unexpected movements may occur. Although one should never cycle the power on hardware controllers while spec is running, the Trinamic controllers do have a status flag that allows software to detect when the power has been cycled. A new option will have spec check this flag at intervals and reprogram the controller parameters if a power cycle is detected. See the trinamic help file for details.

Fix For Canberra Lynx (DSA-3000) MCA

A bug which broke the support for the Canberra Lynx (DSA-3000) MCA on some platforms has been fixed. In addition, the spec support has been updated to work with the current release of the Lynx firmware.

Updated PX4 Support For DP5

The support for the Amptek PX4 MCA has been updated to work with the new model DP5 (using its PX4 compatibility mode). Support for the additional DP5 features will be added to spec soon.

Fix For Multiport MCA Support Over GPIB

A timeout problem when reading large data sets over GPIB from the Canberra/Oxford/Tennelec/Nucleus Multiport MCA has been fixed.