spec

Software for Diffraction

changes

highlights of modifications for spec release 5.02

March 2, 2003 - RELEASE 5.02.04-9

Fix For Parsing Of vme_xxx() Options

An old bug, where a single argument containing a comma-separated list of options for the vme_get(), vme_put(), vme_get32(), vme_put32() and vme_move() functions wasn't parsed correctly, has been fixed. Options contained in a comma-separated list of arguments were not a problem.

Fix For ESRF TACO MAXE Motor Limits

spec now recognizes the case where a motor interfaced using the ESRF TACO MAXE device server has both limits active. Previously, only the case where one limit was active was recognized.

February 21, 2003 - RELEASE 5.02.04-8

New array_op() Option

The "sum" and "sumsq" options of array_op() can now take a third argument to specify a frame size for return values that are arrays of sums of elements. See the arrays help file for details.

Support For Struck SIS1100/3100 PCI to VME

spec now supports the Struck model SIS1100/3100 PCI to VME bus coupler on Linux platforms.

Fix For Channel Numbering For PI C-804

An off-by-one numbering problem for the the Physik Instrumente C-804 motor controller, introduced in spec release 5.01.01, has been fixed.

February 11, 2003 - RELEASE 5.02.04-7

Crash On Certain Array Errors Fixed

A bug introduced in spec release 5.02.03, where the error messages that were to be displayed on certain array operations (divide by zero or an assignment of an array to a scaler) instead produced segmentation faults on certain platforms, has been fixed.

February 6, 2003 - RELEASE 5.02.04-6

New Debug Option For Socket I/O

If the bit 0x400000 is added to the global DEBUG level when bit 0x40 (hardware debugging) is also set, the messages sent and received over sockets will be displayed in an all-hexadecimal format, rather than the normal ASCII with backslash escapes for non-printable characters.

Shared Memory Fix For HP Platforms

One of the shared memory improvements in spec release 5.02.01-1 apparently resulted in a bug on HP platforms, in that shared memory segments created within one spec process would not be visible to other processes. That problem has been corrected, although the automatic deletion of shared segments is back to its pre-release 5.02.01-1 level of robustness for HP platforms.

February 3, 2003 - RELEASE 5.02.04-5

Obscure eval() Bug Fixed

An obscure bug, where the usage eval("#") would cause spec to crash, has been fixed.

MCS Support For Seiko EG&G MCA 7700

spec now supports multichannel scaling on the Seiko EG&G MCA 7700 device. New arguments for mca_par() to support MCS mode are "mcs" to set multichannel scaling mode, "dwell" to set the dwell time (with a value of -1 setting external dwell), "passes" to set the number of MCS passes and "elapsed_passes" to read the numbers of MCS passes completed.

Retry Feature For EPICS Reads

This version of spec will retry EPICS channel-access reads that fail with a timeout. The new "retries" argument to epics_par() can be used to read or set the number of retries. Although a process variable name must be provided to epics_par(), the setting is currently global to all process variables. The default value is two, and the default is restored each time spec is run. Messages will be printed when the channel access reads are retried. Users are requested to inform CSS if retries prove successful (or not).

February 2, 2003 - RELEASE 5.02.04-4

January 30, 2003 - RELEASE 5.02.04-3

Fix For edconf Configuration Editor

A bug in the edconf hardware configuration editor, where a motor's unit/channel information would be lost when a motor was inserted or deleted and adjacent motor columns did not have unit/channel information turned on, has been fixed.

New Feature For the edconf Configuration Editor

When in the list menus of the edconf hardware configuration editor, typing a letter will scroll to the first item in the menu that begins with that letter. The letters are case insensitive. However, the command characters j and k are still recognized as moves down and up, respectively. However, typing J or K will cause a jump to the items matching those letters.

January 27, 2003 - RELEASE 5.02.04-2

Fix For Four GPIB Controllers

A bug that prevented GPIB controller unit four from being recognized has been fixed.

Word Access for ISA DAC Motors

ISA digital-to-analog modules can now be configured for either byte or word access. Previously, only byte access was used. Also, see the new dac help file for a description of the DAC motor interface.

Fixes For Recent Update To ESRF TACO Maxe Motor Controller Support

Problems with excessive hardware reads in the revised Maxe code included in spec release 5.02.03-4 have been fixed.

January 17, 2003 - RELEASE 5.02.04-1

newfile Macro Fix

The newfile macro will now write the #F control line that contains the file name for new data files, no matter what the starting scan number is. Previously, the file name was only written for new files when the starting scan was number one.

Fix For Geometry-less Installations

The installation procedure will now create a start-up command file for the spec-type geometry-less configurations that aren't named spec. The start-up file will be named with the first four letters of the configuration name, appended with .mac and contain a call of the no_hkl macro.

Updated MXC Hardware Support

Support for the Bruker (formerly MAC Science) MXC motor controllers and counter/timers has been updated to work with another version of the controller.

ESRF UDP Transfer Size Increased

The maximum data size for esrf_io() UDP transfers has been increased from 8,192 to 32,768 bytes.

December 12, 2002 - RELEASE 5.02.04

Pseudomotor Improvements

The set macro now works with pseudomotors. For the kind of pseudomotor where the motor position is calculated from the positions of one or more real motors, such as with the kappa configurations of the fourc or psic geometries, the chg_offset() function, as called by set, will now automatically adjust the offsets of the real motors on which the pseudomotor depends. spec also now enforces the rule that for this type of pseudomotor the user and dial positions must be the same. Thus, the chg_dial() function, as used in the set_dial macro, will produce an error if an attempt is made to change the pseudomotor dial position. Note, the definitions of the set and set_dial macros have been modified as part of the update.

December 5, 2002 - RELEASE 5.02.03-6

November 22, 2002 - RELEASE 5.02.03-5

New Signal Handling On Exit

spec's exit behavior on receiving the signals SIGTERM (the default signal sent with the kill command) and SIGQUIT (the signal sent with a keyboard ^\, at least on most platforms) has been changed. Previously, spec would wait for the current moving and counting to finish, or wait for an additional signal, such as a SIGINT from a keyboard ^C, that would stop the acquisition. Now spec will halt the hardware activity when the first signal arrives. Also, spec now catches SIGHUP (the hang-up signal, as sent by a window manager when the window manager exits) and halts hardware activity as with SIGQUIT and SIGTERM. spec will save the user state file on SIGHUP, but still will not with SIGQUIT and SIGTERM.

Fix For eval()

A bug, where an eval() call of a macro function that contained a loop that called a macro function that had no return value and where that call would cause the loop to break after one iteration, has been fixed.

Fix For Motor Round Off

An obscure bug with motor position rounding has been fixed. With certain step size values, if the user-position offset was set to exactly one half step beyond the configured step size, under some conditions, such a motor would move a step when other motors were commanded to move.

November 20, 2002 - RELEASE 5.02.03-4

Motor Power Control For Tsuji Controllers

If the optional motor parameter "generic parameter 1" is set for a Tsuji PM16C-02/04 motor channel, spec will issue commands to turn the motor hold current off when the motor is not moving. The parameter value is the delay time (in seconds) both between the time the power is turned on and the move is started and between the end of the move and the time the power is turned off. A value of zero will skip the delay. If the field in the configuration editor is blank (type ^D to blank the field), then the motor hold current will remain on all the time.

New Version for ESRF TACO Maxe Motor Controllers

The code to support the ESRF TACO Maxe motor controllers has been reorganized as part of a modernization effort. Functionality should remain as before, but if anomalies are noticed, please contact your spec administrator or CSS HQ.

November 18, 2002 - RELEASE 5.02.03-3

Fix For x11filt Fonts

spec now accepts a parameter of either c (character cell) or m (monospace) in the spacing field of the X Logical Font Descriptor (XLFD) string. Previously, only m was accepted (unless overwritten by specific font choices using an Xdefaults resource file or a plot_cntl() call).

October 26, 2002 - RELEASE 5.02.03-2

Support For psic Azimuthal Detector Rotation

spec will now calculate detector rotation in the psic geometry according to the E. Vlieg 2+3 diffractometer configuration. See the psic help file for more information.

Support For Parallel-Rail 3-Axis Four-Circle Geometry

The fourc geometry code now includes preliminary support for a new configuration that has monochromator, sample circles, analyzer and detector circles mounted on four parallel rails, perpendicular to the incident beam. See the geo_fourc.c and macros/fourc.src files for additional information.

Updated Geometry Code

The remaining geometry code has been revised to use the current spec convention of returning an error rather than resetting to command level when a calculation fails. The affected geometries in this revision are gmci, s2d2, surf, twoc, w21h and w21v. (The other geometries were updated in prior releases.) Also, the standard macros br, mk, ca and cal have been revised to exit if the function call embedded in the calcA macro (to calculate motor positions given the HKL of the scattering vector) fails.

Support For Velmex VXM Motor Controllers

spec now supports the Velmex, Inc. VXM-1 and VXM-2 motor controllers over a serial interface.

Support For IMS MDrive Motor Controllers

spec contains preliminary support for Intelligent Motion Systems, Inc. MDrive 17/23/34 motor controllers over a serial interface.

Upgrade to Gomm Controllers

The code for the Uni-Erlangen Gomm motor and counter controllers now supports controllers on more than one serial line.

October 20, 2002 - RELEASE 5.02.03-1

Fix and Enhancement For Rigaku Controllers

spec now works properly with a variant firmware version in a Rigaku RINT or D/MAX type motor controller. Rigaku version numbers are unknown. The manifestation of the problem was that motor positions weren't read correctly during or just after a move. That problem is fixed. Also, Rigaku firmware has never allowed a remote program to read motor positions while motors are moving. spec will now estimate the current position based on motor speed and acceleration and display the estimated position during updated moves.

October 13, 2002 - RELEASE 5.02.03

Fix For array_dump() and array_pipe()

A bug introduced in release 5.01.01 (as an unintended consequence of another fix), which limited the output of array_dump() and array_pipe() to 64 columns of the array argument, has been fixed.

Improved ^C Responsiveness During Array Printing

A ^C interrupt during output of a large data array with the print command will now more likely stop the output.

New motor_par() Options To Set Limits

The new options "low_limit" and "high_limit" are available to set and retrieve motor limits. The set_lim() and get_lim() built-in functions continue to be available.

Fix For Very Large Arrays

A recently introduced bug, where a negative data array dimension in an array declaration would be interpreted as a very large number rather than produce an error, has been fixed.

New Command Character in edconf

The double quote character " is now recognized by the configuration editor edconf as equivalent to the single quote character ' as a command to begin string-entry mode.

September 30, 2002 - RELEASE 5.02.02-12

Fix For Compumotor 3000 and 4000 Motor Controllers

A bug, where spec could segmentation fault when trying to use the old Compumotor CM3000 or CM4000 motor controllers with recent versions of the National Instruments GPIB driver, has been fixed.

September 20, 2002 - RELEASE 5.02.02-11

Fix For Detecting EPICS Motor Configuration Error

A bug, where spec could segmentation fault when EPICS motors were configured on the Motor screen of the configuration editor but the number of motors on the Devices screen was zero, has been fixed.

Fix For Setting TACO Serial Line Parity

A bug, where spec didn't adjust the number of data bits from eight to seven on the TACO serial line driver when setting parity to even or odd, has been fixed.

September 6, 2002 - RELEASE 5.02.02-10

Bug In Serial and Socket EOS-mode Reads Fixed

A bug introduced in release 5.02.02 (May 20, 2002), where when reading serial devices in end-of-string (EOS) mode, a false EOS match was sometimes reported, has been fixed. The bug affected both built-in hardware code and user-level ser_get() and sock_get() functions.

September 2, 2002 - RELEASE 5.02.02-9

Plot Ranging Bug Fixed

A bug, where the high-resolution plotting in spec would hang on certain platforms or display peculiar axis labels on others if all the data points for the x or y axis were an identical very large number (such as 1e38), has been fixed.

Newport MM4000/4005/4006 Updates

A number of fixes and updates have been made for the Newport MM4000/4005/4006 motor controller support. For the 4005/4006, the commands (unavailable on the 4000) to set the base rate, the home base rate and the home acceleration are now implemented. Also, it is now possible to set the dial (home) position to an arbitrary value on all three models. An alternate home command (generally "OR2"), rather than the default "OR1" can be selected by entering the command as Generic Parameter 1 on the second optional motor parameter screen of the configuration editor. Also, limit searches are now properly implemented on the 4005 and 4006 models (although unavailable on the 4000 model). In addition, problems with doing a move after hitting a hard limit have been fixed. Finally, the settle-time feature is now supported with these controllers.

August 21, 2002 - RELEASE 5.02.02-8

Shared Memory Fix For Solaris Platforms

One of the shared memory improvements in spec release 5.02.01-1 resulted in a bug on Solaris platforms, in that shared memory segments created within one spec process would not be visible to other processes. That problem has been corrected, although for Solaris platforms only, the automatic deletion of shared segments is back to its pre-release 5.02.01-1 level of robustness.

August 11, 2002 - RELEASE 5.02.02-7

MCA Interface Additions

A new MCAS global variable is available that is set to the total number of configured MCA devices. The mca_sel() function can return one line of information about a particular MCA using the syntax mca_sel(n, "?"), where n is the MCA device number.

Update to Roentec MCA Support

A couple of features have been added to the Roentec XFlash MAX MCA support. The device can now be configured to run at any baud rate. Previously, the reset command sent by spec would reset the baud rate to 38400. A new mca_par() option "bin" can be used to set the number of channels averaged together within the device during the data read out. For hardware configurations that support live-time presets and readouts, the standard live-time and dead-time mca_par() commands are now available.

Support For Ortec MCS-PCI Multichannel Scaler

spec now supports the Ortec MCS-PCI multichannel scaler module. See the mcspci help file for details.

Help Display Bugs Fix

A bug introduced in release 5.01.03, where display of a long help file using either the gethelp() function or the chelp shell utility would cause a segmentation fault on some platforms, has been fixed. Also, the b command to move backwards a page when using the built-in pager was left out of that release, but is now restored.

July 23, 2002 - RELEASE 5.02.02-6

Fix For Macro Functions Returning Arrays

A bug remaining from the release 5.02.02-2 fixes for data arrays used with macro functions has been fixed. Specifically, a macro function can now return a data array declared as a local in the macro function without causing a segmentation fault or bad values in the returned array.

Fix For Plot Macro Setup

A bug in the plot macros, where the SCAN_D data array would not be configured correctly if the symbol did not already exist as a two-dimensional array, has been fixed.

July 16, 2002 - RELEASE 5.02.02-5

Extern Shared Array Fix

A bug, where declaring an extern shared array more than once for the same array would result in a segmentation fault, has been fixed.

July 10, 2002 - RELEASE 5.02.02-4

Fix For IMS Controllers

A bug introduced in spec release 5.01.03 that broke party-line mode for IMS motor controllers has been fixed.

July 3, 2002 - RELEASE 5.02.02-3

Support For Ortec 996 Counter/Timer

The Ortec 996 one-channel counter/timer is now supported in spec as either a single channel counter or a single channel counter with blind timer. See the ortec help file for details.

Fix For Setting EPICS Timeout

It is now possible to set the timeout value for an EPICS process variable using epics_par() before connecting to the variable in the remote IOC. Previously, the timeout could be set only after the connection was made, which would be impossible if the default timeout was too short to make the connection.

Fix For Setting TACO Timeout

An old bug that affected setting the RPC timeout for TACO (ESRF) device server connections has been fixed. The bug had little impact except when attempting to set a timeout of less than one second.

June 21, 2002 - RELEASE 5.02.02-2

Fixes For Macro Functions With Data Arrays

Bugs in recent spec releases involving memory leaks and memory corruption errors when passing data arrays to macro functions as arguments or from macro functions as return values appear to be fixed. Also, behavior when passing subarrays as macro function arguments is now well defined. A subarray will be passed by value. That is, new memory will be allocated for the data, and modifications to the data won't change the array in the calling function.

Support For OMS Servo-Motor Controllers

spec now includes preliminary support for OMS servo-motor controllers. Select motor type OMS_S in the config editor. The optional DC-motor parameters for proportional, derivative and integral gain (KP, KD and KI) are implemented. Selecting the servo-motor type automatically enables encoder capability.

June 2, 2002 - RELEASE 5.02.02-1

New Ignore-Simulate Mode For Sockets

To accommodate the client-server macros, sockets can now be made immune to simulate mode with the new "ignore_sim" option to sock_par(). See the sockets help file for usage. The macros in server.mac have been modified to use this new mode.

May 20, 2002 - RELEASE 5.02.02

Memory Leaks Fixed

A number of small memory leaks have been fixed. A leak that occurred when command file input was interrupted by an error or ^C has been fixed. A leak that occurred when a macro function was used and then redefined within a statement block has been fixed. A leak that occurred when a data subarray was passed to a macro function as an argument has been fixed.

Improvements To the unglobal Command

Several improvements and fixes have made in the behavior of unglobal command. Use of unglobal within a statement block will now clear the current values of symbols and mark them as unset. Use of unglobal on a constant symbol within a statement block will remove the constant attribute. Use of unglobal in a macro function on a data array passed as an argument will clear the values in the array to zero, but will not remove the array.

clone() Improvement

The clone() function can now be used to redefine an existing macro.

Looping Bug In eval() Fixed

A bug that caused an endless stream of error messages when the eval() function was passed an unterminated string has been fixed.

General Improvements To eval()

A significant code rearrangement to create separate data structures for each eval() invocation should increase the robustness of the function.

Fix Of for (var in arr) Syntax

A bug, where the for (var in arr[num]) syntax didn't properly loop through the elements of the two-dimensional associative array when num was a number constant, has been fixed.

Array Alignment Extended

The automatic array alignment to put the start of data on memory page boundaries for arrays used with image_get() and image_put() has been extended. Now all data arrays greater than 0.5 Mbyte will be aligned to a page boundary when they are created.

Expanded Galil Motor Controller Support

spec now supports the Galil Optima series motor controllers, including the DMC-2x00 models, over ethernet and serial interfaces.

Fix For Four VME Controllers

A bug that prevented VME controller unit four from being recognized has been fixed.

Multiple Driver-less SBS PCI Controllers Implemented

spec can now support multiple (up to four) SBS 616/617/618 PCI-to-VME bus adapters in "driverless" mode on Linux platforms In this mode, spec controls the PCI card directly, rather than going through the kernel driver supplied by SBS.

Support For XIA X10P Parallel Port MCA

spec now supports the XIA model X10P parallel Port MCA on Linux platforms.

Update To New XIA Libraries

This release of spec requires linking with the current release (0.0.6) of the XIA libraries to use the DXP4C, DXP4C2X and the X10P modules.

May 2, 2002 - RELEASE 5.02.01-1

New Optional Scaler Parameter Screen

The configuration editor now includes a new screen to configure optional scaler parameters. The optional screen is accessed with the command s from the main Scaler screen. Currently, the only optional scaler parameter used is for the new EPICS process-variable counters.

New EPICS Process-Variable Counters

Arbitrary EPICS process-variables may now be configured as counters. Their values will be read with the getcounts command, called by the standard counting macros, with the EPICS channel access get commands. No other commands are issued. The process-variable name will be formed from the prefix given on the Controllers screen of the configuration editor and the string entered as miscellaneous parameter 1 from the new optional Scaler parameter screen.

April 29, 2002 - RELEASE 5.02.01

Memory Alignment For image_get() and image_put() Data Arrays

In order to accommodate image acquisition devices that transfer data directly to memory and that require the data to be aligned on memory page boundaries (memory addresses that are multiples of 4096), data arrays used with the image_get() and image_put() functions will now be automatically aligned on memory page boundaries (in most cases).

Shared Array Updates

A number of updates and improvements have been made to the shared array facility:

  • The size of the header of the shared segment has been increased to put the start of the data array on a page boundary to accommodate acquisition hardware that requires page-aligned data.
  • The new start-up option -o old_shared=1 will tell spec to create shared segments using the old-size headers to accommodate applications that have not yet been recompiled for the new header size.
  • The extern shared array feature can be used with both old and new header sizes, even when using the old_shared option above.
  • Shared segments will automatically disappear when the last attached process detaches or exits, even if spec exits abnormally. Previously, spec only removed the segment when exiting normally.
  • If spec creates a shared array, exits while another process is attached and then restarts with the previous state file, spec will reconnect to the existing array. In prior releases, spec would always create a new segment.

New State File

The state file format needed modification to accommodate the array-alignment feature, making the current state file incompatible with previous releases. The current spec version can read state files from previous versions, but will write state files that will not be readable by previous spec versions.

Support For Alternate twoc Configuration

The geo_twoc.c code has been modified to support an alternate configuration where the th and tth rotations are coupled.