spec

Software for Diffraction

changes

Update Notes For All spec Releases

(Jump to 6.12 6.11 6.10 6.09 6.08 6.07 6.06 6.05 6.04 6.03 6.02 6.01 6.00 5.10 5.09 5.08 5.07 5.06 5.05 5.04 5.03 5.02 5.01 5.00 4.05 4.04 4.03 4.02 4.01 4 3.03 3.02 3.01 3.00 2.9 2.8 2.7 2.6 2.5 2.15 2.14 2.13 2.12 2.11 2.10)

March 9, 2024 - RELEASE 6.12.05

IMPROVEMENTS

Improved List Navigation In Configuration Editor

The drop down lists in the edconf hardware configuration editor can now be navigated by typing multiple characters to match an entry. Previously only the first character of an entry was used for matching. Also, the the characters j and k, previously used for navigation, are now used for matching, but new ^P and ^N key entries are available to move up or down by one line. Type ? in the configuration editor for a list of commands.

Improved prdef For Embedded Single Quotes

The prdef command will now display the macro definition as a string delimited by double quotes if the definition contains unescaped single quotes. Previously, prdef would always delimit the definition with single quotes. If the definition used unescaped single quotes, the prdef output would not be suitable for reading back into spec.

New STATE_FILE Built-in Global Variable

A STATE_FILE built-in global parameter is now created that is set to the full path name of the user state file. The save_state macro will use its value, which allows the macro to work even if spec was invoked with the -T or -U flags, which create alternate tty or user names that are used to name the spec session's associated state file.

FIXES

Fix For Scaler Screen Of Configuration Editor

A bug in the edconf hardware configuration editor, where canceling a change in the drop down list of controller types on the Scaler screen would cause the choice to reset to the first item in the controller list, has been fixed.

HARDWARE

Trinamic TMCL Motor Controllers Updates

Trinamic TMCL motor controllers models TMCM-1180 and TMCM-1260 are now tested and working with spec. Additional TMCM models (1021, 1111, 1160, 1241, 1290, 3212, 3214, 3230, 3351, 6110 and 6212) should also work with spec, although the code has not yet been tested with the corresponding hardware. In addition, the parameter information (description, range, access) displayed with the "dump" and "gdump" motor_par() commands should now always be appropriate to the associated model. Also, those commands now take an optional pattern argument to only show parameters whose description matches the pattern. Finally, a "get_ain" motor_par() command is available to read the analog inputs. See the tmcl help file for details.

Fix For Excess Memory Consumption With MCA/Image Macro Hardware

An issue, where each mca_get()/mca_sget()/image_get() call with macro hardware devices would allocate memory for a temporary array that wouldn't be freed until a return to the main spec prompt, has been addressed. Previously, for example, memory usage in a scan would grow by the size of the data array for each point when reading from an MCA or image macro hardware device. For a scan with many points, the memory growth and associated overhead could slow performance.

Fix For epics_get() Reconnection

Previously, an epics_get() in a loop such as:

for (;;) { p epics_get(PV); sleep(1) }

would never reconnect following a channel access "Virtual circuit disconnect" event (such as loss of an Ethernet connection) even after the hardware connection was restored. However, spec would remake the connection after returning to the main prompt. With this spec release, the epics_get() function will take care of remaking the connection. Note, adding a call of wait(0x28) within the loop would be sufficient to regain the connection with prior spec releases. See the wait help file.

Fix For Physik Instrumente GCS-2 Motor Controller Initialization

A problem with spec's support for the Physik Instrumente GCS-2 motor controllers where the initial read of the command list could time out on slower interfaces has been fixed.

Option To Set Pause For Tsuji Controllers After Move Start

A new "mdelay" motor_par() option is available for Tsuji PM16C-02/04 motor controllers. The value (in seconds) is a sleep time for spec to pause after sending commands to start one or more motors on the controller. Some users report occasional communication failures if spec immediately requests status after staring a multiple motor move. Values on the order of 0.1 seconds should give the controller time to prepare to receive new commands. The motor_par() mnemonic argument is any motor associated with a Tsuji PM16C. The setting is global for all configured PM16C controllers and is saved in the state file. The default value is zero.

MACROS

Fix For Recently Broken savmac

An update to the savmac macro in spec release 6.11.02 to use fprintf() instead of the deprecated on() and off() functions had a bug that prevented printing the left parenthesis of macro functions with no arguments. That error is fixed in this release.

February 19, 2024 - RELEASE 6.12.04

FIXES

Fix For array_dump() Crash

Bugs in array_dump()/data_dump() (it is the same code for both) that could result in a crash due to memory corruption have been fixed.

MACROS

Standard Macro Tuneups

The mstartup macro will no longer prompt for parameters associated with geometry motors in a geometry-less configuration. The chk_acq_using macro will no longer produce error messages about undefined ROI_INFO or ACQ_flags when called by roi_reconf() if no acquisition or ROI actions are configured. The newfile macro will behave sensibly if DATAFILE and/or DATAFILE_TEMPLATE are unset or set to the null string.

HARDWARE

Fix For TMCL Parameter Restore Feature

A bug introduced in spec release 6.10.03 that partially broke the parameter restore feature for the TMCL motor controllers has been fixed. The bug prevented the restoration of parameters on other than the first motor on a particular controller board under certain conditions. The attempt to restore parameters occurs when spec detects the power has been cycled on a particular board, which erases all volatile parameter values. The skip of additional motors occurred after spec restored the value of an optional parameter. If there were no optional parameters, spec would continue to the next motor.

Eiger Server Now Works With acq_setup Macros For ROIs

The region-of-interest (ROI) counters implemented in the new acquisition macros can now be used with the eiger_server server hardware support. The macro file eiger_roi.mac is now obsolete. It is currently still included in the spec distribution, but is not installed. See the acq help file for details on configuring ROI counters.

January 24, 2024 - RELEASE 6.12.03

IMPROVEMENTS

New changes Help File On the Web

The certif.com web site now includes a single changes help file that includes all the update notes in reverse chronological order starting from the latest release and going back to release 2.5 from May 11, 1988. Such a file has been included in the spec distribution for some time.

MACROS

Fix For Motorless flyscan Macro

An error where the dwell time per point for motorless fly scans was miscalculated has been fixed.

New SCAN_D_shared Macro

A new SCAN_D_shared macro is defined by default as shared to put the SCAN_D scan data array in shared memory. Define SCAN_D_shared as an empty string to make SCAN_D an ordinary non-shared data array.

PYTHON

Updates To splot, eiger_server and pyspec

With this release, the Python utilities and packages included with spec have updates to continue to install and run with newer Python releases. Also, some recent changes that broke the utilities with older Python releases have been addressed.

December 4, 2023 - RELEASE 6.12.02

IMPROVEMENTS

Automatic Directory Creation When Opening Files

Functions that open files will now attempt to create directories as needed when they are part of a file path. Built-in functions that use this capability are open(), on(), fprintf(), array_dump() and data_dump(). In addition, directories will be created as needed for log files specified on the spec startup command line with the -l logfile option and for the daemon-mode log file, if daemon mode is active. If directory creation fails, for example, due to insufficient permissions, the functions will fail in the same way as if the file could not be opened.

More Flexible Syntax With @ Indirection

The @ indirection operator takes the string value of the item following and turns that into a variable name. For example:

var = "PI"; print @var

would print 3.14159. When the @ indirection operator precedes something in parentheses, previously, that something could only be a variable or associative array element. With this release, the item in parenthesis can be any expression that evaluates to a variable name on which the @ can operate.

Additional Install Option

The Install script to install the spec distribution now accepts a -y flag to go along with the recently introduced -C flag to remove files that get recompiled. The -y flag means "yes", remove the files without asking for confirmation.

Updated help Macro

The help topics displayed when the help macro is invoked without an argument are now organized by category. In addition, multiple topics can be used as arguments or entered when prompted.

MACROS

Update For When DATA_DIR Is Prepended To DATAFILE

Previously, if DATAFILE didn't contain a / character and if DATA_DIR existed, the newfile macro would prepend DATA_DIR to DATAFILE to create the data file path. As the newfile macro now supports templates and a directory that is possibly specified via a template can be included in the path, and since spec can now create directories automatically, the rule for prepending DATA_DIR is changed. Now, DATA_DIR is prepended if DATAFILE doesn't begin with a / or ./ and if DATA_DIR exists.

Note, the newfile macro tests whether DATA_DIR exists before using it. The macro doesn't use the automatic directory creation feature for DATA_DIR.

November 16, 2023 - Release 6.12.01-3

FIXES

Fix To Ensure HDF5 "gzip" Option Is Available On All Platforms

A build issue, where support for the "gzip" compression option for creating HDF5 files was not included in spec's distributed libhdf5.a library for some Linux platforms, has been fixed. One can check whether compression is available using the following command on the library in the spec distribution directory:

nm libhdf5.a | grep compress2

If the output is "U _compress2", then compression is available. If compression is not available, one can update the spec distribution, or one can build a local version of libhdf5.a and relink spec using that libhdf5.a. When building the HDF5 library locally, be sure the zlib development package is installed on the system. Note, the spec distribution includes a precompiled libzlib.a. Sources corresponding to the HDF5 and zlib libraries included in the current spec distribution can be downloaded at certif.com/downloads/extras/hdf5.tgz and certif.com/downloads/extras/zlib.tgz.

Fix For Possible h5_data() Crash

Previously, if an optional argument to h5_data() specified a data type that was wider than the native data type of the array being written (say "double" for a "short" array), the function call could lead to a crash. That issue has been fixed.

November 11, 2023 - RELEASE 6.12.01-2

FIXES

The queue() Function Now Works

The new experimental queue() function described in the spec release 6.11.03 was inadvertently disabled by a last minute edit in that release. The function is now available. See the queue help file.

November 7, 2023 - RELEASE 6.12.01-1

MACROS

Fix For setor1 Macro Typo

A typo in the setor1 geometry macro introduced in spec release 6.11.02 has been fixed.

October 17, 2023 - RELEASE 6.12.01

IMPROVEMENTS

Can Now Use cdef() With Macro Functions

The cdef() chained-macro built-in function can now be used to define spec macro functions. Previously, cdef() was only available for ordinary macros. Unlike ordinary macros, which are expanded very early in the input stream, macro functions are parsed and executed as encountered after parsing and during execution of the encompassing input. In addition, macro functions can return a value. With this spec release, if any of the cdef() calls that define parts of a chained macro include parenthesis after the macro name, the macro will become a macro function. spec will automatically add an initial and final curly bracket to the pieces of the chained macro. Note, though, cdef() macro functions don't currently allow arguments in the definition. However, a cdef()-defined macro function can be called with arguments that can be accessed in the definitions using the argc, argv[] or arg1, arg2, ... features. See the macros help file for details.

New argv[] For Macro Functions and Other Improvements

All arguments to macro functions can now be accessed using the automatically created local associative array-like variable argv[]. Elements are numbered starting from "1". In addition to representing numbers and strings, the argv[] elements can represent another associative array or a data array, matching the data type passed to the macro function. In addition, the symbols arg1, arg2, etc., are created for all arguments. Previously, the symbols were only created for arguments beyond those included in the macro definition. See the macros help file for details and limitations in accessing elements of argv[] that represent arrays.

New "date_format" spec_par() Parameter

Previously, spec used the US format for time and date which puts the month ahead of the day. It is now possible to specify the default format for the string returned by spec's built-in date() function. A call of:

spec_par("date_format", "%a %d %b %T %Y")

would set the date() output to this format:

Tue 29 Aug 20:46:50 2023

instead of the default format which continues to be "%a %b %d %T %Y", producing:

Tue Aug 29 20:46:50 2023

Any format recognized by the strftime() library function is accepted. Beware of selecting a format that leaves out important information. As with most spec_par() parameters, the value is saved in the user's state file. See the spec_par help file.

MACROS

New file_from_template() Macro For Data Files

A new file_from_template() macro is used with the newfile macro to allow data file names to include conversion specifications that are replaced with time or date values or specific spec parameters. The time and date conversions are those supported by the C library strftime() function and used by spec's date() function. Additional conversions are available for the spec data file name, scan number, point number and others. See the newfile help file for further information.

newfile Macro Now Accepts File Template

The newfile macro now takes a file template argument rather than necessarily a file or path name. Each call to newfile will create the DATAFILE name from the template, using the current date and time, if such conversions are present in the template. The macros that write to the data file will not automatically update DATAFILE if, for example, elements of the current date are included in the template and the current date changes during a spec session. However, the new usage newfile -u will update DATAFILE using the current template, stored in the new standard global variable DATAFILE_TEMPLATE.

New Options For Saving MCA/Image Data

The acqsetup macro now includes an option to set whether and how to save the acquired MCA or image data. Spectra can be saved in the standard spec data file or in one or more separate files. If separate files are chosen, there are options to use one additional file for all spectra, one file per scan, one file per data point or one file per array. In addition, one can configure spec to automatically generate file names, or one can define a template for saving such data, which can include conversion sequences for the standard spec data file name, scan number, point number and array name, along with the other strftime() conversions. Currently only ASCII save files are supported. See the acq and newfile help files.

Changes For How ACQ Devices Are Read In the Macros

The new get_acqdev macro, which reads all the enabled MCA and image devices has been relocated to the standard get_counts macro, which is the lowest level macro for reading counters. Previously, get_acqdev was part of the count, _pcount (associated with powder mode) and _upd_count (associated with updated counting) macros. This change ensures that the ct macro and others will read enabled devices. Note, though, if reading such devices is slow, one might want to use the disable/enable macros to temporarily stop the devices from being read. See the disable help file.

Updated chk_move, chk_count and chk_acq Macros

The chk_move, chk_count and chk_acq macros now include a call of the new macro functions user_chk_move(), user_chk_count() and user_chk_acq(), respectively. These macro functions are defined using the cdef() chained macro function. The standard macros create a starting definition for each of these macro functions that simply returns a zero. The macro functions can be redefined locally, as needed, to return values associated with user hardware that indicate whether the associated device is busy. Note, the chk_move and chk_count macros included non-blocking calls of the built-in wait() function and are used in the standard spec macros for updated moving and counting. The chk_acq() macro also includes a wait() call, but isn't currently used with the standard macros.

In addition, tests of the values of the global variables USER_CHK_MOVE, USER_CHK_COUNT and USER_CHK_ACQ are no longer included in the chk_* macros. It is doubtful that these variables have ever been used. See the util.mac file in the spec distribution for information on how to restore inclusion of these variables, if it turns out someone does use them.

Fix For flyscan When Using Pitch Rather Than Intervals

The flysetup macro prompts for the choice of using "intervals" or "pitch" for setting the number of points in the scan. An issue with the calculations when using "pitch" has been fixed. The bug dates from spec release 6.10.05, which introduced macro code to round the number of intervals to solve the problem when an intervals argument is an expression involving floating point values and the integer value of that expression may be one less than the expected value. Integer rounding wasn't appropriate if the argument was the fly-scan bin width.

HARDWARE

Additional Support For Physik Instrumente GCS-2 Controllers

The initial support for Physik Instrumente GCS-2 motor controllers now includes the model E-272.3SDA in addition to models C-663.12 and C-863.11. There are some changes to the code structure to accommodate the new model. The code is now even more likely to work with additional models, although fine tuning may still be needed. See the pi_gcs help file for details.

FIXES

Fix For tango_put() Crash On Missing Input

An old bug (since 2014 spec release 6.02.00), where a call to tango_put() that doesn't supply a value argument for the corresponding attribute argument could lead to a segmentation fault, has been fixed.

Crash With Deeply Recursive Macros Fixed

Previously, recursive macro calls deeper than 169 would cause a crash. That limit is still present, but spec now prints an error message and returns to the command prompt.

Fix For Recently Updated getline()

An issue with the recent updates to the getline() function to maintain current position in multiple files has been fixed. Previously, if an open file was modified, spec might not reopen the file, thus returning stale content. When using getline() to read the next line of a file, spec saves the current byte offset. Note, though, if content is removed or added before that offset, the string returned by getline() may not be the next line after the last one read.

August 3, 2023 - RELEASE 6.11.07-2

HARDWARE

Improved Resynchronization For Tsuji Counter/Timers

The spec support for the Tsuji counter/timer models now does a much better job detecting when responses are out of sync with the commands and with the subsequent resynchronizing of the communication over both socket and serial interfaces.

July 19, 2023 - RELEASE 6.11.07-1

FIXES

Fix For Recent getline() Bug

A bug in the getline() update in the previous release that could result in a segmentation fault has been fixed.

Fix For chk_acq_using Macro

A small addition to the chk_acq_using macro, which is part of the new acq.mac package, eliminates a possible spurious error message. See the acq help file.

Fix For USB-CTR "set_bits" Option

A bug introduced in spec release 6.10.01 that broke the "set_bits" counter_par() option for the Measurement Computing USB-CTR has been fixed.

July 16, 2023 - RELEASE 6.11.07

IMPROVEMENTS

The getline() Function Now Tracks Multiple Open Files

Previously, getline() would only keep track of the current position of one input file. With this release, spec will remember the current position of each file until getline(file, "close") is called for each file.

Default Values Returned For "modules" and "hdw_roi?" Parameters

The "modules" parameter for MCA and image-type devices introduced in spec release 6.11.03 returns the number of distinct modules available on a device where each module can produce a data array. The "hdw_roi?" parameter has been recognized since spec release 6.10.01. A nonzero return value indicates the controller can return a value for a specified region of interest. If no hardware ROI available, spec will read the data array from the device to calculate a region of interest. Both of these parameters are used in the new acquisition macros. (See the acq help file.) This spec release insures that devices implemented using macro hardware or server hardware will now have sensible default return values if the user macros or server code ignore the parameter. The default for "modules" is one. The default for "hdw_roi?" is zero.

FIXES

The ^C Characters Appear On Screen Once Again

Sometime around spec release 6, the ^C characters could stop appearing on the terminal screen when a user typed a ^C to interrupt the current activity. This spec release should have the characters once again echoed to the screen.

Problem With Echo Off In unix() Subshells Fixed

An issue beginning with spec release 6.09.05 where the terminal session in a unix() subshell would often start in cbreak, no-echo mode has been fixed.

Issue With RCP Library Linking Fixed Yet Again

This spec release tries another approach to providing links to RPC library functions used by some of spec's supported hardware. Built-in support for these functions was removed at different release levels of glibc depending on what build flags different Linux platforms chose to include when building the library. Linux distributions provide an alternative libtirpc.a that includes the RPC functions, but that library usually needs to be manually installed. If the platform's glibc doesn't include RPC support, spec's install script will link with the alternative library if it is available. Otherwise, spec will link with a dummy library and print a message explaining the situation. This method should work on all Linux platforms.

Several Issues With the New acq Macros Fixed

Updates in both the acq macros and in C code address several issues. Bugs in the macros that prevented the "auto_run" and "soft_preset" parameters from being set for image devices and that produced spurious error messages about "unconfigured" devices are fixed. Problems with macro hardware or hardware server implementations didn't recognize the "modules" or "hdw_roi?" mca_par()/image_par() parameters have been resolved.

HARDWARE

Updated Support For Physik Instrumente GCS-2 Controllers

The spec support for the Physik Instrument GCS-2 controllers, such as the C-663.12 and C-863.11 models, has been updated to work with daisy-chained configurations. See the pi_gcs help file.

May 13, 2023 - RELEASE 6.11.06

FIXES

Issue With splot_cntl("open") Fixed

An issue introduced in spec release 6.11.01, where a splot_cntl("open") command could interfere with other function's "open" commands, such as implemented in plot_cntl(), getline() and h5_file() has been fixed.

HARDWARE

Fix For medet_setup Used With Multix Detectors

A bug in the configuration menu macro for the the Multix detectors that prevented setting the channels count correctly has been fixed. These detectors are implemented in spec as server hardware. See the multix and server_hdw help files.

eiger_server Arm Mode Reconsidered

The "arm_mode" parameter introduced in the previous release has been removed. Instead, spec's eiger_server will arm the detector at the start of a scan and issue trigger commands for each point. When counting for a single acquisition, spec will configure, arm and trigger the detector for each acquisition. This method allows users the flexibility in configuration they need, but still optimizes performance during scans.

April 11, 2023 - RELEASE 6.11.05

HARDWARE

Preliminary Support For Physik Instrumente GCS-2 Controllers

This spec release contains preliminary support for Physik Instrumente GCS-2 motor controllers. The code has been tested with models C-663.12 and C-863.11, but will likely work with additional models, although some fine tuning of the code may be needed. See the pi_gcs help file for details.

New "arm_mode" Parameter For eiger_server

The eiger_server included with spec for the Dectris Eiger 2D detector includes a new "arm_mode" parameter to choose between the Eiger's default "arm-then-trigger" mode for each image and a custom mode that offers improved performance by arming once and sending only a trigger for each acquisition. Previously, the custom mode was the only mode available. The "arm-once" mode is still the default for eiger_server. See the eiger help file for details.

FIXES

Fix For Missing Prompt Strings In Log Files

New code introduced in spec release 6.11.03 inadvertently prevented spec's command-line prompt strings from appearing in log files. That issue is resolved in this release.

April 5, 2023 - RELEASE 6.11.04

IMPROVEMENTS

Unlimited Length For unix(cmd, var) Strings

The unix() built-in function executes the command given as the first argument using the system shell. With a second argument, the output of the command is placed in that variable. Previously, the length of the output was limited either to 4096 bytes or to a length specified in an optional third argument. With this spec release, there is no limit to the length of the command output stored in var and no need for a third argument.

HARDWARE

Renamed Motor and Counter Channel Controller for MODOCA Devices

The controller types for motor and counter channels in the config file have been changed to MODOCA from SP-8_EM and SP-8_S (for motors) and from SP-8T_EM, SP-8C_EM, SP-8T_S and SP-8C_S (for counters). It was an oversight in the prior coding to have multiple names in each category. The unit number associated with the channel identifies which MADOCA controller the channel is using. The configuration editor (edconf) invoked by the config macro will automatically change the old names to the new names. The spec Install script also runs edconf -I to update the config file for any changes of this sort. New spec releases will work with config files with either the old or the new names. Prior spec releases will not recognize the new names.

Fixes For Tsuji Counter/Timer Configuration

A crash associated with using multiple Tsuji Counter controller with one a "counter/timer" and others as "counters only", where the "counter/timer" unit was not unit 0, has been fixed. In addition, spec will now display an error message that says the "counter/timer" must be unit 0 if it is not. Also, spec will once again increase the channel count by one to accommodate the phantom timebase channel associated with Tsuji timer/counters (channel 8 on an 8-channel counter, channel 16 on a 16-channel counter, etc.). Thus, the NUM field in the configuration editor no longer needs to be set to one plus the number of physical counter channels.

FIXES

Fix For Crash Using Parameter "address" With Macro Hardware

An old bug that could lead to a crash when trying to read the "address" parameter for macro hardware motors or counters has been fixed. The issue only occurred when the ADDR parameter was not set for the associated controller in the config file. The bug was introduced in spec release 6.08.04 for motor_par() and spec release 6.09.05 for counter_par().

March 24, 2023 - RELEASE 6.11.03

IMPROVEMENTS

New "active" Read-Only Parameter For MCA and Image Devices

The mca_par(), mca_spar() and image_par() functions now return a nonzero value for the new parameter "active" if the associated device is running. This parameter is used with the updated MCA and image device ROI and acquisition macros to support the "read during updated counting" option.

New "modules" Parameter For MCA and Image Devices

The mca_par(), mca_spar() and image_par() functions now recognize the new parameter "modules". If the device supports multiple modules at the same unit address, it will return the number of modules present. If the device doesn't support multiple modules, the function calls return the value one. This parameter is used with the updated MCA and image device ROI and acquisition macros to allow separate configuration of ROIs and read/save behavior for each module.

MCA and Image Macro Hardware Can Now Get Subaddress

The first argument to the MCA and image device macro hardware _cmd() and _par() functions will now encode a subaddress if the spec user-level function calls that generated the calls to the macro functions include a subaddress. Subaddresses are used if the unit has multiple modules. Within spec, subaddresses may be specified as 0.0, 0.1, 0.2, ..., or "0:0", "0:1", "0:2". In the latter case, the arguments must be strings. In both cases the first number is the unit number, and the second number is the module number. In the calls to the macro function, the first form will be used. The unit and module address can be extracted as:

def sim_mca_cmd(num, key, p1, p2, data) '{
   local   n, unit, module

   n = sscanf(num, "%d.%d", unit, module)
   ...
}'

In the above, if n is one, there was no subaddress used in the spec command. If the macro hardware doesn't use multiple modules, there is no need even to look for a subaddress.

Note also, the new mca_par(), mca_spar() and image_par() parameter "modules" will be passed to the _par() macro function to set or get a value for the number of modules in the unit. If the _par() function ignores the "get" request, spec will assume there is only one module.

Install Script Improved For "Slash-less" "install" and "aux" Directories

If installing a test or private instance of spec using directories in the distribution directory for the bin and spec.d locations, the Install script will prepend the current working directory to the location when patching the installed scripts and programs that need to know the paths to certain other installed files. This action is only taken if the specified directory name doesn't contain a / character.

EXPERIMENTAL FEATURES

queue() Function To Schedule Commands

A new function named queue() is available to schedule commands to be run once at a fixed time in the future or to repeat at an interval. Commands from the queue will normally run while spec is waiting for keyboard input. If spec is otherwise occupied commands in the queue will be deferred until the next opportunity spec has to check the queue. However, a queue("check") can be issued within running statements to give commands that are due a chance to run. Note, moving and counting commands are currently not allowed. See the new queue help file for details.

Daemonize Mode To Run spec As a Background Server

New start-up options -S3 or -S4 place spec in a background server mode with no connection to the terminal session. All commands to daemon-mode spec must be through its server interface. See the daemon help file for details.

MACROS

ROI and MCA/Image Device Acquisition Macros Updated

The ROI and MCA/image device acquisition macros are now included in the single acq.mac distribution file. There is no longer an roi.mac file. In addition, the setup macro is now called acqsetup, although roisetup is included, but simply defined as acqsetup. The acqsetup macro "read and save" option now offers the choices to just read or to read and save the associated MCA or image device during scans. (One might want to just read the MCA in order to update the live-time spectra displayed in the splot utility.) There is also a new option to select between reading the device repeatedly during updated counting or to read only at the end of the count interval. The macros now offer configuration sections for each module when the device has multiple modules associated with the unit. In addition, the "soft_preset" option is now configurable for each MCA and image. See the acq help file.

Powder Mode Macros Updated

When powder mode is enabled, spec rocks a designated motor over a fixed distance at each point in scans involving other motors. The powder-mode macros now include an option to have the powder motor speed determined by the scan count time. In addition, that option, the option for unidirectional powder moves, the powder motor designation and rocking width can all be configured on the command line with a single invocation of the setpowder macro. See the powder help file for details.

Fix For df_array_xxx()

A misplaced parenthesis that broke the df_array_xxx() call in the df_array() macro function has been shifted into the correct position.

Motorless Fly Scan Updates

The motorless flyscan macro now interprets its first argument as the number of points, rather than the number of intervals. The scan heading shown on the screen and with the #S line of the standard spec data file shows the second argument as the time per bin, irrespective of whether the fly_setup configuration option is to give arguments as time per sweep or time per bin. This behavior is now the same as for fly scans with motors.

Typo In setor1 Fixed

A typo in the setor1 geometry macro introduced in spec release 6.11.02 has been fixed.

HARDWARE

Better Saving Of Runtime Parameters For Selected Acquisition Hardware

This spec release includes an updated method for saving runtime parameters for acquisition hardware. Several MCA devices now have parameters such as time presets, group size, settings for the "soft_preset", "auto_run" and "auto_clear" modes, etc., saved across reconfig calls, along with being saved in the state file. This feature is currently implemented for the Dectris Mythen, the Amptek DP5, the Measurement Computing USB-CTR (in MCS mode) and for the macro hardware MCA and image devices. Other devices will likely have this feature in future spec releases.

Eiger Server Updates

This spec release includes preliminary support for stream version 2 ("V2") firmware from Dectris for the Eiger 2D detectors. If "V2" is selected via the "stream_version" image_par() parameter, separate images can be saved based on the active threshold filters. See the eiger help file for details.

FIXES

Issue With RCP Library Linking Fixed

An issue where the RPC library functions were not linked into spec with C library versions earlier than glibc 2.32 has been fixed.

Possible Crash When Using New Runtime Counters With Certain Devices

The implementation of runtime counters by way of the new "add" parameter to counter_par() introduced in spec release 6.10.01 was flawed and could cause spec to crash if certain hardware timers were configured. The ROI macros introduced in the same spec release use runtime counters. That bug has been fixed. The hardware controllers with the issue were the ESRF VCT6, Labo NT-2400, NI 6601/2 and 63XX, Ortec 9XX, Detel S21DC, FST SMC2100, spec server counters, EPICS scalers and EPICS PV counters.

March 13, 2023 - RELEASE 6.11.02-2

FIXES

Fix For Broken MDrive and Siemens D5000 Controllers

A couple of editing errors in spec release 6.11.02 that made the MDrive motor controller and the Siemens D5000 counter/timer unusable have been fixed.

February 17, 2023 - RELEASE 6.11.02-1

FIXES

Fix For Bugs In calc() and setor0

The previous release introduced a bug in the calc() function that prevented the optional second argument to be recognized as any number other than zero. That broke the calcR macro used in the setlat macro associated with orientation matrix geometries. The USER_UB macro used in several orientation matrix macros also broke. In addition, a typo in the update to the setor0 macro is fixed. The bugs were introduced while implementing the new function to return an array of HKL values and while making changes to old standard macros to remove use of the _1, _2, etc. symbols.

February 3, 2023 - RELEASE 6.11.02

IMPROVEMENTS

New Auto-Save For State File Available

A new "auto_savstate" spec_par() parameter is available. When given a nonzero value, the state and history files will be written out automatically before the main spec prompt, but no more frequently than the value (in seconds) of this parameter. The feature may be useful in situations where the spec computer tends to crash. Otherwise, as has been the traditional behavior, the files are only written when spec exits or if the built-in savstate command is entered. See the spec_par help file.

Consistent Response For motor_par() Parameter "channel"

The return value for motor_par(mne, "channel") now consistently returns the channel number from the hardware config file. Previously, for most motor controllers that number channels from one (rather than from zero), the returned value was one less than the configured channel number. Affected motor controllers are those listed in the "MOTOR NUMBERING" section of the motors help file.

New Function To Return Array Of HKL Values For an Array Of Angles

For geometries that use an orientation matrix, a new calc() function is available to return an array of HKL values when passed an array of motor positions. If arr is a data array with the number of columns set to three plus the number of geometry motors (_numgeo), the call calc(9, arr) will place HKL values calculated from the motor positions into the last three columns of arr. Small changes were made to all of the 3D orientation-matrix associated geometry files (geo_fourc.c, geo_psic.c, etc.), making no_can_do a global variable and assigning a value to a new num_geo global variable to accommodate this feature.

New Option For array_dump() To Return a String

If the value of the initial optional argument to the array_dump() function is the empty string "", the function will return the formatted array output as a string, rather than write the output to the screen or to a file. See the arrays help file.

New "argc" Element In strdef() Optional Array

The strdef() function returns the string definition of the macro name passed as argument. If an optional associative array second argument is included, it is filled with parameters associated with the macro. For macro functions, a new associative array element, "argc" is created and assigned the value of the number of arguments in the macro function definition. See strdef in the funcs help file.

Debug Level Warning Now Shows Use Of Undeclared Variables

Best practice in spec is to declare variables explicitly global or local. The latter avoids unintentional name space conflicts, where a symbol used in one macro might have its value changed in another. If debug "warning" level 2048 (or 0x800) is enabled, spec will print messages each time an undeclared variable is referenced. Note, assigning values to a symbol at the main prompt will automatically make the symbol global and is equivalent to declaring it global. Assigning values to a symbol within curly brackets make the symbol implicitly local and would be the source of "undeclared" warnings. Note also, the "warning" debug level prints messages about using "unset" variables. However, such usage is generally acceptable, as one can rely on unset variables having a value of zero or null.

The undef Command Now Accepts Metacharacters In Arguments

Arguments to the undef command can now include the standard metacharacters *, ? and []. As usual, * matches anything, ? matches any single character, and [] enclose a range of characters to be matched. To avoid inadvertent removal of a large number of macros, if the number of matching macro names exceeds a threshold, keyboard confirmation is required. The default threshold is 10, but can be changed with the new "undef_threshold" option to spec_par(). See the spec_par help file. Also, if an argument contains only * or ? characters, confirmation is required (to avoid an accidental undef ?, for example). Note, the previous behavior where undef with no arguments would produce a syntax error is gone. Instead, undef with no arguments is accepted as input, but does nothing.

Install Script Updates

The spec installation requires a C compiler to create the spec executable based on site configuration parameters. If the C compiler package was not installed, the resulting error messages did not clearly indicate the problem. The Install script now checks for the compiler and if missing, requests that one be installed.

In addition, a new -C option is available to remove compiled files from a previous run of Install. The files will be recreated as the installation proceeds.

Finally, the test for the presence of the Sun RPC libraries is improved. If the support is missing, the spec installation will continue with just a message warning that the several hardware devices that require RPC support will not be available. Note, the GNU C library officially removed RPC as of glibc version 2.32 (August 2020). An alternative library, libtirpc, is available, but no longer required by spec if RPC hardware is not being used.

MACROS

New calcHKL_A() Macro Function To Calculate HKL Arrays

The calkHKL_A() macro function takes an array where each row contains a set of geometry motor positions and returns an array where each row contains the corresponding HKL values. If the array argument has _numgeo + 3 columns, the HKL values will also be assigned to those last three columns.

Updated savmac and cplot_plot Macros

The savmac and cplot_plot macros have been updated so they no longer use the deprecated file on() and off() functions. Instead, the macros use fprintf() to write to a single output file or device.

Improved Use Of df_print() In Standard Macros

Use of the df_print() in the standard macros, introduced in spec release 6.10.06, has been tuned so that in more instances each call is for one line of output. The introduction of df_print() is to make it easier to filter or redirect output intended for the spec data file. Previously, the #S and #D scan header lines were both included in one call to df_print(). The lines now are passed in distinct calls. Also, the header block containing motor and counter names and mnemonics is now passed to df_print() one line at a time. Finally, the comment and qcomment macros have been modified to overcome the limitation on the number of arguments allowed with df_print().

Updated Macros For Showing Scan Data Points

The sdata_dump() macro, called by pts, now takes an additional optional argument to specify a file in which to save the points. The arguments to pts have the same meaning as the arguments to the splot macro (see the splot help file). The arguments determine which array to use, which columns to use for the independent variable, the dependent variable(s) and the rows (points) to show. The macros default to displaying the data in SCAN_D from the last scan. In addition, a new sdata_pts() macro function is included that behaves as pts, but with a first argument that is passed to sdata_dump() as the optional file argument. If the file argument is the null string, sdata_dump() and sdata_pts() return the list of points as a string.

Fix For plotselect With Arguments

When invoked with arguments, plotselect will assign the counters given as arguments as the counters to be plotted in the first plot window. Also, plotting in secondary windows (if configured) will be cancelled. The feature to assign the counters once worked, but hasn't for some time.

Fix For Fly Scan Pre-Scan Limit Checks

The pre-scan limit checks in the fly scans were not effective if scanning from a higher value to a lower value, as the macros did not check the start position against the high limit or the final position against the low limit. In addition, the limit checks did not account for the half-interval offset added to the start and final positions. Both issues are now fixed.

General Tidying Up

Minor clean up of the standard macros includes making sure local variables are explicitly declared and using the more robust motor_num() function rather than motor_mne() to check whether a particular motor mnemonic has been configured.

FIXES

Fix For array_dump() Continuation Lines

An error where backslash continuation indicators would appear in the output of array_dump() for a two-dimensional array when the "%#C" option was used been fixed. The number (#) designates the number of rows per line for a 2D array, but doesn't split lines. The "%W" options specifies the number of elements per line and if that splits a row of the array, a backslash continuation indicator will appear.

HARDWARE

New Acquisition Mode For Eiger Server

The hardware server for the Dectris Eiger 2D detector has been updated to include support for accumulation mode. This mode enables combining multiple images over a set count time into a single image to get around issues with pixel or read-out counter saturation. Either the maximum accumulation time for each individual image or the number of acquisitions to use in the final image can be specified. The final accumulated image will be the image that is saved and used for region-of-interest calculations. See the eiger help file.

October 5, 2022 - RELEASE 6.11.01

IMPROVEMENTS

New HDF5 Options To Test If a Group, Dataset Or Attribute Exist

The h5_attr() and h5_data() functions can now be used with two arguments to test whether a given object already exists in the HDF5 file. See the hdf5 help file for details.

Plotting and Analysis Now Handle One-Dimensional Arrays

The array_plot() function used for data plots and the array_op() function to calculate analysis values, such as full width at half max (FWHM) or center of FHWM (cFWHM), now work well with a one-dimensional array argument, such as an array containing an MCA spectrum. If the array has only one dimension, the index number of each element is used as the x independent variable, while the array element at each index is the y dependent variable. Both the internal C code and the standard macros have been updated. See array_op() in the arrays help file and the splot help file.

array_plot() Of One-Dimensional Sub-Array Now Uses Base Array Index

The array_plot() built-in function previously numbered the x-axis for plots of one-dimensional arrays from zero to the number of points. The function will now use the actual index number of the full array. For example, array_plot(arr[100:200]) will number the x-axis from 100 to 200, rather than 0 to 100, as was the previous behavior.

New "basename" Option For the Built-in OUTFILES Array

The built-in OUTFILES array introduced in spec release 6.02 now includes an additional element called "basename" which contains the last component of the file path. See the syms help file for more information on OUTFILES. Type print OUTFILES from spec to see the complete array for the current session.

syms Display Improved

The columns in the screen output with the syms command have been reorganized for better readability.

Unresponsive Now Included In "unusable" Status

The "unusable" test with mca_par(), mca_spar() and image_par() now returns non-zero if the MCA or image device has become unresponsive. With some devices that are initially usable and later become unresponsive, spec notices and sets an internal flag. Previously, a test for unusable status might print an error message indicating an unresponsive device. Now the "unusable" test will include a check for unresponsiveness in the return value without generating error messages.

New splot_cntl() Syntax For Sending Arrays

The splot_cntl() syntax for sending array data to the Python splot utility via socket communication (as opposed to shared data) is changed. The "send" keyword is still used, but rather than including the array name in the string argument, the array name follows as a second argument, as in

splot_cntl("open;send", SCAN_D)

or

splot_cntl("send", SCAN_D[100:200])

The standard plotting macros now use the new syntax. Only one array can be sent per call. This change was needed to support sending one dimensional arrays. When sending a one-dimensional array, the internal code will send a two-dimensional array with a first column (for a row-wise array) or first row (for a column-wise array) set to the index number of the base array. For example, if sending arr[12:20], where arr[] is a one-dimensional array, the index numbers will run from 12 to 20.

Improved splot_cntl() Behavior

The splot_cntl() function for sending commands via a socket interface to the Python splot utility using the spec server communication protocol has been rewritten to improve behavior. The function includes a feature where commands entered before the connection is complete are saved in a queue and sent when the connection is ready. Previously, only commands from the first splot_cntl() call would be queued. Now commands from multiple calls are queued. In addition, the function will now return the reply associated with the last command sent. For example

print splot_cntl("command_list")

will print a list of the available commands. In addition, a new command, splot_cntl("status") will return one of three strings: "not connected", "trying to connect" or "connected" to indicate the current state. This command joins the "open", "kill" and "send" commands that are executed within spec, although the "send" command to send an array generates an "adddata" message to splot followed by the array data.

MACROS

Standard Macros Can Now Read and Save MCA and Image Data

A scheme for automatic reading and saving of MCA and/or image data at each point of standard scans is included in this release. Calls of new standard macros, acq_head, acq_precount, get_acqdev and save_acqdev have been included in low-level standard macros as follows. The behavior of these new macros is somewhat preliminary, but the locations and purposes of the macros themselves is unlikely to change. By default, the macros are empty, but if roisetup is used to define region-of-interest counters or configured MCA or image devices to be read and the data saved, the macros are redefined to standard macros that perform the tasks.

The standard _head macro now includes a call of acq_head, a macro that will write header information associated with enabled MCA or image-type acquisition devices to the data file. The lowest level counting macro, count_em, now includes a call of acq_precount that does any special preparation for the acquisition devices. The standard count macro, called by the scans to count to monitor or time, and the standard _upd_count macro, called during updated counting, now each include a call of get_acqdev to read the enabled the acquisition devices. For _upd_count, get_acqdev is only called once when the counting has finished. The standard _loop macro now includes a call of save_acqdev which will write MCA or image data to a file.

Currently, the roisetup macro is used to configure which MCA and image devices should be read and have data saved. Also, data will be saved as ASCII to the standard spec data file. A forthcoming spec release should include a scheme for automatically saving such data to binary files. The above macros are in the new distribution file macros/acq.mac.

New vEscan Macro For Variable-Spaced Energy Scans

A new vEscan macro for variable-spaced energy scans is included with the vscan macros. As with the other vscan macros, the start and finish arguments have an added focus argument inserted. Like the standard Escan macro, an optional fixQ argument is available to adjust the geometry motors to maintain a fixed reciprocal space position as the energy changes. See the vscan help file.

Plotting Macros Require Row-Wise Arrays

The standard plotting macros have generally only supported row-wise arrays (where rows correspond to data points and columns to the independent variables, such as motor positions, and dependent variables, such as counters). Some of the macros attempted to accommodate column-wise arrays, but probably not well. The macros now officially only support row-wise arrays. Note, though, the built-in functions, such as array_plot() and array_op(), work with either type of array.

Scan Data Array Now Zeroed At Start Of Scans

The scan_data_init() macro called at the first point of a scan now assigns SCAN_D = 0. Previously, a scan with fewer points than a prior scan but with the same number of motors and counters would contain left over data beyond the last data point from the prior scan. Note, a new SCAN_D would be and is still allocated if the number of columns changed, which happens for example, if the number of motors being scanned changes.

New Fly Scan user_flyscan_post_sweep Macro Hook

user_flyscan_post_sweep is a cdef() defined macro called just before channels are normalized (if that option is enabled) and written to the data file and screen. It would be a good place to add to SCAN_D data that depends on channel number, but is not from the MCS. It is an empty macro by default. See the flyscan help file.

Fix For splot Macro With Range Of Counters In Arguments

The feature of the splot macro where the range of y-axis counters or array columns can be specified using start:end now works as described.

Fix For Motorless Fly Scans

Updates to the fly scan macros in the previous release (associated with the feature to configure how many lines of output display on the screen for fly scans) broke the screen output for motorless fly scans. That issue is fixed.

Fix For Scan Number When No Data File

A bug introduced in spec release 6.10.06 where the scan number (SCAN_N) would be incremented twice if there was no data file (DATAFILE == "") has been fixed.

Removed Obsolete _hkl_lim From Geometry Macros

The _hkl_lim macro definition has been removed from all the geometry files, as it is no longer used with the newer array-based scanning.

FIXES

Even Better Test On RPC Library With Install

During spec installation, the Install script tests for whether libtirpc.a is required for SUN RPC function calls used by certain supported hardware. The improved test in spec release 6.10.04 looked for specific words in compiler error messages. Those words might not be present if the system language was other than English. The test has been rewritten to remove the language dependency.

Possible Crash When No Shared Memory Segments Available Fixed

A possible crash where the system kernel would run out of shared memory segments during spec start up has been fixed. Running out of shared memory resources is more likely on MacOS than Linux as the default MacOS allocation is quite meager and unlike on Linux, if a process with shared memory segments crashes, the segments are not automatically freed. See notes at the end of the arrays help file on how to increase the shared memory resources on MacOS.

Fix For spec_menu() Issue Setting Number Values For Array Child Entries

A spec_menu() bug introduced in spec release 6.10.06 broke the specific case of assigning number values to associative array elements associated with a menu item with a "parent" attribute when the array element had a string value on entry to spec_menu(). The issue is now fixed. This bug broke setting region-of-interest ranges in the recently included roisetup macro.

Now Use Scale Factor With Normalized Counter Option

The "normalize_to_time" implementation introduced in the previous release that enabled spec to automatically normalize counters to the elapsed time did not use the counter's scale factor on the resulting value. That issue is now fixed.

Fix For Crash When Debugging TANGO Functions

When the TANGO error stack contained very long message strings (on the order of 1 Kb), the code to format messages displayed with DEBUG level 128 would result in a segmentation fault due to a buffer overrun. That issue, associated with the tango_io(), tango_get() and tango_put() functions, has been fixed.

HARDWARE

Reworked EPICS Scaler Events

The EPICS standard scaler record support has been revised to use events on the process variable VAL rather than CNT to detect when counting is finished. In some configurations, the CNT "done" event sometimes arrived before events associated with the final values of the associated counters. VAL posts after all the final counter values have posted.

Updated Defaults and Latest Firmware Recognition For Tsuji Counters

spec now recognizes Tsuji counters with firmware CT16-01F. In addition, the code now uses the most likely default values for parameters that depend on firmware version. Parameters such as the number of bits available in the counter channels, the number of bits available for the time preset and the channel used for the monitor preset vary with firmware version. However, recent models tend to use the same values. If spec doesn't recognize the firmware version, spec will default to values used by the recent models.

May 20, 2022 - RELEASE 6.10.07

IMPROVEMENTS

New Normalized Counter Option

It is now possible for spec to automatically normalize counter readings to the elapsed time from the timebase scaler channel. Such a counter can be configured on the Scaler screen of the configuration editor by selecting "normalize_to_time" in the "Use As" column. Additionally, a new "normalize_to_time" counter_par() option allows the configuration to be changed (and read back) from the spec command line. As with most such parameters, a reconfig or restart will restore the normalize behavior to the value in the config file. See the counting help file.

Protection From Disabling HKL Macros

Since the earliest days, the spec executable reads a standard command file based on the first four letters of its name from the spec auxiliary file directory, SPECD. A no-geometry instance named spec reads the file SPECD/spec.mac, which contains a single line of code to call the no_hkl macro to undefine irrelevant reciprocal space macros. Also since the beginning, spec reads a command file named spec.mac in the current directory on startup. That means if a user ran a version of spec that did include geometry support (twoc, fourc, etc.) and if the user started in the auxiliary file directory, the no_hkl macro in that spec.mac file would be read and all the reciprocal space macros (wh, br, hklscan, etc) would be undefined. This release of spec prevents that from happening by not reading a spec.mac file if started from the auxiliary file directory and the calc(2) "user-added" function has been assigned. (The standard geometry macros all use calc(2) to calculate HKL from motor positions.)

Clean Install Of pyspec Files

The pyspec subdirectory of the spec auxiliary file directory (normally /usr/local/lib/spec.d) contains files used by spec-related Python utilities, such as splot, eigerserver and specfile. The standard spec installation script now completely replaces the pyspec contents rather than leave obsolete files in place.

FIXES

Fix For Server Command Line Display During Client Commands

Recent updates to fix ^C issues with a spec server running client commands broke the behavior where the server prompt and typing would be restored after the client generated output was displayed. That problem is now fixed.

Fix For Client Display Of Server Errors With remote_eval()

The feature for a spec client to display an error message associated with the failure of a remote_eval() call to a spec server included in release 6.10.05 didn't always work as intended. That functionality is working better in this release.

HARDWARE

Thorlabs Motor Controller Support Updated For Serial and MLJ150

The Thorlabs APT motor controller support now works with a serial (RS-232) interface along with USB. In addition, model MLJ150 is now supported. See the thorlabs help file for details.

Additional Trinamic TMCL Motor Controllers Supported

Trinamic motor controller models TMCM-1110, TMCM-1141, TMCM-1211 and TMCM-1240 are now tested and working with spec TMCL support. See the tmcl help file for details.

MACROS

Fix For scan_data_init() Macro To Accommodate Fly Scans

A problem where the SCAN_COLS[] assignment didn't agree with how SCAN_D[][] was filled when using fly scans has been fixed in the scan_data_init() macro. The issue occurred when the MON or DET channel were disabled for the scan. SCAN_COLS[] is an associative array where each element contains the mnemonic associated with the corresponding column of the SCAN_D[][] data array.

Additional Option For Fly Scan Display

An additional option for how to display sweep data at the end of each fly scan is now available, namely a mode where all lines are displayed if the number of lines is less than a cutoff value, otherwise the first, middle and last blocks are displayed. The cutoff value can be entered in the fly_setup macro.

Fix For Unidirectional Mesh Fly Scans

An issue where recent updates to the fly scan macros broke unidirectional mesh fly scans has been fixed.

March 20, 2022 - RELEASE 6.10.06

IMPROVEMENTS

Internal Type For Motor Speeds Now 64 Bits

In spec release 6.08.01, storage for motor positions was switched from 32-bit integers to 64-bit integers to accommodate new motor controllers that required the additional resolution. It turns out that the motor speeds (units of steps/sec) for the same motor controllers also need to be able to be specified to higher resolution. Motor speeds are now maintained as 64-bit integers in spec and the edconf hardware configuration editor.

array_plot() Now Returns an Error For Out-Of-Bounds Array

The array_plot() function now appropriately returns an nonzero value to indicate an error if the array arguments access out-of-bounds array elements. The plotting macros now check for that error and will only print one error message rather than seven.

FIXES

Fix For ^C During sock_get()

The reworked signal handling introduced in spec release 6.09.01 prevented a ^C from immediately interrupting a sock_get() call. That issue is fixed.

Fix For Obscure spec_menu() Issue

A issue when using the "bit" key with a child item of a spec_menu() specification, where selected values weren't correctly assigned to an associative array passed as the @ value, has been fixed. (The fly_setup macro uses such a construct.)

Fix For motor_par() "read" For Tsuji PM16C-02/04 Controllers

Code that would likely produce a segmentation fault when using the motor_par() "read" command-pass-through option without an accompanying send string with the spec Tsuji PM16C-02/04 motor controller support has been fixed.

MACROS

whats Can Take Multiple Arguments

The standard macro whats, which displays what the given argument is in terms of spec objects, now accepts multiple arguments and will display the type of each one.

New Macros For Writing To the DATAFILE

The standard macros now send all string output destined for DATAFILE through a new macro function df_print(). The arrays sent to DATAFILE by the fly and mca scans now call a new macro function df_array() instead of the function array_dump(). A new df_flush() macro is called at the end of a scan in the standard _tail macro. These macros enable use of an alternative scheme for outputting data.

In the default case, the above macros write output to DATAFILE, just as before. However, if the new global variable DFILE_HOW is set to some string word, the above macros will instead call local macros named df_print_word(), df_array_word() and df_flush_word() which would output the strings and arrays passed as arguments as local needs require.

Changes to the standard macros are rather minimal. Usage such as fprintf(DATAFILE, ...) becomes df_print(...). In a few cases where fprintf() printed out partial lines, the entire output line is now collected into a string and that string is passed to df_print().

Existing local macros that write directly to DATAFILE will continue to work just fine. If local users want to take advantage of the new DFILE_HOW feature, local macros should use the new df_*() macro functions for data file output.

See the macros/file.mac file included with the spec distribution for more details on using DFILE_HOW.

SCAN_D Now Matches Data File Columns

The SCAN_D array, which holds motor positions and counter values for spec scans, now has the same column arrangement as is saved in the data file. The first column is the main independent variable of the scan. That is followed by other motors and/or HKL values involved in the scan. Next is the epoch time associated with the data point. The remaining columns are the the counter values. The counter associated with DET is always the last column. The counter associated with the preset (either time or monitor counts) is the second to last column. Other counters are ordered by counter number. What has changed is that SCAN_D now includes the epoch time, and the preset and DET counter values are now placed in the last columns.

Fix For Using Parameters In splot Macro To Specify Range

Previously, a command such as:

splot tth det 3:NPTS-3

would fail as the macros wouldn't properly evaluate the expression for the range of points. The above usage now works.

Fly Scan Updates

The fly scan macros include a number of updates. When using a prescaler, the number of intervals and range is now adjusted to insure a full complement of motor pulses will arrive to generate sufficient channel advance pulses to the multi-channel scaler. The macros attempt to maintain the range as best as possible, with most of the adjustment being on the number of intervals.

A new fly_setup option is available to configure how much of the sweep data is displayed on the screen. Since the data can't be displayed until it is read at the end of the sweep, it may not be desirable to have perhaps hundreds of data rows output to the screen at once. Configuration choices include:

o Display just the last line (traditional behavior)

o Display all the data

o Display the first and last block of data

o Display the first, middle and last block of data

The block size is currently six data points (or rows).

Also, an issue setting the motor pulses per unit in the fly_setup macro has been fixed.

HARDWARE

Configurable Gate For USB-CTR In MCS Mode

A new "gate_mode" mca_par() option for the Measurement Computing USB-CTR counter/timer is now available. spec supports that module in multi-channel scaling mode, which is used by the fly scan macros. See the usbctr and flyscan help files.

Select Motor Controller Support Now Uses 64-Bits For Speed

Support for macro hardware motors, spec server motors and the EPICS motor record has been updated to use the 64-bit resolution for motor speeds available in this spec release.

SmarAct MCS2 Controller Support Speed Update

The units for motor speed for the SmarAct MCS2 controller are now steps per second and can be specified with up to 64-bit integer precision. Note, previous support for the controller set the speed to a value which was the product of the config file setting and the steps per mm parameter. Current users of that motor controller need to adjust the values configured for slew rate, base rate, home slew rate and home base rate to reflect the updated support, which is now the usual steps per second.

Support for libusb-1.0

spec can now be linked with version 1.0 of libusb. Previously spec only supported version 0.1, which is on longer maintained. On Linux, spec USB support is available using built-in code that makes direct calls to the Linux generic USB driver. For MacOS, support is only through libusb. Version 1.0 appears to be required on MacOS Monterey. Both versions of libusb work with Linux, but the built-in code should be preferred. To use the USB libraries, the site_libs parameter in the spec install_data file needs to be assigned with the name of the library during spec installation, along the lines of:

site_lib="-L/usr/local/lib -lusb-1.0"

On MacOS, one may need to download the library source, build and install. Find the source at github.com/libusb. Most Linux distributions will have a downloadable package available with a name along the lines of libusb-1.0.0-dev.

January 15, 2022 - RELEASE 6.10.05

IMPROVEMENTS

encode()/decode() Updates and Fixes

The encode() and decode() functions now support Base64 in addition to JSON. The JSON decode() function now takes an optional associative array argument into which any JSON string can be decoded. JSON values that are objects or arrays will be returned as string array elements, which can then be passed into decode() again. See the encode help file for details.

New "match_one" Option For getline()

The getline() function accepts a new option, "match_one", which unlike "match", only returns the one line that matches the regular expression. See getline in the funcs help file.

HDF5 Support Updated To Current HDF5 Release

The built-in HDF5 support in spec is now using HDF5 stable release 1.12.1. Previously, spec was built against HDF5 release 1.10.1. See the hdf5 help file for details on spec's HDF5 support.

Certain Errors On spec Server Now Display With remote_eval()

When a "fatal" error occurs on a spec server while running a command sent by a spec client using remote_eval() or from any client sending a CMD_WITH_RETURN message, the server response will now include the error message in the return packet. A spec client will display the error. A fatal error is an error that resets spec to the command prompt, such as a syntax error or certain hardware errors. (See the HDW_ERR help file for a list of fatal hardware errors.)

The exit command also resets to command level. Messages associated with nonfatal errors or displayed with eprint or eprintf() will also be sent and displayed if an exit command follows the error within the statement block. However, if any additional commands between the error generating command and the exit generates an ordinary (non-error) message, the error message will not be returned.

Distribution and Installation Updates

The scripts and Makefiles used to prepare and install spec distributions have been cleaned and reorganized a bit. Entries for obsolete computer architecture targets are gone for the most part. (Supported platforms/architectures are currently 32-bit and 64-bit linux on both Intel and arm and 64-bit macOS on Intel and arm.) Commands and logic for setting file ownership during installation is improved. The spec_zcat gzip compression utility is gone, as there is no longer any risk that the "z" flag to tar will not be available.

The Python splot Utility Now Includes HKL on Plots

The Python splot utility will now show the reciprocal space HKL coordinates at the start of a scan in the plot header of the screen display.

FIXES

Fix For Both Server and Client Response To ^C

The reworked signal handling introduced in spec release 6.09.01 broke some ^C behavior when a spec server was running a command from a client. A ^C entered on the server keyboard was not recognized while executing an SV_CMD or SV_CMD_WITH_RETURN packet (generated by remote_cmd() or remote_eval() in a spec client). In addition, a spec client's remote_eval() could not be interrupted by a ^C on the client keyboard. Both issues have been fixed.

MACROS

Energy Macros Updated For Asymmetric Cut Monochromator Crystal

For type 5 two-crystal monochromators (configured with two motors with mnemonics mono and monp), the motor position calculations now take into account an asymmetric crystal characterized by the cut angle beta, stored as a constant global variable g_mo_beta. The setmono macro will prompt for the value of the cut angle. A zero indicates no correction.

New Rounding For Number Of Intervals In Scan Macros

The number-of-intervals argument in spec scans is now rounded to the nearest integer. That solves a problem when the argument is an expression involving floating point values and the integer value of that expression may be one less than the expected value. For example, the integer part of 10.2/0.01 is 1019, not 1020, due to the inexact representation of floating point numbers on a computer. If expr is the expression used as the number-of-intervals argument, the scan macros now use int(expr + 0.5).

November 9, 2021 - RELEASE 6.10.04

IMPROVEMENTS

New scantypes Help File

A new help file, scantypes, summarizes the many standard scans available with spec.

New -U fake_user Start-Up Option

The new -U fake_user start-up option creates a state file associated with the name fake_user rather than the actual account user name. Such a feature may be useful at a facility that requires all visitors to use the same computer account, but would like to maintain separate spec state files for each visitor. The site could require visitors to begin their sessions by entering their visitor ID, which could be placed in an environment variable used by a shell script that invokes spec with the -U flag and that variable.

FIXES

Better Test On RPC Library With Install

On some Linux systems the standard C library (glibc) no longer includes support for the SUN RPC function calls, used by spec's VXI11 and SPring-8 MADOCA hardware support. The library functions are needed to link spec during installation. An additional library (libtirpc.a) can be installed on those systems. The spec Install script does a check on whether that alternative library is needed and available. If needed, but not available, the script requests it be installed. The previous version of the check was not entirely robust across platforms. The test is this release should work better.

Fix For array_dump() Not Closing File

An old bug, where under some conditions an output file specified as the first argument to the array_dump() or data_dump() functions was not closed at the end of the function call, has been fixed.

Fix For spec_menu() "text" Item

A bug in the recently introduced "text" spec_menu() item which could result in corrupted menu displays has been fixed.

HARDWARE

Additional Parameters Available For Galil Controllers

The built-in support for Galil motor controllers now recognizes additional non-standard optional motor parameters and recognizes additional motor types. The recognized Galil commands and associated spec parameters are as follows:

KP      proportional_gain
KI      integral_gain
KD      derivative_gain
IL      integration_limit
FV      veloc_feedforward
FA      accel_feedforward
DB      on_band
DS      off_band
OE      off_on_error
ER      error_limit
SK      max_pulse_freq
MT      motor_type
CE      configure_encoder

The first six can also be specified using the similarly named standard optional parameters (names having an initial "dc_"). Commands for all but the last two parameters are normally only sent with the first move after start up or a reconfig, or if the values have been changed with motor_par(). The command motor_par(mne, "update") will update the controller immediately. The last two commands are sent immediately after reading the config file or when changed with motor_par().

Setting "motor_type" to values 12, -12, 12.5 or -12.5 turns on encoder mode and position maintenance mode (if available). Values of 1 or -1 turn on servo mode (if available). Setting "motor_type" will override the encoder and servo mode selections made by setting the controller to GALIL_E or GALIL_S in the config file. The MT command is only sent to the controller if "motor_type" is set.

For encoder and servo modes, positions are read with the TP controller command, otherwise RP is used. When encoder mode is enabled, the chg_dial() function will send a DE controller command in addition to a DP command. In encoder mode, if the standard optional parameter "encoder_step_size" is set and nonzero, the value read from TP or sent with DE is scaled by the ratio of motor steps to encoder steps.

Updates To Mclennan Motor Controller Support

The communication with the Mclennan motor controllers has been made a bit more robust. Also, spec can now read and return long replies, such as those generated by the "QA" (query all) and "HE" (help) commands. spec now recognizes the motor types PM600_P and PM600_S that signify using an encoder with position maintenance and using a servo motor. New motor_par() commands "update" to program the controller with the current parameters in spec and "dump" to display all the controller parameters are available. Additional optional parameters are recognized. See the new mclennan help file for details.

New motor_par() "update" Option For Newport SMC100

A new motor_par() "update" option for the Newport SMC100 motor controller will send commands to update any changed parameters. Updating some parameters requires a reset/homing cycle that can take several seconds. As before, reprogramming is done automatically, if needed, on the first move after any parameter has changed. This new option allows the parameter programming to be done before executing a move command. See the newport help file.

Better Thread Mutex Locks For Measurement Computing USB-CTR

spec creates a dedicated thread to read data from the Measurement Computing USB-CTR when running in multi-channel scaling (MCS) mode. The code includes mutex locks around the USB access to allow access to other functions of the USB-CTR while MCS acquisition is in progress. The first implementation of the mutex locks would sometimes freeze out attempts to access the controller through the main spec thread (to access the I/O pins, for example). This spec release takes a slightly different approach to the mutex locks that appears to solve the problem.

Fix For DSP CC-488 GPIB-To-CAMAC Controller

A problem with the DSP CC-488 GPIB-to-CAMAC controller, where the code did not properly poll the LAM (look-at-me) register, has been fixed. Yes, at least one spec user still uses CAMAC.

July 30, 2021 - RELEASE 6.10.03

IMPROVEMENTS

Accommodation For Dangling ifs In Command Files

The lexical analyzer will now complete a dangling if (that is, an if statement without a corresponding else) at the end of in input file and no longer generate syntax errors. The standard macro source files have included a last line of the sort, "# Do not remove this line -- it keeps the parser from waiting for an "else"." for a long time. Such measures are no longer needed.

New Installation Option For Reading TIFF Image Files

The fmt_tiff.c file included in the spec distribution has always include the option for reading TIFF images files with spec's fmt_read() function. However, because inclusion required that the TIFF libraries be available, the option was off by default. Turning on the option required changing a #define option in the fmt_tiff.c file and including the TIFF library in the site_libs install parameter. With this release, the spec Install script now prompts for the TIFF library. If a library is selected, the fmt_tiff.c file will automatically be built with the TIFF file read option enabled. Updating or reinstalling spec with the same install_data file will automatically maintain the TIFF file read option selected.

deg() and rad() Now Work With Data Array Arguments

The functions deg() and rad() can now take a data array as input argument. The functions perform the operation on each element of the array and return the results in an array of the same dimension as the argument array.

HARDWARE

Updates For Newport SMC100CC/PP

The spec support for the Newport SMC100 motor controller now distinguishes between the CC and PP flavors, allowing the base rate to be set for the PP type. In addition, nonstandard optional motor parameters, "micro-step_factor" and "full_step_value" are recognized for the PP flavor, while "closed_loop" and "encoder_increment" are recognized for the CC type. Refer to the Newport manual for a description of the parameters. See the newport help file for a list of all parameters supported by spec. Also, an issue where spec would unnecessarily put the controller in the "configuration" state to reprogram parameters that hadn't actually changed in value has been fixed.

Updated Support For Trinamic TMCM Controllers

The Trinamic TMCL support now includes support for the model TMCM-6214. In addition, spec now sets all parameters associated with the "SixPoint" motion profile used by this and other models. See the tmcl help file.

Tsuji Counter CT08-01F Recognized

spec now recognizes Tsuji CT08 with firmware 01F.

FIXES

Fix For Screen Width Changes In spec_menu()

The spec_menu() function compressed long strings as intended when redisplaying the menu with a narrower screen, but didn't uncompress the strings if redisplayed after the screen was made wider. That issue has been fixed in this release.

Fix For Logarithmic Axes With Python splot

Issues when using logarithmic axes with the Python splot utility have been addressed. Data points with values less than or equal to zero are now not plotted and not used in setting the axis range.

Fix For USB-CTR MCS Dwell Time

A bug introduced in spec release 6.10.01 with the Measurement Computing USB-CTR, where the parameter set using the mca_par() "dwell" option was converted to an integer, has been fixed. With the bug, dwell times less than one second were set to zero, which is invalid. The code sets the dwell time to the default of 0.01 seconds when the parameter is not valid.

Fix For Distribution File Ownership

The Install script now does a better job of setting the owner of the distribution and installation files to the owner specified in the install_data file. Previously, a number of files ended up belonging to the root user, even if another owner was configured.

MACROS

Fix For flyscan Macro

An issue where the flyscan macro generated motor positions incorrectly if scanning from a larger to smaller position has been fixed.

Fix For Saving EPOCH With cscan Macros

The cscan macros now save the EPOCH value to the data file to millisecond resolution, which now matches the behavior of the standard scans.

May 11, 2021 - RELEASE 6.10.02

IMPROVEMENTS

Assignment Now Allowed With array Declaration

The array declaration now supports initialization. For example,

array a[10] = [ 1, 2, 3 ]
string array a[20] = [ "this is a test" ]
ushort array a[2][3] = [ 1, 2, 3, 4, 5, 6 ]

Unassigned array elements are set to zero. Surplus initializers are ignored. For 2D arrays, elements are assigned row by row. In the last example, the assignment produces:

SPEC> print a
{{1, 2, 3}, {4, 5, 6}}

See the arrays help file.

FIXES

Fix For spec Client Connecting To Remote Servers

An issue introduced in spec release 6.09.13, where a spec client might fail to connect to spec servers on a different host, has been addressed.

MACROS

Fix For Typo In Updated sixc.src

Missing def keywords in the recently updated sixc.src file have been added. The update was to implement the new macro definitions for aziscan and azidscan that use the new _pa_scan_prep geometry pseudo angle scan.

April 29, 2021 - RELEASE 6.10.01

IMPROVEMENTS

New Runtime Counter Creation

Runtime counters can now be created without editing the spec hardware config file or reinitializing the hardware. The command:

counter_par(mne, "add" [, macro_name ])

creates a new counter with the specified mnemonic. The optionally specified macro function will be called with the counter mnemonic as argument when the getcounts command is executed. When spec executes the getcounts command, hardware counters are read first, then macro-hardware counter macros are called, then runtime counter macros are called. This order determines what counter values are available to the macros. The command:

counter_par(mne, "delete")

removes the specified counter. The command:

counter_par(mne, "name", "New Name")

can be used to assign the counter name. Otherwise the name will be the same as the mnemonic. Mnemonics can be at most 7 characters, while names can be 15 characters long.

The runtime counters disappear on exit or hardware reconfiguration (reconfig). The built-in config_mac macro can be used to have the counters automatically recreated after reading the hardware configuration. (See an example of that in the roi.mac file.)

The "controller" and "device_id" options to counter_par() both return the string "RUNTIME" for these counters.

Bad Mnemonics for counter_par() and motor_par() Now Return an Error

When the counter_par() and motor_par() functions are called with an invalid mnemonic or channel number, the functions now set HDW_ERR to value 6 (unconfigured hardware) and return -1. Previously, such errors were "fatal" in that spec would jump back to the main prompt.

New "config" Option To image_par(), mca_spar() and mca_par()

The new usage image_par("config") displays the current configuration for all images devices in the same format that mca_sel("?") displays MCA device configuration. That is, information including unit numbers, device description and enabled status is shown. The usage image_par(sel, "config") returns a string containing the configuration for the selected unit only, or returns zero if there is no corresponding entry in the hardware configuration file. For symmetry, the usage mca_spar("config") and mca_spar(sel, "config") does the same for MCA devices. mca_sel("?") still works as before.

New spec_menu() Feature For Including Multiple Parameters On Single Line

New spec_menu() "family" and "parent" keys allow setting values for multiple parameters on a single line. The "family" key configures IDs for each sibling. The "parent" key associates an item with a "family". In addition, a new "prefix" key is associated with "parent" descriptions. A new "check_macro" key allows configuring a validation macro to be called on number and string items. See the spec_menu help file for details.

Better Validation Of config File Motor/Counter Numbers

The code to read motor and counter configuration from the spec hardware config file now has improved validation of the motor and counter numbers. spec now insists on consecutive numbers with no duplicates. The edconf configuration editor always saves files using those rules, but the update catches errors that might be introduced by a manual edit of the file.

Metacharacters Allowed With Some Chained Macro Operations

When the strdef() function is used to return the definition of a cdef chained macro, the second argument specifying the cdef key can now include the standard metacharacters *, ? and [] for matching. When using delete, enable or disable flags with cdef(), the third argument specifying the cdef keys can now include the same metacharacters. As usual, * matches anything, ? matches any single character, and [] enclose a range of characters to be matched.

eval() Quiet Mode Puts eprint/eprintf() Messages In EVAL_ERR

The eval() optional "quiet" argument suppresses spec errors but puts the error message in the global variable EVAL_ERR. In this release, messages from eprint and eprintf() are now treated in the same manner, in that they won't appear on the screen and the last such message will be assigned to EVAL_ERR. See eval in the funcs help file.

Improved Syntax With 2D Associative Array for and if Commands

Previously, spec would allow a loop or a test for just one element of a 2D associative array, but would not accept an empty set of brackets for the second index. That is:

local arr[] = [ "one":1, "one":2, "two":3 ]

for (i in arr["one"])
   print arr["one"][i]

would work, but:

for (i in arr["one"][])
   print arr["one"][i]

would not work with the empty brackets resulting in a syntax error. That usage is now permitted, as is also:

if (2 in arr["one"][])
    print "yes!"

A set of empty brackets for the first element has always worked.

New HISTCMD Built-in Variable Holds Current History Number

The command line history number is now accessible as the parameter HISTCMD. That is the name used for the same item in the standard bash and zsh shells. HISTCMD is used in the new standard highlight macro described below.

Additional Geometry/Orientation Matrix Errors Made Non-Fatal

A number of errors associated with calculation of the orientation matrix for various diffractometer geometries are no longer fatal. That is, the errors no longer cause spec to stop execution and jump back to the command line prompt. Instead, the associated calc() call now returns an error. Possible errors are a zero lattice constant or lattice angle, a zero LAMBDA (incident wave-length), a zero length reflection or parallel reflections when calculating the orientation matrix from two reflections or failure to fit an orientation matrix from multiple reflections (for example, if the reflections are all in the same plane).

Most of the standard scan macros already check the return value of calcA (defined as calc(1) for all standard geometries and used to calculate motor positions from reciprocal space coordinates) and exit the scan or move if there is an error.

HARDWARE

Update to USB-CTR Digital I/O Pins Access

When the Measurement Computing USB-CTR is used in "external-gate-select" mode, one to three of the eight digital I/O pins are reserved and used for gating the counter channels based on which channel is designated as the master counter. Previously, spec prevented changing the state of those pins at all times. Now it is possible to set and clear those pins except when actively counting. See the usbctr help file.

Fix For USB-CTR Time Presets Over 36 Minutes and Counters Over 32 Bits

It seems the Measurement Computer USB-CTR firmware does not allow time presets greater than 31 bits. With the timebase frequency set by spec to 1 megahertz, the maximum count time was a bit less than 36 minutes. The code now decreases the timebase frequency by a factor of ten for each factor of ten in the preset count time above 36 minutes, but only when the hardware config file sets the scale factor for the timebase to the recommended 1e6. If set to another value, spec assumes an external timebase. See the usbctr help file.

In addition, a bug where counter values greater than 32-bits were not converted correctly to count values in the S[] scaler array has been fixed.

New Tracking Option For EPICS PV Monitors

The "monitor_set" option to epics_par() now takes an optional argument that is a spec global variable or data array. When set, the value of the spec parameter will track the value of the EPICS process variable. See the epics help file for details.

Encoder Mode Update For Galil Motor Controllers

By default, the spec support for Galil motor controllers uses relative move commands for encoder motors (GALIL_E) and absolute move commands otherwise (GALIL). A new custom optional motor parameter "encoder_move_mode" can be assigned values "absolute" or "relative" to set what kind of moves to use for encoders. Use the p command from the standard Motor screen to access the custom parameter screen.

Errors Now Checked When Setting Newport XPS Speeds

spec will now return an error on starting a move or home search on an XPS controller if the PositionerSGammaParametersSet command returns an error when setting the velocity and acceleration. Previously, spec would consider the speeds had been set and proceed with the moves.

Updates For SPring-8 MADOCA Support

An issue where spec would query a MADOCA motor controller during hardware configuration if there were any motors configured to use the controller, even if the associated controller was set to "OFF" in the config file has been fixed. If the controller is unavailable, no MADOCA commands will be sent.

In addition, spec now rounds count times to the maximum two significant figures the standard MADOCA timer hardware supports. spec also will truncate count times to the maximum 990 seconds allowed. Warning messages are printed in each case. To disable count time adjustments for the less used MADOCA timers that don't have such constraints, set the nonstandard optional controller parameter "no_time_check" to a nonzero value from the Devices screen of the configuration editor.

MACROS

New Region Of Interest Counter Macros

A new facility to create run-time region of interest (ROI) counters is now included with the standard macros. The macros work with any MCA- or image-type controller. Counters are created using the new counter_par() "add" function. The ROIs can be configured to return the sum, average, minimum or maximum values associated with the specified detector region. Multiple ROIs can be assigned to the same controller. A new roisetup macro uses the spec_menu() built-in function to provide a configuration screen. See the roi help file for details.

New highlight Macro Displays Matching Items From Command History

The standard macros now include a macro called highlight, which takes a single argument. The argument is a string or regular expression. The macro displays all items from the command line history which match the argument. The matches are displayed as highlighted text. The macro uses the new HISTCMD variable, the relatively new get_history() function, and the slightly less new match() and gsub() functions.

New Option For newfile Macro

When re-opening an existing data file, if the current scan number (SCAN_N) doesn't match the last scan number of the file, the newfile macro will now prompt whether to assign SCAN_N to continue the existing file scan numbering. In addition, if a -c argument (for "continue") is included on the newfile command line, the assignment will be made with no prompting, even if a different scan number was included on the macro command line.

New ub_default Macro To Reset Geometry Parameters

A new ub_default macro is available to reset geometry parameters to the default values they have after starting fresh. The parameters include the lattice constants and the HKL values, angles and associated energy of the primary and secondary orientation reflections.

New Implementation For Geometry Pseudo Angle Scans

The standard macros now include a utility macro called _pa_scan_prep that is used with a number of geometry macros to scan pseudo angles. Both regular and delta versions of the scans are included. The fourc, fivec and sixc geometries have aziscan and azidscan to scan the AZIMUTH pseudo angle. The zaxis geometry has alphascan and betascan, along with delta versions, to scan the ALPHA and BETA pseudo angles. The psic geometry includes alphascan for ALPHA, betascan for BETA, omscan (or thscan) for OMEGA, psiscan (or aziscan) for PSI, qazscan for QAZ and nazscan for NAZ along with delta versions for each. See the comments in the newscans.mac source file for details on how _pa_scan_prep works.

resume Macro Now Restores cleanup_once Macro

The resume macro that restarts scans that were interrupted (usually by a ^C) now restores the cleanup_once macro that was in effect at the time of interruption. For example, with delta scans, the cleanup_once macro returns motors to their positions at the start of the scan. Previously, if a delta scan was resumed, the cleanup action was lost and the motors would not be returned to starting positions.

splot Macros Simplified When Using the Python splot Utility

The draw_plot() macro function used by the splot macro no longer includes unnecessary calls of splot_cntl() to set PLOT_MODE parameters, as the splot utility gets those parameters from the meta region of the SCAN_D[] shared data array.

_dscan_cleanup Updated To Use move_info()

The _dscan_cleanup macro used by most of the delta scans to return scanned motors to positions held at the start of the scan now includes a call to move_info() to determine which motors need to be moved. This change eliminates messages about returning motors to a position they are already at, particularly in the case of the scans associated with the geometry pseudo angles introduced in this release.

Fly Scan Macros Updated

The fly scan macros have a number of updates and fixes, including a new configuration choice in fly_setup to select permitted fly scan motors and parameters for each. In addition, it is now possible to select channel advance behavior for the motorless fly scans, choosing either the internal clock (the default) or an external signal.

Fix For disable_undo Of the disable Macro Set

A small issue, where the saved state of disabled hardware could not be restored with a disable_undo after successful completion of a disable/enable command, has been fixed. See the disable help file for details on the macros.

New Option To Disallow Using Motor Numbers For Move Commands

The standard move macros (mv, umv, mvr, umvr, mvd, umvd, mvr2 and umvr2) traditionally allow motors to be specified by motor numbers in addition to mnemonics. In order to avoid one kind of typing error that results in moving a motor unintentionally, the mstartup (or startup) macros now offer the option to disallow using motor numbers to specify motors for those move commands. If the new global variable NO_MV_MOTNUM has a nonzero value, the macros will print an error message and exit if numbers are used instead of mnemonics. Note, though, variables are still allowed as long as they have been set to a value. Using an uninitialized variable to specify a motor has resulted in an error since spec release 6.05.01. The feature is off by default. Assign a nonzero value to NO_MV_MOTNUM in a local macro file such as site.mac in SPECD to enable the check for all users.

FIXES

Fix For Crash On motor_par(mne, "?") In Some Configurations

For a small number of motor and scaler types, spec could crash if there was a motor or scaler configured but no corresponding controller configured, and the motor_par(mne, "?") or counter_par(mne, "?") functions were called. This was notably a problem with macro hardware motors and scalers, but also affected a handful of other controller types. The issue is now fixed.

Fix For Using Three Arguments With strdef()

A bug that prevented the three-argument invocation of the strdef() function has been fixed. The strdef() function returns the macro definition of its first argument. For cdef() chained macros, the second argument can specify a key to match cdef() segments. The last argument for both regular and cdef() macros can be an associative array that will be filled with the defined argument names if the macro is a macro function, along with an element called "file" that will be filled with the macro source location.

February 19, 2021 - RELEASE 6.09.13

FIXES

Issues With splot To spec Server Communication Fixed

Problems with the recently refactored version of the Python spec client library included in spec release 6.09.10 resulted in issues with the connection from the splot utility to a spec server. Commands from splot, such as initiating a move or scan from the splot server panel, didn't work properly, and splot didn't exit quickly when spec sent a quit message. Those problems have been fixed with updates to the library (install location is SPECD/pyspec/client) and splot.

Fix For Closing Server Connections

On some platforms under certain conditions, a spec client could start racing when a connected server exited. That problem should now be fixed.

February 4, 2021 - RELEASE 6.09.12

MACROS

Fix For fscan/fdscan Bug

The file scan (fscan) macro in spec release 6.09.01 included updates to implement a delta-position scan (fdscan), but there were a couple of bugs that prevented the file scans from working at all. That issue is now fixed. fscan and fdscan are scans that take motor positions and optional count times from a file.

January 27, 2021 - RELEASE 6.09.11

FIXES

Fix For getline() Bug

A bug associated with the updated capabilities for the getline() function introduced with spec release 6.09.05 has been fixed. The bug was that the value for the current line number of the input file was not reset when the file was closed or a different file was accessed without explicitly using the "open" argument. Thus, the wrong line number would be read from the new file, or an end-of-file could be returned if the new file had only one line. Specifying the line number explicitly or using the "open" argument with a new file did not have an issue.

Fix For lsdef and prdef Globbing

The expanded globbing introduced in spec release 6.07.01 that added support for the [...] metacharacter pattern for several built-in commands did not work with the lsdef and prdef command as intended. It works now.

December 14, 2020 - RELEASE 6.09.10

IMPROVEMENTS

New "type" array_op() Option

The "type" argument to the array_op() function now returns a string that represents the data type of the array. For example, array_op("type", SCAN_D) returns the string "double". See the arrays help file for details.

Assignment Now Allowed With global and local Declarations

The declarations global and local now allow initialization in the statement. For example,

local tmp[] = [ 1, 2, 3 ]
global VAR = 1.234
global arr[] = [ "one":1, "two":2, "three":3 ]

Note, only one variable per statement can be declared and initialized using this syntax. (Associative array initialization was introduced in spec release 6.06.01.)

Updates For splot

This release includes bug fixes and stability improvements for the Python splot utility.

MACROS

Fix For _assign_mA Macro

An unfortunate bug introduced in spec release 6.09.07 that broke the _assign_mA macro that is used with the spec HKL geometry configurations is fixed. That macro fills the global mA[] associative array with motor numbers putting the diffractometer motors first in the list. The _assign_mA macro is called by way of the geometry-dependent _assign macro called within the standard config macro. The bug did not affect geometry-less configurations or configurations where the geometry motors were the first motors in the config file.

Updates For flyscan Macros

The fly scan macros include several fixes and additions. A new user_flyscan_trigger hook is called immediately after starting the MCS. The MCS data is now read before the call to fly_chk_beam so that the data so obtained can be used in any beam-check considerations. For unidirectional mesh fly scans, the fly motor backlash is restored for each move back to the starting position. An oversight where the absolute value of the motor_par() "step_size" parameter was not used has been fixed. See the flyscan help file.

FIXES

Fix For prompt_mac Deletion On ^C

An issue introduced in spec release 6.06.01, where prompt_mac was deleted on ^C, is now fixed. See the macros help file for a description of prompt_mac.

Fix For array_copy() Shared Memory Notification

A bug where the array_copy() function did not update the shared memory utime counter when copying to a shared array has been fixed. Utilities that check for updated values, such as spec's splot, use that counter to tell when array contents have been updated. See the spec_shm.h and sps.c files included in the spec distribution.

November 2, 2020 - RELEASE 6.09.09

IMPROVEMENTS

New "reopen" ser_par() Option

It is now possible to close and reopen an ordinary serial device configured for generic user-level access without having to run reconfig. The command ser_par(addr, "reopen") will close and attempt to reopen the serial device configured at addr. Such a capability is not normally needed, but may be useful for certain poorly behaved interfaces. The serial device parameters previously set, such as baud rate, parity, "raw" versus "cooked", etc., will be restored. This option only acts on UNIX serial devices and returns zero if successful and -1 if not. Does nothing and returns zero for SOCKET, EPICS and TACO serial interfaces. See the serial help file.

Updates For splot

The Python splot utility now includes support for live-time display of 2D images. In addition, fly scan plotting issues have been fixed along with fixes for other minor issues.

HARDWARE

Improvements For USBCTR MCS Mode

A few tweaks to the timeout and packet size used with the Measurement Computing USBCTR in the MCS mode used by spec's fly scan macros have resulted in more robust operation. See the usbctr help file.

MACROS

Update For USB-CTR flyscan Macros

The "trigger" support in the flyscan macros when using the Measurement Computing USB-CTR has been straightened out. What was previously referred to as "DIO bit for trigger" is now more properly referred to as "DIO bit to use for gating", in that the DIO bit (if selected) is set at the start of the pass and cleared at the end of the pass and can be used to gate an external device. In addition, a new option "external trigger to start pass" can be selected from the fly_setup macro to use the trigger input on the USB-CTR to start the pass. Choices are "off", "low", "high", "falling" and "rising" referring to the kind of signal presented to the input. See the flyscan help file.

Fixes To _tail and scan_meta_update() For Fly Scans

The standard macros _tail and scan_meta_update() include updates that accommodate fly scan plotting using the splot utility.

FIXES

Fix For Crash With "disable" Option To motor_par() and counter_par()

An old bug that became problematical in spec release 6.09.05 where it could result in a crash when using the "disable" option to counter_par() or motor_par() with certain hardware configurations has been fixed.

October 15, 2020 - RELEASE 6.09.08

IMPROVEMENTS

New "move_timeout" Parameter

A new optional "move_timeout" parameter is available to have spec abort moves or home sequences that do not complete within a specified timeout interval. Such a feature might be useful during unattended operation of an instrument when, for example, a motor with encoder becomes physically blocked and unable to complete a requested move while the controller continues to generate steps.

The parameter can be set four ways. Each method given takes precedence over the prior method. First, a global spec_par("move_timeout") value can be set that will apply to all motors. Second, a "move_timeout" nonstandard optional controller parameter can be set in the config file that will apply to all motors associated with the controller. Third, a "move_timeout" nonstandard optional motor parameter can be set for individual motors in the config file. Finally, motor_par(mne, "move_timeout") can be used during a spec session to set the value for a single motor. Values set with motor_par() will be lost on start up and reconfig. A value set with spec_par() will be saved in the state file.

Units for "move_timeout" are seconds. Fractional values are allowed. If a move or home sequence doesn't complete in the time given, all current moves will be aborted and spec will reset, just as if a hard limit had been hit.

HARDWARE FIXES

Fix For Possible Crash With TMCL Motors

The source of occasional segmentation faults on configuration when using Trinamic TMCL motors has been found and fixed. The issue appeared with spec release 6.09.01 which included support for additional TMCL models.

October 6, 2020 - RELEASE 6.09.07

MACROS

ascan and dscan Can Now Take Multiple Motor Arguments

The standard ascan and dscan macros will now accept an unlimited number of "motor start end" arguments before the number of intervals and count-time arguments. The macros a2scan through a5scan and d2scan through d5scan still exist and do require the number of motors to match the digit in the macro name.

HARDWARE

Updates For eiger_server

The support for the Dectris Eiger detectors through spec's eiger_server hardware server facility includes fixes and improvements. See the eiger help file for current capabilities.

FIXES

Updates For splot

This release includes bug fixes and stability improvements for the Python splot utility.

July 30, 2020 - RELEASE 6.09.06

MACROS

New Option To Show Motors On Screen During HKL Scans

It is now possible to show geometry motors on the screen during reciprocal space scans. The mstartup and startup macros will prompt for which motors to include.

Improved Screen Formatting For Scans

The standard scans now do a more consistent job of filling the available screen row with counters beyond the always shown main detector and monitor channels. The width per counter column is adjusted from 8 to 11 characters based on the available space. In addition, if the window size is changed mid scan, the number of columns displayed and their width is dynamically recalculated. Also the column headers will be redisplayed. These changes are part of the standard _head and _loop macros. If local spec administrators have replaced one or both of these macros (not recommended), the local versions need to be reconciled with the standard versions.

FIXES

Fix For cleanup_once In Server Mode

A long standing bug, where cleanup_once would not run if there was an error in a command sent from a client to a spec server, has been fixed.

Fix For CANbus Bit Rate In config File

An issue where the hardware configuration editor might not read the CANbus bit rate correctly from the config file has been fixed.

Stability Improvements For Python Tools

The Python code for the splot and eiger_server utilities includes fixes and improvements.

July 20, 2020 - RELEASE 6.09.05

IMPROVEMENTS

New Multi-line getline() Options

The built-in getline() function now supports options to read a specific line in the input file and also to read a range of lines at once. The beginning of the range can either be the current position or a specified line number. The end of the range can be specified as a line number, the first line that matches a regular expression or all lines to the end of the file. See getline in the funcs help file.

savstate Will Now Execute Within Statement Blocks

Previously, the savstate built-in command would only set an internal flag to indicate the action was requested. The actual saving of the state didn't occur until spec returned to the main prompt. spec will now write out the state file at the point at which the command occurs.

Updated Behavior For quit Command

Previously the quit command to exit spec (same as ^D typed at the main prompt) was only allowed at the beginning of a line either typed on the keyboard or read from a command file. The command could not be included in a macro. With this release, quit is now an ordinary command that can be included in macros, flow control statement, etc. A new "legacy_quit" spec_par() option is available to restore the old behavior. See the spec_par help file.

New mainloop_mac For Controlling Access To spec Commands

If there is a macro called mainloop_mac, that macro will be run instead of spec prompting for input. The intention of this macro is to provide site administrators a tool to limit what commands are available to users. The macro should prompt the user for input and act on that input. Unless the macro includes an option to undefine itself, the macro will run forever. The macro is undefined automatically when spec exits, either by quit or ^\ (quit signal). See the macros help file for more information.

Error Message Now Printed If Concatenation Used In Function Arguments

The concatenation operator comes into effect when expressions are combined separated only by space characters. The resulting expression is the concatenation of the string values of the constituent expressions. Concatenation is only allowed on the right side of an assignment operator, in the arguments to the print and eprint commands and in the value assigned to a variable in a constant statement. Previously, concatenated expressions in arguments to functions used as terms where concatenation is allowed were not flagged as errors.

New SPEC_PID Built-In Global Variable

A new immutable global variable SPEC_PID contains the process ID of the spec process.

July 13, 2020 - RELEASE 6.09.04

FIXES

Fix For Setting Powder-Mode Parameters In config File

A long standing issue where the powder-mode parameters "powder_base", "powder_slew" and "powder_acceleration" could not be set as nonstandard optional parameters in the config file has been fixed. The parameters could be set during a spec session with motor_par(). The values for "powder_base" and "powder_slew" still default to the base rate and "powder_acceleration" to the acceleration value from the config file.

Fix For TMCL Parameter Restore Feature

The code that restores TMCL motor parameters on detection of a power cycle has been tuned to ensure that there will be no movement of the motor when the actual position and the target position registers are restored.

Fix For New Signal Handling

An issue with the revised signal handling introduced in spec release 6.09.01, where the hardware abort code and cleanup macros might not be execute on a ^C interrupt during a sleep(), has been fixed.

June 25, 2020 - RELEASE 6.09.03

HARDWARE

Eiger2 Now Supported

The eiger_server code used with spec's server hardware facility now supports the Dectris Eiger2 model that uses version 1.8.0 of the SIMPLON API. See the eiger and server_hdw help files for details.

FIXES

Fix For sixc Gamma Position

A bug introduced in spec release 6.08.06 in the sixc geometry code that affected configurations with no geometry pseudomotors has been fixed. The issue was that the position for the Gamma motor after a calcA was not restored after a read_motors().

Fix For TMCL Support

A bug introduced in spec release 6.09.01 that could lead to a crash when using a TMCL motor that didn't have the "home_slew_rate" parameter set has been fixed.

June 19, 2020 - RELEASE 6.09.02

IMPROVEMENTS

New rpi_io() Function To Access GPIO Pins On Raspberry PI

This spec release includes a new rpi_io() function for the Raspberry PI platform to allow access to the general purpose I/O (GPIO) pins. See the rpi help file for details. Note, spec has been available for the Raspberry PI running Raspian Linux since spec release 6.03.01 from February 2015.

Stability Improvements For Python Tools

The Python code for the eiger_server and splot utilities include some fixes and improvements.

MACROS

New user_pregetcounts Hook

The standard get_counts macro, which is the lowest level counter reading macro, now includes a user hook macro user_pregetcounts, which is called before the built-in getcounts command. The existing user hook user_getcounts is called immediately after getcounts. Both user_getcounts and user_pregetcounts are defined as null macros by default.

HARDWARE

Update For Standard EPICS Scaler Record Support

spec now uses a ca_put_callback() to set the CNT process variable to begin counting. With this method, the standard scaler record will send an event for CNT after counting is finished and after final value events have been sent for all associated scaler channels. Previously, spec relied on regular callback events when the value of CNT changed to zero to signal the end of counting. It seems that method doesn't guarantee that all scaler channel final value events arrive before the CNT event.

May 13, 2020 - RELEASE 6.09.01

IMPROVEMENTS

More Robust Signal Handling

The signal handling code associated with a keyboard ^C has been reorganized to correct a potential source of crashes. As spec evolved, the actions taken on a ^C interrupt became more complex. In particular, with the addition of macro hardware and spec server functionality, interrupt handling code sometimes included calls of the C library memory allocation functions. Those function are not re-entrant. If a ^C came while spec was in those functions, a call to the same functions from the signal handling code could cause spec to crash. Although the bug has been present for a long time, it was very rarely seen. CSS has no user reports associated with this bug, but the issue was seen with in house testing.

In this release of spec, the interrupt handling does nothing more than set a flag. That flag is examined at key check points in the code, and if set the appropriate actions are taken (stopping motors, resetting to the main prompt, etc.). There should be no point where a ^C fails to break out of a loop, but it is possible some loop was missed. Please report any anomalies to CSS.

Reorganized File Hierarchy To Support Python Utilities

The spec auxiliary file directory (normally /usr/local/lib/spec.d) now contains a subdirectory called pyspec which currently includes utility packages used by the Python splot utility, the eiger_server hardware server program, and the specfile utility.

Support For Python 3

The Python-based spec utilities (splot, eiger_serve*, specfile) now work with Python 3. The programs will use Python 3 if available, otherwise Python 2 will be used.

Python Library and Examples For Connecting To a spec Server

The Python modules used by the splot utility to connect to a spec server are now located in the new pyspec subdirectory of the spec auxiliary file directory. The source files and examples are included in the spec distribution directory under pyspec/python/client. The examples create graphical widgets that can interact with a spec server.

MACROS

New Delta File Scan Macros

A new fdscan macro works similarly to the fscan macro. Both take motor positions (and possibly count times) from a file. With fscan the file positions are absolute motor positions. For fdscan, the positions in the file are taken as offsets from the motor positions at the start of the scan.

Fix For Screen Display Of Integer Counts

A change in spec release 6.08.05 to no longer round significant figures of integer counter readings for the screen display of updated counting and count values during scans had the unintended consequence of limiting values to 32-bit signed integers. That problem has been fixed by changing the format from "%d" to "%.0f".

FIXES

Problems With cbreak-mode input() Fixed

When the input() function is called with a numerical argument less than zero, the tty state is set to cbreak mode, input echo is turned off and the state remains in that mode until a call of input() with a positive numerical argument or if spec returns to the main prompt. A bug introduced with spec release 6.06.04 that implemented use of the command-line editing library for the input(), yesno(), getval() and getsval() could lead to issues with the tty state if one of those functions was called while the tty state was in cbreak mode. For example, consider the following:

for (;;) {
     key = input(-1)
     if (key == "x")
             val = getval("Enter", val)
     sleep(.1)
}

If getval() call is made, the tty state would not be properly restored to the expected cbreak mode for the next input() call. That issue has been fixed.

In addition, a problem where ^C (interrupt signal) and ^\ (quit signal) were disabled while cbreak mode was active has been fixed.

HARDWARE

Support For Thorlabs LTS150/LTS300 APT Motor Controllers

spec now supports the LTS150 and LTS300 models of Thorlabs APT controller over USB. Support for additional models will be added as needed. See the thorlabs help file for details.

Support For Trinamic TMCL-6210 Motor Controllers

The initial spec support for Trinamic TMCL motor controllers was tested with models TMCM-1140 and TMCM-3110. This release adds support for model TMCM-6210. Support for other models will be added as needed or requested. See the tmcl help file.

Support For Dectris Eiger Detectors

spec now includes Python-based support for the Dectris Eiger detectors using the server hardware facility. See the eiger and server_hdw help files for details.

January 23, 2020 - RELEASE 6.08.08

IMPROVEMENTS

Updated "sort" and New "merge" Options For array_op()

For a 2D array, the array_op() "sort" option will sort the array by rows. Previously, the option would sort a 2D array as if it were a 1D array and distribute the sorted elements in consecutive rows. Now the array will be sorted by rows, either by the value in the first column, or in the column specified by an optional argument.

A new "merge" option combines rows of an array where values in the same column in adjacent rows are the same or within a specified threshold. This feature can be used in combining overlapping scans.

See the arrays help file for more information.

Allow Up To Nine x11filt Windows

The number of allowed x11filt windows has been increased from five to nine.

New "text" Item For spec_menu() and ^G Command

A new "text" item is available to insert a block of text within the menu. A new ^G command will jump to the first item of the menu. See the spec_menu help file for details.

Improved Handling Of Write Errors To Sockets and Pipes

spec now does a better job in handling errors when writing to a socket or a pipe (to x11filt or data_pipe() processes) that has been closed at the other end.

Automatic Removal Of Unnecessary Quotes In prop_watch()

The prop_watch() property string for associative array elements should not contain quotes around the array index. spec will now automatically remove such quotes when registering the property with a spec server if the user has inadvertently included them.

splot Updates

The Python splot utility is now release 3.3.01. Changes include refreshed icons and stability improvements, and partial support for Python 3.

MACROS

New umoveE Macro

The standard energy macros now include a umoveE macro that has the same syntax as moveE but will display the monochromator motor positions and energy during the move. A new internal _updateE macro, an updated _update() macro and new _numE and mE[] global variables are part of the implementation.

Configurable Units For Energy Macros

The units for the standard energy macros, getE, setE, calcM, moveE, umoveE and Escan, can now be configured as either eV or keV. Previously, the units were fixed as keV. The value is stored in a new global variable, E_mult (for energy multiplier). A value of 1 corresponds to keV. A value of 1000 corresponds to eV. The units can be configured in the mstartup macro or by setting the appropriate value to E_mult.

New MCA Scan Macros

This spec distribution includes macros to perform detector-arm scans that take MCA data at a range of positions that provide full scan coverage at the resolution of the MCA pixels. Currently, the macros are not installed by default. See the file macros/mca_scans.mac in the spec distribution. Use mca_scan_setup to configure the macros mca_ascan and mca_dscan.

Fix For Internal sdata_plot() Macro For Column-Wise Arrays

The sdata_plot() internal macro that is called by splot and the other plotting macros will now work correctly with column-wise arrays. In declaring two-dimensional arrays, the first dimension is rows, the second is columns. By default, the "wise-ness" is set based on which dimension is bigger. For example, if there are more rows than columns, the array will be row wise. However, array_op() options can be used to force the "wise-ness". The standard macros set the data array, SCAN_D, to be row wise. The macros that use SCAN_D are written accordingly. With this update, the splot macro will now also work with column-wise arrays.

FIXES

Old sscanf() Bug Fixed

The oldest bug on record, dating to the introduction of the sscanf() function in spec release 3.00.06 in December 1993, has been fixed. The issue was that a minus sign immediately following integer digits would make the scanned value negative. For example, the following statement:

{ sscanf("123-xyz", "%d-%s", num, str); p num, str }

would previously show this incorrect output:

-123 xyz

With the fix the correct result:

123 xyz

is produced.

Fix For sixc Fresh Start Pseudo Motor Calculation

A missed divide-by-zero check in the recently added pseudo motor code for the sixc geometry that resulted in motor discrepancy messages on a fresh start before the geometry parameters used in the calculation had been set has been fixed.

HARDWARE

Support For Modbus

spec now includes preliminary support for Modbus TCP, RTU and ASCII protocols via the fbus_put() and fbus_get() functions. See the new fbus help file for details.

Fix For Struck SIS3820 Monitor Preset Channel

A bug dating from the original support for the Struck SIS3820 32-channel counter/timer where none of the upper 16 channels would work as a monitor preset channel has been fixed.

Preliminary Support For Dectris Eiger

Preliminary support for the Dectris Eiger detector is included via the server hardware feature. See the eiger help file for more information.

October 25, 2019 - RELEASE 6.08.07

IMPROVEMENTS

New Option For split()

If the optional third argument to the built-in split() function is the null string, "", the first argument will be split at each character. See the split() entry in the funcs help file.

New Features and Fixes For spec_menu()

The "@" key can now be used with "bit" items, but only for retrieving a value. Initial values are still set through the modes argument. In addition, the choices key for the "toggle" item can now take more than two choices. Also, an issue where the "@" key might not be effective when used for the same item that had "value" or "svalue" keys, depending on the order in which the items appeared in the menu array, has been fixed. See the spec_menu help file.

Updated Defaults For x11filt

The default settings for x11filt have been switched to use a retained pixmap rather than backing store. These options are for two different methods of having the window redrawn when exposed. The backing store setting was the original default as it required less memory and CPU cycles, which was a valid consideration in the early days of spec. However, the retained pixmap method is more reliable. Not all of the many window managers that now exist implement backing store support in a way that always works with the code in x11filt. See the x11 help file.

Install Creates a SPECD/macros Directory

The standard installation will now create a directory called macros in SPECD (usually /usr/local/lib/spec.d). If a file or directory by that name already exists, it is not an error. Existing files will not be removed. In addition, the global variable DO_DIR, which can be a colon-separated list of directories in which to look for command files, will be initialized with that path when starting fresh. The hardware servers that include command files containing macro definitions will have those files installed in the new macros directory when a make install is run in the spec distribution servers directory.

FIXES

Fix For Start-Up -T Flag

A bug, introduced in spec release 6.06.01 (May 2017), where the state file associated with the "fake" tty argument to the -T start-up option was not used when writing the state file, has been fixed. The designated "fake" tty state file will now be used to both initialize the state and save the state on exit (or with the savstate command).

Fix For sixc setlen Macro

A recently introduced bug for the sixc geometry macros, where the setlen macro didn't work for the "pseudo-gamma" configuration that has gamR and gamT motors, has been fixed.

Fix For Server Hardware Instability

An issue with memory allocation for server hardware arguments has been fixed. The symptoms could include the server failing to start and/or memory corruption.

Fix For Updated MCAS and CCDS Meaning

spec release 6.08.05 revised the meaning for the MCAS and CCDS global variables to facilitate looping through all configured devices. With that release, the values are set to one greater than the highest numbered device, rather than to the number of devices. That accommodates non-consecutive device numbering. In that recent release, the value was still 1 if there were no devices configured. With this release, if there are no associated devices, the value of the respective variable will be zero.

HARDWARE

New Server Hardware Support For greateyes Cameras

This spec release includes initial code, macros and a help file for the greateyes cameras, which can be used over USB or ethernet. The files are in the servers subdirectory of the spec distribution. See the greateyes help file for details.

New "goodbye" Message For Server Hardware

The server hardware protocol now includes spec sending a "goodbye" message before disconnecting the socket to the server. See the server_hdw help file for details.

Subaddress Allowed For Image Devices

The same subaddress syntax available with the mca_spar(), mca_sget() and mca_sput() functions can now be used with image_par(), image_get() and image_put(). The only built-in hardware support that current makes use of the subaddress for image devices is the server hardware pseudo device. The subaddresses, when used, will be passed to the associated server. For the listed functions, the address argument may be given as 0.0, 0.1, 0.2, ..., where the first digit is the unit number from the config file, and the digit right of the decimal point is the subaddress. The argument can be entered as number or a string. The syntax "0:0", "0:1", "0:2", ..., is also recognized, where the arguments for each module are strings.

Updates For Delta Tau Motor Controller Support

The built-in support for the Delta Tau motor controllers has been updated. spec no longer programs values for motor parameters Ix15, Ix19 and Ix21. Values for these I variables can be set as nonstandard optional motor parameters in the config file. Otherwise, values in controller memory will be used. spec now allows a zero acceleration time to be programmed as motor controller parameter Ix20 for this controller, in which case it is important to insure the Ix21 S-curve time parameter has a non-zero value. In addition, if the standard optional motor parameter "home_method" is set, spec will send that string when doing a home search.

spec now recognizes a nonstandard optional controller parameter named "init_sequence". Its value can be one or more commands separated by semicolons. Each command will be sent to the controller during hardware configuration.

Also, new nonstandard optional motor parameters "nudge_time" and "nudge_sequence" are available to deal with avoiding fatal following errors when moving a motor that hasn't moved recently. The parameter "nudge_time" can be set to the number of seconds between moves before spec will send nudge commands before moving the motor. The parameter "nudge_sequence" is a string containing a semicolon-delimited list of commands to send before starting the move to the destination.

Fix For Possible epics_get() Retry Anomaly

A possible crash when spec retries epics_get() commands after a timeout when a connection has dropped has been fixed.

September 3, 2019 - RELEASE 6.08.06

IMPROVEMENTS

More Robust State File

When saving the state information either at exit or with the savstate command, spec will now fully write out a new state file with a name ending in ".new" before renaming the new file to replace the the previous. In addition, the previous state file will be maintained with a suffix ".old". If on start up, the standard state file is missing or corrupted, spec will attempt to read from a ".new" file, if it exists. If it doesn't, spec will try to read from the ".old" file. The same procedure is followed for the command-line history file. These changes should greatly reduce the already small chances of a corrupt state file forcing spec to start fresh. A state file could become corrupted if a computer is shutdown or spec is killed while the state file was in the process of being written.

FIXES

Fix For sixc Pseudo Motors With Tracking Off

When tracking is off for calculational pseudo motors, moving the pseudo motor should not change the positions of the associated real motors and vice versa. The sixc geometry code has been fixed to make sure that is the case.

HARDWARE

Fix For Enabling Multiple PCI Boards Of the Same Type

Some Linux systems are configured so that access to PCI board I/O ports and memory registers is disabled by default on boot with the expectation that kernel drivers will enable access if the PCI board is to be used. spec driverless support for PCI boards also enables access. A bug that only enabled access to the first board when multiple boards of the same type were installed has been fixed.

Support For SPring-8 MADOCA Request Server Layer

The SPring-8 "equipment manager" RPC layer support added to spec in 1999 has been updated to also support the "request server" socket layer. In addition, the naming has been changed to MADOCA to reflect the naming conventions used at SPring-8. The built-in em_io() function has been renamed madoca_io(). An em_io is now included in the standard macros (defined simply as madoca_io) to maintain backward compatibility with existing local macros. See the madoca help file (formerly named equipman) for details.

MACROS

New save_state Macro To Aid In Diagnostics

The new standard macro save_state invokes the utility show_state (included with the spec package) to write the current state file contents along with config and settings file information, all in human readable format, to either the file specified by an optional argument or to a file beginning with the name /tmp/state. Such a file can be useful at CSS for diagnosing or debugging user issues.

June 16, 2019 - RELEASE 6.08.05

IMPROVEMENTS

New tolower() and toupper() Functions

New string manipulation functions tolower() and toupper() are available to change the case of strings. Optional arguments provide a character count and starting position. See the funcs help file for details.

New Position Argument To asc()

The asc() function, which returns the ASCII value of the first character of the string argument, now accepts an optional second argument to specify a position within the string rather than the first character. Positions are counted from 1. See the funcs help file for details.

New "every" Option to array_op()

A new array_op() "every" option returns every n-th element of a data array. See the arrays help file for details.

Improvements to spec_menu()

A new "alist" key allows selecting multiple items from a list. The list of items must be passed as an associative array. A new "bracket" key allows specifying the bracket characters that indicate selections made with the "list" and "alist" keys. All the descriptive text can now include special text formatting strings for bold, underline, etc. See the spec_menu help file for details.

The show_state Utility Will Attempt To Find Associated Files

The show_state utility presents information not only from the user state file but also from the associated history, config and settings files. When invoked with an explicit state file argument, the locations of the other files are not necessarily known, so the command output doesn't include those elements. With this release of spec, if the file argument to show_state includes the userfiles/ path component, the command will try to locate the associated files based on that path. That is, if the history file is in the same directory as the state file and if the config and settings files are at the same level as userfiles, show_state will find them.

Interruptible Socket Connect

spec uses a four-second timeout when attempting to connect to a socket. That timeout can now be interrupted with a ^C, both with user-level socket commands and hardware initialization from the config file. While initializing hardware from the config file, processing will continue as if the attempt to open the socket failed. During the user-level socket calls, the ^C will jump back to the command prompt, as usual.

Additional Check For Socket Lost Connection

spec will now take notice when a socket connection has been dropped by a server when doing a read of an associated socket. Some spec hardware support recognizes a lost connection and will attempt to reconnect. This check is an addition to the existing tests for lost connections.

Updated Meaning For MCAS and CCDS Global Variables

Previously, the values of the built-in MCAS and CCDS global variables were set to the number of 1D and 2D devices in the hardware config file. If all device numbers were used, one could loop from zero to the value of the corresponding global variable to access all configured devices. If an intermediate device number was unused, such a loop would not address all the devices. The values of MCAS and CCDS are now set to one greater than the highest device number to facilitate such loops.

Updated Behavior For Certain mca_spar() and image_par() Commands

The options "controller", "responsive" and "device_id" to the mca_spar() and image_par() commands will no longer print an error message if the device is unconfigured. For unconfigured devices, the functions will return the string "Unconfigured" for "controller", the value 0 for "responsive" and the value -1 for "device_id". In each case, HDW_ERR will be set to the value 6, which corresponds to trying to access unconfigured hardware. (See the HDW_ERR help file.) Note, that the "unusable" option to the commands still returns a zero or one to indicate whether a given device is available and usable and also does not print a message.

HARDWARE

Macro Hardware Timer/Counter Improvement

If no channels are active for a particular macro hardware timer/counter controller due to all configured channels being unresponsive or disabled, spec will no longer send the "prestart_all" and "preread_all" commands to the associated _cmd macro.

Fix For Struck SIS3820 Reset

Previously spec issued a reset command before programming the Struck SIS3820 for each counting interval. The reset produced an undesirable short spike on the enable signal. The reset command has been replaced by appropriate commands to prepare the device for a new counting cycle.

New MCS Support For Struck SIS3820

spec now supports the multi-channel scaling (MCS) capabilities of the Struck SIS3820 VME Scaler. See the sis3820 help file. spec flyscan macros have been updated to include support for the SIS3820. See the updated flyscan help file.

Fix For USB-CTR MCS Pass Sums

A bug with the recently added support for multi-channel scaling (MCS) with the Measurement Computing USB-CTR counter/timer, where the sum of channels accumulated over multiple MCS passes was not done correctly, has been fixed. Note that for fly scans, which were the impetus for adding the MCS capability, only one pass is made, so the bug was not an issue.

Fix For Halting Trinamic TMCL Limit Searches

An issue, where a ^C or stop() command wouldn't stop a chg_dial() "lim+" or "lim-" search on a Trinamic TMCL motor controller, has been fixed.

Fix For Possible Crash When Reading From a spec Server

Under some conditions, a timeout while attempting to read a message from a spec server could cause a segmentation fault. That issue is fixed.

MACROS

Improved Display With Updated Counting During Scans

The screen display of updated counting during scans will no longer round significant figures of integer counter readings.

New Options For uct Display

The setshow macro for setting certain parameters for displaying motor and counter information now has two additional options for configuring the updated counting display associated with the uct macro. The counter mnemonics can now be displayed. A blank line can now be inserted between each set of counter rows.

Updated flyscan Macros

The flyscan macros now support the Struck SIS3820 VME Scaler as the MCS device, along with the existing support for the Measurement Computing USB-CTR. In addition, the optional normalization function is more robust with respect to normalization channels that might contain zeroes.

FIXES

No Longer Limit Capabilities If root User

spec release 6.05.01 replaced the set-userid-root method of allowing the spec executable access to privileged I/O (such as PCI card registers for hardware control) with use of the Linux capabilities facility. Privileges are only enabled briefly around the calls that gain access. After gaining access, the code releases the capabilities, even if the real user ID was the all-privileged root user. One of the needed capabilities is "dac override" for discretionary access control, i.e., file permissions. When spec disabled that capability, even the root user would lose access to permission-protected files and directories. With this spec release, if the real user ID is that of root, the executable does not manipulate the Linux capabilities at all. Note, CSS does not recommend running spec or even a shell as the root user as normal operating procedure due to the possibility of doing catastrophic damage to the operating system with a single mistyped command.

Fix For Possible Buffer Overflow In array_dump()

Previously, if the optional element format for the array_dump() command specified a too-large format width (for example "%5000g"), there could be a buffer overflow leading to a subsequent crash. That bug has been fixed in this release. In addition, the field width for a single element is now limited to 4096 characters.

edconf String Editing Fixes

An issue with the edconf hardware configuration editor introduced in spec release 6.08.02, where the delete character and the delete to the beginning of the line character when entered in the middle of a string would erase to the end of the string, has been fixed.

edconf Default Limits Fix

Traditionally, when motors were added to the config file using the edconf hardware configuration editor, default values for limits were set to -180 and 180. Recent changes to implement 64-bit motor positions inadvertently caused the default limit values to be set to zero for newly added motors. This release restores the traditional behavior.

March 27, 2019 - RELEASE 6.08.04

FIXES

Another Fix For Escan fixQ Mode

When the Escan macro was rewritten to use the new array-based scan engine in spec release 6.03.08, the implicit calculation of H, K and L from current motor positions via the scan_head call was overlooked, with the result that if geometry motors were moved prior to the Escan, the HKL used in fixQ mode would not necessarily be the HKL associated with the motor positions at the start of the scan. This spec release includes an updated Escan macro that restores the traditional and expected behavior by including an explicit calcHKL call.

Fix For eval2() Replacement

The update in spec release 6.08.02 that replaced the now deprecated eval2() function with a call of eval() with the new optional flags "reset_on_error, local_visible" was mishandled. The eval2() call was replaced with a macro function called eval_arg(). However, macro functions always hide local variables defined outside the macro function, thus defeating the purpose of the "local_visible" flag. This spec release replaces the macro function with a direct call of eval() that includes the flags "reset, local" (the alternative short form names).

March 13, 2019 - RELEASE 6.08.03

IMPROVEMENTS

New "prestatus_all" and "preread_all" Commands For Macro Hardware Counters

To accommodate macro hardware counter configurations where hardware reads multiple channels with a single command, the macro hardware facility now implements "prestatus_all" and "preread_all" commands that can be used to create simpler macro hardware implementations. See the mac_hdw help file for details.

Additional Enhancements For edconf

The ^F and ^B keys can now be used to page through the nonstandard optional parameters screens of motor controllers and counter/timers. In addition, a new help screen describes the value-editing special commands.

Updates To New sixc Geometry Configurations

The new six-circle geometry configurations introduced in spec release 6.07.07 have been updated in order to provide more fine-tuned control over the pseudo motor tracking. See the sixc help file for details.

Support For %a, %A and %F Formatting In printf() Functions

The printf(), fprintf() and sprintf() built-in functions now recognize the %a and %A conversion specifiers, which print float and double values using a hexadecimal notation including an exponent. The %F format is identical to %f and is included for compatibility with the standard C library syntax. See a UNIX/Linux manual page for the printf() function for details on the conversions.

HARDWARE

Updates For Trinamic TMCL Controllers

spec will now, by default, automatically check for a power cycle on the Trinamic TMCL controllers and will restore positions and motion parameters if needed. In addition, reading the controller is more robust, with an automatic retry of commands that have a checksum error in the reply. Also, if the "check_interval" optional parameter is set to -1, power-cycle detection will be disabled. See the tmcl help file for details.

New ANC150 and Updated ANC300 Support

Support for the Attocube ANC300 piezo controller has been updated for more robust error handling and to display estimated positions during updated moves, based on the step frequency and elapsed time. When a move is aborted, spec will estimate the current position at the point that the move was halted. In addition, the configured slew rate will be used to program the step frequency (using the controller's setf command). Support for the similar Attocube ANC150 has also been added to spec (although that model controller is out of production). See the new anc help file for more information.

Updated Mythen Support

spec can now load the user-defined flatfield arrays supported by Mythen firmware 4.1.0. The mca_par("flatfield") command now takes options of either a spec data array or a file that contains the array. In addition, a new "flatfield_slot" command can be used to specify which user-defined array to use. See the mythen help file for details.

Fix For phyMOTION Module Numbering

An issue with the Phytron phyMOTION support, where motor controllers installed to the right of any other module types (power supplies, I/O modules) in a phyMOTION crate were not correctly addressed, has been fixed.

Interruptible Firmware Load With USB-CTR

The Measurement Computing USB-CTR counter/timer requires a firmware upload whenever the device is powered up. It takes almost 15 seconds to send the firmware to the device. The loading process can now be interrupted with a ^C. The firmware will still need to be loaded in order to use the device, but one will not be stuck waiting if there is something else that needs to be done first.

MACROS

Fix To Reset Plotting Parameters With Disabled Counters

An issue associated with plotting when counters have been disabled has been fixed. The plotselect (or similar counters) macro assigns a value to the PL_Y1 global variable that points to the column of interest in the SCAN_D data array for plotting and analysis. If counters are disabled or enabled after the value is assigned, the columns in SCAN_D may no longer match the column chosen for PL_Y1. The scan_data_init() macro, called after acquiring (but before saving) the first point of each scan, now recalculates PL_Y1 taking into account the currently enabled counters.

January 17, 2019 - RELEASE 6.08.02

FIXES

Buffer Management Fix

An issue, where under certain conditions a "Can't get a big memory buffer" message would be displayed, sometimes followed by a segmentation fault, has been fixed. The issue was associated with eval() calls of certain functions with particular argument types. The error could also occur when a spec server executed commands from a client, as the same internal code is used.

Fix For Tsuji Model UPM4C Configuration

A bug, where spec mistook the configuration of a Tsuji Model UPM4C as a PM4C, has been fixed.

Fix For edconf Anomalies

A few minor display and data entry glitches in the edconf configuration editor have been fixed.

December 31, 2018 - RELEASE 6.08.01

IMPROVEMENTS

Internal Type of Motor Positions Now 64 Bits

The spec code base has been updated to switch the storage type of motor positions from 32-bit integers to 64-bit integers. Such a change requires an update to the settings file binary format, which has been accomplished in a completely backward compatible manner. Saved position magnitudes greater than 32 bits will be truncated to 32 bits if the settings file is read by an earlier spec release.

Updated settings File Format

For over thirty years, the settings file stored motor positions as 32-bit integers, reflecting the storage type within spec. This spec release introduces an extended format for the settings file to accommodate 64-bit positions while preserving backward compatibility.

The settings files saves motor parameters that are changed during a spec session and is updated whenever any of the parameters are changed, for example, at the end of a move or if the limits or offsets are adjusted.

The long-time settings file data structure saves values for motors in consecutive chunks that are 24 bytes long laid out as follows (where s32_t is a 32-bit signed integer):

struct  sav_mot {
  s32_t   sm_pos;         /* Current position */
  float   sm_off;         /* Current user/dial offset */
  double  sm_low;         /* Software low limit */
  double  sm_high;        /* Software high limit */
};

spec has a compiled-in limit of 320 motors for the settings file. The first 320 times 24 bytes of the new format settings file has the same information and format as before. That occupies exactly 512 bytes less than 8192 bytes. spec now uses that last 512 bytes of the 8K page for a header. Starting on the second 8K page, all four motor values are saved in consecutive 32-byte long data structures formatted as follows:

struct  sav_mot_d {
  s64_t   sm_pos;         /* Current position */
  double  sm_off;         /* Current user/dial offset */
  double  sm_low;         /* Software low limit */
  double  sm_high;        /* Software high limit */
};

Both spec and the edconf configuration editor now write and read motor settings in both locations. When reading a settings file, the code sorts out whether the data was written using the version 1 or version 2 format and uses the appropriate positions. See the spec distribution files settings_file.h for details on the format, including the header definition. See the config/set2asc.c source code for an example of how to test which settings file version was used.

A settings file saved with the new format will not cause issues with older versions of spec or edconf, other than having 64-bit motor positions (if there are any) truncated to 32 bits. An old format settings file will be perfectly understood by new versions of spec and edconf.

New Options To eval()

The eval() function now recognizes optional arguments "quiet", "reset_on_error" (or "reset") and "local_visible" (or "local"). The "quiet" argument suppresses the display of error messages associated with the eval() command on the screen. The "reset_on_error" option causes syntax errors and the like to reset to the command prompt. The "local_visible" argument causes eval() to have the same property as the now deprecated eval2() function, in that local variables defined outside the eval() call are visible to the command being executed within the argument string. Type h eval at the spec prompt for details.

Page Through MCA/Image Optional Parameters With edconf

The edconf hardware configuration editor (usually invoked via the config macro) now allows paging through MCA and image device optional parameter screens (reached via the p command) using the page forward (^F) and page backward (^B) commands. In addition the ^G command jumps to the parameter screen for the first device.

More Consistent Setting Of HDW_ERR With mca_par() and image_par()

Previously, some hardware errors that occurred in the device dependent code reached through the mca_par() and image_par() calls didn't set HDW_ERR. That issue is addressed in this release.

Updates To counter_par() Error Handling

The counter_par() function will now consistently return a -1 value if there is an error in the device dependent code. In addition, HDW_ERR is set for such errors. Note, since -1 may be an allowed value for some parameters, it is more robust to check for errors by looking at the value of HDW_ERR after a call to counter_par().

HARDWARE

Select Motor Controller Support Now Uses 64-Bit Resolution

Support for macro hardware motors, spec server motors, and the EPICS motor record has been updated to use the 64-bit resolution for motor positions available in this spec release.

Updates For CLS EPICS Motor Record

In addition to using 64-bit resolution for motor positions, the support for the CLS EPICS motor record contains a fix for a scaling issue. In addition, process variable names generated from motor numbers are now always at least two digits with a leading zero for motor numbers 0 through 9.

Initial Support For SmarAct MCS2 Controllers

This spec release supports the SmarAct MCS2 motor controllers. These controllers use a completely new protocol and syntax compared to the previously supported SmarAct models. The support for these controllers uses the new 64-bit resolution for motor positions. Currently, only the ethernet interface with closed-loop mode is supported. See the mcs2 help file for details.

Fix For EPICS Motor Soft Limits

An issue where the spec soft motor limits didn't properly account for backlash set within the EPICS motor record has been fixed.

Fix For New EPICS Scaler "timestamp" Option

A bug that prevented the counter_par() "timestamp" option introduced in the previous release from working for EPICS scaler counters has been fixed.

MACROS

Replace eval2() With eval_arg()

All 100+ calls of eval2() in the standard macros have been replaced with eval_arg() calls. The eval_arg() macro is a new standard macro defined as:

def eval_arg(s) '{ return(eval(s, "reset_on_error, local_visible")) }'

The "local_visible" option invokes the functionality of the now deprecated eval2(). The option allows the eval() call to see local variables defined outside the function call. The "reset_on_error" option addresses an issue associated with the relatively recent introduction of eval() in the standard macros. Using eval() allows expressions and variables as macro arguments. Until this release, the eval() function did not reset to command level if there were syntax errors in the arguments (for example, typing ,01 instead of .01). The "reset_on_error" option causes such errors to reset to command level, restoring the traditional behavior.

FIXES

Fix For Possible Crash With ser_get(), sock_get(), gpib_get() and vxi11_get()

A very old bug that became an issue with unrelated changes made in release 6.06.01, where spec could crash on some platforms when the ser_get(), sock_get(), gpib_get() or vxi11_get() functions were called with an optional argument ("byte", "short", "long_swap", etc.) to read a single binary number, has been fixed.

Fix For HDW_ERR With Successful motor_par()

A bug where the global HDW_ERR symbol was set to "generic error" on successful calls of motor_par() has been fixed. See the HDW_ERR help file for details on the HDW_ERR feature.

Fix For ^C Interrupt While Waiting For Unresponsive DP5/PX5/MCA8000D

The spec support for the Amptek DP5/PX5/MCA8000D accommodates the fifteen second reconnect timeout in the device firmware, but allows the user to ^C out of the wait during hardware configuration. A bug, where a ^C typed during the reconnect timeout on a reconfig call made while spec was running would subsequently disable ^C altogether, has been fixed.

Fix For Process Accounting With splot

A bug, where if the Python splot utility exited for any reason spec did not clean up spec's process accounting table, has been fixed. Previously, one might have seen a "Too many processes for spec" message after that happened sixty or so times.

Fix For Internal Process Creation Error

A bug, where if spec's internal code failed to create a new process (particularly when using the unix() command), pathological behavior occurred, such as run away CPU usage or spec killing all of the user's processes, has been fixed.

Fix For readline Key Binding

An old bug in a key-binding call in spec (but only when linked with the readline command line editing library -- not the default libedit library included with the spec distribution) bound the circumflex key (^) to the reverse incremental search command. That bug is fixed in this release. The behavior can be fixed when running older releases of spec by putting the line:

"^": self-insert

in a file named ~/.spec_keys. See spec's readline help file and the official readline documentation for further details.

Assorted splot Fixes And Enhancements

The Python splot utility included with spec is updated to the current release. See the splot update notes in the distribution for details.

October 4, 2018 - RELEASE 6.07.07

IMPROVEMENTS

New get_history() Command

A new get_history(num) command returns entries from the command-line history as a string. If num is positive, returns the specified history item. If num is negative, returns the item relative to the current history number. If no item exists at the specified number, returns an empty string. See the history help file for details.

The show_state Utility Now Includes config and settings Info

The spec show_state utility displays the saved state of a spec session in human-readable form. The output will now also display the contents of the hardware config and motor settings files. Type show_state - at the shell prompt to see usage.

New sixc Geometry Configurations Supported

Support has been added to the six-circle geometry code and associated macros to recognize two additional configurations, where the standard gamma, delta and mu angles become pseudomotors. See the updated sixc help file for details.

Linearized Motor Limit Messages Possible

Previously, motor limit messages referred to "clockwise" and "counter-clockwise" hard limits. Now, if the standard optional motor parameter "rotary" is set and has a value of zero, the hard limits will be called "positive" and "negative" in the limit messages. In the hardware configuration editor, the parameter is labeled "Linear/Rotary". This motor parameter is presently only otherwise used in the built-in C code for the MicroMo MVP-2001, Attocube ANC350 and SmarAct MCS motor controllers.

FIXES

Fix For Assigning From Unset Associative Array

Previously, a runtime error would occur when assigning one associative array to another if no element of the right-hand side associative array had yet been assigned a value. That issue is now fixed.

Application Icons For splot and x11filt Installation Tuned

The installation process for desktop files introduced with spec release 6.07.05 has been refined. The desktop files allow certain modern Linux window managers to find and display icons for the splot and x11filt processes. Previously, the installation attempted to install the files in /usr/share/applications and would display an error message if the installation failed. Now the installation will attempt to install the files in one of these directories: /usr/local/share/applications, /usr/share/applications and ~/.local/share/applications, in that order. For the files to be copied, a directory must exist and the user running the Install script must have permission to create the file. If successful, a message indicating the install location will be displayed. No message will be displayed if the files are not installed due to insufficient permissions.

HARDWARE

Support For isel iMC-M/iMC-MP 4-Axis Motor Controllers

This spec release contains preliminary support for the isel iMC-M/iMC-MP 4-Axis Motor Controllers. See the isel help file for details.

Support For Kohzu KOSMOS Series Models ARIES/LYNX

Support for the Kohzu Kosmos series Aries/Lynx controllers are included in this spec release. See the kosmos help file for details.

New counter_par() "timestamp" Parameter For Event-Driven Counters

For counters with values updated by events sent from a spec server or via EPICS scalers or PV counters, the rate at which the values are updated is generally much slower than the rate at which user-level code can retrieve values with the getcounts command. These hardware types have a new read-only counter_par() "timestamp" argument implemented that returns the time at which the value was last updated by an event. The timestamp can be used to check whether an updated value is available. The timestamps are based on the system clock.

MACROS

Enhanced cscan Macros

The cscan continuous scans macros, introduced in spec 6.02, have two new features. Previously, the cscan macros treated all the enabled counters as cumulative counters, subtracting successive readings to get net counts at each data point. Now, if the optional counter_par() "cscan_instant" parameter exists for a particular counter and is nonzero, each reading for that counter will be used as is.

Count values associated with event-driven counters for EPICS scalers and process variables and spec server hardware are updated at a rate slower than the frequency with which the cscan macro can read the values via the get_counts call. That results in successive readings returning identical values. For these particular controller types (EPICS_SC, EPICS_PV and SPEC_SC), the cscan inner loop will now save a timestamp associated with the value and continue to read values until all the timestamps are updated. That timestamp checking can be disabled for a particular counter if the optional counter_par() "cscan_poll" parameter exists for that counter and has a value of zero.

See the cscan help file details.

August 16, 2018 - RELEASE 6.07.06

FIXES

Fix For Entering Negative Values In edconf

A bug that was introduced with the edconf updates in spec release 6.06.03 that broke initiating certain number entries with a minus sign has been fixed. In most cases, negative numbers could still be entered prior to this fix by editing an existing entry.

Fix For "short_swap" Option With ser_get(), sock_get(), gpib_get() and vxi11_get()

A very old bug where the "short_swap" option for the ser_get(), sock_get(), gpib_get() and vxi11_get() functions would read but not swap two bytes has been fixed. Note, the older version of the command "int2_swap" did work correctly.

July 23, 2018 - RELEASE 6.07.05

FIXES

Application Icons Now Work For splot and x11filt

The magic behind icon display with modern Linux window managers has been decoded, and the icons associated with spec's Python splot utility and standard x11filt plotting now display correctly in the window manager task bars. The standard spec installation will now install required desktop files in the /usr/share/applications directory, if such a directory exists.

Unexpected splot Restarts Fixed

Previously, for some commands, the Python splot utility did not return an expected value to spec, which would lead spec to restart the splot program. The issue has been corrected.

July 3, 2018 - RELEASE 6.07.04

MACROS

Fix For get_angles In Newer Scan Macros

A bug associated with the delta versions of the ascan, mesh and xascan scans defined in newscans.mac (which became the source of the standard scan macros in spec release 6.04.01), along with the delta versions of the cscan, cmesh, vscan, and flyscan macros, defined in cscan.mac, vscan.mac and flyscan.mac, has been fixed. The code that saved the initial positions at the start of the delta scans used the obsolete getangles macro instead of the current get_angles macro. The difference is that the latter includes a call of user_getangles, a hook macro used to set positions when using an old-style implementation of pseudo motors. Pseudo motor implementations that use the macro-hardware feature were not affected by this bug.

The getangles keyword was originally a built-in command in spec. It was replaced with the get_angles macro to accommodate the user_getangles hook 25 years ago. Twenty years ago, getangles itself was replaced by the built-in function read_motors(). For backwards compatibility, getangles still exists as a macro.

June 19, 2018 - RELEASE 6.07.03

FIXES

Recursive Macro Functions With Different Number Of Arguments Fix

A bug dating from spec release 6.06.11, where a nested call of a macro function using a different number of arguments could result in a segmentation fault, has been fixed.

May 2, 2018 - RELEASE 6.07.02

IMPROVEMENTS

New Laue Mode For psic Geometry

The psic geometry now supports a new mode that uses the two detector circles and the X-ray wavelength as the three degrees of freedom, keeping the four sample circles frozen. This mode can be useful if the sample rotations are limited or the X-ray focus is smaller than the diffractometer circle of confusion. See the psic help file for details.

MACROS

Fly Scan Updates

The new fly scan macros contain a number of fixes and additions. Among the fixes, an issue with the value of the prescale counter setting as shown in the fly_setup macro has been addressed. Among the additions, a new loopscan mode is available that doesn't use motors, but simply accumulates counts to the specified number of intervals using the MCS internal timebase to advance the channel counter. See the flyscan help file for details.

Counter Column Width Set Dynamically

The standard scan macros now adjust the width of the columns for counter values as displayed on the terminal window from between 8 and 11 characters, based on the space available. Previously, 8 characters were used. The change affects the standard _head, _loop and _upd_count macros.

HARDWARE

Support for Newport DL Controller

This spec release includes support for the Newport DL Controller Series single-axis motion controller. See the DL help file for details.

Update For Multix ME100 Server Hardware Implementation

Several issues with spec's server hardware module for the Multix ME100 have been fixed.

March 29, 2018 - RELEASE 6.07.01

IMPROVEMENTS

New -A Option For Server White Listing

A new start-up option can be used to limit the hosts allowed to connect to a spec server as clients or to spec via socket ports opened with sock_par("listen"). The -A option is followed by an IP address with an optional bit mask argument, using the standard CIDR (Classless Inter-Domain Routing) notation. Multiple -A options are allowed. For example, the options -A 127.0.0.1 -A 192.168.1.0/24 would allow the localhost (127.0.0.1) and hosts in the 192.168.1.0 through 192.168.1.255 subnetwork to connect. If not given as a start-up option, all hosts are allowed to connect as before.

Expanded Globbing

Commands that support the metacharacters * (which matches any string) and ? (which matches any single character) now also support the [...] metacharacter pattern. Any string that contains the characters within the square brackets is matched. Two characters separated by a hyphen specify a range of characters that will match. An initial ^ negates the enclosed character set. The commands affected are lsdef, prdef, lscmd and syms, along with the optional search-string file positioning argument of dofile() and qdofile().

Omega-For-Theta Four-Circle Kappa Configuration

The geo_fourc.c code now allows the motor traditionally called th (for theta) to be given the mnemonic om (for omega). Previously, using the om mnemonic would activate a special configuration named omega-type, where the tth and om motors are mechanically coupled. Now, if there is an om motor, no th motor, and if the om motor has a non-standard optional parameter named "omega_for_theta" with a positive value, the standard four-circle configuration will be used. This new naming option is available for normal and kappa variations of the four circle. Note, though, the four-circle macros will still also use OMEGA in the traditional sense, that is, the value of om - tth / 2.

MACROS

New Fly Scans

spec now includes fly scan macros that take advantage of the enhanced hardware support for the Measurement Computing USB-CTR4/8 counter/timer. Fly scans use the counter/timer in multi-channel scaler (MCS) mode with the channel advance controlled by motor pulses from a continuously scanned motor, allowing each MCS counter bin to be associated with an accurate motor position. See the new flyscan help file for details. (The current version is considered a beta release of the macros.)

Updates To Standard Macros To Accommodate Fly Scans

A number of standard macros, including resume, _head, _scan_time and _loop, have been updated to accommodate the new fly scans.

Updates To disable/enable Macros

The disable_save() macro now returns the current state of disabled devices as an associative array. A new disable_restore() can use that array to restore the state. See the disable help file.

Plotting Macros Updated To Take Into Account Disabled Counters

Disabled counters are no longer included in the SCAN_COLS or SCAN_D arrays. The configuration of these arrays is updated at the start of each scan.

Fix For hklmesh Scans

A bug in the _hklmesh macro associated with the new array-based scan engine (see newscans.mac) where the _m[] array used by the _array_scan macro engine wasn't properly initialized has been fixed. (The _m[] array contains the motor numbers of the motors that are part of the current scan.)

Fix For surf abscan and abmesh

The abscan and abmesh macros used in the surf geometries were updated to use the new array-based scan engine that became the default for scan macros in spec release 6.04.01. Several bugs introduced at that time are now fixed. In particular, for several surf variations (namely ames, bl18b, cmc, harv, x19, x22 and x22b), not all motor positions were calculated for each point in the scans. For all surf variations, values written to the data file for HKL with abscan were not associated with the correct scan point. Also, with abmesh, the _m[] array was not properly initialized.

FIXES

Fixes For Server Hardware

The code for the server hardware feature has improved handling of out of sequence commands and of data transfer to and from the server. See the server_hdw help file for information on the server hardware feature.

Server Protects Against Non-null Terminated Strings From Clients

If a client sends a packet to a spec server where string data doesn't include a terminating null byte, the server will silently correct the incoming data.

Fix For Server Not Running Cleanup Macros On Remote Abort Message

An issue where a spec server sometimes did not run cleanup macros when receiving a remote abort message has been fixed. The abort message is sent by a spec client with the remote_par(host, "abort") command. That command sends a packet containing the SV_ABORT command code. To the server, receiving that command code is intended to be equivalent to typing a ^C at the spec server keyboard. Although previous spec releases would handle halting hardware with the SV_ABORT message, the full reset which includes running cleanup macros (if defined) such as cleanup_once and cleanup_always did not always occur.

Fix For decode() Crashes

A bug in the decode() function, where a string argument with unbalanced quotation marks could result in a program crash, has been fixed.

Fix For Small Memory Leak If eval() Action Doesn't Complete

A small memory leak associated with eval() commands that either exited on an error or were interrupted with ^C has been fixed.

Fixes For array_op() and data_anal() "i_<=_value" and i_>=_value" Commands

Very old bugs dating from the original implementations of the rarely used "i_<=_value" and i_>=_value" commands to both the array_op() and the (deprecated) data_anal() functions have been fixed. The return value for "i_<=_value" was one index too large for values falling between two points. The return value for "i_>=_value" was one index too large for values just equal to that of a data point.

Fix For edconf String Editing

A bug in the string editing features introduced in the edconf hardware configuration editor in spec release 6.06.03 has been fixed. With the bug, the commands ^A and ^E to initiate editing existing string values for non-standard optional parameters or the standard optional generic motor parameters would change the field to a random number.

Fix For Installation Of New Help Files Derived From Macro Source Files

An issue, where the help files created from macro files (currently vscan, cscan, disable and flyscan) were not installed, has been fixed.

HARDWARE

MCS Support Added To USB-CTR

spec now supports multi-channel scaling (MCS) functionality with the Measurement Computing USB-CTR4/8 timer/counters. New fly scan macros use the MCS capabilities. See the updated usbctr help file and the flyscan help file for details.

Update To Physik Instrumente E-712 Support

An issue with the support for the Physik Instrumente E-712 piezo controller where positions were limited by an integer overflow to +/- 2174 has been fixed.

Update To Compumotor 6K To Work With Parker Gem6K Models

The existing support for the Compumotor (now Parker Hannifin) 6K motor controller has been updated to work with the Gemini 6K models. In particular, if spec detects a Gem6K model, it will not send the AXSDEF command during the initial presence test, as that command is unsupported on the Gem6K.

Updates To MDrive Support

A couple of issues introduced with the updates to the Schneider Electric (previously IMS) MDrive motor support in spec release 6.04.05 have been fixed. In particular, unexpected messages seen when hitting limits no longer appear, and a bug where the motor_par() "read" and "uread" commands didn't return the appropriate strings has been fixed.

January 23, 2018 - RELEASE 6.06.12

FIXES

Allow Counter Polling With INTR Software Timer

spec will now continue to poll active counters when using the software timer in INTR (interrupt) mode. This enables the new MAC_CNTR macro-hardware counter type to work when there are no other active polled counter/timer devices. See the mac_hdw help file for details on the MAC_CNTR counter type.

Geometry Macro Install Now Works With Arbitrarily Named spec

The spec install scripts will now ensure that the standard geometry macros are installed when none of the chosen names for the spec executable match a built-in geometry. That allows the arbitrarily named spec instance to be started with the -g flag to force use of the specific geometry.

Fix For Long-Time Client/Server Motor Sync Issue

Since the introduction of spec server motors, the implementation of the position discrepancy messages has been asymmetric. The discrepancy messages occur when a motor controller and spec disagree as to the position of a motor and there are no configuration parameters set to resolve the discrepancy one way or the other. In those cases, spec requires a response before it will continue. When the discrepancy is generated on the server (which is in communication with the real motors), the discrepancy messages appear on the screen of both the server and any clients registered for the motor. If the user responds to the message in a client window, the response is propagated to the server which will no longer need a response. Prior to this spec release, if the user responded to the message on the server window, the client window would still also need a response. With this spec release, a response entered in the server window is propagated to the client, echoed in the client window and the client is released from waiting for a response. In addition, if the user responds on the client window, that response is now echoed in the server window.

Fix For Displaced Controller Unit Number With Macro Motors

A bug introduced in spec release 6.06.11 that caused the unit number argument in calls of the macro hardware motor _cmd() functions for the keys with "_all" in the name to be shifted by one position is fixed in this release.

HARDWARE

Update For Compumotor 4000 Serial Support

Issues with the support for the serial interface on the old Compumotor 4000 motor controller have been addressed.

December 13, 2017 - RELEASE 6.06.11

IMPROVEMENTS

New Variable Argument Feature For Macro Functions

New local variables now exist within macro functions. The variables are named argc and possibly arg1, arg2, etc. The value of the variable argc is the number of arguments used to invoke the macro function. The additional variables arg1, arg2, etc., contain the values of arguments not included in the macro definition, but used in the macro invocation. The argument number corresponds to the position of the argument. If the macro definition defines an argument, there will be no new argument variable created for that position. For example, consider this macro function:

def test(par1, par2) '{ ... }

When called as:

test(1, 2, 3, 4)

the value of argc will be 4, arg3 will be 3 and arg4 will be 4. There will be no arg1 or arg2, since the macro has named parameters in those positions.

With respect to backward compatibility with existing macros that may use these names, a macro argument or local variable named argc will take precedence. However, a global variable named argc will not be visible in macro functions. Also, in the unlikely scenario there are explicitly declared variables named arg1, arg2, etc., and the macro function creates variables for missing arguments, the created variables will mask the existence of the declared variables. For example:

1.SPEC> def test(arg3) '{ print argc, arg3 }'

2.SPEC> test(PI)
1 3.14159

3.SPEC> test(PI, 2, 3)
3  3

In the first instance, no arg3 was created, since the macro was called with only one argument. In the second instance, a new arg3 local variable is created that takes precedence over the declared variable.

Just as with declared macro function arguments, the type of the created variable will be the same type as the variable used in the macro call, whether number, string, associative array or data array.

Server Mode Events Now Sent For "status" Property Registrations

When a client registers for events for a property on a spec server, spec sends an initial event with the current value of the property. However, prior spec releases did not send initial connection events for the status/shell, status/quit, status/simulate, status/ready, and error properties. This spec release remedies that. The value sent for the connection event for the error property is the message "No error". See the server help file for details on server properties.

splot Updates

This spec release includes splot version 3.1.01, which contains various fixes and stability improvements, particularly with respect to making initial connections to spec and for displaying 2D mesh scans. There is also a new feature that allows having the spec command line embedded as a panel in the splot window. The splot update notes are available in the splot/docs directory of the splot distribution.

FIXES

Fix For ^C During getval() and getsval()

The update in spec release 6.06.04 that enabled command-line editing with the getval() and getsval() data entry functions broke the expected ^C (interrupt signal) and ^\ (quit signal) response on Linux (but not macOS) platforms. That issue is fixed in this release.

Fix For Possible Crash With getval(), getsval() and input()

The update in spec release 6.06.04 that enabled command-line editing with the user input functions included bugs which could sometimes lead to a crash if getval() or getsval() were called with just one argument or if input() was called with no arguments.

Legacy Behavior Restored For Reading mca_par() and image_par() "disable" Status

In adding the support for the mca_spar() and image_par() "unusable" argument in spec release 6.06.01 (which returns zero/nonzero to indicate if the specific device is available), the behavior for the "disable" argument was changed slightly, in that spec would print out an error message if used with an unconfigured device. In consideration of legacy macros at some locations, the previous behavior, where checking the "disable" status of an unconfigured device would silently return zero, has been restored. CSS recommends that new macros that use mca_spar() or image_par() check the "unusable" status for a particular device before issuing additional commands.

Stability Fixes

This spec release fixes an issue with macro functions where the last executed statement in the function assigns a value to a local variable.

Fix For Crash While Waiting For Child Process

A possible segmentation fault when spec looks at child processes that have exited has been fixed. The bug is very old, and the only known manifestation has been when the process created by the EPICS libraries exited after not locating a caRepeater executable file.

MACROS

New Settle Time Option for Each Row of Mesh Scans

A new _mesh_sleep global variable can be set to the number of seconds to sleep (as a settling time before counting) after moving the motor associated with the outer loop of a mesh scan. The sleep is contained in the standard _loop macro (as is the existing optional per-point sleep, set with the _sleep global variable) for mesh and dmesh scans and for fscan scans when there is #L loop directive in the scan source file. The sleep is implemented directly in the cmesh and cdmesh scans. The standard macros mstartup and setscans (called by startup) now prompt for a value for the new variable. Of course, the variable can also be assigned to directly.

X11 Plot Tweaked

The macros that display the x11filt plots have been tweaked to display the analysis values (PEAK, FWHM, COM) in a more consistent and readable style.

HARDWARE

Support For Tsuji Model UPM4C-01 Motor Controller

spec now supports the Tsuji Model UPM4C-01 motor controller. This model is very similar to the UPM2C-01, but has four axes rather than two.

October 30, 2017 - RELEASE 6.06.10

FIXES

Fix For ^C During input(n) and With Remote Commands

spec release 6.06.01 broke handling of the interrupt (^C) and quit (^\) keyboard signals during the calls of input(n), where n is 0 or less. Also, keyboard signals were blocked on a spec server while executing commands from a remote client. Those issues are resolved in this spec release.

October 23, 2017 - RELEASE 6.06.09

FIXES

Fix For Excessive CPU Usage With Software Timer

A bug introduced in spec release 6.06.03 that could result in excessive CPU usage during non-updated counting when using the software timer in interrupt (as opposed to polled) mode has been fixed.

Fix For Memory Corruption In Server Hardware Code

A bug introduced in the server hardware facility overhead module, server.c, in spec release 6.06.01 that could cause unexpected program issues has been fixed. The server hardware facility was introduced in spec release 6.04.01. See the server_hdw help file for more information.

MACROS

Fix For dscan_cleanup

The updated dscan_cleanup macro, introduced with the new array-based scan engine in spec release 6.03.04, had issues parsing arguments when the macro was used with legacy local macros that invoked dscan_cleanup using variables as arguments. That issue is resolved in this spec release.

October 1, 2017 - RELEASE 6.06.08

HARDWARE

Updates For SmarAct Motor Controllers

The SmarAct MCS and SCU motor controllers limit the number of steps that can be sent with the open-loop move commands (MST on the MCS and U/D on the SCU). This spec release will automatically split commanded moves that exceed the limit into as many smaller moves as necessary. Also, the hardware configuration now includes options for both serial and socket interfaces. See the smaract help file for details.

September 24, 2017 - RELEASE 6.06.07

IMPROVEMENTS

HDF5 Support Updated To Current HDF5 Release

The built-in HDF5 support in spec is now using HDF5 stable release 1.10.1. Previously, spec was built against HDF5 release 1.8.14. See the hdf5 help file for details on spec's HDF5 support.

FIXES

Fix For Using spec Server Counters From Remote Client

spec release 6.06.01 included improved hardware polling, but introduced a bug that prevented clients from receiving an event that indicated the end of counting when using counters on a spec server. This spec release fixes that bug.

Fix For Passing Macro Function Arguments to eval()/eval2()

spec release 6.04.05 added a new capability that allowed the eval() and eval2() functions to accept and return the value of an input string containing a single number, literal string or a variable. Previously, such input would generate a "Not a command or macro" error, just as at the main spec prompt. spec release 6.05.01 removed the "+0" from the eval2(arg "+0") usage in the standard macros which had been there to force evaluation of an expression when arg was a single number, literal string or variable. This spec releases fixes a bug where the code didn't consider the case where the eval()/eval2() argument was itself a macro function argument, which internally is a different kind of object. With that bug and the updates to the standard macros, usage such as def mymove(pos) '{ mv m1 pos }' stopped working, as the standard mv macro expands to something that uses pos as the argument to an eval2() function.

September 13, 2017 - RELEASE 6.06.06

MACROS

Continuous Scan Timer Preset Now Configurable

The continuous scan macros (cscan, c2scan, cdscan, etc.) program the timer for long count time. Previously, that value was explicitly set to 999 seconds. Some users want to do continuous scans that last longer than that. The scans now use the value of the new global variable CSCAN_TIMER_PRESET to set the timer. The default is still 999 seconds, but users can assign a different value. See the cscan help file for details.

The eval2() Calls Of Macro Arguments Now Protect Double Quotes

spec release 6.05.01 put eval2() calls and double quotes around the value arguments for the standard set, set_dial, set_lm and home macros so that the arguments could be expressions or symbols. In order to allow the arguments themselves to include double quotes, the macros now use escaped single quotes around the arguments. That is, code such as eval2("$1") has been replaced with eval2(\'$1\'). In addition, arguments to aziscan, abscan, abmesh, r2scan, alphascan and betascan, which are associated with particular diffractometer geometries, have had the same update.

HARDWARE

Fix For Anorad Presence Test

The code for the presence test for the RS-232C Anorad motor controller used a short 0.5 second timeout while waiting for the reply to the first command. It appears this timeout was too short for some system configurations. The presence test now uses the same two second timeout used by the rest of the Anorad support.

August 31, 2017 - RELEASE 6.06.05

FIXES

Fix For edconf Crash With 24-Line Window

A crash introduced with the edconf updates for bigger windows in spec release 6.06.03 that occurred when using a 24-line terminal window has been fixed.

HARDWARE

New Configurable VME Address Modifier For OMS MAXv

spec now allows the VME address modifier to be configured for the Oregon Micro Systems MAXv motor controller. Previously, the default A16 addressing mode was built into the code. The edconf configuration editor now uses the MODE column to allow choices of A16, A24 or A32 as addressing mode.

August 6, 2017 - RELEASE 6.06.04

IMPROVEMENTS

Line Editing For input(), yesno(), getval() and getsval()

The spec built-in functions input(), yesno(), getval() and getsval() will now use the command-line editing library to collect user input from the keyboard. All the special key sequences for editing text are available, along with filename completion. The forward and reverse search keys (^S and ^R) can be used to recall command history entered at the main spec prompt, but text entered with these functions is not saved in the history stack. Of course, spec needs to be linked with one of the optional command-line editing libraries (libedit or readline) for the feature to be available. A small change from prior behavior is that with the command-line editing, ^D only terminates entry when it is typed as the first character of an empty line. Otherwise, ^D is interpreted as forward delete. As with the previous implementation, initial white space is removed from the returned value. The new implementation also removes trailing white space.

MACROS

Fix For Broken vscan Macros

An incomplete edit in the previous release of the vscan macro source file made the variable-spaced scan macros unusable. That issue is fixed. See the vscan help file for a description of the macros.

HARDWARE SUPPORT

Support for EPICS release 3.16

This spec release can be linked with EPICS release 3.16 channel access libraries.

FIXES

Fix For Potential array_op() Crash

A bug that could result in a spec crash when the array_op() commands "fwhm", "cfwhm", "lhmx", "uhmx", "com", "x_at_min" or "y_at_min" were used with an invalid subarray as second argument has been fixed.

^Q/^S Now Available With libedit

The control characters traditionally associated with flow control on old TTY terminals are now enabled for command-line editing when spec is linked with libedit. The default bindings assign ^Q to "ed-quoted_insert" and ^S to "em-inc-search-next". That is, ^Q can be used to insert a literal control character, while ^S searches history in the opposite direction to ^R. As before, alternative key bindings can be assigned in a .spec_keys file in a user's home directory. See the libedit help file for details.

July 17, 2017 - RELEASE 6.06.03

IMPROVEMENTS

New edconf Features

The edconf hardware configuration editor, usually invoked via the config macro, has several updates.

  • It is now possible to edit existing entries. Use the left- and right-arrow keys to change text insertion position, ^A to move to the beginning of the entry, ^E to move to the end, ^U to delete to the beginning, ^K to delete to the end and ^D (or the forward-delete key) to delete one character forward.
  • When using ' or " to initiate editing of an entry, if the next character typed is one of the above editing characters, the existing value will not be erased.
  • The ^A and ^E commands can be used to initiate editing of existing values starting from the beginning or end of the string, respectively.
  • When multiple motor controllers or counter/timers of the same type are configured, the unit numbers associated with the controllers are now displayed on the far right. Typing the unit number of another controller of the same type in the unit field will swap entries.
  • The motor and counter/timer screen now displays the row number in the first column, which can be used to swap entries by entering a new row number.
  • For lists that page with ^F and ^B commands, a new ^G command will position the cursor on the first item of the list.
  • The editor will now display as many motor columns as fit on the screen (up to ten) rather than the four that can fit in 80 columns.
  • A new startup option -c cols is available, where cols is a number greater than or equal to 80 and less than or equal to the number of columns on the screen. Only as many motor columns as fit in cols will be displayed. (Each additional motor column uses 13 spaces.)
  • The editor will now display as many rows on the Interfaces, Devices, MCA/Image Devices and Scaler screens as will fit.
  • A new startup option -l lines is available, where lines is a number greater than or equal to 24 and less than or equal to the number of lines on the screen. A value less than the maximum will limit the amount of information displayed.
  • A new -O option (for "old" mode) sets columns and lines to 80 and 25, respectively.
  • After changing the window size, the refresh command, ^L, will adjust the display to the new columns and lines values, unless the values were fixed with the -c and/or -l options.
  • The q command can be used as an alternative to ^C to quit the program.
  • The secondary Scaler screen for miscellaneous parameters, accessed with the s command, has been eliminated. Instead, the parameters misc_par_1, misc_par_2, etc., can be configured on the custom optional parameter screen, accessed with the p command.

New Polled-For-Reading Macro Hardware Counter Type

A new MAC_CNTR macro-hardware counter type is available to accommodate implementations of averaging devices, such as an instrument that takes instantaneous readings from a PIN photodiode with multiple readings averaged to create a counter value. The macro-hardware *_cmd() function is called with the "get_status" key while counting is active, but there is no busy status associated with MAC_CNTR counters. In addition, a new optional counter parameter, "min_read_time" can be used to set the minimum read interval in order to limit how many readings are used in the average. See the mac_hdw help file for details.

HARDWARE

Support For OMS PCI MAXk Controller

spec now recognizes and supports the Oregon Micro Systems MAXk family of PCI-bus motor controllers. Each board can support up to ten motors.

FIXES

Fix For History Display With show_state

A bug introduced in spec release 6.06.01, where the show_state utility didn't display command history, has been fixed.

Consistency For Bit-Shift Operators For Arrays

To be consistent with the implementation of 64-bit integer operations for scaler values introduced in spec release 6.05.03, when bit-shift operators are applied to arrays, each array element is now masked to 52-bits before carrying out the shift operation. (spec stores numbers as double-precision floating-point values, which have a 52-bit significand.) Previously, the bit-shift operators didn't mask the operand, which allowed the highest order bits to be used, but if those high-order bits were set, the values of the low-order bits would be lost. (When an operator is applied to an array or subarray, the operation is carried out on each element of the array. See the arrays help file for more information.)

Obsolete PAGER Built-In Global Variable Removed

The PAGER built-in global variable has not been used since the revised help-file utility was introduced with spec release 6 and is no longer created as a built-in symbol with a value fetched from the environment. The help utility reads a file /usr/local/lib/spec.d/spec.conf that assigns values for shell commands and arguments used for help file formatting and display, and a PAGER variable is assigned there.

Fix For taco_io() Possible Fault

A old bug in the implementation of taco_io() which was activated by internal updates in spec release 6.06.01 and that could result in a program crash has been fixed.

June 9, 2017 - RELEASE 6.06.02

IMPROVEMENTS

Updated tidy_spec Utility

The tidy_spec utility, which reports on user state file usage and optionally removes user state files, has been tidied up. The utility will now include the separate history file in its report. History files can be removed with the new -h option. In addition, the more conventional -g flag can be used to specify which geometries to clean. The prior flag, -s, is still recognized.

MACROS

Fix For Time Scan Macros

Some of the "unnecessary" code removed in the time scan macros updates in spec release 6.04.05 broke the time scan plotting when x-axis auto-scaling was disabled. The plotting now works properly for timescan and loopscan, even when x-axis auto-scaling is disabled.

FIXES

Fix For Crash In getline()

A bug introduced in spec release 6.05.04 where the getline() function could crash has been fixed. The crash occurred if getline() was called to read a line from a file, then called with the "close" argument, then called again to read a line from the same file.

Fix For Crash With Empty Command Files

A bug introduced in release 6.06.01, where spec could crash when reading an empty command file using dofile() or qdofile(), has been fixed.

May 8, 2017 - RELEASE 6.06.01

IMPROVEMENTS

Better Hardware Polling While Waiting For Keyboard Input

While waiting for keyboard input, spec checks the busy status of active motors, timers, etc. spec also checks for events from a spec server (if using), messages from clients if running as a spec server and EPICS event callbacks (if using EPICS), Previously, spec used a select() system call with a short polling time that only responded to keyboard activity. spec now uses the select() call to also monitor server/client related and EPICS activity. If no other I/O, such as with PC board controllers, serial devices, etc., is active, spec is idle, waiting in the select() call. If there is other I/O, spec polls the devices no faster than ten times per second. The new code should provide faster response times to server/client and EPICS events.

The new code also includes a fix for an issue related to pasting text at the prompt. Previously, there was a noticeable delay between display of each character of the pasted text. That delay is gone.

Finally, the spec_par() "fast_hdw_checks" option is no longer relevant. For backward compatibility, it can still be set, but its value is ignored.

Hardware Polling While Running unix() Commands

spec will now use the keyboard-input hardware polling loop while waiting for a child process created with unix() to finish. The same applies to spec's gethelp() function which also creates child processes to format and display help files. This change means that when in server mode, the spec server will now respond to clients even when, for example, the server itself is being used to display a help file.

spec will give the child process up to one second to complete before starting the hardware polling. That avoids any delays when running quick unix() commands.

A known issue occurs if a client sends a command to a spec server to create an interactive subshell while the server itself is in a subshell. The work around is not to do that. If the situation occurs, upon exiting the subshell on the server, one may need to type ^Z to suspend spec, then fg to bring spec to the foreground.

Parser Now Reentrant

The byacc utility is used to compile the spec parser. CSS has modified the version it uses so that the parser is re-entrant. That means that as of this spec release, multi-line commands being typed at a spec server will not be corrupted by the arrival of commands from a client, as was previously the case. In addition, nested eval() calls should now work flawlessly.

Initialization Implemented For 2D Associative Arrays

Two dimensional associative array initialization is now available. Each element is initialized with three colon-separated items. The first two items are the array indices and the third is the element value. Syntax is as follows:

testarray = [ 1:2:"item", 2:3:"item2" ]

which results in:

testarray["1"]["2"] = "item"
testarray["2"]["3"] = "item2"

Initialization lists can include a mix of 2D, 1D or index-implicit 1D sequences.

Multi-Line Commands Now Saved As One Entry In History List

Commands or statement blocks entered at the main prompt that extend over multiple lines are now saved as just one item in the command line history. This history mode, which is enabled by default, can be disabled by setting the new spec_par() "history_join" option to zero.

Escaped History Character Now Kept In History Item

In order to use the negation operator ! in an expression entered at the keyboard, the character needs to be preceded by backslash, as in \!, as a bare exclamation mark is interpreted as the history recall character by the command line editing library. Previously, when the line containing \! was saved as a history item, the backslash was removed, meaning if the line was recalled, the line would have to be edited to add back in the backslash. This spec release ensures the backslash remains in the history item. However, it is now not allowed to combine \! and exclamation-mark recalled history items on the same line.

History Restored Even If State File Is Unusable

When not starting fresh, but with a state file that is missing, corrupted or otherwise unusable, spec will still try to restore command-line history, which is stored in a separate file since spec release 6.05.01.

Input Line Length Now Unlimited

The length of an input line is now unlimited. Previously, the maximum number of characters was 4,096. This change is important to accommodate the new "history_join" feature which, for example, will save a statement making a macro definition that includes a long string as a single history item.

New "unusable" Argument for mca_spar() and image_par()

A new "unusable" option for mca_spar() and image_par() will return a nonzero value if the associated device is unusable, either because it didn't pass the presence test, because it was marked "OFF" in the config file or because there is no configured device at the given unit number. No error messages will appear if the arguments refer to unconfigured devices.

New Options and Fixes To strdef()

The strdef() functions returns the macro definition of its argument as a string. A problem where escaped string delimiters were not properly coded in the return strings has been fixed. In addition, strdef() now takes an optional associative array argument. If the macro is a macro function, the associative array elements will be assigned the string names of the arguments in order starting at zero. Also, an element of the array indexed by the string "file" will contain the pathname of the file where the macro definition came from or the string "tty" if the macro was defined at the keyboard.

"Server Hardware" Functionality Improved

The new "server hardware" feature introduced in spec release 6.04.01 now supports MCA-type (1D) and image-type (2D) devices. In addition, spec now supports automatic start up of the server process, whether on a local or remote host. spec will also attempt to restart a server that stops responding. The servers can now be daemonized to run in the background unassociated with a terminal. The servers also use lock files to prevent more than one instance from running. See the server_hdw help file for details.

Image Functions Now Set HDW_ERR

The image_get(), image_put() and image_par() functions now set the built-in HDW_ERR global variable with appropriate values on failed calls. See the HDW_ERR help file for details.

splot Updates

The Python splot utility has improvements in functionality, performance and stability. One notable new capability is 2D contour-plotting for mesh scans. Also, print dialogs and functionality are improved.

MACROS

New Reciprocal Space and Delta vscan Macros

The vscan family of macros do variable step size scans. The scan arguments include a start, focus and end position for each scanned variable, with point spacing being closest together at the specified focus, which can be anywhere within the scan range, including the end points. New vhscan, vkscan, vlscan and vhklscan macros provide for scanning in reciprocal space. Additional v3scan and v4scan macros have been added to support additional motors. Delta versions dvscan through dv4scan are also now included. See the vscan help file for details.

New disable and enable Macros For Setting Hardware

The standard spec macros now include macros to easily disable or enable hardware devices. The macros are based on similar macros from the ESRF and should be fully compatible with those. See the disable help file for details.

Broken Multiple Motor Continuous Scans Are Fixed

A bug in the internal _cscan_prep macro prevented c2scan through c4scan from working correctly, along with the delta versions. That bug is fixed. See the cscan help file for more information about the scans.

FIXES

Fix For Restoring History When Starting With -u and -t

An issue with the revamped history facility introduced in spec release 6.05.01, where if spec was invoked with the -u and/or -t flags to start with an initial state file from another user or tty, spec would not also import the associated command history, has been fixed.

Fix For Reading Miscellaneous State File Parameters with -u and -t

An old issue, where the spec_par() options and certain persistent hardware parameters saved in the user state file as "miscellaneous parameters" were not obtained from the alternate initial state file specified with the -u and/or -t command line options, has been fixed.

Fix For Slow Pasting With libreadline

spec now includes a work around for a problem with slow pasting of text when spec is linked with libreadline (but not libedit) in certain environments.

Fix For the "move_done" Property On spec Servers For Pseudomotors

A problem where a request to a spec server for a calculational pseudomotor's "move_done" property would return a value of 0, even when the associated real motors were busy, has been fixed.

HARDWARE SUPPORT

New motor_par() "dump" option for Newport SMC100 Motor Controller

A new "dump" option to motor_par() for the Newport SMC100CC/PP motor controllers will display all the controller parameter settings as obtained using the controller's ZT command. In addition, the command motor_par(mne, "read", "ZT") will return a multi-line string that contains the complete ZT response. See the SMC100 manual for more information.

April 5, 2017 - RELEASE 6.05.04

IMPROVEMENTS

New setsector for ESRF SUV Geometry

A new option for the ESRF horizontal z-axis diffractometer to flip the sign of the delta circle is implemented. A new setsector macro in the SUV geometry code toggles the mode.

MACROS

The newfile Macro Will Add Header If Missing In File

In addition to the warning message that appears when opening a spec data file that doesn't begin with the usual #F, the newfile macro will now append the standard file header to the data file if no line in the file begins with #F.

New _g3 Global To Track Mesh Scan Rows

A new global variable associated with the standard scan macros is set to the first point number for each row of a mesh scan. For non-mesh scans, _g3 remains at zero. This parameter joins _g1, the point counter in the inner loop of scans and _g2, the point counter in the outer loop of mesh scans. The _g3 variable will be used by the Python splot utility when displaying the results of mesh scans as 2D plots.

Added Missing calcHKL In Continuous Scan Macros

A missing call to calcHKL in the _cscan() macro function (used by all the continuous scan macros) has been put into place. Without that call, the SCAN_D array did not contain HKL values when it should have.

FIXES

Fix For cnt_num() and motor_num()

A bug in the new argument evaluation feature introduced in spec release 6.05.01 for cnt_num() and motor_num() has been fixed. Before the fix, cnt_num() would accept a string containing a valid motor mnemonic and motor_num() would accept a string containing a valid counter mnemonic. Now, those uses return a -1 error.

Fix For GETLINE_EOF

A bug, where the recently introduced global variable GETLINE_EOF was set to -1 when getline() was successfully called with the "open" or "close" arguments, has been fixed.

HARDWARE SUPPORT

Fix For TANGO_ERR

An issue where requesting an attribute or property that doesn't exist on a TANGO device didn't follow the documented behavior has been fixed. The behavior is supposed to be that if TANGO_ERR is set to -1 before the tango_get(), tango_put() or tango_io() call, no error message is printed, the calling function returns -1 and TANGO_ERR is set to the text of the message. That wasn't happening for the particular error above, but is fixed in this release. See the tango help file for details on use of TANGO_ERR.

Refinement Of EPICS "slop" Parameter

The special behavior in spec for EPICS motors with the optional read-back "slop" parameter set to a nonzero value has been updated. In spec release 6.03.07, a feature was introduced so that the "slop" parameter for EPICS motors creates a position dead band. Position events within "slop" counts of the current position don't update the current position in spec. However, at the end of a move or during a sync command, the current position will always be read. This update further restricts the position updates to motors started by spec.

February 22, 2017 - RELEASE 6.05.03

IMPROVEMENTS

Greater Flexibility In Associative Array Initialization

It is now possible to initialize associative arrays without specifying the array index. If the array index is missing, spec will use the position number of the data value in the list as the index number. For example:

testarray = [ 123, 456, "testing" ]

is the same as:

testarray = [ 0:123, 1:456, 2:"testing" ]

Explicit index values can be intermixed with missing values. For example:

testarray = [ 123, "second":456, "testing" ]

will result in:

testarray["0"] = 123
testarray["2"] = "testing"
testarray["second"] = 456

Also, initialization can now be carried out over multiple lines without having to use a backslash escape to continue lines, although the final closing bracket must appear on the same line as the last initialization value.

Array Assignment Implemented For Associative Arrays

It is now possible to assign the same value to every element of an existing associative array. For example:

S = 0

will set all elements of the scaler array S[] to zero.

Improved Sort For Symbols and Associative Array Elements

An improved "natural sort" algorithm is now used for sorting associative array elements displayed with print and for determining the order that array elements are accessed using the for i in arr syntax. The same sort algorithm is applied to the list of symbols displayed with syms, the macros displayed with lsdef and the symbols and values displayed with the utility show_state. "Natural sort" means that consecutive digits are treated as a single character and sorted according to their value as a group. That way, a10 will come after a9, contrary to the order with strict lexicographical sorting.

Consistency For Bit-Shift Operators

The support for (not quite) 64-bit integer operations introduced in spec release 6.00 treated the bit-shift operators somewhat differently than the other bit-wise operations, which masked the operands to 52-bits (the maximum precision available for the significand in double-precision floating-point values, which is how spec stores numbers). Previously, the bit-shift operators didn't mask the operand, which allowed the highest order bits to be used, but if those high-order bits were set, the values of the low-order bits would be lost. For consistency, the bit-shift operators now simply mask the operands to 52-bits and then do the shift operation.

Can Now Use wait() For Externally Started Motors

When spec is sharing motors, either as a client to a spec server or using EPICS channel access, if those motors are started by a different client, setting bit 4 (16) in the argument to the wait() function will cause spec to wait until those motors have completed their move. Waiting can be interrupted with ^C, but that will not stop the motors. See the wait help file for details.

FIXES

Fix For Escan fixQ Mode

When the Escan macro was rewritten to use the new array-based scan engine in spec release 6.03.08, the fixQ mode was not handled correctly. This spec release includes an updated Escan macro that includes the geometry motors in the motor position array passed to the _array_scan macro scan engine.

Fix For Delta xscan Macros

A bug in the placement of curly brackets that broke the delta scan versions of the xscan macros (xdscan, xd2scan, ...) is fixed. The xscan macros break up a scan into three regions doing denser point spacing in the middle region.

MACROS

Scans With Count Time of Zero Now Set Count Values to Zero

The standard count and _upd_count macros used to start the counters during scans now set the values of the S[] scaler array to zero if the count time argument is zero.

January 27, 2017 - RELEASE 6.05.02

FIXES

Fix For Crash On reconfig

Release 6.04.05 contained a fix for a memory leak that occurred during reconfig when using macro hardware pseudomotors. Unfortunately, the fix was buggy, and with some macro hardware pseudomotor configurations, spec crashed on reconfig. This release solves the crashing problem and still fixes the memory leak.

January 20, 2017 - RELEASE 6.05.01

IMPROVEMENTS

New Argument Parsing For motor_num() and cnt_num()

The motor_num() and cnt_num() functions now evaluate their arguments. If the argument is a number, it is checked if it is in range of allowed motor or counter numbers. If the argument is a simple string, it is checked whether it is a valid mnemonic. If the argument is an uninitialized variable, the functions return -1. If the argument is an initialized variable or an expression, the argument is evaluated. If the result is a number, its value is checked against the valid range. If the result is a string, its value is checked against valid mnemonics. Only commands and functions that make sense in the context are allowed in the expression. Commands that control hardware or generate screen output are not allowed. For example, sprintf() is allowed, but not print or printf(). The functions return -1 if disallowed commands are included.

Built-in Expression Evaluation in spec_menu() Now Safer

Text input to "value" items in the spec_menu() arrays is evaluated using the built-in spec parser. Previously, any allowed spec keywords were accepted. With this spec release, only commands and functions that make sense in the context are allowed. For example, commands that control hardware or generate screen output are not allowed. In addition, most of the error messages that might occur during evaluation of the expression will now appear in the spec_menu() error space rather than at the cursor position.

Revamped History Facility

The command-line history is now saved in a separate file from the state file. It is now possible to start "fresh" while retaining the command line history. (A "fresh" start resets all symbols to their default values, and reinitializes the set of defined macros and global variables from the standard command files in SPECD, /usr/local/lib/spec.d, by default).

When starting "fresh" with the -f or -F flags, an additional -h flag on the command line means retain history.

The new history file is saved alongside the state file in the SPECD directory. If the state file is named, for example, /usr/local/lib/spec.d/fourc/userfiles/user_ttyp#S, the history file will be named /usr/local/lib/spec.d/fourc/userfiles/user_ttyp#H.

Additionally, the maximum size of history can be set using the spec_par() function. The command spec_par("history_size") returns the current maximum number of lines saved to history, which defaults to 1000, the fixed value in previous spec versions. A command such as:

spec_par("history_size", 2000)

sets the history size to the indicated value. For sanity, there is a maximum allowed value (32768).

Although this release of spec and the accompanying show_state utility can read state files from previous spec releases, previous versions will not be able to use state files created from this release. Starting an older spec release with state files from this spec release (or later) will display a message about incompatible state files and force a "fresh" start.

setcap Now Used By Default On Linux

As anticipated in the release notes for spec release 6.04.04, the Linux capabilities facility has now become the default method for giving spec access to PC hardware. The operation on the spec executable takes place during installation when the spec Install script is run by the root user. If the Linux platform lacks the setcap command, spec will use set-user-id root mode, as before. The enhanced capabilities are needed in configurations that use spec's built-in support for certain instrument control and data acquisition devices. For some hardware, spec needs access to /dev/mem to map PCI/PCIe memory space to the spec process. On some recent Linux platforms, PCI/PCIe cards used by spec without kernel drivers are disabled on boot by the Linux kernel, and spec needs escalated privileges to enable the cards. If udev rules are not in place to set permissions for USB devices supported by spec, spec will use escalated permissions to open the device nodes. For some older PC cards, spec needs direct access to I/O ports. To protect the system, spec turns off all capability modes immediately on program start up (just as it does with set-user-id root privilege) and only enables the capabilities around the few lines of code used to gain access to the otherwise unavailable resources.

splot Updates

The Python splot utility is now at version 3.02.

MACROS

Motor Argument Can Now Be a Symbol or Expression

The motor scan macros, the move macros, the home, set, set_dial, zero and set_lm macros all can now have motors specified as expressions or symbols, as they all use the updated motor_num() function. A number of macros that previously partially accommodated use of symbols or expressions have been simplified, since the capability is now included in the built-in code for motor_num(). In addition, the _check0 macro, which protected against moving motor zero due to mistyping a motor mnemonic (creating an uninitialized symbol with a value of zero), is now obsolete, as the built-in code implements that protection. However, _check0 will still be included in the standard macros to accommodate local macros that still use it.

Motor Macro Value Arguments Can Be a Symbol or Expression

The value arguments for the standard motor macros set, set_dial, set_lm and home (the optional home position) can now be expressions or symbols, as the arguments will be evaluated using eval2().

File Scan Macro Will Now Plot Mesh Scans

A new #L control line in the header of input files for the fscan (file scan) macro can be used to specify the number of outer Loops contained in the following data. The total number of points in the file will be divided by the number of outer loops and spec will reset the real-time plot for each such loop.

Minor Updates to Standard Macros

Several minor updates are included with the standard macros:

  • The internal _mot macro has been renamed _show_mot.
  • The "+0" strings in all the eval2() occurrences have been eliminated, since eval2() now treats single numbers or symbols as expressions.
  • The internal local variables in macros that use eval2() to evaluate macro arguments have been renamed with an initial underscore to avoid conflicts with user symbols (users should avoid using initial underscores for their variables to prevent conflict with spec internal symbols).
  • The set_lm macro now includes the values in user units when printing the new limits.
  • The macros that use spec_menu() (mstartup, setplot, counters, and setshow) now set the maximum width to 90 characters to improve readability on wide windows.
  • The fscan (file scan) macro does a bit better job handling improperly formatted scan files.

FIXES

Fix For Updated Counting Macro

A missing expression in the updated _upd_count in spec release 6.04.05 resulted in each counting update during the scan to generate a newline on the screen. That issue is fixed.

Fix For Continuous Delta Mesh Macro

A typo that produced the wrong outer loop values for the cdmesh (continuous delta mesh) macro has been corrected.

Fix For lup Macro

An issue where the lup (line-up) macro was not properly supported by the new array-scan engine has been fixed.

Fix For Using Multiple Windows With the splot Utility

An accidental edit to the definition of the macro symbol PL_MULTI_SPLOT in spec release 6.03.09, which broke using multiple windows with the Python splot utility, has been corrected.

Fix For set_sim() No-Sleep Toggle

The command set_sim(0x10) turns on a mode where the user-level sleep() command returns immediately, while set_sim(0) turns that mode off. Previously, if spec was started in simulate mode with the -s flag or was forced into simulate mode due to a hardware lock, set_sim(0x10) could still be used to set no-sleep mode, but set_sim(0) would not turn the mode off. With this release, set_sim(0) will turn off no-sleep mode.

January 12, 2017 - RELEASE 6.04.07

FIXES

Fix For Defining Macros Using eval()

A bug introduced in the recent 6.04.05 release broke the ability to define macros using eval(). Since the standard scan macros define a _scan_on macro, eval() couldn't be used to do scans. Also, since a spec server invokes the same internal code as eval() to run remote commands, client-initiated scans in a spec server broke. The bug is fixed in this release.

January 11, 2017 - RELEASE 6.04.06

FIXES

Fix For vxi11_put()

A bug introduced in spec release 6.02.01 that broke sending strings with vxi11_put() has been fixed.

Fix For Terminal Settings On Forced Quit

A bug introduced in spec release 6.02.08, where terminal settings were sometimes not properly reset if spec was quit using SIGQUIT or SIGTERM signals, has been fixed.

December 18, 2016 - RELEASE 6.04.05

IMPROVEMENTS

Files Opened With -l logfile No Longer Reopened On Restart

Log files opened or created on the command line with the -l logfile option will not be included in the list of files saved to the session's state file. Thus, those files will not be reopened when spec is restarted. This change accommodates sites that use scripts to create uniquely named log files for each spec invocation. Unless such files were specifically closed, they would be automatically reopened in subsequent spec sessions.

array_read() Now Assigns Lines Of Text To String Array Arguments

The array_read() function, which can assign values to data array elements from text files containing rows and/or columns of values, now treats assignments to string arrays differently. When passed a string array argument, array_read() will assign each row of text from the file to successive rows (or columns) of the array. Previously, the text file was scanned for number values, which would be assigned to consecutive bytes in the string array, just as if it were a byte array. See the arrays help file for details.

Updates To eval() and eval2()

A new built-in global variable named EVAL_RESULT will be assigned a value after each call to eval() or eval2(). Its value will be -1 if there is an error parsing the argument. If the last statement of the parsed string is an expression, EVAL_RESULT will be zero. If the last statement of the parsed string is a statement, EVAL_RESULT will be set to 1.

If there is an error parsing the argument string, a new built-in global variable named EVAL_ERR will be set to the error message. Previously, if there was an error message, eval() and eval2() returned the message string, and if there was no associated message, returned false. The functions will now always return false if there is an error.

The eval() and eval2() functions will now accept and return the value of an input string containing a single number, literal string or a variable. Previously, such input would generate a "Not a command or macro" error, as it does at the main spec prompt.

See eval in the functions help file for details.

splot Updates

The Python splot utility is now at version 3. The code has been substantially reorganized. The better supported matplotlib 2D plotting library is now preferred over PyQwt. The new version includes many fixes and improvements. See the updates notes in the splot distribution docs subdirectory for further details.

MACROS

Updated Counting During Scans Displays Full Row Of Counters

The standard _upd_cnt macro, which displays updated values of the counters during scans if the corresponding option is selected, now displays as many counters as fit in one row on the screen. Previously, only the time, DET and MON channels were displayed.

Changes To Motor/Counter Configuration Saved To Data File

The standard _head macro, used in all the standard spec scans, now includes a call of the new macro chk_datafile_head which does a quick test to see if the motor or counter configuration has changed since the datafile was opened. If there has been a change, the data file is updated with the new motor and counter configuration.

New Option To Save Motor/Counter Configuration In Each Scan Header

The standard _head macro, used in all the standard spec scans, now implements an option to write the complete motor and counter configuration (names and mnemonics) within the header section of each scan. Normally the information is only included in the file header. The new global symbol _sav_mne signals whether or not to save the information. The mstartup macro prompts for the configuration. The default mode is to only write the information in the file header or when there is a change in the hardware config file.

Time Scans Can Now Be Resumed

The _timescan macro, used by timescan and loopscan, has been updated to remove unnecessary code and to maintain sensible values for the _n1 global variable, which generally holds the total number of points in a scan. The changes allow the resume macro to restart a time scan halted with ^C.

HARDWARE

MDrive Support Updates

Support for the Schneider Electric Motion (formerly IMS) MDrive motor controller has been updated to work with firmware versions 5 and greater. The newer firmware uses a different command to set the mode of the input switches. In addition, spec doesn't initialize the input switches for firmware version 5 or greater. An initialization sequence for the switches can be included in the hardware config file, though. For firmware version 5 or greater, the initialization sequence can include the commands IS, OS and D#. As before, for earlier firmware the sequences can include S# and D# commands. Also in this spec release, the communication between spec and all versions of the MDrive controller has been made more robust.

FIXES

Fix For Disappearing OUTFILES When Started With -l logfile

A bug, where the built-in associative array OUTFILES disappeared when the -l logfile start-up option was used has been fixed. The OUTFILES array contains information about all the open output files.

Fix For Truncated Strings With syms -v and show_state

The values for string values displayed with the -v option to the syms command and with the shell utility show_state were previously truncated to approximately 600 characters. This spec release will display the entire string.

Fix For array_read() Crash

A bug, where calling array_read() with certain subarray arguments and with a file having fewer lines than the array could fit would cause a segmentation fault, has been fixed.

Fix For TANGO_ERR Behavior

The built-in TANGO_ERR symbol, used when spec is linked with the TANGO libraries (see spec's tango help file), now behaves as expected when used with syms -v, whatis("TANGO_ERR", "info") and conditionals, such as:

if (TANGO_ERR)
  ...

The above will be false if TANGO_ERR has a number value of zero or is the null string, "". TANGO_ERR has a special property as a spec built in symbol in that it is allowed to be either a number or a string. Other built-in symbols can be only one or the other. Previous spec releases didn't properly accommodate that and the above usages didn't always result in what would be expected.

Fix For Memory Leak When Using Macro Hardware Motors

A bug, where memory allocated for macro-hardware macro-functions calls during the reconfig command was not freed, has been fixed. The memstat command would show the memory allocated for "Parse Tree" growing after every reconfig in previous spec releases.

Fix (Again) For Debug Level 512 Crash

A bug that resulted in spec crashing on start up if the debug level was set to include 512 (memory allocation and freeing) has been fixed. (A similar bug was fixed in release 6.00.05, but subsequent modifications in the code reintroduced the problem.)

November 17, 2016 - RELEASE 6.04.04

HARDWARE

Issue With MDrive Limit Messages Fixed

The MDrive motor controller firmware has changed many times over the years and not always in a backward compatible manner. The spec MDrive support parses the firmware string returned by the motor controller to determine what commands will work correctly with the firmware in use. At some point, the format of the firmware string itself changed, which broke spec's parsing of the firmware version. The most noticeable result to users was that spec no longer displayed messages when the associated motor hit a limit switch. This spec release fixes the parsing of the firmware version string and restores the display of limit messages.

Fix For Disabled PCI/PCIe Boards

An issue where PCI/PCIe cards supported by spec at user level would be disabled at the Linux kernel level at boot time has been addressed. The disabled cards would be unusable by spec. The spec code now sends commands to enable such cards during initial hardware configuration (provided spec has suitable permissions).

Updates To Support For Using Linux setcap

The feature for using the Linux setcap utility as an alternative to spec being a set-user-id-root executable that was introduced in spec release 6.04.01 has been updated. The initial support only dealt with the "raw io" capability, which grants access to I/O ports. In order for spec to access /dev/mem, which is needed for mapping PCI/PCIe memory space to the spec process, the "dac override" capability is required. ("Dac override" overrides discretionary access control, that is, bypasses file access permissions.) Also, in order for spec to enable PCI/PCIe cards that were disabled on boot by the Linux kernel, spec requires "sys admin" capability. To protect the system from spec users with such enhanced capabilities, spec turns off all capability modes immediately on program start up (just as it does with set-user-id root privilege) and only enables the capabilities around the few lines of code used to gain access to the otherwise unavailable resources.

This current release still installs spec using the traditional method of changing ownership of the spec executables to root and the mode to u+s. A forthcoming spec release will instead execute the following command:

setcap "cap_dac_override=ep cap_sys_rawio=ep cap_sys_admin=ep" spec

The command can be used on this and subsequent spec releases as an alternative to the set-user-id-root mode. Do not use the command on older spec releases, as the older releases do not disable the privileged capabilities within the code.

November 14, 2016 - RELEASE 6.04.03

IMPROVEMENTS

array_read() Now Does Tilde Expansion

The array_read() function, which takes a file name as its first argument, will now do tilde expansion of the argument. Tilde expansion means that the tilde character ~ will be replaced with the path of the user's home directory. The array_read() function is used in the new fscan "file scan" macro.

fmt_read() and fmt_write() Now Do Tilde Expansion

The fmt_read() and fmt_write() functions, which take a file name as first argument, will now do tilde expansion of the argument. Tilde expansion means that the tilde character ~ will be replaced with the path of the user's home directory.

whatis() Now Recognizes Number Constants

The built-in whatis() function will now return the value 8 if the string argument represents a numerical constant in any format (decimal, octal, hexadecimal, exponential).

MACROS

Scan Heading Reverted To Show ascan For dscan

In the initial release of the new array-based scans (see newscans.mac), for delta scans the macros displayed the names dscan, d2scan, etc., in the headers saved to the data file and shown on the screen. In this release, ascan, a2scan, etc., are displayed for the delta scans, which is the traditional behavior.

Updated scan_data_init() Works Better With splot

The macro code for scan_data_init() has a few small changes to work better with spec's Python splot utility.

FIXES

Fixed Scan Heading For Multi-Motor Delta Scans

A bug in the new scan macros that showed the wrong start and end motor positions for delta scans of more than one motor (th2th, d2scan, d3scan, d4scan, d5scan, dmesh) has been fixed. Only the text of the scan header was incorrect -- the scans were done as commanded.

Fixed Issues With plotselect Assigning DET and MON

Two issues in the plotselect macro related to assigning values to DET and MON have been fixed. If either DET or MON were set to values that did not correspond to an enabled counter when entering the macro, changes made in the macro wouldn't stick. Also, new values might not have stuck if the multiple plot window feature was active.

Fix For whatis("")

A bug where the whatis() function identified an empty string as a macro has been fixed.

Fix For spec_menu() With Empty "list"

A bug, where spec could crash if the spec_menu() array argument specified a "list" menu item with the list itself an empty string, has been fixed. See the spec spec_menu help file for a description of the spec_menu() function.

HARDWARE

Smaract Sensor List Updated

The built-in table of supported sensor types for the Smaract SCU and MCS motor controllers has been updated to match the additional sensor types now available from Smaract. See the spec smaract help file for details.

October 14, 2016 - RELEASE 6.04.02

FIXES

Fix For tango_io() "source" Command

The "source" command option for the tango_io() function, although documented in the spec tango help file, was not fully implemented until this spec release. The "source" command can now be used to set or get the TANGO option that specifies whether to obtain data directly from a device or from a polling cache.

HARDWARE

Support For CLS EPICS Motor Record

The alternative EPICS motor record developed and used at the Canadian Light Source (CLS) is now supported. See the notes in spec's epics help file for details.

September 12, 2016 - RELEASE 6.04.01

IMPROVEMENTS

The for (var in assoc_array) Syntax Now Sorts Elements

The syntax:

for (var in assoc_array) {
     ...
}

will now return the elements in lexicographical order. Previously, the order was unspecified. The sort order is the same as used by the print and syms +v commands when displaying associative arrays.

Custom Optional Parameters Now Available With image_par() and mca_par()

Previously, custom optional parameters added to the config file for MCA- and image-type devices have only been accessible from within macro hardware functions as elements of the associative array prefix_CONPAR[] where the array elements are indexed by the parameter name and prefix is the macro function prefix. With this spec release, the parameters are generally available using image_par() and mca_par().

Integration With Linux "capabilities"

The default spec installation on Linux makes the spec executable a set-user-id root process in order for spec to have access to I/O device resources for hardware control. In this release, the Linux command setcap can be used as:

sudo setcap cap_sys_rawio=ep /usr/local/bin/spec

That command gives spec the I/O privileges necessary without having to make spec a set-user-id root program. See the Linux man pages capabilities(7) and setcap(8) for more information.

(Note, even when spec is set-user-id root, spec runs with an effective ID of the actual user except around the limited calls to gain access to I/O resources. It isn't possible for a spec user to do anything else that requires root access.)

MACROS

New Array Scan Engine Now the Default In the Standard Macros

The updated scan macros, included in spec release 6.03.04 distribution in the file macros/newscans.mac, are now the default scan macros. The "newscan" macros are a significant update to the long-time standard spec motor scans. Whereas the traditional scan macros calculate new motor positions at each point as the scan progresses, the new scans take an array containing motor positions (and possibly count times) precalculated for each point of the scan.

The new macro source file replaces macros/scans.mac, which is still included in the distribution but is not installed. The array scan engine enables new scan types and creates a more consistent scan behavior, but remains backward compatible with the existing user definable hooks.

The _ascan macro, previously used by the motor scans, is not used with the new scan engine, but remains as an installed macro for the benefit of locally defined scan macros that rely on it.

Redefined scans include ascan through a5scan, dscan through d5scan, lup, th2th, mesh, hscan, kscan, lscan, hklscan, hklmesh, hkcircle, hlcircle, klcircle, hkradial, hlradial and klradial.

New scans that use the new array scan engine are:

fscan
Does motor scans based on positions in a file. The beginning of the file needs a line starting with #M that contains a space-separated list of motor mnemonics. The following lines contain space-separated motor positions corresponding to the mnemonics. Each line of the file corresponds to a point in the scan. The data file can optionally contain a per-point count time as the last item on each line.
dmesh
A delta mesh scan, similar to a delta motor scan. Endpoints are specified relative to the starting positions and motors are returned to the starting positions as the end of the scan.
hklscanarr
An HKL scan that takes a 2D array of HKL positions and an optional count time as arguments. Each row of the array corresponds to a data point. If no count time argument is specified as an argument to the macro, the last column of the array contains the count time for each point.
vscan and v2scan
Variable step-sized scans with densest points at a specified "center" position. The spacing density is calculated using parameters for an exponent and a minimum step size. The parameters will use default values or can be specified either as optional arguments to the scan or in global variables. See a complete description in the comments of the vscan.mac file.
xascan through xa4scan and xdscan through x4dscan
Expanded motor scans that have a configurable number of points at the beginning and end of regular motor scans at a lower point density. These scans are similar to local scans at ESRF.
rscan
A region scan named that allows specifying a single motor scan with various point densities in consecutive segments. This scan is similar to a local scan at ESRF.

Geometry-Specific Scans Updated To Use Array Scan Engine

Scan macros associated with specific geometries, namely aziscan in fourc, fivec and sixc; alphascan and betascan in zaxis; and abscan, abmesh and r2scan in surf, have been rewritten to use the new array scan engine. The macros in newscans.mac include a few small revisions to accommodate the new scan types. Also, the twoc geometry no longer includes separate scan macros, as the macros in newscans.mac will work with the two-circle planar geometry.

FIXES

Fixes For ^C Response On Server During Execution Of remote_* Commands

A fix in spec release 6.03.05 to eliminate the double echoing of text typed at the keyboard to a spec server while the server was executing a command from a spec client inadvertently disabled recognition of a ^C typed at the server keyboard during execution of the command. This spec release restores that functionality. Note, the problem appeared to exist only on Linux platforms when spec was linked with the default libedit libraries. There were no issues if using libreadline on Linux or either libedit or libreadline on Mac OS X.

Fixes For Printing Long Strings

Issues related to printing long strings (greater than 9000 bytes) when debugging was enabled that could lead to program crashes have been addressed. In addition, debugging messages printed from multiple threads when running in server mode should now be more robust.

Macro Hardware Polling Now Only For Active MCA and Image Devices

Previously, the "get_status" key for the _cmd() functions for macro hardware MCA and image devices would be called for all MCA instances even if only one was active and for all image instances if only one was active. This spec release will make "get_status" calls only for active devices.

HARDWARE

Preliminary Implementation Of "Server Hardware" Feature

Although the spec binary generally includes built-in support for hardware controllers, to accommodate devices that require vendor libraries that don't integrate well into the spec binary, a new generic "server hardware" interface is part of this spec release. Currently only MCA-type devices are supported. See the server_hdw help file for details.

Encoder Mode Update For Trinamic TMCL Motor Controllers

By default, the spec support for the Trinamic TMCL motor controllers uses relative move commands for encoder motors (TMCL_E) and absolute move commands otherwise (TMCL). A new custom optional motor parameter encoder_move_mode can be assigned values "absolute" or "relative" to set what kind of moves to use for encoders. Use the p command from the standard Motor screen to access the custom parameter screen.

Encoder Mode Update For Phytron PhyMotion Motor Controllers

The Phytron PhyMotion motor controller support will now use relative moves for a motor configured to use an encoder (motor type PHYMO_E). Otherwise, spec will use absolute moves. In addition, a custom optional motor parameter encoder_move_mode can be assigned values "absolute" or "relative" to set what kind of moves to use for encoders. Use the p command from the standard Motor screen to access the custom parameter screen. Finally, spec will use parameter 22 as the position when configured with an encoder. Previously, spec used parameter 19.

Revised and Updated Support For Princeton Applied Research Model 283

The existing code to support the Princeton Applied Research Model 283 Potentiostat/Galvanostat as an MCA-type device has been substantially rewritten to use current spec conventions and to fix issues in the code. The support now works with data arrays. The native data type is float with 98304 channels. Data can be read in three modes, selected using a subaddress in the selection argument to mca_sget(). No subaddress or a subaddress of 0 interprets data as 16-bit signed integers. A subaddress of 1 interprets data as 12-bit signed integers and is appropriate for reading measured currents with auto-ranging mode off. A subaddress of 2 interprets data as 12-bit signed integers with a 4-bit signed exponent and is used for reading measured currents with auto-ranging mode on. Use the roi_beg and roi_end arguments to mca_get() and mca_put() to transfer data from or to specific "curves" in the 283.

The mca_par() command pass-through options "read" and "send" can be used to program the device parameters and operating mode. The mca_par() "status" command returns the GPIB status byte, which is the same value as returned by the "ST" command. User code should make sure the status indicates the device is finished with an acquisition before the user code reads the data.

April 20, 2016 - RELEASE 6.03.11

IMPROVEMENTS

Updates For spec_menu()

A new "choices" key to spec_menu() can be used to replace the default YES and NO prompts used with the "bit" and "toggle" keys. See the spec_menu help file for details.

MACROS

Fix For wm Macro

A bug in the wm (where motor) macro versions since release 6 of spec caused by a typo has been fixed. Previously, if the number of motor arguments was sufficient to require a second row of motors, the user positions in the second and subsequent lines would belong to the first line.

FIXES

Clarity For When ASCII Plots Get Drawn

A little used but still supported plotting feature that dates from spec's origins is the ability to use ASCII characters and cursor positioning commands to plot scan data on a terminal screen. The option to use ASCII plots is included in the setplot macro and allowed if the standard x11filt plotting is disabled. Although the standard plotting macros would create the correct plot based on the selected options, the functions array_plot() (and data_plot()) would send cursor positioning commands if x11filt plotting was disabled, even when ASCII plotting was also disabled. This spec releases fixes the C code to prevent such output. The macros have been updated to use the plot_cntl() "ascii" and "-ascii" options to ensure the mode is only enabled when specifically configured.

HARDWARE

Software Timer Now Plays Nice With Multiple-Timer Configurations

Previously, the software timer would reset to command level if attempting to count to a monitor preset with mcount(). That may have been sensible when spec only allowed a single master timer. However, spec has allowed multiple master timers since release 5.09.01-1. Now, if counting to monitor, the software timer will simply keep track of elapsed time until halted by another master timer.

Fixes For Multiple Master Timer Configurations

An issue when using multiple master timers, where several models of timers would modify the global count time parameter which was then used by the other timers, has been fixed. The changed value could be passed to macro-hardware timers with the "start_all" and "start_one" keys. The master timers that would change the count time values were the Am9513-based models with count times less than 20 microseconds or greater than 71.5 minutes, the Mizar MZ 8310 with count times greater than 10.92 minutes and the National Instruments 660x or 63xx models if counting to monitor with the hardware prescaling option turned on. In addition, the software timer, the Am9513-based models, the Mizar MZ 8310 and the Siemens D5000 models would change the count time with the move_cnt command. Note, though, in move_cnt mode the count time is otherwise zero and in any case should be ignored.

Fix For motor_par() "read" For PI E-712

A bug that always resulted in an error return for the command pass-through "read" motor_par() option for the Physik Instrumente Model E-712 piezo controller and that has been present in the code since the first version of the support in spec release 5.09.02-1 (2011) has been fixed.

Ketek DDP2 Renamed DPP1

The spec support for the Ketek DPP now refers to the device as a DPP1, which matches Ketek's current nomenclature. See the ketek help file.

February 27, 2016 - RELEASE 6.03.10

IMPROVEMENTS

Improved Locking For State File and settings File

The code to lock and check for locks on the state file and the settings file has been updated to use system calls that should be more robust if the files are on NFS mounts. The state file lock prevents a user from starting multiple instances of the same spec version. The settings file lock prevents more than one instance of spec from trying to control the same hardware. It is also now possible to use reconfig to gain access to previously locked out hardware without exiting spec if the instance of spec that had locked the hardware exits. See the set_sim help file for details.

Fix For Moving Off Limits

For many motor controllers, if a move off of an active limit was not far enough to clear the limit switch, spec would behave as if such a move ended by hitting the still active limit switch. That means spec would print a limit-hit message and abort any other motors that might be moving. With this release, such a move will be treated as a normal move for all motor controllers.

New spec_par() Option To Enable Previous Limit Behavior

The above change in spec code for recognizing a limit condition could be an issue if the spec support for a particular motor controller misidentified the plus and minus limits. If a site finds a problem, a new spec_par("legacy_limit_check") option is available to restore the prior behavior until CSS can fix the motor controller support. See the spec_par help file for details.

Maximum Number Of Scalers Increased To 256

To meet the needs of a least one installation's hardware configuration, the maximum number of scalers allowed by spec has been increased from 128 to 256.

splot Updates

Among the updates for the Python splot utility are a fix for an issue where the first scan might contain spurious points when connecting to spec in server mode. Also, scroll bars are now available with the zoom feature when using the matplotlib 2D plotting library option.

HARDWARE SUPPORT

Support For EPICS Motor Record DISP Process Variable

The spec support for the standard EPICS motor record (as used at the APS) now includes the generic DISP (disable) process variable. spec will register to receive DISP events for all motor channels. When a DISP event is received, the associated motor will be disabled or enabled as appropriate. The behavior in spec is the same as if the motor_par() "disable" command had been issued for the motor. However, motor_par() cannot be used to undo the results of the DISP event.

Fix For Huber SMC 9300 Limit Sense

A long standing error in the support for the Huber SMC 9300 motor controller that switched the sense of plus and minus limit status indications has been corrected. Unless user macros relied on differences in return value of the motor_par() "high_lim_hit" and "low_lim_hit" options, there should be no difference in behavior, other than in the messages that describe which limit has been hit.

Fix For Amptek DP5/PX5 Support

Recent updates to the spec support for the Amptek DP5/PX5 latest firmware broke sending the TPFA (fast channel peaking time) parameter for firmware prior to 6.7.5. This release fixes that issue. In addition, the code to display parameters from the diagnostic packet has been revised, which may result in more sensible values displayed on the screen with the mca_par("diagnostics") command.

Preliminary Support For Encoders With TMCL Controllers

This spec release includes preliminary support for encoders on the Trinamic TMCL motor controllers. If the controller type is selected as TMCL_E, spec will use relative moves for positioning, read the position from axis register 209 and write the position to register 209 with the chg_dial() function. In addition, if the optional motor parameter "encoder_step_size" is set, spec will scale the values accordingly. See the tmcl help file for details.

Support For Deceleration Parameter On Compumotor 4000

The spec support for the Compumotor 4000 motor controller will now program the deceleration parameter, if it has been set in the hardware configuration file or via motor_par(). If not set, the deceleration will be programmed with the same value as the acceleration parameter.

January 16, 2016 - RELEASE 6.03.09

IMPROVEMENTS

New plot_cntl() Commands

The plot_cntl() function, used with the x11filt, now recognizes commands "grid" and "-grid" to enable or disable display of a grid over the plot, "dotsize=value" to set the size of large dots and "width=value" to set the width of the lines connecting the data points. See the plot_cntl help file for details.

splot Utility Updated To Version 2

spec now includes a new release of the Python splot plotting utility. Version 2 of splot can now use either the PyQt5 or PySide Qt binding libraries, in addition to the PyQt4 supported by splot version 1. Also, splot version 2 can use the matplotlib 2D plotting library instead of the PyQwt5 library required by version 1. Finally, a number of issues have been fixed and new features added. See the update notes in the splot distribution directory for details.

BUG FIXES

Fix For prefix_ADDR For Macro Hardware Image Devices

A bug where the edconf configuration editor didn't read an optional ADDR value from the config file when associated with with a macro hardware image device has been fixed. The value in that field can be accessed in the macro hardware macro functions as a local variable named prefix_ADDR where prefix is the identifier configured for the particular macro hardware device.

MACRO UPDATES

Logarithmic x-Axis Now Supported In the Plotting Macros

The setplot and draw_plot() macros have been updated to allow using a logarithmic x axis.

draw_plot() Updated For New plot_cntl() Options

The draw_plot() macro, which does the main work of creating plots, now implements grid mode, dot size and line width for x11filt plots.

New vscan Global Parameters To Set Default Values

The new variable step size macros, vscan and v2scan, now recognize global variables named VSCAN_EXPON and VSCAN_MINSTEP which, if nonzero, will provide default values to use for the exponent and minimum step size if the value are not specified as a macro arguments. See the comments in vscan.mac source file for details on the macros. The vscan macros require the new array-based scan engine from newscans.mac.

fscan Bug When Scanning Single Motor Fixed

A bug in the initial release of the fscan macro, which prevented the macro from working if the scan was for just one motor, has been fixed. The fscan macro requires the new array-based scan engine from newscans.mac.

Macro cplot_plot Updated To Work With Current Plotting Macros

Obsolete code from the cplot_plot macro that attempted to make the macro work with the very old plotting macros has been removed.

sevc Geometry _assign Macro Fixed

The _assign macro, which is defined for each geometry to assign the special geometry motors to the first positions in the mA[] array, was missing a required call to _assign_mA, which is a macro that assigns the rest of the motors to mA[]. This spec release fixes the macro definition.

HARDWARE SUPPORT

Kohzu Motor Controller Support Updated To Recognize New Models

The code to support the Kohzu model SC-200, SC-400 and SC-800 motor controllers has been updated to also recognize the newer model SC-210 and SC-410 controllers. The programming sent by spec to the controllers is unchanged.

November 11, 2015 - RELEASE 6.03.08

IMPROVEMENTS

Fix For Memory Leak In Macro Functions

A memory leak in macro functions has been fixed. The leak occurred when the macro function was defined with arguments, an associative array was assigned to an argument within the function and the function was invoked without an argument. For example, the following minimal code would leak memory:

global ARR[]; ARR[0] = 0; def test(arr) '{ arr[0] = ARR[0] }'; test()

The bug has existed since macros functions were introduced.

Improvements For MCA Sub-Address Syntax

When a single MCA unit has multiple MCA modules (such as the Dectris Mythen 6K/24K or the Canberra Multiport II), the mca_spar(), mca_sget() and mca_sput() functions accept an address argument with a subaddress in the form a.b, "a.b" or "a:b", where a is the MCA unit number and b is the module subaddress. The first form is a number, while the second two forms are strings. Previously, the subaddress of the number form for 1.10 and 1.20 would be interpreted as 1 or 2, respectively. With this spec release, the subaddress will be interpreted as 10 or 20 as intended.

Fixes and Updates For the splot Utility

The Python-based splot utility has several fixes relating to how the axes are drawn and will also now work correctly with energy scans and the reciprocal space parametric scans (hkcircle, hkradial, etc.).

MACRO UPDATES

Continuous Scan Updates

The recently introduced continuous scan macros have been reorganized a bit and new continuous delta scans, cdscan, cd2scan, cd3scan and cd4scan, have been introduced, along with a new continuous delta mesh scan, cdmesh. The delta versions of the continuous scans take position arguments relative to the current positions of the motors and return the motors to their starting positions at the end of the scan or if the scan is interrupted. See the comments in the cscan.mac file included in the spec distribution for usage details.

Fix For Escan Compatibility With splot

The Escan macro has been updated to set global variables (_nm, _s[] and _f[]) used by macros that communicate with the Python-based splot utility.

Fixes For scan_data_init(), scan_data() and scan_meta_update()

The scan_data() macro and the new scan_data_init() and scan_meta_update() macros that that communicate with the Python-based splot utility have been fixed so energy scans and parametric scans, such as the radial and circular reciprocal space scans, will plot correctly. Previously, assignments to the SCAN_COLS and SCAN_D arrays were not quite right for those scans.

More Fixes and Updates For newscans.mac

The macros in newscans.mac that will replace the current scans in scans.mac in a forthcoming spec release have been slightly reorganized. Also, a new scan-type macro named hklscanarr takes an array of HKL positions and an optional count time as arguments. If the count time is missing, the last column of the array contains the count time. See the comments in the newscans.mac file included in the spec distribution for usage details.

New Variable Step-Size Scans

New scans called vscan and v2scan do variable step-sized scans with densest points at a specified "center" position. The scans use the new array-based scan engine contained in newscans.mac. See the comments in the vscan.mac source file.

HARDWARE SUPPORT

Support For Struck SIS3153 USB VME controller

spec now works with the Struck SIS3153 model VME controller over the USB interface. Configuration is the same as for the earlier SIS3150 model. spec will detect which is connected and behave accordingly. Support for the ethernet interface on the module will be included in a future spec release.

Fix To Accommodate OMS MAXnet Firmware Update

The latest firmware (version 1.48) for the Oregon Micro System MAXnet motor controller introduced a change in protocol which broke spec's existing support. This spec release will work with both the new firmware and previous versions.

Fix For Mythen Firmware 3 Multiple-Module Communication

Issues with updating parameters on Mythen 6K and 24K devices with multiple MCA modules using version 3 and later firmware have been fixed.

October 14, 2015 - RELEASE 6.03.07

NEW FEATURES

New "open?" Option For plot_cntl()

A new "open?" query option for the plot_cntl() function returns nonzero if the currently selected filter process is running and zero otherwise. See the plot_cntl help file.

New "depends" Option For motor_par()

A new "depends" option for motor_par() returns an associative array containing a list of motor mnemonics that correspond either to the real motors that the pseudo motor argument depends on, or the pseudo motors that depend on the real-motor argument. If there is no dependency, an empty associative array is returned.

IMPROVEMENTS

Faster Quitting When Multiple Plot Windows Are Open

A delay of 0.25 seconds associated with terminating each plot window when spec exits has been eliminated.

Fix For "prestart_all" and "start_all" Macro-Hardware Motors

Previously, when moving macro-hardware motors from different macro sets at the same time, the macro-hardware motor support would call all macro-hardware motor _cmd() functions with the "prestart_all" and "start_all" command keys when starting backlash moves for any of the motors being moved. The code will now call the _cmd() function only for the motor that is getting the commands to start backlash.

Updates For HDW_ERR Implementation

HDW_ERR is now a built-in global variable. It no longer has to be created at user level to take effect. HDW_ERR will now be set on failed calls to motor_par() and counter_par() in order to distinguish a failed call from a valid return value of zero or -1. See the HDW_ERR help file for details and a list of the possible error codes.

Updates For psic Sectors Implementation

The sectors implementation for the psic geometry has been cleaned up and now works more in line with how it is documented in the psic help file. In addition, the sectors macro now takes an optional argument to select how to display the results. See the psic help file for details.

Updates For fmt_read() and fmt_write()

The API for the user fmt_*.c has a couple of changes. The data set number passed to the read and save functions now begins at one rather than zero. A bug in the ff_get_next_head_item() function that could return a spurious command and ID that has values for both of "0" has been fixed.

Updates To ESRF Format Binary File Writing and Reading

The implementation of the "esrf" format for the fmt_write() and fmt_read() commands has updated to allow setting the ID number in the data block header. In addition, a new "esrf2" format is included which aligns both the header and the data on 1024-byte boundaries. The "esrf" format only aligns the data on 1024-byte boundaries. See the notes in the fmt_esrf.c file included in the spec distribution for complete details.

BUG FIXES

Fix For Crash When An Output File Disappears and Cannot Be Reopened

Updates in spec release 6.02 to implement the built-in OUTFILES associative array introduced a bug where a crash could occur if an output file disappeared while spec was running and the output file could not be reopened. That could happen, for example, if the path leading to the file no longer existed. That bug is now fixed.

Fix For x11filt Additional Window Parameters In .Xdefaults

A feature documented in the spec x11 help file, where parameters can be set in a user's .Xdefaults file for additional plot windows, such as spec_2.geometry, spec_3.Foreground, etc, has not been working since spec release 5.01.02. This spec release restores that feature. With the new macro support for multiple plot windows, it is important to be able to set the default location and parameters of the additional windows.

Fix For User Process Termination If splot Cannot Be Found

A bug, where spec would issue the kill() system call with the pid argument equal to -1 after approximately 64 failures to execute the program assigned to SPLOT_PROGRAM, has been fixed. The effect of calling kill() with pid set to -1 is to terminate all the user's processes.

Fix For unix() Return Value

A bug introduced in release 6.02.08 where the return value of the unix() built-in function was shifted up eight bits has been fixed. (The return value of unix() is the exit status of the system command executed by unix().)

Fix For HDW_ERR In Server Mode

An old problem, where a socket error in the spec server read or write threads could set the HDW_ERR value associated with a user function call in the command thread, has been fixed. For example, during execution of a command such as gpib_get(), HDW_ERR could be set by the read thread if it loses a client connection even though the GPIB call had no error. In this spec release, socket errors associated with the spec server read or write threads will no longer change the value of HDW_ERR.

MACRO UPDATES

New Macro Support For Multiple Plot Windows

The standard macros now support assigning different counters to different plot windows. The feature works with both the traditional x11filt plotting and the new Python-based splot plotting. Use the setplot macro to enable using multiple plot windows. Use the plotselect (or counters) macros to assign particular counters to up to five different plot windows. If both x11filt and splot utility are enabled, the same window assignment of counters is applied to each.

Updates To splot Utility To Reduce Use of splot_cntl()

The standard plotting macros have been updated to reflect the new ability of the Python-based splot utility to adjust plots to user preferences automatically. For plotting during scans, it is no longer necessary to include any splot_cntl() commands in the macros other than an "open" command. The plot configuration is now added to the meta region of the SCAN_D shared array.

Update To setplot Argument Behavior

Without arguments, setplot prompts for plot configuration options, most of which are toggles assigned to bits in the PLOT_MODE global variable. With an argument, PLOT_MODE is set directly. If the argument begins with a + or - sign, previously, the value would be added to or subtracted from PLOT_MODE. With this spec release, bit-wise operations will be used instead to add to PLOT_MODE or remove from PLOT_MODE the bits contained in the argument, so that repeated calls with the same argument will not change bits not in the argument.

Spurious Comments Generated By the set Macro Eliminated

To accommodate using the set macro with pseudo motors, the macro compares positions returned by getangles before and after changing the offset. Changing the offset for a pseudo motor that depends on real motors or for a real motor that is used by pseudo motors, can change the user position of the associated motors. However, motors with fluctuating positions due to sensitive encoders could also show up as having the offset changed. The set macro has been revised to use the new "depends" option for motor_par() and will now only reported changed offsets for the relevant motors.

New Test For Accessible Data File In Standard Scan Header

The standard _head macro used by all the scans will now make sure the current data file (as contained in the DATAFILE symbol) can be accessed using the open() function. If open() fails, the _head macro will execute the exit command which will abort the scan. Previously, repeated messages indicating failure to open the data file would be displayed while the scan continued.

User Hook move_poll Macro Now Included In dscan_cleanup

The move_poll macro, defined as a null macro by default, is now called after the _move command in dscan_cleanup.

HARDWARE SUPPORT

Fix For EPICS Motors With Rapidly Updating Encoders

In configurations with EPICS motors that constantly send updates with small fluctuations in position (due to a sensitive encoder, for example), spec could send move commands to the motors during scans, even if the motors were not involved in the scans. The "slop" parameter can now be used with such motors to create a position dead band. Position events within "slop" counts of the current position won't update the current position in spec. However, at the end of a move or during a sync command, the current position will always be read. The "slop" parameter is set on the second standard optional parameter motor screen of the configuration editor.

Additional Fix For Communication Errors With Tsuji PM16C Motor Controllers

An additional issue where a bad read of the Tsuji PM16C motor controller status could cause a spurious "both limits set" event has been corrected.

July 30, 2015 - RELEASE 6.03.06

Can Return Sub-second File Times with file_info()

The "atime", "mtime" and "ctime" options to file_info() will now return file times to sub-second resolution on platforms and file systems that support the feature. Linux platforms with glib version 2.12 or greater support the feature. All Mac OSX versions supported by spec support the feature, although the HFS and HFS+ file systems do not.

Broken or_swap Macro Fixed

Updates to the orientation matrix macros in spec release 6.02.08 to accommodate a new seven-circle geometry introduced a bug in the or_swap macro used to swap the two orientation vectors. That bug is fixed in this release.

Fix For Server Crash

A rare crash that could occur in a spec server when the socket connection to a client was unexpectedly lost while there were pending events for that client has been fixed.

Improved Handling Of Communication Errors With Tsuji PM16C Motor Controllers

The spec support for the Tsuji PM16C motor controllers now includes code to better detect and deal with communication errors. Previously, if the communication interface was error prone, it was possible for the messages between the controller and spec to get out of sync, with responses getting associated with the wrong command. One symptom of the out-of-sync problem would be a spurious message that a motor hit a limit switch. The code now does consistency checking on the responses to the read-position and get-status commands. If the responses are in the wrong format for the particular command, spec will attempt to resynchronize communications.

Fix For Kontron PCIDCC5 Digital I/O

A bug in the code that prevented the counter_par() commands for setting and reading the digital I/O on the Kontron (ICS Advent) PCIDCC5/5-P model Am9513-based PCI counter/timer card has been fixed. See the am9513 help file for details on the commands.

Fix For Agilis Configuration Crash

A recently introduced bug, where the code for the Newport Agilis motor controller could cause a crash if a controller was configured but not present, has been fixed.

July 7, 2015 - RELEASE 6.03.05

Unlimited Line Length for getline() and array_read()

The getline() function to read a line of text from a file and the array_read() function to fill a data array with values from a text file have been updated to allow reading from files with unlimited line lengths. Previously, getline() would read up to a maximum of 4095 characters and array_read() would allow input lines up to 2047 characters.

New GETLINE_EOF Built-in Symbol For getline()

To distinguish between an end of file, an error or a literal -1, the getline() function now assigns a value to a new built-in variable named GETLINE_EOF. After each call of getline(), the value of GETLINE_EOF will be 1 if there was an end-of-file condition on the read of the file, -1 if there was an error reading the file or if the file couldn't be opened and zero if the read was successful. For backward compatibility, the getline() return value will continue to be -1 on end of file or an error, or if the current line of the file is the string -1.

New array_read() Option To Skip Initial Columns

A new optional "C=#" argument to array_read() can be used to specify from which column in the file to start assigning data. See the arrays help file for details.

Restored Capability For Fixed-Ranged Updated Plots

Release 6.02 of spec included new plotting macros that auto-ranged the x axis in the updated plot displayed during scans. This spec release now includes an option to configure the behavior as either fixed or auto-ranged via the setplot macro.

Updates For New Focus 8742 Motor Controller

The spec support for the New Focus 8742 controller now works with its USB and RS-485 (via RS-232C) interfaces. In addition, daisy-chained units connected in series with a master (gateway) controller using the RS-485 connections are now supported. When using daisy-chained units, set the "crate" address in the motor configuration to the module address. Finally, the socket connection code will now automatically attempt to reconnect when connections are dropped by the controller.

Fix For Mythen When Specifying a TrimMo Settings File

An old typo in the spec Dectris Mythen MCA support that translated the deprecated (in firmware version 2) "-trimfile TrimMo" command to the "-settings StdmMo" command has been corrected by removing the surplus lower case m. In addition, the deprecated (in firmware version 3) "-settings" arguments that begin with Hg, Std, and Fast have those prefixes automatically removed when using firmware version 4.

Fix For Reporting Trinamic TMCL Parameter Values

All the Trinamic TMCL motor controller parameters can be accessed via the motor_par() function using generic numbered names, such as "par6". Some of these parameters have aliases such as "PeakCurrent" which corresponds to parameter 6. Previously, if the parameter value was changed using the generic name ("par6"), the value reported by motor_par() for the alias ("PeakCurrent") would not reflect the new value. That issue is corrected in this release.

Fix For Server Mode Interactive Command Echoing

An issue where characters typed at the keyboard of a spec server session could be echoed twice to the screen if typed while the server was executing a client command has been fixed.

Updates For splot Utility

The splot utility now supports x-axis logarithmic plotting. Also, an issue with y-axis logarithmic plotting in shared-data mode, where data was not always plotted, has been fixed. In addition, a new splot_cntl() command "plotrange" provides the same functionality as the plot_range() function for the traditional plotting and is used in the standard plotting macros to implement the setplot options to force the y-axis minimum to zero and to use fixed ranges for the x axis during scans.

A new splot_cntl() command "showstats" can be used to toggle the display of the peak, center-of-mass and full-width-at-half-max markers.

A new splot_cntl() command "showmotor" can be used to toggle the display of a marker showing the current position of the

Fixes and Updates For newscans.mac

The previous release included a file named newscans.mac that contains a new implementation of the standard macros that will replace the standard macros in a forthcoming update. There are a few updates to these new scan macros as follows:

The HEADING string (used in the screen display, data file and plots) for the dscan macros had showed incorrect start and end positions, but is now fixed.

The new fscan (file scan) macro has been updated to allow the count time to be optionally assigned at the end of each row of motor positions. If invoked without a count-time option, and if the file contains a count time at the end of each row of motor positions, the file count times will be used at each point. If the scan is invoked with a count-time argument, the file count times will be ignored. Also, the motor mnemonics for the scan must now be proceeded by a #M and a space rather than a lone # to allow for comments in the file and future # directives. A single # followed by a space introduces a comment.

May 11, 2015 - RELEASE 6.03.04

New String-Handling Functions With Regular Expressions

New built-in string-handling functions use an extended regular expression as an argument as follows:

rsplit()
like split() in that it splits a string and places the parts into an array, but the delimiter can be a regular expression.
match()
finds the position in a string where a regular expression occurs, and optionally places matched subexpressions into an array.
sub()
replaces a single instance of text in a string that matches a regular expression.
gsub()
replaces all instances of text in a string that match a regular expression.
gensub()
replaces selected instances of text that match a regular expression.

See the entries for each function in the funcs help file for further details and features.

New Macro Special Symbol $@

It is often useful when parsing macro arguments, particularly when the macro is called with a variable number of arguments, to use the split() function to place the arguments into an associative array. The normal syntax is:

{
  local ac, av[]
  ac = split("$*", av)
}

However, that usage does not respect quoted arguments, since $* removes quotation marks when concatenating the macro arguments. This spec release introduces a new sequence $@. When an ordinary macro with arguments is expanded, $@ will be replaced with the concatenated arguments delimited by the special character \a (the audible bell, ^G, ASCII 7). The string can then be split as follows:

{
  local ac, av[]
  ac = split("$@", av, "\a")
}

The elements of av[] will respect the quoted arguments in the macro invocation. There is no syntax to escape the \a.

New "lines" Option For file_info()

A new "lines" option for the file_info() function returns the number of newline characters in the specified file. See the file_info() entry in the funcs help file for a description of all the available options.

New Flexibility For the Indirection Operator @

The spec parser now allows the indirection operator @ to be applied to a parenthesized variable or associative array element. The priority of @ is higher than the square brackets of the array, so parenthesis must be used if the array element contains the string which points to the symbol. For example:

SPEC> arr[0] = "PI"; s = "arr"
SPEC> print @s[0], @(arr[0]), @(@s[0])
PI 3.14159 3.14159

The expanded syntax allows cascaded usage as shown above.

strdef() Can Now Return Chained Macro Segments

The strdef() function, which returns the string definition of the macro name given as an argument, can now return segments of a chained macro as specified by the associated key given as a second argument. See the strdef() entry in the funcs help file for a detailed description.

get_lim() Can Now Take Backlash Into Account

The get_lim() function to return software motor limits will return the limit corrected for backlash if the magnitude of the second argument is greater than 1. For example, for a motor with sign of user*dial positive, backlash positive and steps per degree positive, the corresponding return values might be:

SPEC> p get_lim(tth, -1), get_lim(tth, -10)
-180 -179.99

That is, although the actual soft limit is -180, when taking account the configured backlash, the effective limit is -179.99.

Move Macros Now Allow Variables For Motor Mnemonics (Really)

The feature announced with release 6.02 that allowed motor mnemonics to be given as variables for the motor-move macros (mv, umv, mvr, umvr, mvd and umvd) didn't actually work when the release came out. The parser modification for the indirection operator (@) that enabled the feature was problematic and immediately reverted. This spec release fixes the problems and restores the behavior. Thus, usage such as:

for (i = 0; i < 5; i++) mv i 10

and:

{ par="phi"; umv par 4; par=th; umv par 1 }

will work.

New Return Value For srand()

The srand() function, used to set the seed value for the pseudo-random number generator now has a return value, namely the value of the previous seed.

delete Can Now Be Used On Entire Associative Array

The delete built-in command can now be used to delete all elements from an associative array. Previously, delete would only remove one element. Note, delete doesn't remove the array or change its type, it just removes all the elements. Use unglobal to remove the array from the symbol table.

Preliminary Release of Updated Scan Macro Package

A file named newscans.mac is included in the distribution that contains a preliminary release of a new array-based scan engine and several new standard scans. These scans will replace the standard scans in scans.mac in a subsequent release. The new scan engine uses a pre-filled array of motor positions for the scan points, which allows better pre-scan limit checks and enables new scan types. Existing scans that are replaced include ascan through a5scan, dscan through d5scan, lup, th2th, mesh, hscan, kscan, lscan, hklscan, hklmesh, hkcircle, hlcircle, klcircle, hkradial, hlradial and klradial. The standard _ascan macro will no longer be used, but will continue to be included in the distribution for the benefit of local scans that use it.

The macros in newscans.mac are not installed with this release, but can be activated by reading the file with qdofile() or qdo.

New scans in newscans.mac include:

A new fscan does motor scans based on positions in a file. The first line of the file contains a list of motor mnemonics as a comment. Subsequent lines contain corresponding motor positions. Each line is one point in the scan.

A new dmesh scan, which is a delta mesh scan, similar to a delta motor scan. Endpoints are specified relative to the starting positions and motors are returned to the starting positions as the end of the scan.

A series of expanded motor scans named xascan through xa4scan and xdscan through xd4scan add a configurable number of points at the beginning and end of regular motor scans at a lower point density.

A region scan named rscan allows specifying a single motor scan with various point densities in consecutive segments.

See the comments in the newscans.mac file in the spec distribution for additional details.

Fix For split() In Macro Functions

An old bug, where an "Illegal reference to array" error would occur when using a local associative array as a return value in a macro function when the array had been used with the split() function but where elements had not otherwise been assigned any values, has been fixed.

Fix For array_read()

The return value of array_read() is the number of points read from the file. A bug, where the value did not include points assigned when the number of columns in the data file was less than the array dimension, has been fixed. spec has always assigned as many elements to the array as are available in the file, but had not been including points in the return value when a line of data from the file did not have values to fill every column (or row for a column-wise array).

Fix For counters/plotselect Macro

An issue with the interactive spec_menu() versions of the counters/plotselect macro introduced in spec release 6.02, where the wrong value would be assigned to DET or MON if there were any lower-numbered disabled counters, has been fixed.

Fixes and Updates For splot Utility

Arguments in the scan_info_update() macro function in the standard _tail and _scanabort macros along with the splot Python code have been fixed to correct an issue where the last point of scans wasn't always drawn. Another issue with the splot utility, where plots sometimes did not refresh correctly when switching between types of scans, has been fixed. New options for the splot_cntl() "marker" command are available. A new splot option to display the current motor position is available from the PLOT menu of the splot window.

Fixes For Trinamic TMCL Support

An issue with spec's support for the Trinamic TMCL motor controllers, where it was not possible to update certain global parameters, has been fixed.

New Timing Parameters For Agilis Communication

New non-standard optional parameters named "wdelay" and "rdelay" are available for the Agilis motor controller. These parameters can set a delay for writing commands to the Agilis and reading replies from the Agilis. See the agilis help file for details.

Fixes For sevc Geometry

The preliminary support for the sevc seven-circle diffractometer geometry has been updated with several fixes in the sevc.src macros.

April 1, 2015 - RELEASE 6.03.03

Fix For tango_put() With String Array

A segmentation fault that occurred with tango_put() when called with an empty associative array for a data type that required a string array has been fixed.

More Fixes For spec_menu() Issues

A bug, where a call to spec_menu() with a menu that had no editable items would cause a segmentation fault, has been fixed.

Correction For Recent whatis() Fix

A fix in release 6.03.01 for an old bug in the whatis() function that inadvertently broke another aspect of the function has been corrected.

Support For Newport Agilis AG-UC8

This spec release includes support for the Newport Agilis AG-UC8 piezo controller. The update to the existing code for the Agilis AG-UC2 model includes support for the absolute positioning command and setting the step-amplitude parameter. See the new agilis help file for details. Note, the update code has only been tested with the serial interface on the AG-UC8. Please contact CSS if any problems using the USB interface on either the AG-UC2 or AG-UC8.

March 22, 2015 - RELEASE 6.03.02

Macro Hardware Support For CCD-type (2D) Devices

The macro hardware facility now includes support for CCD-type (2D) detectors. See the updated mac_hdw help file for details.

Updated Support For Mythen Firmware 3 and Mythen2 Firmware 4 Models

The spec support for the Dectris Mythen MCA has been revised and updated to work with firmware version 3 and the new Mythen2 models that use firmware version 4. See the updated mythen help file for details.

Fix For spec_menu() Issues

The relatively new spec_menu() function has been updated to fix a couple of issues. A crash that could occur when passing an uninitialized symbol as the first argument has been fixed. A crash that could occur when scrolling with a menu that included "desc" keywords for items that had no editable elements has been fixed. In addition, if there is a "desc" keyword with no editable elements, the spec_menu() function will now treat the entry as a "subhead" so that the cursor does not stop on the item.

sync Command Fixed To Halt Multiple Timers

The sync command, normally used to make sure motor hardware and software are synchronized, also aborts the current move and active counting. Previous versions of spec only halted one active timer or acquisition device, even if multiple master timers or acquisition devices were configured. The sync command will now force stop all active timers.

New Indenting Option For config File

The configuration editor edconf now takes optional arguments +w or -w to add or remove a single character white-space indentation in the config file on lines beginning with the words STATE, CONPAR, MOTPAR and CNTPAR. Adding the space aids in readability of the file. The +w adds the indenting when writing out the file. The -w removes the indenting. If the option is unspecified, the existing indenting (or lack thereof) is maintained.

February 12, 2015 - RELEASE 6.03.01

Updates In the HDF5 Support

The standard spec distribution now includes static libhdf5.a and libz.a files that can be linked with spec during installation to provide HDF5 support. The libraries have been built from the open-source HDF5 and ZLIB source packages. The spec Install script now prompts for HDF5 linking specifications.

New options are available to set the raw-data chunk-cache parameters used for writing data to the HDF5 file, either per dataset or for all datasets in an opened file.

A new h5_link() function can be used to create soft links to HDF5 objects in an external file.

A new "flush" option to h5_file() can be used to tell the library to write existing data out to disk.

The format used to save string-valued associative arrays has been changed from using variable-length strings to using fixed-length strings.

One-dimensional arrays can now be set to unlimited size. One scalar value at a time can be added using the frame syntax of h5_data().

spec is now built against release 1.8.14 of the HDF5 libraries.

See the spec hdf5 help file for details on the updates.

Support For ARM Platforms

The spec package can now be built to run on ARM platforms such as the Raspberry PI or BeagleBone Black. Contact CSS for details on OS support.

Fix To Enable Support For Baltic Scientific Instruments Si(Li) Detector

The BSI detector support documented in the spec release 6.02.09 release notes was not actually available due to a coding error. That issue has now been corrected.

Fix For whatis()

A old bug in the built-in whatis() function that could incorrectly identify a local variable as a macro has been fixed. Although unlikely, if a user defined a macro named f, the show_motor_info() macro function used by wa, lm, etc. would fail due to this whatis() bug.

(Please see release 6.02 introduction below.)

December 29, 2014 - RELEASE 6.02.11

Fix For Amptek MCA8000D

An Amptek firmware update (version 6.07.00) broke spec's support for the MCA8000D by changing the command used to set the preset time from PRET to PREL. This spec update recognizes the new firmware and uses the new command.

December 15, 2014 - RELEASE 6.02.10

Fix For tango_io() Crash

A bug that could cause a crash when using tango_io() with a TANGO device that was not in the TANGO database has been fixed.

December 4, 2014 - RELEASE 6.02.09

Support For Baltic Scientific Instruments Si(Li) Detector

This spec release supports the Baltic Scientific Instruments Si(Li) Detector type SER-25 based on the SP350 controller board. The device is configured as an MCA-type instrument and uses a serial interface. See the bsi_sp350 help file for details.

Trinamic TMCL Updates

The recently added Trinamic TMCL motor controller support has been updated so that parameters that can be stored in EEPROM will be saved to EEPROM when set using motor_par() or when configured as nonstandard optional parameters in the config file. In addition, spec can now restore the position registers when a power cycle has been detected. To enable the latter feature, the controller parameter "check_interval" needs to be added to the config file. See the tmcl help file for details on both new features.

Fix For HDF5 Data Frames With 1D Arrays

A bug with the new HDF5 support where the frames option wasn't working for one-dimensional arrays has been fixed.

Update For Escan Macro

The standard Escan macro will now use the global UP variable to set the number of decimal digits displayed on the screen for the monochromator motor positions, just as is done with the standard motor scans. The UP default value is 4.

November 7, 2014 - RELEASE 6.02.08

splot Updates

This spec release includes various improvements to the Python splot utility, including a new splot_cntl() "marker" option to create vertical marker lines on the plot. See the files in the splot distribution docs directory for detailed descriptions, particularly the development log and command server documentation.

Improvement In the ser_par() "queue" Option

Previously, the "queue" option for the ser_par() command would return the number of characters available in spec's read-ahead buffer. That buffer has bytes from a previous ser_get() call that were returned by the system read() call, but beyond the specified byte count or end-of-string match. The "queue" option will now return that same value if it is nonzero. However, if spec's read-ahead buffer is empty, the code will check if any characters are available in the kernel buffer and return that value.

New Serial Debugging Option For Hex Output

For serial device I/O, spec debug level 128 uses octal escape sequences to represent unprintable characters. If debug level 0x400000 is also set, the debugging output will use a hexadecimal format for all bytes, as has been possible for socket debugging since spec release 5.05.05-5.

New Invocation Option For plotselect

When invoked with arguments, the plotselect macro now accepts a comma-separated list of counter numbers or mnemonics to set which counters are to be plotted. This is in addition to the still supported space-separated list of counter numbers or mnemonics invocation. When invoked without arguments, plotselect still runs in interactive menu mode.

More Robust Server-Mode Debugging

An issue in server mode with debug levels 0x1000 and 0x100000 (for debugging server-client communications and thread locks) that could cause crashes has been addressed.

Updates For Trinamic TMCL Motor Controller Support

The preliminary support for the Trinamic TMCL motor controllers now includes new commands to access the I/O ports. See the tmcl help file for more details.

Support For NI GPIB Version 3.2 Libraries

It is now possible to link with version 3.2 of the National Instruments GPIB libraries for Linux. However, CSS still recommends using spec's built-in support. See the nigpib file for more information.

Fix For NI GPIB-ENET/1000 gpib_put()

An old bug where a gpib_put() of more than 500 bytes would fail when using spec's built-in support for the National Instruments GPIB-ENET/1000 has been fixed.

Fix For Mythen 1.3 Firmware

Support for the older Dectris Mythen MCA version 1.3 firmware that was inadvertently broken in spec release 6.00.11 is now fixed.

Fix For Measurement Computing USB-CTR04 Detection

An issue, where spec had the wrong USB device ID coded for the Measurement Computer USB-CTR04 with the result that spec did not detect that device, has been fixed. The device ID for the USB-CTR08 was correct.

Fix For Crash With Incomplete terminfo Description

A bug, where spec could crash with the spec_menu() function if certain function-key sequence descriptions were missing from a terminfo entry, has been fixed.

Preliminary Support For Seven-Circle Geometry sevc

Preliminary support for a new seven-circle diffractometer geometry is included in the source file geo_sevc.c. Choose sevc as the geometry type during spec installation. To accommodate the seven geometry motors, orientation-matrix macros that were based on a maximum of six geometry motors have been updated to work with seven.

September 10, 2014 - RELEASE 6.02.07

Fix For remote_poll()

Updates in spec release 6.02 to allow more flexibility in specifying the name of the spec server inadvertently broke the remote_poll() function. That issue is now fixed.

Fix For GE Fanuc SBS (Bit-3) Driverless Support

Optimizer improvements in gcc release 4.8 broke the spec driverless support for the GE Fanuc (formerly SBS, formerly Bit-3) PCI-to-VME model 61x/62x controller boards (in at least some configurations). This spec release fixes that issue.

Preliminary Support For Saving To HDF5 FILES

This spec release features new functions to save data using the HDF5 standard. See the new hdf5 help file for details. In order to enable the functions, spec must be linked with the HDF5 library, which can currently be configured by setting the site_lib ("extra library flags") installation parameter to include the library, as in site_lib=-lhdf5. This preliminary support expects version 1.8.13 of the library, although will still function if linked with an earlier 1.8 release. Future releases will include a compatible library version. The function syntax and usage in this preliminary release is subject to change. Please contact CSS directly for additional information.

August 16, 2014 - RELEASE 6.02.06

Fix For Struck SIS1100

Optimizer improvements in gcc release 4.8 broke the spec driverless support for the Struck SIS1100 PCI and PCIe VME controller boards (in at least some configurations). This spec release fixes that issue.

August 6, 2014 - RELEASE 6.02.05

Updates and Fixes For Phytron phyMOTION

The recently introduced Phytron phyMOTION support has been updated to fix issues associated with identifying the crate configuration and with addressing I/O modules. In addition, the USB interface (which appears as a serial device to spec) is now supported. Also, spec's udev rules file for Linux platforms now includes a rule to create a /dev/phymotion special device when the controller is connected.

Support For Micos Venus-1

This spec release includes support for the old Micos Venus-1 programming syntax, such as used on the Corvus Eco model motor controller. The configuration is the same as for the Venus-2 and Venus-3 controllers. The spec code automatically selects the appropriate syntax version to use.

Added "init_sequence" Parameter For MDrive Motors

The MDrive motor controller support now recognizes a parameter named "init_sequence". The parameter must be set in the config file (type p from the motor screen in the configuration editor to access nonstandard optional parameters). The string value of the parameter can contain a sequence of S and/or D commands separated by semicolons to configure the I/O points, such as:

S1=2,0,1;S2=3,0,1

That string would set input 1 as the plus limit, input 2 as the minus limit and both inputs as active low and current sources.

The "init_sequence" commands will be sent when reading the config file on start up or after reconfig. The default initialization sequence is the following:

S1=2,0;S2=3,0;S3=1,1

That command will be sent prior to any "init_sequence" commands, but the assignments made using "init_sequence" will override the default sequence. Only S and D assignments are allowed in the sequence. See the MDrive programming manual for proper syntax for using the S and D commands. Also, the semicolons are not part of the MDrive syntax. spec will format the commands correctly when sent to the controller.

July 3, 2014 - RELEASE 6.02.04

Fix For -l logfile Crash

A bug introduced in release 6.02 that resulted in a crash when the -l logfile start-up option was used has been fixed.

Fixes For Background Subtraction With the Plotting Macros

Support for the background-subtraction feature in the plotting macros has been updated to restore functionality which disappeared with the spec 6.02 release. The ability to enable the feature is back in the setplot macro. After updating the spec installation, use the newmac command to load the revised macros.

The background-subtraction feature calculates a linear background using the endpoints of the scan for the counters selected for plotting with the plotselect or counters commands, subtracts that background from the data in SCAN_D and places the results in an array called SCAN_B. One can use the setplot macro to enable or disable background-subtraction or simply assign a value to the global variable BG. A nonzero value enables background subtraction. The commands splot, pts, lp_plot and plot use SCAN_B if BG is nonzero. The values CEN, pl_MIN, pl_MAX, pl_FWHM, etc. are calculated from the SCAN_B data after calling splot, pts, lp_plot or plot when background-subtraction is enabled. One of those macros needs to be called after setting BG to zero to have CEN, etc., calculated from SCAN_D.

Fix For Display Of Macros containing Non-ASCII Text

The prdef command and the show_state utility will now use octal escape sequences for non-ASCII bytes in the macro definition. Previously, characters with bit 8 set would display as a backslash followed by the ASCII representation of the remaining seven bits.

Fix For Output File Reference After Directory Change

Release 5.07.03-4 (fall 2007) broke a feature associated with output files and described in the spec Reference Manual as "spec remembers the directory the files are in when they are first opened. If the user changes spec's current directory, open files may be referenced either by the name with which the files were opened or by the correct path name relative to the current directory." That bug is now fixed.

Update To Macro-Hardware Motor "search" Keyword

The macro-hardware motor _cmd() function call for with keyword "search" has been modified so that the p2 parameter will only be set if the underlying chg_dial() function is called with an optional third argument or if the optional "home_position" parameter is set. See the mac_hdw help file for details.

June 25, 2014 - RELEASE 6.02.03

Support For Measurement Computing USB-CTR4 and USB-CTR8

spec supports the new USB-CTR4 and USB-CTR8 counter/timer modules from Measurement Computing. See the usbctr help file for details.

Backlash Compensation Support For Phytron PhyMotion Controllers

spec now programs the backlash compensation parameter (P25) on the Phytron PhyMotion controllers. When this parameter is set the controller will perform backlash compensation as part of a single move command. Normally, spec programs two moves when backlash is required.

Updates For splot Utility

The splot utility will now create a pop-up error window if there are problems opening a data file instead of silently fail. The code for identifying scan types from the scan name is now more robust.

June 15, 2014 - RELEASE 6.02.02

Fix For tango_put() Of Associative Arrays

A bug in the spec release 6.02 TANGO updates, where a tango_put() of an associative array did not include the last element of the array, has been fixed.

Fix For counter_par() Crash with PCI Counter/Timers

A crash that could occur when using counter_par() to access hardware features when PCI counter/timers were configured but not installed in the computer has been fixed. Affected cards were any of the am9513 based PCI cards, the National Instruments 6601 and 6602 PCI cards and the National Instruments X series PCIe cards.

Fixes For splot Utility

An issue where the splot utility could not read data files that contained motor scans of three or more motors (a3scan, a4scan, etc.) has been fixed. Another issue, where the FWHM was displayed with a negative number for scans that went from high to low values, has also been fixed.

June 2, 2014 - RELEASE 6.02.01

Support For HP/Agilent E2050/E5810 LAN/GPIB Gateway

This spec release includes initial support for the HP E2050 and Agilent E5810 LAN/GPIB gateway controllers.

May 20, 2014 - RELEASE 6.02

Introduction

Welcome to spec release 6.02. In addition to the usual assortment of new hardware support and bug fixes, this release has some noteworthy new features. The notes below are divided into four sections: new features, macro updates, bug fixes and hardware support. (The following notes are consolidated and reorganized from the 6.01 beta release notes, which are in the chg6_01 help file.)

First of the new features is the new interactive plotting utility called splot. splot not only does real-time plots of scan data, but also can read and display scans from spec data files. In addition, splot has controls to send commands to spec to position motors and start scans. Note, though, spec must be run in server mode (use the -S flag when starting) for splot to send commands to position motors or start scans.

Another added feature is the new built-in spec_menu() function that provides interactive menu configuration capabilities. The standard setplot, plotselect and setshow macros have been replaced with versions that use spec_menu(). A new mstartup macro replaces much of the configuration provided by the old startup macro. Additional menu-ized configuration macros will be forthcoming.

A new set of continuous scan macros, cscan, c2scan, cmesh, etc., performs rapid scans where the counters are read continuously as the motors move steadily from the start to end specified positions.

Be sure to either start fresh, as in spec -f, or run the newmac macro to read in the updated macros. Run setplot to choose to run the new splot utility.

Please read through the update notes below for a full list of updates. We at CSS look forward to your feedback. Thanks!

NEW FEATURES

New splot Utility

A new stand-alone plotting utility called splot is introduced with this spec release. The splot program is intended to replace the standard x11filt window and provide additional functions. The splot program uses shared-memory data arrays and spec server/client protocols to communicate with the spec process.

The splot program is written in Python and requires the PyQt4 and PyQwt5 packages. A script called install_splot_needs is included in the spec distribution that will try to install the required packages and their dependencies. One can also install the needed packages using whatever tools the particular Linux distribution includes.

To use the supplied script, go to the spec distribution directory and type:

sudo ./install_splot_needs [-y]

The -y flag means the package installation programs will assume a yes in response to queries to confirm additional package installation. The package installations programs (yum or apt-get, depending on Linux distribution) will likely download a dozen or more additional packages.

Note, the x11filt plotting is still available and can be used simultaneously with or instead of splot. Use the setplot macro to configure plotting.

New splot_cntl() Built-In Function

To support the tight integration of the new splot utility with spec, a new splot_cntl() function is provided to send and receive splot messages. .. See the splot_cntl help file for details.

New spec_menu() Function

A new function named spec_menu() is available for creating interactive menus. See the spec_menu help file.

array_plot() Will Now Plot One-Dimensional Arrays

The array_plot() function has been updated to plot one-dimensional data arrays, such as may be read from an MCA device. For such plots, the x-axis is set to the point number.

Unlimited Number Of Output Files

Previous releases of spec limited the number of open files (using the open(), on() or fprintf() functions) to 25. With this spec release, the built-in limit is removed. The number of files that can be opened is only constrained by the system limits.

Note, it is not a good idea to run up against the system limit. Some spec commands will cease to work if no more file descriptors are available from the system. Make sure that macros that open files have provision to close the files when no longer needed. Note also, the spec_par() "auto_file_close" option can be set to have spec automatically close files that haven't been accessed in the specified time. See the spec_par help file for details.

New Built-In OUTFILES Associative Array

spec will now maintain an associative array named OUTFILES that will hold information about all open output files. OUTFILES is a two-dimensional array. The first index is the name by which the file was opened using open(), on(), fprintf() or the -l outputfile start-up option. The element value for a second index of "name" is the first index. The element value for a second index of "path" is the full path name of the file. Additional elements may be added in the future. For example:

1048.FOURC> for (i in OUTFILES[]["name"])
1049.more>    printf("%10s %s\n", OUTFILES[i]["name"], OUTFILES[i]["path"])
      dlog /private/tmp/dlog
     data1 /private/tmp/data1
       tty /dev/tty
 /dev/null /dev/null

or

1053.FOURC> p OUTFILES[DATAFILE]["path"]
/private/tmp/data1

Note, the special built-in name "pipe" is not included in OUTFILES. The special built-in name "/dev/null" includes the full path in both "name" and "path" to work with the standard macros that always refer to that special file by the full path name.

New Filename Completion For do and qdo Macro Commands

Although do and qdo are defined as standard user-level macros, filename completion code has been added to automatically include directory paths contained in the global variable DO_DIR. Macro support for path lists in DO_DIR was added to the standard macros in spec release 6.00.05. Filename completion is available when spec is linked with the libedit or readline libraries.

Support For 64-Bit Integer Data Arrays

New keywords long64 and ulong64 are available to create 64-bit signed and unsigned integer data arrays, respectively. The 64-bit arrays can be used in all contexts that accept array data types. Note, though, spec will only work with 52 bits of precision in some contexts, since the internal code uses double-precision floating point format for many operations associated with spec user-level symbols. (Double floats use 52 bits for the significand and the remaining 12 bits for sign and exponent). The spec_shm.h and spec_server.h files included in the spec distribution have been updated to include definitions for 64-bit data-array data types.

The fmt_read() and fmt_write() Functions Now Work With Subarrays

The fmt_read() and fmt_write() commands, used to read and write binary data in standard and user-created formats, will now work using subarray syntax. Previously, the commands only worked with full data arrays.

New input() Option To Read Arrow Keys and Forward Delete

The cbreak mode for input() now has an option to return special codes when arrow keys or the forward-delete key are pressed. Type h input at the spec prompt or see the funcs help file for details.

New IS_SERVER Built-In Variable

A new built-in variable named IS_SERVER will be nonzero if spec is running in server mode (invoked with the -S option). When in server mode, IS_SERVER will be set to the port number on which the spec server is listening.

New HOSTNAME Built-In Variable

A new built-in variable named HOSTNAME will be set to the hostname of the computer running spec.

New Flexibility For Identifying spec Server

The configuration of spec server motors and counters and the built-in functions for communicating with a spec server all require an argument of the form host:port or host:spec to identify the host and the port on which the server is listening. With this new release, if the host part of the string is missing, spec will use "localhost". In addition, it is now allowed to mix references to the same server by port number and by spec process name. See the server help file for details.

Improvements For remote_stat()

spec will now include a check for pending connections to spec servers during a call of remote_stat(), making it possible for a loop that tests the return value of remote_stat() to determine when a server connection comes up.

Also, remote_stat() will no longer return "lost" for a previously open connection after a new call of remote_par(..., "connect") for the same host is made.

Length Of Allowed Input Line Increased

The maximum length of input records has been increased from 512 to 4096 bytes.

"SignedInteger" Recognized As an ESRF Data Format Data Type

Some programs that use the ESRF data format (EDF) use "SignedInteger" instead of "SignedLong" to characterize the 32-bit integer data type. The fmt_esrf.c file included in the spec distribution that implements the EDF format for the fmt_read() and fmt_write() functions now recognizes "SignedInteger" as a data type.

MACRO UPDATES

New Continuous Scan Macros

New cscan, c2scan, c3scan, c4scan and cmesh standard macros for on-the-fly scans are included with this spec release. With these scans, the counters and motor positions are read continuously as the motors move from the start to end positions. The scan arguments include the start and finish positions for each motor and the total time for the scan. The speed of each motor will be set to approximate that scan time. An additional optional argument specifies a sleep interval before each counter reading. The cmesh scan does a series of single motor on-the-fly scans as an additional motor is stepped through a specified range. The scan direction is reversed after each on-the-fly scan to minimize overhead time. See the comments in the cscan.mac source file for details.

Move Macros Now Allow Variables For Motor Mnemonics

The _mmov internal macro used by the standard motor-move macros (mv, umv, mvr, umvr, mvd and umvd) will now work if the motor number or mnemonic argument is a variable. For example:

for (i = 0; i < 5; i++) mv i 10

will move motors 0 through 4. Similarly:

{ par="phi"; umv par 4; par=th; umv par 1 }

will work. In the first instance, the symbol par is assigned a string version of the motor mnemonic. In the second, par is assigned the number value of the mnemonic.

Name-Space Issues with Moving and Counting Macros Addressed

The local variable names used within the _mmov macro (used by mv, umv, mvr, umvr, mvd and umvd) now all start with an underscore to lessen the chance of a name conflict with local definitions in user_getangles, user_premove, user_postmove, etc.

In addition, get_angles in the wm and _update() macros has been replaced with a new macro function called get_angles_func(). The new macro function serves as a wrapper to get_angles, insulating local variables that appear in user_getangles from symbols used in the calling macros. A get_counts_func() provides a similar wrapper to get_counts and is used in the updating counting macro uct.

Fix For Display of Disabled Counters In uct

The uct macro has been fixed to properly format the display when disabled counters are included.

Update For counters Macro

Counter names, in addition to counter numbers and mnemonics, are now included in the list of counters displayed with the counters and show_counters() macros.

Updated and Improved Plotting Macros

The standard plotting macros have been updated and revised to fix some old problems and to accommodate the new splot utility, which is an alternative to the standard spec x11filt plots.

The SCAN_D data array now defaults to a shared-memory object to accommodate the splot program. In addition, SCAN_D now includes data for all the configured counters at each data point along with HKL values for motor scans that include geometry motors.

New scan_info_update() and scan_meta_update() macros have been worked into the standard macros to fill the shared memory info and meta region with details of the spec configuration and scan status for the benefit of splot.

Many of the internal macros have been reworked. If a site's local macros use internal macros from the macros/plotarray.mac file, those local macros should be checked and possibly revised to maintain compatibility.

Epoch Now Saved To Data File With Added Precision

The default _loop macro, called at each point of the standard scans, will now save the epoch value for each scan point to millisecond resolution. Previously, the value was saved as an integer. The value is the difference between the current time and value of the EPOCH variable. The value for EPOCH is set to the current time when a new data file is created and is saved in the data file header.

Revised setplot, plotselect and setshow Macros Use New spec_menu()

The setplot macro to configure the scan plots, the plotselect macro to select which counters to plot and the setshow macro to configure motor and counter screen displays now use the new spec_menu() function.

New mstartup Macro

A new mstartup macro (for menu startup) uses the new spec_menu() function and replaces much of the functionality of the standard startup macro.

New CP_FILTER_CMD Option For cplot_plot Macro

The standard cplot_plot macro now recognizes a CP_FILTER_CMD global variable. If it exists, the cplot_plot macro will evaluate its string value to create a dynamic CP_FILTER command. For example, the following will produce pdf files using the C-PLOT pdf filter containing the current scan number as part of the pdf filename:

CP_FILTER_CMD = 'sprintf("pdf scan_%04d.pdf", SCAN_N)'

See the macro source file macros/cplot.mac in the spec distribution for implementation details.

New COUNT_FMT_MAXCH Option For Updated Counting

The number of counters displayed while doing an updated count with the uct macro can be limited to the number of counters in the new global variable COUNT_FMT_MAXCH. If the value is zero, all the counters will be displayed. The setshow macro will prompt for a value.

newfile Macro Updated and Reorganized

The standard newfile macro has been reorganized and now does the bulk of its work in macro functions. The arguments are checked and the file created in newfile_f(). That macro calls newfile_head() to create the file header. The newfile_f() macro is also called from the new mstartup macro.

A new user_newfile macro hook is called at the end of newfile_f(). By default, the macro is empty. Also, user_newfile and user_filehead are now wrapped in macro functions to avoid name-space conflicts with the local variables in the newfile macros.

Finally, the chk_file utility that used to be used to test if an existing file begins with the standard header has been replaced with calls of built-in spec functions.

See the macro source file macros/file.mac in the spec distribution for implementation details.

BUG FIXES

Fix For Drifting Pseudomotors

An old problem associated with the internal rounding of motor positions calculated for pseudomotors from real motors or for real motors from pseudomotors, such as with a kappa head on a fourc, fivec or psic diffractometer, has been addressed. The rounding may have led to position drift during repetitive movements in certain configurations.

Fix For x11filt Retained-Pixmap Mode Text Garbling

The x11filt plotting utility can use either backing store or a retained-pixmap to maintain content that is drawn when the plot window itself is not visible. Backing store is a server feature. The retained pixmap is implemented within the x11filt code. The default mode for x11filt is to use backing store, but on some platforms the default X server configuration has backing store disabled. In that mode, x11filt uses the retained pixmap. An old (twenty-one year) bug associated with writing labels to the x11filt retained-pixmap buffer that resulted in garbled labels when a window becomes visible that had been updated when hidden has been fixed.

Fix For array_copy()

A bug, where an "Out of temporary cells" message would appear after somewhat less than 20 calls of the new array_copy() function (but only when the first argument was a subarray), has been fixed.

Fixes For Server/Client Issues

Several old issues with spec server/client mode have been addressed. A bug where a client may not find a previously open server specified by host and port number when the client is already attached to multiple servers has been fixed. A deadlock hang in server mode that could occur if a keyboard ^C came while socket connections were being opened from both the main thread and the server read thread has been eliminated.

Fix For Rare Crash In Server Mode

When running in server mode, a mutual-exclusion lock around the code that spec uses to maintain the list of socket connections now exists. Previously, data corruption and a crash could sometimes occur if clients were making and breaking connections to a spec server that was also making socket connections from the main command loop. This flaw has been present since the introduction of spec's server mode.

Fix For Detection of Invalid Octal Values In Strings

An old issue where strings starting with the characters "08" or "09" would evaluate to zero in certain contexts, in particular in conditional statements, has been fixed. The problem was that the C code improperly identified the strings as octal constants because of the leading zero, but a scan for an octal number would return a zero value since 8 and 9 are not valid octal digits.

Fix For date() Glitch

A bug in the date() implementation where two successive values for the time of day displayed using the format date("%s.%.6") could result in anomalous values such as:

1382650482.99999905 1382650482.00001097,

where the second invocation shows an earlier time than the first, has been fixed. Note, a more straightforward way to obtain the same information is using the time() function, which never had such an issue.

Fix For decode() Of Two-Dimensional Associative Arrays

The built-in decode() function will now properly decode two-dimensional associative arrays. See the encode help file for details on encode() and decode().

Fixes For array_dump() To File

A problem when calling array_dump() where the specified file could not be opened and spec would show the same error message repeatedly has been fixed. Also, a small memory leak when calling array_dump() with the optional filename argument has fixed fixed.

Duplicate Port Numbers In sock_par("show") Eliminated

The strings printed with sock_par("show") and returned by sock_par("info") no longer list the same port number twice after the host.

Fix For Counter Mnemonic Check In Configuration Editor

A old bug in the configuration editor, where a check for illegal use of spaces in the counter mnemonics was applied to strings in row 2 of the scaler screen and not the mnemonics in column 2, has been fixed.

Fix For tango_put()

An old programming error in the implementation of the tango_put() function that has only recently manifested on 64-bit Linux builds has been fixed. Before the fix, a tango_put() call of a scalar attribute could pass an incorrect value.

HARDWARE SUPPORT

Support For National Instruments X Series Counter/Timers

The National Instruments 6300 X series PCIe and PXIe 6300 boards are now supported as counter/timers. The digital I/O capabilities of the boards can also be used. The analog-to-digital and digital-to-analog capabilities are not yet supported. See the ni63xx help file for details.

Hardware Support For the New Focus 8742 Motor Controller

This release includes initial support for the New Focus (Newport) model 8742 Picmotor Controller/Driver. The current support is limited to the Ethernet interface. The USB interface and RS-458 network support will be added when needed.

Support For SmarAct SCU Motor Controllers

spec now supports the SmarAct SCU model motor controller in addition to the MCS model already supported. See the smaract help file for details.

Support For C400 Counter/Timer

This spec release contains support for the C400 counter/timer made by Pyramid Technical Consultants and sold by FMB-Oxford. The spec support is over the serial interface only. See the c400 help file.

Preliminary Support For Trinamic TMCL Motor Controllers

This spec release contains preliminary support for the TMCL line of motor controllers from Trinamic. Both serial and CAN interfaces are supported.

Preliminary Support For Phytron PhyMotion Motor Controllers

This spec release contains preliminary support for the Phytron PhyMotion motor controllers over a socket interface. The configuration editor controller type is PHYMO.

New Serial Baud Rate and Other Fixes

spec now recognizes a baud rate or 600000 for serial devices. In addition, some issues with the code to set certain non-standard baud rates (7200, 14400 and 28800) on Linux have been addressed.

Updated Behavior For Several Motor Controllers

An update to the motor control error handling will now abort the move if an error occurs during the "prestart_one" and "prestart_all" phase of sending the commands. A handful of motor controllers are affected by this change, namely the Oriel 18092, Advanced Control System MCU, Missouri Research Reactor motors, MicroMo MVP-2001, New Focus Picomotor 875x, Newport XPS, SPring-8 Equipment Manager motors, along with the macro hardware motor support. In practice, one is not likely to see any difference in behavior with the real motor controllers. However, the updated behavior may be useful with the macro hardware motor support.

Updates For the Newport XPS Motor Controllers

Previously, spec would automatically send the home-search command to a Newport XPS motor group if the XPS reported that motors in the group were in the not-referenced state. When an XPS motor is in the not-referenced state, nothing can be done with the motor until the home-search command has been sent. This spec release changes the default behavior so that the home-search command is not sent automatically. Instead, a message is printed during hardware configuration or when a move is attempted telling the user that the home command must be run.

The previous default behavior of automatic home-search can be restored on a controller-wide basis by adding the non-standard optional controller parameter "auto_home" to the hardware configuration file. A value of 1 for the parameter will allow spec to send the home-search command during hardware configuration. A value of 2 will allow spec to send the home-search command any time it is needed.

The 19 additional states added to the XPS internal state machine since the original spec XPS support was written are now recognized.

spec will now show warning messages if a move is halted by the controller putting a motor in the disabled state because of a following error (or several other conditions).

If a motor reports it is in the not-initialized state due to the error "both ends of run activated", spec assumes that to mean the motor is disconnected and disables access to that motor to avoid continued error messages. To re-enable access to the motor, it is necessary to fix the problem and restart spec or run the reconfig command.

Some problems with configuring XPS motor groups with more than one motor have been addressed. (Apparently, nobody had been using that configuration with spec.) Yet to be resolved are issues where spec sends commands to perform backlash. This issue can be worked around by configuring backlash in the XPS system file and setting the spec backlash parameter to zero.

Finally, the commands to set speed and acceleration are handled more efficiently.

Improved Abort Handling for ACS MCB-4B Motor Controller

A problem with the ACS MCB-4B motor controller, where communication errors occurred after sending a motor-stop command associated with a ^C user abort, has been addressed. spec now gives the controller motors time to decelerate before sending a command after sending the stop command, as the controller firmware appears to require such a delay.

Several TANGO Updates

The tango_get() and tango_put() functions have new usage options to read or set multiple attributes in a single call. See the updated tango help file for details.

The tango_get() return value can now be used to check if the data quality of the values read is "invalid".

Calling any of the tango_io(), tango_get() and tango_put() functions with an invalid attribute is no longer a fatal error. Instead, spec will return -1 and place a message in TANGO_ERR.

The tango_io(), tango_get() and tango_put() should now work well with associative array and all data array input and output types for any array (spectrum or image) TANGO data type.

If a return argument is included for tango_io() scalar-valued commands, tango_io() will return zero on success and place the return value in the supplied argument.

TANGO_ERR can now be assigned a numeric -1 value rather than the string "-1" to suppress error messages on the next call of the TANGO functions.

spec now supports the DEVVAR_LONG64ARRAY and DEVVAR_ULONG64ARRAY as input and output types for tango_io(), as input types for tango_get() and as output types for tango_put().

Notes For Beta Release

Thanks for taking a look at the spec 6.01 beta release. In additional to the usual assortment of bug fixes and new hardware support, this spec release contains some noteworthy new features. Please explore them and report back to CSS any comments, questions, concerns or suggestions.

First on the list of new features is the new interactive plotting utility called splot. splot not only does real-time plots of scan data, but also can read and display scans from spec data files. In addition, splot has controls to send commands to spec to position motors and initiate scans. Note, though, spec must be run in server mode (use the -S flag when starting) in order to send commands to position motors or do scans from splot.

Another added feature is a new built-in spec_menu() function which provides interactive menu configuration capabilities. The standard setplot, plotselect and setshow macros have been replaced with versions that use spec_menu(). A new mstartup macro replaces much of the configuration provided by the old startup macro. Additional menu-ized configuration macros will be forthcoming.

A new set of continuous scan macros, cscan, c2scan, etc., performs rapid scans where the counters are read continuously, while the motors move steadily from the scan starting to ending positions.

The splot program is written in Python and requires the PyQt4 and PyQwt5 packages. A script called install_splot_needs is included in the spec distribution, which will attempt to install the required packages and their dependencies. One can also install the needed packages using whatever tools the particular Linux distribution includes. To use the supplied script, go to the spec distribution directory and type:

sudo ./install_splot_needs [-y]

The -y flag is optional. If included, the package installation programs will assume a yes in response to queries to confirm additional package installation. The above Python packages do have dependencies, so the package maintenance programs (yum or apt-get, depending on Linux distribution) will likely download a dozen or so additional packages.

Be sure to either start fresh, as in spec -f, or run the newmac macro to read in the updated macros. Run setplot to choose whether to use the new splot utility, the traditional X11 plotting utility, neither or both.

Please read through the update notes below for a full list of updates. We at CSS look forward to your feedback. Thanks!

May 2, 2014 - RELEASE 6.01.12 Beta

Include install_splot_needs Script In Distribution

The install_splot_needs script is now included in the distribution.

Updated setplot Macro

A number of splot-related options, such as symbol size and whether to display a grid have been added to the setplot macro.

Fixes For splot_cntl() Function

The splot_cntl() function has been updated to require semicolons to separate multiple commands in order to be able to parse the options associated with the "plot" command.

Faster splot Start Up

The server connection to the splot program is now faster on start up.

Updated Newport XPS Support

The Newport XPS motor controller code will now show warning messages if a move stops because of a following error or any of the other events that cause the controller to put the axis in a disabled state. Also, the commands to set the motor speed and acceleration are now done more efficiently.

April 14, 2014 - RELEASE 6.01.11 Beta

Fixes For cmesh Macro

The string assigned to the HEADING symbol for the cmesh macro is now correct.

Fixes and Performance Improvements For the splot Utility

This release contains fixes and improvements for the splot utility.

April 6, 2014 - RELEASE 6.01.10 Beta

Fix For Drifting Pseudomotors

An old problem associated with the internal rounding of motor positions calculated for pseudomotors from real motors or for real motors from pseudomotors, such as with a kappa head on a fourc, fivec or psic diffractometer, has been addressed. The rounding could lead to position drift during repetitive movements in certain configurations. The get_commanded macro, introduced in the first 6.01 Beta release to work around the problem, has been eliminated, as it is no longer needed.

Updates For spec_menu()

The ^L redraw command will now redraw the menu using the current window size if the window size has been changed. An issue with compressing numerical list items when the window is too narrow to display the full text has been fixed.

Fix For newfile Macro When Opening Existing File

An unnecessary warning message about the last scan number in existing data files with more than nine scans has been fixed. This bug was introduced with the reorganization of the newfile macros in the initial 6.01 Beta release.

"SignedInteger" Recognized As an ESRF Data Format Data Type

Some programs that use the ESRF data format (EDF) use "SignedInteger" rather than the "SignedLong" to characterize the 32-bit integer data type. The fmt_esrf.c file included in the spec distribution that implements the EDF format for the fmt_read() and fmt_write() functions now recognizes "SignedInteger" as a data type.

Fix For tango_put()

An old programming error in the implementation of the tango_put() function that has only recently manifested on 64-bit Linux builds has been fixed. Before the fix, a tango_put() call of a scalar attribute could pass an incorrect value.

Support For National Instruments X Series Counter/Timers

The National Instruments 6300 X series PCIe and PXIe 6300 boards are now supported as counter/timers. The digital I/O capabilities of the boards can also be used. The analog-to-digital and digital-to-analog capabilities are not currently supported. See the ni63xx help file for details.

Updates For C400

The support for the FMB-Oxford C400 counter/timer has been updated. See the new c400 help file.

Fixes and Performance Improvements For the splot Utility

This release again contains various fixes and improvements for the splot utility.

March 24, 2014 - RELEASE 6.01.10 Beta

Refinements and Enhancements To spec_menu() Function

The spec_menu() function will now automatically scroll the menu choices if there are more items than fit in the available space. Also, item descriptions and values are now compressed or scrolled to fit a narrow display area. In addition, a new "toggle" key is available that is similar to "bit" but is not limited to 52 items. See the spec_menu help file for details.

The plotselect macro (also used by counters has been updated to use "toggle" instead of "bit" in the spec_menu() calls to remove the limit on the number of counters.

Fix For Counter Mnemonic Check In Configuration Editor

A old bug in the configuration editor, where a check for illegal use of spaces in the counter mnemonics was applied to strings in row 2 of the scaler screen and not the mnemonics in column 2, has been fixed.

March 12, 2014 - RELEASE 6.01.09 Beta

Fix For array_copy()

A bug, where an "Out of temporary cells" message would appear after a bit less than 20 calls of the new array_copy() function (but only when the first argument was a subarray), has been fixed.

Fixes and Performance Improvements For the splot Utility

This release contains various fixes and improvements for the splot utility.

March 5, 2014 - RELEASE 6.01.08 Beta

Fixes For Server/Client Issues

Several old issues with spec server/client mode have been addressed. A bug where a client may not find a previously open server specified by host and port number when the client is already attached to multiple servers has been fixed. A deadlock hang in server mode that could occur if a keyboard ^C came while socket connections were being opened from both the main thread and the server read thread has been eliminated.

Updates For Continuous Scan Macros

Several improvements have been made to the screen display and plotting during for continuous scan cscan and cmesh macros.

Updates For splot Utility

Various fixes and improvements for the splot utility are included.

February 26, 2014 - RELEASE 6.01.07 Beta

Fix For spec_menu() Cursor Positioning

An issue introduced with the switch to the ncurses library that resulted in the cursor being incorrectly positioned in the first column for some menu configurations has been fixed.

Continuous Scan Macros Now Include a cmesh Macro

The continuous-scan macros have been updated to include a cmesh scan. The cmesh scan does a series of single motor on-the-fly scans while an additional motor is stepped through a specified range. The scan direction is reversed after each on-the-fly scan to minimize overhead time.

In addition, the cscan count time has been decreased from 3600 seconds to 999 seconds to accommodate counter/timers with lower maximum count times.

Fix For resize_scan_data()

A syntax error in the updated definition for the resize_scan_data() macro (associated with the standard plotting macros) has been fixed. The error would only have been seen for scans with more than 4096 points.

Fix For pl_MIN, pl_MAX, pl_SUM and pl_SUMSQ Definitions

The definitions for pl_MIN, pl_MAX, pl_SUM and pl_SUMSQ have been belatedly updated to match the changes in the rest of the plotting macros.

The fmt_read() and fmt_write() Functions Now Work With Subarrays

The fmt_read() and fmt_write() commands, used to read and write binary data in standard and user-created formats, will now work using subarray syntax. Previously, the commands could only work with full data arrays.

Preliminary Support For C400 Counter/Timer

This spec release contains very preliminary support for the C400 counter/timer made by Pyramid Technical Consultants and sold by FMB-Oxford. The spec support is over the serial interface only.

Preliminary Support For Trinamic TMCL Motor Controllers

This spec release contains very preliminary support for the TMCL line of motor controllers from Trinamic. Both serial and CAN interfaces are supported.

February 22, 2014 - RELEASE 6.01.06 Beta

Fix For Rare Crash In Server Mode

When running server mode, there is now a mutual-exclusion lock around the code that spec uses to maintain the list of socket connections. Previously, data corruption and a crash could sometimes occur if clients were making and breaking connections to a spec server that was also making socket connections from the main command loop. This flaw has been present since the introduction of spec's server mode.

Reversion Of Fix For the @ Indirection Operator

A fix to address an issue with the @ indirection operator and two-dimensional associative array elements introduced with the first 6.01 release has been removed, as it caused more problems than it fixed.

February 14, 2014 - RELEASE 6.01.05 Beta

Hardware Support For the New Focus 8742 Motor Controller

This release includes initial support for the New Focus (Newport) model 8742 Picmotor Controller/Driver. The current support is limited to the Ethernet interface. The USB interface and RS-458 network support will be added when needed.

Epoch Now Saved To Data File With Added Precision

The default _loop macro, called at each point of the standard scans, will now save the epoch value for each scan point to millisecond resolution. Previously, the value was saved as an integer. The value is the difference between the current time and value of the EPOCH variable. The value for EPOCH is set to the current time when a new data file is created and is saved in the data file header.

Duplicate Port Numbers In sock_par("show") Eliminated

The strings printed with sock_par("show") and returned by sock_par("info") no longer list the same port number twice after the host.

January 27, 2014 - RELEASE 6.01.04 Beta

Fix For Smaract Motor Controller

This release has a fix to accommodate the Smaract MCS motor firmware update which had broken spec's presence test for the controller.

January 25, 2014 - RELEASE 6.01.03 Beta

Fix For spec_menu() Function

This release fixes an issue with the display of values when using the "min" and "max" menu items in the spec_menu() function.

Update For counters Macro

Counter names, in addition to counter numbers and mnemonics, are now included in the list of counters displayed with the counters and show_counters() macros.

January 23, 2014 - RELEASE 6.01.02 Beta

spec_menu() Now Uses the ncurses Library

The spec_menu() function now uses the ncurses library to draw to the screen, which is much more efficient than the hand-coding in the previous version.

Name-Space Issues with Moving and Counting Macros Addressed

The local variable names used within the _mmov macro (used by mv, umv, mvr, umvr, mvd and umvd) now all start with an underscore to lessen the chance of a name conflict with local definitions in user_getangles, user_premove, user_postmove, etc.

In addition, get_angles in the wm and _update() macros has been replaced with a new macro function called get_angles_func(). The new macro function serves as a wrapper to get_angles, insulating local variables that appear in user_getangles from symbols used in the calling macros. A get_counts_func() provides a similar wrapper to get_counts and is used in the updating counting macro uct.

Move Macros Now Allow Variables For Motor Mnemonics

The _mmov internal macro used by the standard motor-move macros (mv, umv, mvr, umvr, mvd and umvd) will now work if the motor number or mnemonic argument is a variable. For example:

for (i = 0; i < 5; i++) mv i 10

will move motors 0 through 4. Similarly:

{ par="phi"; umv par 4; par=th; umv par 1 }

will work. In the first case, the symbol par is assigned a string version of the motor mnemonic. In the second case, par is assigned the number value of the mnemonic.

splot Updated

The version of the splot utility in this spec release includes fixes and performance enhancements.

Fix For Display of Disabled Counters In uct

The uct macro has been fixed to properly format the display when disabled counters are included.

December 18, 2013 - RELEASE 6.01 Beta

New splot Utility

A new stand-alone plotting utility called splot is introduced with this spec release. The splot program is intended to replace the standard x11filt window and provide additional functions. The splot program uses shared-memory data arrays and/or spec server/client protocols to communicate with the spec process.

The splot code is written in Python and the source is included in the spec distribution. The current version of splot requires the PyQwt package.

Note, the x11filt plotting is still available and can be used simultaneously with splot. Use the setplot macro to configure plotting.

New spec_menu() Function

A new function named spec_menu() is available for creating interactive menus. See the spec_menu help file.

New splot_cntl() Built-In Function

To support the tight integration of the new splot utility with spec, a new splot_cntl() function is provided to send and receive splot messages. See the splot_cntl help file for details.

array_plot() Will Now Plot One-Dimensional Arrays

The array_plot() function has been updated to plot one-dimensional data arrays, such as might be read from an MCA device. For such plots, the x-axis is set to the point number.

Updated and Improved Plotting Macros

The standard plotting macros have been updated and revised to fix some old problems and to accommodate the new splot utility, which is an alternative to the standard spec x11filt plots.

The SCAN_D data array now defaults to a shared-memory object to accommodate the splot program. In addition, SCAN_D now includes data for all the configured counters at each data point along with HKL values for motor scans that include geometry motors.

New scan_info_update() and scan_meta_update() macros have been worked into the standard macros to fill the shared memory info and meta region with details of the spec configuration and scan status for the benefit of splot.

Many of the internal macros have been reworked. If a site's local macros use internal macros from the macros/plotarray.mac file, those local macros should be checked and possibly revised to maintain compatibility.

Revised setplot, plotselect and setshow Macros Use New spec_menu()

The setplot macro to configure the scan plots, the plotselect macro to select which counters to plot and the setshow macro to configure motor and counter screen displays now use the new spec_menu() function.

New mstartup Macro

A new mstartup macro (for menu startup) uses the new spec_menu() function and replaces much of the functionality of the standard startup macro.

New Continuous Scan Macros

New cscan, c2scan, c3scan and c4scan standard macros for on-the-fly scans are included with this spec release. With these scans, while the motors move from the start to end positions, the counters and motor positions are read continuously. The scan arguments include the start and finish positions for each motor and the total time for the scan. The speed of each motor will be set to approximate that scan time. An additional optional argument specifies a sleep interval between each counter reading. See the comments in the cscan.mac source file for details.

Unlimited Number Of Output Files

Previous releases of spec limited the number of open files (using the open(), on() or fprintf() functions) to 25. With this spec release, there is no built-in limit. The number of files that can be opened is only constrained by the system limits.

Note, it is not a good idea to run up against the system limit. A number of commands in spec will cease to work if no more file descriptors are available from the system. Make sure that macros that open files have provision to close the files when they are no longer needed. Note also, the spec_par() "auto_file_close" option can be set to have spec automatically close files that haven't been accessed in the specified time. See the spec_par help file for details.

New Built-In OUTFILES Associative Array

spec will now maintain an associative array named OUTFILES that will hold information about all the currently open output files. OUTFILES is a two-dimensional array. The first index is the name by which the file was opened using open(), on() or fprintf(). For the second index "name", the value is the same as the first index. For the second index is "path", the value is the full path name. For example:

1048.FOURC> for (i in OUTFILES[]["name"])
1049.more>    printf("%10s %s\n", OUTFILES[i]["name"], OUTFILES[i]["path"])
      dlog /private/tmp/dlog
     data1 /private/tmp/data1
       tty /dev/tty
 /dev/null /dev/null

or

1053.FOURC> p OUTFILES[DATAFILE]["path"]
/private/tmp/data1

Note, the special built-in name "pipe" is not included in OUTFILES. The special built-in name "/dev/null" includes the full path in both "name" and "path" to work with the standard macros that always refer to that special file by the full path name.

Support For 64-Bit Integer Data Arrays

New keywords long64 and ulong64 are available to create 64-bit signed and unsigned integer data arrays, respectively. The 64-bit arrays can be used in all contexts that accept array data types. Note, though, spec will only work with 52 bits of precision in some contexts, since the internal code uses double-precision floating point format for many operations associated with spec user-level symbols. (Double floats use 52 bits for the significand and the remaining 12 bits for sign and exponent). The spec_shm.h and spec_server.h files included in the spec distribution have been updated to include definitions for 64-bit data-array data types.

New Variable Argument Feature For Macro Functions

New local variables now exist within macro functions. The variables are named argc, arg0 and possibly arg1, arg2, etc., and represent parameters used in the invocation of the macro function that were not declared in the definition of the macro function. The variable argc is a count of the additional parameters. The variable arg0 is a string with the name of the macro function. The additional variables arg1, arg2, etc., contain the values of the additional arguments and will have the same data type -- number, string, associative array or data array -- as the parameter in the call to the macro function.

Note, argc and the arg# parameters only apply to arguments after the declared arguments. For example, consider this macro function:

def test(par1, par2) '{ ... }

When called as

test(1, 2, 3, 4)

the value of argc will be 2, arg1 will be 3 and arg2 will be 4.

If a parameter or local variable of the same name is used in the definition of the macro function, that instance will override these automatically created argc/arg# variables.

New Filename Completion For do and qdo Macro Commands

Although do and qdo are defined as standard user-level macros, filename completion code has been added to automatically include directory paths contained in the global variable DO_DIR. Macro support for path lists in DO_DIR was added to the standard macros in spec release 6.00.05. Filename completion is available when spec is linked with the libedit or readline libraries.

New input() Option To Read Arrow Keys and Forward Delete

The cbreak mode for input() now has an option to return special codes when arrow keys or the forward-delete key are pressed. Type h input at the spec prompt or see the funcs help file for details.

New IS_SERVER Built-In Variable

A new built-in variable named IS_SERVER will be nonzero if spec is running in server mode (invoked with the -S option). When in server mode, IS_SERVER will be set to the port number on which the spec server is listening.

New HOSTNAME Built-In Variable

A new built-in variable named HOSTNAME will be set to the hostname of the computer running spec.

New Flexibility For Identifying spec Server

The configuration of spec server motors and counters and the built-in functions for communicating with a spec server all require an argument of the form host:port or host:spec to identify the host and the port on which the server is listening. With this new release, if the host part of the string is missing, spec will use "localhost". In addition, it is now allowed to mix references to the same server by port number and by spec process name. See the server help file for details.

Improvements For remote_stat()

spec will now include a check for pending connections to spec servers during a call of remote_stat(), making it possible for a loop that tests the return value of remote_stat() to determine when a server connection comes up.

Also, remote_stat() will no longer return "lost" for a previously open connection after a new call of remote_par(..., "connect") for the same host is made.

Length Of Allowed Input Line Increased

The maximum length of input records has been increased from 512 to 4096 bytes.

Fix For Detection of Invalid Octal Values In Strings

An old issue where strings starting with the characters "08" or "09" would evaluate to zero in certain contexts, in particular in conditional statements, has been fixed. The problem was that the C code improperly identified the strings as octal constants due to the leading zero, but a scan for an octal number would return a zero value since 8 and 9 are not valid octal digits.

Fix For date() Glitch

A bug in the date() implementation where two successive values for the time of day displayed using the format date("%s.%.6") could result in anomalous values such as:

1382650482.99999905 1382650482.00001097,

where the second invocation shows an earlier time than the first, has been fixed. Note, a more straightforward way to obtain the same information is using the time() function, which never had such an issue.

Fix For decode() Of Two-Dimensional Associative Arrays

The built-in decode() function will now properly decode two-dimensional associative arrays. See the encode help file for details on encode() and decode().

Fix For x11filt Retained-Pixmap Mode Text Garbling

The x11filt plotting utility can use either backing store or a retained-pixmap to maintain content that is drawn when the plot window itself is not visible. Backing store is a server feature. The retained pixmap is implemented within the x11filt code. The default mode for x11filt is to use backing store, but on some platforms the default X server configuration has backing store disabled. In that case, x11filt uses the retained pixmap. An old (twenty-one year) bug associated with writing labels to the x11filt retained-pixmap buffer that resulted in garbled labels when a window becomes visible that had been updated while hidden has been fixed.

New CP_FILTER_CMD Option For cplot_plot Macro

The standard cplot_plot macro now recognizes a CP_FILTER_CMD global variable. If it exists, the cplot_plot macro will evaluate its string value to create a dynamic CP_FILTER command. For example, the following will produce pdf files using the C-PLOT pdf filter containing the current scan number as part of the pdf filename:

CP_FILTER_CMD = 'sprintf("pdf scan_%04d.pdf", SCAN_N)'

See the macro source file macros/cplot.mac in the spec distribution for implementation details.

New COUNT_FMT_MAXCH Option For Updated Counting

The number of counters displayed while doing an updated count with the uct macro can be limited to the number of counters in the new global variable COUNT_FMT_MAXCH. If the value is zero, all the counters will be displayed. The setshow macro will prompt for a value.

newfile Macro Updated and Reorganized

The standard newfile macro has been split into pieces. A new newfile_head() macro function creates the file header. A new newfile_f() macro function handles most of the task of creating the new data file. The chk_file shell utility test on whether an existing file begins with the standard header has been replaced with calls of built-in spec functions that perform the same test. The newfile macro itself handles parsing arguments and calls newfile_f(). The newfile_f() macro is also called from the new mstartup menu startup macro. See the macro source file macros/file.mac in the spec distribution for implementation details.

Fix For Drifting Positions In Motor Scans In Some Pseudo Motor Configurations

A new get_commanded macro, which is defined as read_motors(0x10) (that puts each motor's last commanded position into the A[] array) has been added to _ascan and mesh macros before motor positions are calculated for each new scan point. This addition to the macros addresses a problem with real motor drift while scanning related pseudo motors in certain configurations.

New Serial Baud Rate and Other Fixes

spec now recognizes a baud rate or 600000 for serial devices. In addition, some issues with the code to set certain non-standard baud rates (7200, 14400 and 28800) on Linux have been addressed.

Updated Behavior For Several Motor Controllers

An update to the motor control error handling will now abort the move if there is an error during the "prestart_one" and "prestart_all" phase of sending the commands. Only a handful of motor controllers are affected by this change, namely the Oriel 18092, Advanced Control System MCU, Missouri Research Reactor motors, MicroMo MVP-2001, New Focus Picomotor 875x, Newport XPS, SPring-8 Equipment Manager motors, along with the macro hardware motor support. In practice, one is not likely to see any difference in behavior with the real motor controllers. However, the updated behavior may be useful with the macro hardware motor support.

TANGO Support For 64-Bit Integer Data Types

spec now supports the DEVVAR_LONG64ARRAY and DEVVAR_ULONG64ARRAY as input and output types for tango_io(), as input types for tango_get() and as output types for tango_put().

Support For SmarAct SCU Motor Controllers

spec now supports the SmarAct SCU model motor controller in addition to the MCS model already supported. See the smaract help file for details.

Updates For the Newport XPS Motor Controllers

Previously, spec would automatically send the home-search command to a Newport XPS motor group if the XPS reported that motors in the group were in the not-referenced state. When an XPS motor is in the not-referenced state, nothing can be done with the motor until the home-search command has been sent. This spec release changes the default behavior so that the home-search command is not sent automatically. Instead, a message is printed during hardware configuration or when a move is attempted telling the user that the home command must be run.

The previous default behavior of automatic home-search can be restored on a controller-wide basis by adding the non-standard optional controller parameter "auto_home" to the hardware configuration file. A value of 1 for the parameter will allow spec to send the home-search command during hardware configuration. A value of 2 will allow spec to send the home-search command any time it is needed.

Improved Abort Handling for ACS MCB-4B Motor Controller

A problem with the ACS MCB-4B motor controller, where communication errors occurred after sending a motor-stop command associated with a ^C user abort, has been addressed. spec now gives the controller motors time to decelerate before sending a command after sending the stop command, as the controller firmware appears to require such a delay.

April 6, 2014 - RELEASE 6.00.11-5

Updates For Tsuji UPM2C Motor Controllers

The spec support for the Tsuji UPM2C motor controllers has been updated to use the new-style firmware commands. (The controller firmware understands both an old-style and a new-style command set.) Previously, the code was using the old-style commands, which included a command to set backlash that isn't supported by the UPM2C.

March 24, 2014 - RELEASE 6.00.11-4

Updates For Tsuji PM16C Motor Controllers

The spec support for the Tsuji PM16C motor controllers has been updated to include the PM16C-16 model. In addition, on models that support the new commands, spec now uses the new commands for home search and for reading the busy and limit status.

Updates For Tsuji CT Counter/Timers

The spec support the Tsuji counter/timers will now recognize additional models CT16D/E, CT32D/E, CT48D/E and CT64D/E.

February 14, 2014 - RELEASE 6.00.11-3

Timeout Tweak For OMS MAXv

The read and write timeout intervals for the Oregon Micro Systems MAXv motor controller have been increased a bit as a possible solution to an infrequently observed communication problem between spec and the controller.

February 10, 2014 - RELEASE 6.00.11-2

Fixes For Ortec 994/996 In Blind-Timer Mode

Counting to a monitor-count preset when using the Ortec 994/996 counters in blind-timer mode is now more robust. See the ortec help file for details.

Fix For SPring-8 Equipment Manager Motor Configuration

An update in spec release 6.00.04 that inadvertently broke support for the SPring-8 Equipment Manager motor configuration has been fixed.

January 15, 2014 - RELEASE 6.00.11-1

Support For Tsuji PM4C-06 Socket Interface

This spec release adds support for the Tsuji PM4C-06 model which adds a socket interface capability to the PM4C motor controller.

September 21, 2013 - RELEASE 6.00.11

Support For LAWICEL CANUSB

This spec release includes support for the LAWICEL AB CANUSB module to interface to CANbus devices using USB. Currently, the only CANbus devices with built-in support in spec are the Mclennan PM595 and the Trinamic QUADpack/SIXpack motor controllers (although generic access is available using the fbus_get() and fbus_put() functions). Note, the CANUSB device works best using a maximum CAN bit rate of 125 kbit. Communication with the above motor controllers fails at higher rates.

Updated Support For Dectris Mythen

Support for the Dectris Mythen MCA has been updated to include support for the multiple-module 6K and 24K models. Also, firmware support has been extended through version 2.0.5. See the mythen help file for details.

September 5, 2013 - RELEASE 6.00.10

Additional Revision For New Version of Move Macros

Unnecessary quotation marks around the $* in the call of _mmov in the definitions for the recently revised move macros mv, umv, mvr, umvr, mvd, umvd, mvr2 and umvr2 have been removed. This change restores the ability to use quotation marks when specifying target positions, as in:

mv tth x["arg"]

This revision should be the last for this generation of the basic move macros.

Limit On Number Of Macro Arguments Removed

The limit on the number of positional arguments allowed with ordinary macros has been removed. Previously, no more than 25 arguments were allowed.

Fixes For Am9513 Counter/Timer Support

This spec release fixes a problem introduced in release 5.09.02-1 that broke support for the ISA bus versions of the two counter-chip models of the Am9513 counter/timer cards, specifically the Measurement Computing model CIO-CTR10 and the Keithley/Metrabyte model CTM-10.

Aug 6, 2013 - RELEASE 6.00.09

New eval2() That Can Access Local Variables

A new version of the eval() function called eval2() can access local variables defined in the enclosing statement block. Type h eval from spec for details.

Revisions For New Version Of Move Macros

The revised move macros introduced in release 6.00.06 maintained the existing feature where positions could be specified as expressions and added the ability to specify multiple motors and target positions on the command line. However, the implementation in that release inadvertently broke the ability to use local variables in the expressions for the position arguments. An updated implementation in this spec release replaces the _mmov() macro function used with the move macros with an ordinary _mmov macro and uses the new eval2() function. These changes restore the ability to use local variables in the position argument. In addition, the standard home macro also now uses eval2() to allow local variables to be used for its optional position argument.

Additions To the Standard spec Data File Header

The standard spec data file header, which has always included all the configured motor names prefaced by the #O control key, will now also include the motor mnemonics prefaced with #o, the counter names prefaced with #J and the counter mnemonics with #j. Eight items are included on each line, successive lines are numbered as #O1, #O2, etc. and motor and counter names are each separated by two spaces.

Fix For User Name Shown At Exit

When spec exits, it prints a message that the user's state has been stored and converts the first letter of the user's name to upper case for purposes of the message. A 25-year old bug, where the conversion would generate a control character if the first character of the user's name was a digit, has been fixed.

Fix For Help Viewer

A bug introduced with the help viewer updates in the previous release that broke formatting for .rst files when a path was used to specify the file name has been fixed.

July 18, 2013 - RELEASE 6.00.08

New Features For Shared Data Arrays

A new info field has been added to the spec shared array header structure. The field can be filled with up to 512 bytes of arbitrary text. The field can be read or written from spec using the new "info" option to the array_op() function. New functions SPS_GetInfoString() and SPS_PutInfoString() are included in the sps.c code distributed with spec and used with other applications, such as the SPS Python modules.

In addition, a new meta area has been defined for the shared array data segments. The area is located after the array data. New meta_start and meta_length fields have been added to the shared array header structure. The meta_start field contains the byte offset of the meta area from the start of the shared memory segment, while meta_length is the size of the meta area in bytes. There is no limit to the length of the meta area, but spec will set the size to 8,192 bytes, although that might change in the future. The area can be read or written from spec using the new "meta" option to the array_op() function. New functions SPS_GetMetaData() and SPS_PutMetaData() are also included in the sps.c code.

The SHM_VERSION number in the updated spec_shm.h file has been changed to 6 to reflect the changes. These changes will not break compatibility of the new objects with programs built using prior versions of the shared array header, as the new elements have been added to the existing region of padding in the header.

The additions to the shared memory object definition will be used with spec's forthcoming stand-alone plotting utility.

A user_prect Added To ct and uct Macros

A new user-hook macro named user_prect is available for users who need to do a special action prior to counting from the command line, but not prior to counting during a scan. The new macro will be called in the standard ct and uct macros. By default user_prect is defined as an empty macro.

Note, user_prect should not be confused with the exiting user_precount hook which is included in the lowest level counting macro count_em, used by both ct/uct and the scans.

In addition, the uct macro has been rearranged to ensure that the user_ct hook, called after counting has finished, will always be called, thus ensuring calls of user_prect and user_ct will be balanced. Previously, if the timer indicated the count was finished before the first polling check with chk_count, the user_ct macro would not be called.

Fix For encode()

A bug where spec could crash when encoding an empty associative array with the encode() function has been fixed.

Fix For Command File Display On Some 64-Bit Platforms

Internal code used to display and save the path for command files for the dofile() and qdofile() commands has been updated to work correctly on certain 64-bit platforms. Previously, if the path contained a leading "./" or embedded "/../", "//" or "/./" sequences, the displayed and saved path name might have been corrupted.

Updates For Help Viewer

spec's built-in help viewer and the stand-alone chelp utility have been updated to accommodate local help files that don't quite conform to the expected format. In particular, the help viewer will now work with help files produced by the ESRF machelp utility when the source macro files are missing the %TITLE% comment.

Fix For ESRF VCT Timer/Counter Support

Recent fixes to restore compatibility with old versions of the ESRF VCT Timer/Counter TACO device server inadvertently broke use of more than one VCT device server in a session. That issue has been fixed in this spec release.

Fix For "start_all" Error With Macro Motors

A problem where errors generated by the "start_all" command in a macro hardware motor function might not be properly caught by the spec motor moving code has been fixed. The problem was likely to occur if calculational macro-hardware motors had also been defined.

Updates For Macro Hardware Motors

To make the code associated with calculational macro motors and regular macro-hardware motors work more robustly, spec now enforces a rule that if a prefix_calc macro function exists for a particular prefix, spec will not make any calls to a prefix_cmd macro function, even if such a macro function exists. spec will print a warning message to that effect during hardware configuration if both macro functions are defined.

Fix For Catching Motor Start Errors

If there is an error (usually a communication error) in sending the commands to start a move for certain motors controllers that support a multiple-motor start command, spec will now halt any current moves of all motors on all controllers, just as is done on ^C or when hitting a limit switch. The motor controllers affected are spec macro-hardware motors, spec server motors, ACS SPI-8, Anorad, ESRF MAXE, FZD Sergen, Huber 9300 touch screen, Micos MMC-100, Newport SMC100 Newport XPS, OMS, Piezosystem Jena, Sigmatech FC-501A, Velmex, and XIA HSC-1.

June 25, 2013 - RELEASE 6.00.07

New array_copy() Function

A new array_copy() function is provided that enables the creation and decoding of byte streams of mixed data types. See the arrays help file for details.

Support For Newport CONEX-AGP Motor Controller

This spec release supports the Newport Agilis-P model CONEX-AGP single-axis motor controller for a piezo actuator with encoder feedback. Use the "dump" option with the motor_par() command to list all the parameters names associated with the controller along with their current values. The parameters can be assigned as standard or non-standard optional parameters using spec's hardware configuration editor, as appropriate.

The CONEX-AGP has a USB interface that is supported on Linux and Mac OSX using USB-to-serial kernel drivers. On Linux, the standard ftdi_sio kernel module is required along with the special udev rules installed by spec in /etc/udev/rules.d/10-spec_usb.rules. On OSX, the VCP driver available at the ftdichip.com must be installed, and the CONEX USB vendor and product IDs must be added to the kernel extension Info.plist file as explained in the FTDI Technical Note 105 available at the FTDI website. Contact CSS for assistance, if needed.

Support For Tsuji UPM2C-01 Motor Controller

This spec release contains support for the Tsuji UPM2C-01 two-axis USB motor controller. Although the controller uses a USB connection, the controller appears as a serial device to spec.

Fixes For SmarAct Motor Controller

spec's support for the SmarAct Motor Controller has been updated to work with configurations that use actuators with no position sensor. See the smaract help file for details.

Fixes For Tsuji PM4C-05A Motor Controller

The Tsuji PM4C-05A motor controller support now also has the fix for setting the acceleration parameter (included in spec release 6.00.04 for the other Tsuji motor controllers).

Fixes For Bruker Vantec-1 MCA

A bug in the Bruker Vantec-1 MCA support where the internal start and stop routines would return errors when there were none has been fixed. This bug prevented use of the MCA with "auto_run" mode enabled. In addition, a new "exposure_time" mca_par() option is available that will read and return the "actual exposure time" as reported by the Vantec-1.

Fix For GPIB Controller Configuration

An old bug, where GPIB controller configurations would only work if controllers were assigned consecutive unit numbers starting from zero, has been fixed. It is now possible to leave empty slots in the GPIB controller configuration.

Updates For Amptek DP5 Support

A couple of minor issues with parameter display have been corrected for the new Amptek DP5 support. Also, the automatic delay on re-opening the DP5 socket to accommodate the 15-second delay built into the DP5 firmware is now interruptible by a ^C.

Fix For syms and show_state Display Of New constant Associative Arrays

The display of constant associative array symbol values with the syms -v command and with the output of the utility show_state has been fixed so that the output is acceptable as further input to spec.

Fixes For New Motor Move and Display Macros

An internal macro name associated with the new move macros has been changed from _mmv to _mmov to make it easier to detect whether conflicting local macros exist. In addition, the old macro names have been redefined to include an error message to alert the user to the issue of obsolete local macros.

A bug in the new motor display macros that would produce an error if the steps-per-degree parameter was negative has been fixed.

The uwm macro will display the specified motor positions at least once, even if the specified motors aren't active.

Type newmac to reload the standard macros after updating.

Fix For _plotselect() Macro

An error in the calculation of a new value for PLOT_CNTRS_MAX in the updated _plotselect() macro from the previous release has been fixed.

Type newmac to reload the standard macros after updating.

May 16, 2013 - RELEASE 6.00.06

constant Associative Arrays Implemented

The constant keyword can now be used to create and initialize constant associative arrays. These arrays are global and elements can't be added or deleted. The arrays can only be removed with unglobal or reinitialized with constant. For example,

constant arr [ 0:PI, 1:"one", "cat":"internet" ]

creates a three-element constant associative array.

Syntax For constant Declaration Expanded

An optional equals sign can now be used in constant declarations, as in:

constant mono_type = 3
constant test = [ 1:"one", 2:"two" ]

Usage without the equals sign is still valid, of course.

New Standard Macros For Moving Motors

The standard mv, umv, mvr, umvr, mvd, umvd, mvr2 and umvr2 macros have been rewritten to use a new _mmv() macro function which implements a syntax to allow multiple motors and targets to be specified on the command line. As before, the target position can be an expression (although still with no spaces). For example, valid syntax now includes:

umv tth 60 th 30 phi 90 chi 120
mv tth 2*CEN th CEN

plotselect Macro Now Automatically Resizes SCAN_D

The standard plotting macros make use of a global variable named PLOT_CNTRS_MAX that sets a limit on the counter number that can be used in plotting. The purpose of the limit is to keep the global SCAN_D array reasonably sized. The default value for PLOT_CNTRS_MAX is 10, which means that counter numbers greater than 10 will not show up in the standard plots unless PLOT_CNTRS_MAX is increased. This spec release includes an updated _plotselect() macro (which is called by the plotselect and counters macros) that will automatically increase the PLOT_CNTRS_MAX value (and resize SCAN_D) to accommodate the highest number counter selected for plotting.

Updates For chelp Utility and gethelp() Function

spec release 6 introduced a redesigned help facility that intended to retain compatibility with previous help file formatting conventions. To improve that backwards compatibility, this spec release includes a minor update to the standalone chelp utility. When the filename argument to chelp contains a pathname, chelp will now default to using formatting macros appropriate for the old-style help file format. New optional arguments, -old and -new, will force selection of the old-style or new-style formatting macros. Type chelp - to see usage. The gethelp() function within spec will continue to default to the new-style formatting macros, but can take as a second optional argument a value to force the style. Bit 2 will select old style and bit 3 will select new style. Note, for arguments which consist only of a help filename, both chelp and gethelp() will choose the formatting macros based on whether the help file is in the old or new subdirectory within the spec auxiliary file directory.

Additional Information Displayed With mca_par("info")

The mca_par("info") command now displays the status of auto-clear mode, auto-run mode and soft-preset mode in addition to native data type, number of channels and maximum number of channels for the selected MCA device.

set_sim() Now Has Option To Simulate sleep()

Invoking the set_sim() function with an argument having bit 4 (0x10) set, will prevent spec from sleep delays when using the user-level sleep() function.

Support For 10-Axis OMS Motor Controllers

The 10-axis Oregon Micro Systems (Pro-Dex) MAXnet motor controllers should now work with spec. Previously, only configurations with up to 8 axes were supported.

Fix For Tsuji Motor Controller Support

A bug, where the 32-bit position support introduced in spec release 6.00.04 for Tsuji motor controllers may have prevented setting the dial position (with the chg_dial() function or the set_dial macro) to negative values, has been fixed.

Fix For cleanup_once In Server Mode

An issue related to use of cleanup_once in spec's server mode has been fixed. Expected behavior is that when cleanup_once is defined, it will either run if there is an error or be removed before the next top-level prompt is displayed. Previously, if the cleanup_once macro was defined in a block of commands sent from a remote client to a spec server and the commands completed successfully, the cleanup_once macro was not removed until a command or newline was entered using the keyboard associated with the server spec session.

Fix For Recently Broken sock_get() For UDP Connections

A problem introduced in release 6.00.02 that could cause problems with sock_get() reads from UDP sockets has been corrected. The problem occurred when using more than one sock_get() call to read a single message from the socket source.

Fix For Debug Level 2 Crash

A bug, where spec could crash if the debug level was set to 2 (show node execution while running), has been fixed.

April 3, 2013 - RELEASE 6.00.05

Directory List Now Allowed For DO_DIR In do/qdo Macros

The _do macro, used by the standard do and qdo macros, has always supported a command file directory given by the global variable DO_DIR. If the command file given as argument to the do or qdo macros isn't in the current directory, the DO_DIR directory will be checked. This spec release extends the syntax to allow DO_DIR to contain a colon-separated directory list, following the usual UNIX convention. As before, the current directory will be checked first. If there is no file by the given name in that directory, each directory in the list will be checked in order. If DO_DIR contains just a single directory name, the macro will behave exactly as it did before.

Fix For Prompting While Building Macro Arguments

An old bug, where an unmatched quote followed by a newline in the arguments to an ordinary macro invocation would generate the standard spec prompt rather than quot> prompt to indicate a matching quote was required, has been fixed. Previously, it would appear that spec had become unresponsive, as the prompt displayed was the prompt one sees when typing commands, although spec was simply building a string and waiting for the matching, terminating quote.

Fix For Debug Level 512 Crash

A recently introduced bug, where spec would immediately crash if the debug level was set to 512 (memory allocation and freeing), has been fixed.

Fix For Duplicated CONPAR Lines In config File

A bug, where each invocation of the r or R commands in the edconf configuration file editor (invoked by the config macro) would cause the CONPAR: entries to be duplicated when the config file was written out, has been fixed. The r and R commands are used to undo the current editing session and replace the session with the current config file or the backup config file, respectively. With the bug, the size of the config file could grow quite large in time due to the doubling. The fix also includes code to remove all duplicate CONPAR entries when writing out the config file.

Fix For Dectris Mythen 1K Using Old (1.3.0) Firmware

An issue, where changes in the internal socket code in spec release 6.00.02 broke support for the Dectris Mythen 1K with the older version 1.3.0 firmware, has been addressed.

March 5, 2013 - RELEASE 6.00.04

Updated Macros For Motor and Counter Column Display

The standard macros for displaying motor information in columns and for displaying updated motor positions and counter values during moving and counting have been updated and improved. The macros now use the full width of the window. In addition, the number format for large values is adjusted automatically to maintain equally spaced columns.

Several new parameters are available to configure how the values are displayed. In particular, the number of digits displayed to the right of the decimal point for motor positions is now configurable. The new macro setshow prompts for all the configuration parameters.

With this update, the motor-related macros wm, show_motor_info(), _updateHKL, _upd_move and _update() have been replaced. The show_motor_info() macro is used by wm (where motor), wa (where all), wu (where all in user units), lm (show limits) and _mot (used indirectly in the geometry macros cal, ca, wh and ci by way of the macro _var). The _updateHKL macro is used by umk and ubr. The _upd_move macro is used during scans.

The _update() macro, used to display updated moving and counting during scans, is now also used by all macros that display updated motor positions including umv, umvd, umvr, uwm, umk, ubr, uan, upl.

The updated counting macro uct has been replaced and uctn has been redefined as uct.

All these updated macros are defined in the new file macros/show.mac in the spec distribution directory. Read the comments in that file for additional details.

Fractional Positional Values Allowed With plot_move()

The plot_move() function, used for placing text labels on the high-resolution plots, can now take floating point x and y position arguments. Previously, positions were rounded to the nearest integer. Note, the range of values for the position arguments remains 0 <= x < 80 and 0 <= y < 25 with the origin at the top left corner.

X11 Plots Use Higher Resolution Scaling

The scaling factors used to calculate pixel positions for the X11 plot windows have been increased by a factor of 100 to reduce the position rounding seen with larger pixel-count plot windows.

Improved Text-Mode Plotting

Although a little used feature, the text-mode plotting in spec is now a bit more robust. A new "ascii" option to plot_cntl() can be used to force text mode plots. To sample the text mode plotting, Type the command plot_cntl("ascii") and run scans or make a plot with splot. Use plot_cntl("-ascii") to disable.

Updated plot_cntl() Syntax

The query commands for the plot_cntl() function now allow a trailing question mark. Previously the syntax to query a current mode was, for example, plot_cntl("?xlog"). Now plot_cntl("xlog?") also works.

New Curly Bracket Delimiter Option For def and rdef

The spec parser now allows the macro definition string for def and rdef to be delimited by curly brackets. The normal string delimiters are ' or ". This extension allows syntax-aware editors to highlight the structure of the macro definition appropriately. When quotes are used with such editors, the content of such strings is not highlighted to show syntax. The following are now all equivalent:

def test 'print "hello"'
def test '{ print "hello" }'
def test { print "hello" }
def test "print 'hello'"
def test "print \"hello\""

Note that if curly brackets are used to delimit the macro definition, nonfunctional curly brackets need to be escaped if they are used in strings, for example:

def test { print "curly \{ and \}" }

Fix For Fault When Accessing Disabled Controllers

An issue, where spec could crash when the motor_par() or counter_par() functions were used with a few models of controllers that were disabled using the recently added config-file OFF feature, has been fixed.

Fix For Channel Configuration Issue With Some Controllers

An issue related to channel configuration that could cause a crash when using certain controllers that have channel numbers starting with one (rather than zero) has been fixed. As the error was related to a memory corruption problem, the manifestation would vary. Anomalies were reported with the ESRF TACO VCT6 counter/timer. Controllers that could exhibit the same problem are the Attocube ANC300, EPICS motor record, ESRF TACO VCT6, JVL SMI20B, Munich BR-tronik IPS, Newport Agilis, PI E-712 and Sigmatech FC-501A. Prior to this fix, the crash issue could be avoided by configuring one more channel than needed.

Fix For Spurious mca_par() Error Message

An issue with several MCA devices, including the Dectris Mythen, where using the "disable" option with mca_par() would display an "unknown argument" error message even though the command otherwise worked, has been fixed.

Fix For tango_get() Crash

An issue, where a call of tango_get() with just one argument might lead to a segmentation fault, has been fixed.

Restore TACO VCT-6 Compatibility With Old Device Servers

An update to the VCT-6 counter/timer support in spec release 5.09.02-1 that broke compatibility with old versions of the TACO device server has been addressed in this release by having the GetDevList command (only present in the new device server) emulated in the spec code.

Update For Sigmatech FC501-A Motor Controller

The spec support for Sigmatech FC501-A motor controller has been modified to work with single-axis models.

Support For 32-bit Positions For Tsuji Motor Controllers

spec now supports the 32-bit maximum position (in steps) for newer models of the Tsuji motor controllers. Older controllers have 24-bit position registers, and the command syntax only supported 24-bit values. For models that support it, spec uses the new command syntax to read and set the current position and to send move commands. The new syntax is also used for sending speed and acceleration commands, where a wider ranges of values is also allowed.

Fix For Programming Acceleration On Tsuji Motor Controllers

A long-standing bug in setting the acceleration time for Tsuji motor controllers is now fixed. Previously, the acceleration time sent to the controller would be off from the time specified in configuration file by a factor of the steady-state rate divided by 1000. If the rate was 10,000 steps/sec, and the configured acceleration time was 100 msec, spec would have sent a command for an acceleration time of 10,000/1000 * 100 msec or 1 second. When updating to this spec release, current users of Tsuji motor controllers should pay particular attention and adjust the configuration file values for the acceleration time accordingly.

Support For Tsuji CT08-01E Counter/Timer

spec now recognizes the model CT08-01E counter/timer from Tsuji Electronics.

Support For Phytron MCC Controllers

spec now supports The Phytron model MCC motor controller.

New Sample-Height Offset Parameter For Some surf Geometries

A new parameter (g_shoff in the macros) has been added for the surf_cmc, surf_x22b and surf_bl18b geometry code to hold a value for a sample-height offset. The parameter might be used, for example, to track a changing correction to the sample height due to evaporation of a liquid sample. The default value is zero. Macros for the corresponding surf geometries have been updated and include a new set_shoff macro.

December 8, 2012 - RELEASE 6.00.03

Fix For Calculational Pseudo-Motor Drift

A long-standing issue involving position drift of calculational pseudo motors during scans has been fixed. The fix will work for pseudo motors associated with geometry code, such as the kappa versions of the fourc, fivec and psic diffractometers, and for macro-hardware calculational pseudo motors. The position drift resulted from the process where real-motor positions are calculated from the desired pseudo-motor positions at each point in a scan, then pseudo-motor positions are recalculated from the actual real-motor positions after the motors are moved. Since the real-motor positions are rounded to the motor resolution, the pseudo-motors that aren't being explicitly scanned and assigned values at each point can drift due to the round off. The solution involves saving the desired real-motor position to full resolution and (when appropriate) using that value (rather than the value rounded to motor resolution) when calculating the pseudo-motor position.

December 6, 2012 - RELEASE 6.00.02-1

Can Now Check For Hardware Limits With Tsuji PMC16C Motor Controllers

The "high_lim_hit" and "low_lim_hit" options to motor_par() return the current state of the the designated limit switch for most motor controllers. Previously, for the Tsuji PMC16C multiplexed controllers, the command would only read the active state of the limits for the two (or four on the -04 models) last-used motor channels. For other channels, the function would always return zero. This spec release updates the Tsuji support so that is now possible to read the active state of the limits for any channel specified in the motor_par() command.

New "holdoff" Parameter For Tsuji Motor Controllers

A non-standard optional parameter named "holdoff" is now recognized when using the Tsuji PMC16C motor controllers. When set, spec will turn the motor hold current off when the motor is not moving. The parameter value is the delay time (in seconds) that spec will delay between when the power is turned on and the move is started and between the end of the move and when the power is turned off. A value of zero will skip the delay. A negative value will disable the hold-off feature. Non-standard optional parameters can be created by typing a lower case p from the Motor screen of the configuration editor. The hold-off functionality is the same as provided previously using the "misc_par_1" standard optional parameter (use of which is still supported, but is discouraged).

December 1, 2012 - RELEASE 6.00.02

Support for VXI-11 RPC Protocol

This spec release has support for the VXI-11 protocol, often used with instruments such as digital oscilloscopes. See the vxi11 help file for details.

Added user_setdial Hook To set_dial Macro

A user_setdial hook macro is now part of the standard set_dial macro, just as a user_setpos hook macro has been part of the standard set macro for many years. The set_dial macro is used to set a motor dial position. The set macro is used to set a motor user position. In both cases, the macros are called with the same arguments as the including macro.

New sock_par() "silent" Flag For Testing Socket Connection

An additional "silent" argument can be used with the "connect" and "connect_udp" options to sock_par() to suppress error messages if the connection attempt fails. Success or failure can be determined by the return value of sock_par(). See the sockets help file for details.

Check For "Start All" Errors On Certain Motor Controllers

For certain motor controllers that include a simultaneous start capability, an error while sending the simultaneous start command(s) will now result in the same behavior that occurs when there is an error sending a single motor start command. That is, the move will be aborted for all motors and the appropriate flags will be set or cleared in the internal code. The affected controller types are ACS SPI-8, Anorad I-series, ESRF MAXE, FZD Sergen, Huber 9300 touch screen, Micos MMC-100, Newport SMC100, Newport XPS, OMS (all models), Sigmatech FC-501A, Velmex VXM-1/VXM-2, XIA HSC-1, spec macro motors and spec server motors.

Updated tango_home and taco_home Syntax

The tango_home and taco_home parameters used in the spec Install script can now each contain the complete path name to the directory that holds the associated libraries. The prior behavior, where the parameters each contained the path to the associated /lib/ directory, continues to be supported.

Fix For Persistent Hardware Parameters Over a reconfig

spec stores certain parameters for specific hardware devices in the state file. For example, the preset times or number of channels set using mca_par() are saved for some models of MCA. When restarting spec, the last set values are restored from the state file. Previously, though, such parameters did not maintain their values during a hardware reconfig from the command line, and were instead reset to their default values. The problem has been solved by having spec update the state file (equivalent to a savstate from the command line) before doing the hardware reinitialization associated with reconfig.

Support For Piezosystem Jena Controller

This spec release includes support for the Piezosystem Jena piezo actuator controller. See the piezojena help file for details.

Update For Bruker D8 Motor Controller

The built-in support for the Bruker D8 motor controller has been updated to work with the RVD8-02 firmware released in 2010.

Fix For Bruker/Roentec XFlash MCA Serial Modes

The spec code for the Bruker (formerly Roentec) XFlash MCA no longer unconditionally sets hardware flow control. Hardware flow control can be enabled in the MODE field of the configuration editor, if needed.

New "refresh" Option For epics_par()

A new "refresh" option to epics_par() is available that closes and reopens the channel access connection to the specified process variable.

Fix For Obscure remote_par() Issue

An old bug, where using many (somewhat less than 20) calls in the same statement block of remote_par() with any of the "close", "connect" or "abort" arguments would produce an "Out of temporary cells" error, has been fixed.

Fix For Double Newlines In Log Files

An issue, where a carriage return-linefeed combination in a string would generate two newlines when written to a log file, has been fixed.

October 10, 2012 - RELEASE 6.00.01

Fix For Possible Crash With Misconfigured Motor Controllers

A bug, where spec could crash if the number of channels on a DAC motor device in the config file was set below the number of channels in use, has been fixed.

Fix For TACO/TANGO General CCD Support

A problem with the "ESRF General CCD Dev" device support, where the "talk" and "hw_par" image_par() commands didn't return values when used with TANGO-based image device servers, has been corrected.

September 26, 2012 - RELEASE 6.00

New Major Release Number and New Website Launch

With the debut of the revitalized certif.com website and a number of noteworthy updates to the spec code, we've bumped the spec major release number to 6. The website is a complete redesign and includes interactive forums and a new supported-hardware database. The spec updates are described below and include new support for 64-bit integers, an overhauled help facility and purging of some legacy macro references.

Integer Operations Support Greater Precision

Many of the 32-bit integer operations in spec have been recoded to use (nearly) 64-bit integer arithmetic. spec stores number values in a double-precision floating point format and that format has only 52 bits for the significand (the remaining 12 bits are for the sign and exponent). Thus, most of the recoded integer operations in spec are carried out only to 52 bits.

The bit-wise operators (|, |=, &, &=, ^, ^=) will mask the operands to 52 bits. The result of the operation will be no more than 52 bits. The bit-not operator (~) will mask the result to the low 52 bits. The bit-shift operators (<<, <<=, >>, >>=) and the modulus operators (% and %=) will convert the operands to 64 bits, perform the operation using 64-bit integer arithmetic, then convert the result to a double for the return value.

The input parser now recognizes 64-bit hexadecimal and octal values. Hexadecimal and octal 64-bit values can be input as constants and as input to the getval() function.

The int() function will return values up to 64 bits in magnitude, although, as with all of the functions and operations, only 52 bits of precision. The bcd() and dcb() functions will now operate on up to 52 bits.

The built-in printf(), sprintf() and fprintf() functions will now look for an l modifier (as in "%ld", %lx", etc.) in the format string specifications for integers and if an l is present, will convert the double valued spec variable to a 64-bit integer.

New plot_cntl("raise") Option

A new "raise" option to the plot_cntl() function will raise the X11 plot window to the top of the desktop stacking order.

Auto-raise Behavior Of X11 Plots Updated

The auto-raise behavior of the X11 plot windows is now disabled by default. However, the standard macro splot used from the keyboard will use the new "raise" option to plot_cntl() to make the plot visible. New options available in the setplot macros allow one to choose if the plot should be raised as each point is added to plotting during scans and whether the plot should be raised at the end of the scan. The plot macro called at the end of scans has been revised to accommodate the optional raise feature.

If the auto-raise behavior is enabled in one's ~/.Xdefaults file or has been turned on for a particular instance of x11filt using the "cmd=9109" plot_cntl() option, the old default behavior will be restored and the plot window will be raised to the top of the stacking order each time a point is added and at the end of a scan, regardless of the setplot configuration. See the x11 help file for details on the auto-raise feature.

Improved Support For Very Long Strings

This release fixes crashes with strings longer than 8,192 bytes in certain contexts, such as when used as the prompt string in the input(), yesno(), getval() and getsval() functions and when part of error messages, such as with syntax errors.

New Help Infrastructure

This spec release has a redesigned help facility. The internal help file parser and formatter have been removed and formatting is now handled by the standard groff and related utilities. Both the built-in help display and the stand-alone chelp program automatically stream formatted help files through the less pager with output sized to the width of the window.

The help files are now authored in reStructuredText (reST) format and converted to groff input format for spec (or HTML for the certif.com website) using Python tools. The new help files are located in a new SPECD/spec_help directory.

For sites with local help files conforming to the old format conventions, spec (and the chelp utility) will check the old SPECD/help directory for the topic if a corresponding file is not in the new directory. Files from the old directory will be formatted and displayed using groff macros compatible with the old spec help file formatting conventions.

The text processing utilities tbl and groff (or nroff) are required to reformat the help files to match the screen size. If unavailable, help files preformatted for 80-column screen windows, which are included in the spec distribution, will be displayed. In addition, even if the text utilities are available, if the current screen window is between 80 and 92 columns, the preformatted files will be displayed.

The initial processing of the standard reST help source documents to groff format is done at CSS HQ and the derived groff-format files are included in the spec distribution. However, the reST source files and CSS's customized front end to the Python Docutils package, rst2man, are included in the spec distribution. Files given as arguments to the built-in gethelp() function or to the stand-alone chelp utility that end with the .rst suffix will be processed through spec's rst2man script, if suitable versions of Python and Docutils are available.

New spec.conf File

The spec Install script now creates a file called spec.conf in the SPECD auxiliary file directory. Currently, the file contains paths and options associated with the new help infrastructure, but in the future additional configuration will reside in that file. The Install script invokes a script called install_spec_conf to create spec.conf. If the spec.conf file is missing or contains inaccurate information and the default values built into spec don't match the current system configuration, the help facility may not function correctly. The install_spec_conf script can be invoked independently from within the spec distribution directory.

Legacy PRINTER References Removed From Standard Macros

The references to the PRINTER and related variables (PPRNT, PFMT) have been removed from the standard macros, as have the ifp and onp statements along with references to lp_plot macro. CSS is confident that all the dedicated line printers once used to produce real-time hard-copy documentation of spec sessions and scan data have long since been retired. Eliminating the legacy references makes the standard spec macros a bit easier to follow. Any user who may have been assigning a filename to the PRINTER variable to create logs of spec activity should consider using the special tlog log-file facility that records all output that is sent to the screen to a file.

Fix For Obscure for (var in arr) Bug

An old issue where the usage

for (var in arr) {
        ...
        continue
}

would generate a "unexpected break/continue" error has been fixed. A continue statement as the last statement in a for-loop body is an unlikely usage, thus explaining while the bug has gone unreported for sixteen years.

Repeated Commands Not Saved In History

When linked with the libedit or readline command-line editing libraries, identical consecutive commands will now be saved only once in the command history queue. Note, that also means the history number included in the spec prompt will not increment if the exact same command as the previous is entered from the keyboard.

Updated Linux udev Rules File

spec installs the file /etc/udev/rules.d/10-spec_usb.rules for the benefit of the device manager feature present on modern Linux platforms. The rules grant general read/write permission to the USB device nodes associated with hardware used with spec, unbind certain devices from the human interface device (HID) subsystem and create special device nodes for certain hardware. Like many kernel and system features on Linux, the implementation is something of a moving target. This update reflects the latest udev implementation, but continues to work with previous versions. This spec release contains new rules to handle the HID unbinding needed for Measurement Computing's USB devices with the newer udev implementations.

The spec Install script now invokes a new install_udev_rules script that tailors the rules file to the current platform. The install_udev_rules script can also be invoked independently from within the spec distribution directory.

Work Around For Underlying Problem With EPICS Motor Record

This spec release includes a work around for an underlying problem with EPICS that can sometimes send events out of order. The issue would manifest when spec might receive the final position event of a move before the end-of-move event, contrary to the expected behavior for the standard EPICS motor record. In spec release 5.08.01-4 (June 2008), the EPICS motor record support was changed to use event-based position reporting in order to eliminate unnecessary network channel access calls. However, after that update at least one user reported sometimes seeing spec position data in scans reflecting stale position information.

The issue with EPICS events arriving out of order is a known issue and should be resolved in the forthcoming EPICS 3.15 release. Additional information regarding the strict-ordered-event-queue can be found at the EPICS base launch-pad site.

In the meantime, spec support for the EPICS motor record has been modified to do an explicit channel access read of the motor position after a move-complete event. Other than that case, motor position information will be event driven.

Change For ENUM EPICS Data Types With epics_put()

Previously, the user-level epics_put() function sent ENUM values as a DBF_STRING type. That could lead to ambiguities in a situation where an EPICS process variable had a enumeration table such as the following:

     
  String Index
  Value Value
  "1" 0
  "2" 1
  "3" 2

spec will now use DBF_STRING for string-valued arguments to epics_put() and DBF_ENUM for number-valued arguments. spec can distinguish input of the string "1" from the number 1. This change also serves as a workaround to a known problem with EPICS base built using the Windows compiler where numbers sent as DBF_STRING type for DBF_ENUM process variables would not be recognized.

Fix For Crash With Out-Of-Range Channel Number

An old bug which could lead to a segmentation fault if a very out-of-range channel number was passed to the functions motor_par(), counter_par() or chg_offset() has been fixed.

Support For Ketek DPP1 MCA

This spec release includes initial support for the Ketek DPP1 digital pulse processor, as used in the GE Measurement & Control Meteor0D energy dispersive X-ray detector. See the ketek help file for details.

Support For OMS UMX Motor Controller

spec now includes support for the new OMS UMX model motor controller on Linux and Mac OS X platforms. The UMX has a USB interface but appears as a serial device if the appropriate kernel drivers are installed. See the oms help file for details.

August 7, 2012 - RELEASE 5.10.02-17

Blank Lines Allowed Again In config File

Recent updates inadvertently led to blank lines in the config file generating error messages in spec. That issue has been fixed.

Fix For Off-by-one Motor Number Display In Certain Messages

An issue with the support for the EPICS motor record and the Newport Agilis controller, where several motor-related messages (including hard-limit reports) gave a channel number off by one, has been fixed.

Fix For Recently Introduced Crash When Using ISA Am9513 Card

Changes in the Am9513 support in the previous spec release introduced a bug that could cause spec to crash when using other than PCI models. That bug is fixed.

June 27, 2012 - RELEASE 5.10.02-16

Large File Support On 32-Bit Platforms

The 32-bit architecture versions of spec are now compiled with large file support. It should now be possible to use the spec built-in output functions to add data to files larger than 2.15 gigabytes.

Fix For Attocube ANC350 Support

A bug that was part of the original spec ANC350 support, where actuators with particular values for the the step-width parameter would be marked unusable, has been fixed.

Additional Fixes For Am9513 Use With Multiple PCI Cards

The support for multiple PCI Am9513 cards has been fixed. It is unclear whether a configuration with multiple PCI Am9513 had ever been working. Such a configuration does work in the current release. In addition, the ADDR field of the configuration editor can be used to set the PCI bus and slot IDs to distinguish among multiple cards.

June 18, 2012 - RELEASE 5.10.02-15

Fix For Am9513 With Multiple PCI Cards

A recently introduced bug, where spec would hang if using more than one Am9513 PCI card, has been fixed.

Fix For Inserting Motors In Configuration Editor

A bug associated with inserting a new motor channel on the Motor screen of the configuration editor has been fixed. Previously, any existing non-standard optional parameters would be copied from the neighboring motor channel to the inserted motor and changing the value of one of those parameters for either of the motors would change the value for both motors.

Fix For spec Standard Output With libedit

A "feature" added to the upstream libedit source in early 2011 disabled command-line editing if the linking program's standard output was not a tty device. For users who piped spec's output through a program such as the tee utility to make a copy of spec's standard output to a file, the spec prompt would not be seen and command line editing would be disabled. The libedit version now distributed with spec disables that feature of the standard libedit distribution, restoring the previous behavior. As usual, the version of libedit used with spec can be downloaded at certif.com/downloads/extras. Note, to make a log of spec's tty output, CSS recommends using a tlog file rather than the tee utility.

May 29, 2012 - RELEASE 5.10.02-14

Fix For wait() With Some MCA Models

An issue when using the wait() function to determine when counting had finished with certain MCA devices active with "auto_run" mode on and "soft_preset" mode off has been fixed. The problem was due to spec considering the MCA done after sending the halt command, but prior to the device acknowledging it had stopped. The EPICS MCA was particularly affected. The code for the SEIKO EG&G MCA 7700, the Bruker Vantec-1 and the Ortec PCI MCS had the same defect, but the consequences were unlikely to be noticed.

Fix For Number of Channel Configuration For Some Controllers

A recently introduced issue with channel configuration for certain controllers where channels are numbered starting from one in the configuration file has been fixed. The last channel configured would generate a "not enough channels on unit" message unless the number of channels on the Devices screen of the configuration editor was increased by one. Affected controllers were the Attocube ANC300, EPICS motor record, JVL SMI20B, Munich BR-tronik IPS, Newport Agilis, PI E-712 and Sigmatech FC-501A.

May 19, 2012 - RELEASE 5.10.02-13

Fix For GPIB-ENET Reads

A bug, introduced in the spec release 5.10.02-3 update to support the GPIB-ENET/1000 modules, where GPIB-ENET reads would fail if the read count had bit 7 or 15 set, has been fixed.

May 17, 2012 - RELEASE 5.10.02-12

Fix For Signal Handling When Using TANGO GPIB

A bug, where spec could crash when the new TANGO GPIB device server was configured and software signals associated ^C or the software timer were raised, has been fixed.

Fix For Channel Count For TACO VCT6

A recently introduced issue, where it became necessary to configure the number-of-channels parameter on the Devices screen of the configuration editor with one more channel than needed when using the TACO VCT6 device server, has been addressed.

May 12, 2012 - RELEASE 5.10.02-11

New "timestamp" Option For epics_par()

A new "timestamp" option is available with the epics_par() function to return the EPICS timestamp associated with a process variable. See the epics help file for details.

Fix For Using Named Pipes As Output Devices

A problem with spec hanging when opening a named pipe when no process had the named pipe open for reading has been fixed.

New "bl18b" surf Geometry

A new liquid surface diffractometer geometry for beamline BL18B at the Photon Factory is included in this spec release.

May 8, 2012 - RELEASE 5.10.02-10

Fix For EPICS Crash

On certain platforms, use of epics_put() with the optional third argument to have the code wait for a callback to indicate the value has been sent resulted in a segmentation fault. The crash might also appear when reading using the built-in EPICS serial device support. The problem has been fixed.

Update To Recognize New Model Tsuji Counter

This spec release will recognize the new Tsuji model CT08-01D counter/timer.

May 5, 2012 - RELEASE 5.10.02-9

Fix For Recently Introduced Bug With PCI Am9513

The configuration updates included in spec release 5.10.02-1 introduced a bug that could cause a segmentation fault when a PCI Am9513 was configured. This release fixes that problem.

TACO Serial Driver Support Reversions

The changes to the support for TACO serial driver introduced in spec release 5.10.02-3 to display additional error messages have been removed. However, an issue where HDW_ERR could be incorrectly set when reading a serial device has been fixed.

April 6, 2012 - RELEASE 5.10.02-8

Fix For Slow Reads Using Built-In NI PCI-GPIB Support

A timing issue with spec's built-in support for the National Instruments PCI-GPIB controller, where GPIB reads of large blocks of data (on the order of 10,000 bytes or more, depending on the transfer rate) could take much longer than necessary, has been fixed.

April 2, 2012 - RELEASE 5.10.02-7

More Controllers Allowed In Configuration

The maximum number of motor controller and timer/counter entries on the Devices screen of the configuration editor has been increased from 40 to 64. In addition, a bug where the configuration editor could crash if there were more than the allowed number of controllers in the config file has been fixed.

Fixed decode() Function

A bug, where the newly added decode() function did not allow assignment of its return value when the return value was an associative array, has been fixed.

Updates For Micos MMC-100

A problem where spec would consider a move complete too early with the newly added Micos MMC-100 support has been fixed. In addition, a new "initialize" motor_par() option is available to locate the limit and home position of a stage. See the mmc100 help file.

Update For New Struck SIS1100ecmc Model

The hardware signature of Struck's new SIS1100ecmc 2G link PCIe-to-VME adapter is now recognized by spec's driverless built-in support.

Fixed ANC300 Support

A bug in the newly added support for the Attocube ANC300, where spec could crash if a controller was configured but not connected, has been fixed.

OMS Motor Controller Updates

spec will now allow up to ten channels per controller for the OMS MAXnet controller in order to work with the new models. Also, a bug, where the "init_sequence" parsing did not recognize the BD command to configure digital I/O direction, has been fixed.

OMS Motor Multiplexing Fixed and Updated

The configuration updates in spec release 5.10.02-1 broke the old motor multiplexing support in the OMS code. The code been brought up to date and is working again. In addition, the support now allows a multiplexed channel for each controller module. Previously, only one multiplexed channel was allowed among all the controllers. With multiplexing, one OMS channel can drive up to sixteen motors. spec uses five digital output lines on the OMS controller to control external hardware that switches the motor driver power lines among the multiplexed motors. See the new section on multiplexing in the oms help file for details.

March 14, 2012 - RELEASE 5.10.02-6

Fix For Serial Support On Linux

Some kernel-level serial device drivers on Linux did not work with the updated code in spec to set baud rates introduced in spec release 5.08.06-4. In particular, problems have been seen with drivers for Prolific PL2303 USB-to-serial adapters and for the Rayon Multiport PCI cards. This spec release should fix the issue.

March 11, 2012 - RELEASE 5.10.02-5

Support For Micos MMC-100 Motor Controller

This spec release includes preliminary support for the Micos MMC-100 Modular Motion Controller System. See the mmc100 help file for implementation details.

Updates For OMS Support

Values for the standard optional motor parameters "dc_integration_limit", "dc_veloc_feedforward" and "dc_accel_feedforward" will now set the KU, KV and KA OMS parameters, respectively. The non-standard optional motor parameter "pid_offset" will program the KO OMS parameter. A new "closed_loop" motor_par() non-standard optional parameter can disable/enable closed-loop mode during a session or from the config file. When using servo motors, the code will now query the encoder status during moves to detect moves interrupted by a slip if slip detection is enabled. For firmware versions greater than 1.30, spec now will send the new commands for a number of deprecated commands.

Fix For USB-4300 "get_bit" Command

An issue where the "get_bit" option to the counter_par() function for the Measurement Computing USB-4300 series timer/counters didn't return the correct value has been fixed.

Fix For Allowed GPIB Addresses

Previously, spec allowed GPIB device address 31 to be passed to the GPIB controller support code. The maximum valid address is 30, and spec now respects that.

Support For TANGO GPIB Server

spec supports release 1.0 of the TANGO GPIB device server. All of the existing GPIB support, including the user-level commands such as gpib_get() and gpib_put(), along with the built-in support for motor controllers, counter/timers and other devices that use GPIB should work if the "TANGO GPIB server" interface is selected in the hardware configuration editor.

New TANGO Options To Obtain Attribute Information

Additional options are available to the tango_get() function to display or return all available descriptive attribute properties. See the tango help file for details.

Fix For NI 6601/2 Unavailable Channel Access

A bug, where spec could crash if an unavailable National Instruments 6601 or 6602 counter channel was accessed with counter_par(), has been fixed.

January 5, 2012 - RELEASE 5.10.02-4

Fix For Linked Configurations

A issue when using linked config files that was introduced in spec release 5.10.01-9 where in some configurations spec would quit immediately after reading the hardware configuration with a message of the sort "user(): Not configured for motor ..." has been fixed.

December 28, 2011 - RELEASE 5.10.02-3

Support For NI GPIB-ENET/1000

spec will now work with the National Instruments GPIB-ENET/1000 using spec's built-in support. The programming for the GPIB-ENET/1000 is a bit different than that for the GPIB-ENET/100 and the GPIB-ENET models, which continue to be supported.

Restored Compatibility With NI Linux Drivers

spec can now be linked with release 2.9.0 of the National Instruments GPIB drivers on Linux, although use has not been well tested and isn't recommended. Use of spec's built-in GPIB support is preferred. See the nigpib help file for details.

Update For Newport SMC100 Controller

A too short serial timeout for the Newport SMC100 controller has been fixed.

Update For Newport NSC200 Controller

Checks on maximum values for the velocity and acceleration when using the Newport NSC200 motor controller have been removed, as the maximum values built into the software were too low for some actuator models. spec will now program the values requested. Users should make sure the configured values do not exceed the specifications for the particular actuator model.

Preliminary Support For the Attocube ANC300

This spec release contains preliminary support for the Attocube ANC300 controller. The current release is only for controllers with one active channel. Updated support will be provided when the ANC300 firmware is updated to accommodate easier programming of multi-channel configurations.

Update For Attocube ANC350 Support

spec now recognizes the "targetground" parameter for the Attocube ANC350 positioner.

Trinamic Check-For-Reset Feature Updated

The check-for-reset feature for Trinamic motor controllers, implemented in spec release 5.09.01-1, will now also restore motor position when restoring parameters.

TACO Serial Driver Update

Some error messages associated with the TACO serial device that had been suppressed are now shown.

Update For Miscellaneous State File Data

Some internal improvements have been made for the handling of certain miscellaneous data that is saved in the user state file. Such data includes spec_par() parameters and some persistent hardware parameters. In most cases, the data will now be properly restored if saved by one computer and read by another of different endianess, such as an Intel PC (little endian) and a Sun SPARC station (big endian).

New Option For show_state Command

The show_state command now includes a new +/-x option to show or not show miscellaneous values, which include the spec_par() parameters and some persistent hardware parameters. Only the values are displayed, not the parameter descriptions.

November 8, 2011 - RELEASE 5.10.02-2

Support For SmarAct Controller

spec now supports the SmarAct GmbH Modular Control System for micro- and nanopositioning. The support is for the serial interface. See the new smaract help file for details.

October 25, 2011 - RELEASE 5.10.02-1

New Option to Disable Controllers In Configuration Editor

A new option is available to disable the configuration of motor and counter controllers, interface controllers, serial devices, MCA-type devices and image-type devices from the edconf configuration editor without removing the configuration from the config file. The YES/NO column of the configuration for each of these items now has an additional OFF option, which can be selected by typing an O or an o. When "off", the configuration information will remain in the config file, but spec will treat the controller or device as disabled and not access it.

Macro Hardware MCA Update For Returned Count

The macro-hardware MCA implementation for the commands "read" and "write" now accepts a return value for the number of points actually read or written. The value will determine how many data elements will be transferred to the spec data array when mca_get() is called with an array argument and will be the return value for the mca_get() and mca_put() functions when called with group/element arguments. See the mac_hdw help file for additional details.

October 21, 2011 - RELEASE 5.10.01-14

Fix For Number Of Generic Serial Devices

The edconf hardware configuration editor allows 21 generic serial devices to be configured, but prior to this release, spec only allowed 20 to be opened.

October 18, 2011 - RELEASE 5.10.01-13

Fix For Tsuji Counter Update

A problem with the previous update for the Tsuji counter/timers that prevented proper operation of the devices on some platforms has been fixed.

October 9, 2011 - RELEASE 5.10.01-12

Fix For chg_dials() Crash Bug

An old bug, where spec could crash if chg_dials() was called to perform a limit search using an out-of-range motor number, has been fixed.

Updated Support For Tsuji Counters

The built-in support for the various models of the Tsuji counter/timers has been updated. A reset command is no longer sent on hardware initialization. Settings for certain internal parameters, such as maximum allowed preset and preset resolution, are now correctly assigned based on the capabilities of the specific model detected during the presence test.

Attocube ANC350 Support Now Includes Limit Searches

Limit searches using the "lim+" and "lim-" options to chg_dial() are now available for the Attocube ANC350 controller. See the attocube help file.

Support For Radicon SCSD-3C

This spec release includes support for the Radicon SCSD-3C X-ray scintillation detector with integrated timer/counter. See the radicon help file for details.

October 1, 2011 - RELEASE 5.10.01-11

Fix For USB Support On openSUSE 10.0 and 10.1

The USB devices supported by spec should now work with the old openSUSE 10.0 and 10.1 Linux releases.

Preliminary Support For Physik Instrumente E-516 Motor Controller

This spec release includes initial support for the Physik Instrumente E-512 controller over serial and GPIB interfaces. Contact CSS for implementation details.

September 26, 2011 - RELEASE 5.10.01-10

Fix Of Bug In Previous Release That Leads To an Early Exit

This minor update fixes a bug that was put into the previous release and that would cause spec to terminate during initial hardware configuration if there was a position discrepancy that was resolved in favor of the motor controller.

September 23, 2011 - RELEASE 5.10.01-9

Fix For eval() Return Of Associative Array

The stricter validation for assignment of associative arrays implemented in spec release 5.09.2-2 disabled the ability to return associative arrays from the eval() function, which also broke the behavior when using the remote_eval() function with a spec server. That problem has been fixed.

Improvements For "Commanded" Position, Reversion Of mvr Macros

Several instances where the value for the last-commanded position of a motor was incorrect have been fixed. (The last-commanded position is available with the new move_info() function and a new option to read_motors(), both introduced in spec release 5.10.01-1. The last-commanded position saves the requested target position to the fully specified resolution, while the usual motor position is rounded to the motor step size. Using the last-commanded position to calculate target positions in relative moves allows one to perform successive relative moves in increments less than the motor resolution.) The last-commanded position will now be set to the current motor position on a fresh start (with the -f flag), when leaving simulate mode, and after correcting a position discrepancy where the software position or user offset was adjusted to match the hardware. Although the updated mvr and umvr included in release 5.10.01-1 should work fine for most users most of the time, the previous definitions have been restored for the time being while CSS works to make sure the last-commanded position feature is as robust as possible. The definitions that use the last-commanded position are still available as mvr2 and umvr2.

September 15, 2011 - RELEASE 5.10.01-8

String Values Now Available For epics_get() Character Arrays

When reading arrays of DBF_CHAR with epics_get(), if the optional argument that specifies the desired type of the return value is specified as "string", spec will now return an ordinary string. Previously, the function would return a single-row string data array. See the epics help file.

September 10, 2011 - RELEASE 5.10.01-7

Fix For Canberra Lynx MCA Issues After ^C

A problem with the Canberra Lynx MCA, where socket communications could become disrupted if a transaction was interrupted by a a keyboard ^C, has been fixed.

Fix For State File Locking On Mac OS X

Normally, spec prevents the same user from starting multiple instances of the same spec version. A problem on Mac OS X, where the locking mechanism didn't always work correctly with more than ten terminal windows open, has been fixed.

Fix For GPIB Sharing With Built-in NI GPIB Support

A problem where the sharing feature for GPIB controllers wasn't working with the built-in support for some of the National Instruments GPIB models has been fixed.

September 4, 2011 - RELEASE 5.10.01-6

Prompt Now Indicates Simulate Mode

The spec prompt will now contain text to indicate when simulate mode is active, as in 123.FOURC_sim> .

Mu Pseudomotor Available For Six-Circle Geometry

The six-circle geometry, sixc, now recognizes a configuration where the mu rotation involves two real motors, muT and muR. See the sixc help file.

Fix For Recently Created Pseudomotor Issue

An oversight in spec release 5.10.01-3 that removed the ability to use motor_par() to retrieve arbitrarily configured unit and channel numbers for motors with the NONE controller type has been remedied.

Fix For EPICS Debugging Messages

A bug, where the values printed at debug level 128 for the epics_put() command were incorrect for non DBF_DOUBLE number-valued process variables, has been fixed. The bug only affected the debugging output, not the values sent through the EPICS channel access calls.

Update For Attocube Controller

The Attocube ANC350 controller support has been updated to work better with the firmware problem where the controller can take hundreds of milliseconds to report a motor is busy after spec sends a move command.

Fix For Number Of Channels For Huber SMC 9300 Controller

A bug, introduced in spec release 5.09.01-3 and associated with the update to the Huber SMC 9300 support for simultaneous motor starts, where the highest numbered motor channel wouldn't move unless the number of motor channels configured was one more than needed, has been fixed.

August 12, 2011 - RELEASE 5.10.01-5

Fix For Motor Sync Issue With spec Client

A bug, where a ^C on a spec client could be ignored during a move of a motor on a spec server, has been fixed. The issue only occurred if the server had sent the client a "sync_check" message that initiated a motor discrepancy dialog on the client. (The bug was related to improper settings of the keyboard-input modes after the discrepancy dialog.)

Fix For Setting Certain MCA Parameters On Unresponsive Unit

The mca_par() commands "auto_clear", "auto_run" and "soft_preset" can now be used to set those modes on MCA devices that are configured, but not responsive. In particular, for the EPICS MCA (which isn't flagged as responsive until all the registered connection events arrive), the mca_par() commands can now be used immediately after reading the config file. For example, the commands can be included in the definition of config_mac, which will generally execute before the EPICS MCA is fully connected.

Fix For EPICS MCA Polling During wait()

A bug, where EPICS events were not processed during a call of wait() or wait(0) if the only EPICS device that was busy was the EPICS MCA, has been fixed.

Fix For TANGO Commands

Implementation of data-array type conversions for tango_put() input arguments has been completed. Previously, if the type of the data array passed to tango_put() didn't match TANGO's expected data type, incorrect data could be sent. Also, a bug with the tango_io() and tango_put() functions with 64-bit spec builds, where incorrect values were sent when converting elements of an input associative array to TANGO long (32-bit) data types, has been fixed.

ser_par() "queue" Implemented For TACO Serial Devices

The ser_par() "queue" option is now implemented for the TACO serial device server.

July 1, 2011 - RELEASE 5.10.01-4

Fix For OMS Position Maintenance With Negative Encoder Ratio

A problem, where the Oregon Micro Systems position-maintenance mode would not work if the encoder-step-size parameter had the opposite sign of the standard step-size parameter, has been fixed.

June 22, 2011 - RELEASE 5.10.01-3

Fix For Calculational Pseudomotors In Server Mode

A problem, where spec would get stuck waiting for a move to finish in the seldom encountered configuration of running in server mode with a calculational pseudomotor (using the macro hardware feature) having an associated real motor configured as controller type NONE, has been fixed.

June 20, 2011 - RELEASE 5.10.01-2

Fix For GPIB-ENET Issues On ^C

An issue with some built-in hardware controlled over GPIB using the National Instruments GPIB-ENET interface, where a ^C interrupt would lead to a breakdown in communications with the GPIB-ENET, has been fixed.

June 6, 2011 - RELEASE 5.10.01-1

New move_info() Function

A new move_info() function returns information about what would happen on a subsequent move_all command given the current motor positions and current values in the A[] array. The information returned can include a list of motors that would be moved. See the new move_info help page for details.

New "Commanded" Motor Position Value Available With read_motors()

spec now retains the value of the commanded motor position passed to the move code via the motor position A[] array. The value is retained to the full precision specified, which can be higher precision than the normal motor positions, which are rounded to the step size of the motor. A new option to the built-in read_motors() function will return this commanded position. If called as read_motors(0x10), the commanded positions for all motors will be placed in the A[] array. If called as read_motors(0x10, mne), the function will return the commanded position for motor mne, leaving the A[] array unchanged. The commanded position is set to the current (rounded) position on start up, after hardware reconfiguration, at the end of a homing operation, after hitting a limit, with a chg_offset() command (called by the set macro) and when a move is aborted by ^C or an emergency stop.

Revised _mvr Macro Uses Commanded Position

The standard _mvr macro (used by mvr and umvr) has been updated to use the new commanded-position return value of read_motors() to calculate the target position of the relative move.

New encode() and decode() Functions

New built-in functions encode() and decode() are available to convert between spec data types and data-serialization formats to aid in exchanging data with other processes. See the new encode help file for details.

New Macro Hardware MCA Functionality

The macro hardware feature now includes support for MCA devices, in addition to the existing support for motors and counter/timers. See the mac_hdw help file for details.

Restored Auto-Raise Functionality to X Window Plots

The focus-stealing-prevention functionality that has appeared in window managers over the last years broke the auto-raise feature of spec's X Window plots. With the auto-raise feature enabled, hidden or partially hidden plot windows rise to the top when spec updates the plot. This release restores the auto-raise functionality. See spec's x11 help file for details on setting plot window options.

Fix For Early Read Of Counters In Server Mode

In server mode, while waiting for command input, spec will periodically issue calls to read the active scalers and cache the values in order to be able to respond to client requests for scaler values without needing to access the hardware. Previously, as part of this procedure, the counters would be read immediately after starting the time count interval. Now, that first read won't occur immediately. The change will be noticed particularly in the sequence of calls to macro counter _cmd() functions.

Enhanced Support For 2D Associative Arrays With var in Syntax

The syntax related to querying 2D associative arrays with a known second element, as in

for (var in arr[][key]) print arr[var][key]

and

if (var in arr[][key]) ...

is now supported. Previously, such usage produced a syntax error.

Support For DEV_ENCODED tango_io() Type

This spec release supports the current implementation of the new DEV_ENCODED data type for the tango_io() function as used at ESRF and elsewhere.

Fix For Crash When Using Empty Macro Functions

A segmentation fault that sometimes occurred when using macro functions defined as an empty string (no curly brackets) in particular contexts has been fixed.

Fix For TACO MCA Access Of Disabled Units

A bug, where spec would access the device state on a call of disabled (via the "disabled" key for the mca_par() function) TACO MCA device-server units, has been fixed.

Fix For Mistaken "Duplicate Channel" Error

An issue with a handful of hardware controllers (EPICS motor record, ESRF VCT6, JVL SM120B, Munich BR-tronik IPS, Newport Agilis and Sigmatech FC-501A), where a "duplicate channel" error message would sometimes be erroneously displayed during hardware configuration when a channel number was the same as the configured number of channels, has been fixed. The issue with the VCT6 was introduced with the code update in spec release 5.09.02-1. The issue with the other controllers dates generally from the introduction of the particular controller support to spec.

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.

June 3, 2010 - RELEASE 5.08.06-6

Fix For Repeated "Lost Connection" Messages

A problem where a spec client would occasionally print a stream of "Lost Connection" error messages has been addressed. Only one message per event should appear now.

Support For EPICS Motor Record Update

The spec support for the EPICS motor record has been adapted to follow the elimination of the RES process variable in release R6-5.

May 20, 2010 - RELEASE 5.08.06-5

Fix For Crash On epics_put() Syntax Error

A bug dating from the original EPICS implementation in spec, where using only one argument with the epics_put() function could cause a crash, has been fixed. Such use is now properly flagged as a syntax error.

Fix For Crash On epics_get() When Forcing String Type

A bug, where spec could crash when using epics_get() with the optional "string" argument to read a process variable of array type that was longer than 40 bytes (the maximum length of an EPICS string) but was not DBF_STRING type, has been fixed.

Fixes For Returning EPICS Arrays As Strings

When forcing a "string" type with epics_get(), spec now properly formats the returned values as ASCII strings for all supported EPICS data types. For native types other than DBF_CHAR, arrays will be returned as a spec string data array consisting of 40-byte rows, with as many rows as elements in the EPICS array. For DBF_CHAR data, the return value will be a single-row string data array with as many columns as elements in the EPICS array. See the epics help file for more information.

Fix For Writing to EPICS Character Arrays

When sending values to a process variable which is an array of DBF_CHAR type using epics_put(), non-array values will now be transferred as a string, filling as many elements of the array as the string is long. Previously, the number value of the argument would be assigned to only the first element of the process variable array.

May 19, 2010 - RELEASE 5.08.06-4

Baud Rate Setting Now Working on Mac OS X

A bug in Mac OS X version of spec, where serial lines only worked at 9600 baud, has been fixed. Note, spec only changes baud rates on serial lines on a Mac when using USB-to-serial converters, as the Mac hardware that spec supports doesn't include built-in serial ports. For serial ports accessed via Ethernet-to-serial devices, spec doesn't set the baud rate.

Fix For Limit Message On Micos Pollux Controllers

A problem associated with recent updates to the Micos motor controller support, where hitting a limit switch with the Pollux models would stop the associated motor but not generate a limit message in spec, has been fixed.

Fix For Move-To-Limit Operation On Trinamic Controllers

Previously, if a move-to-limit search was the first move performed with a Trinamic motor controller, the motor speed used for the move was undefined. spec now programs the move speed before doing a limit search.

April 15, 2010 - RELEASE 5.08.06-3

Can Now Check Active Status Of Calculational Pseudomotors

The command motor_par(mne, "active") will now return a zero or one to indicate whether any of the real motors associated with the calculational pseudomotor mne are busy. Previously, the command only worked with real motors.

New "nodelay" Option For TCP Sockets

Is now possible to disable or enable the TCP_NODELAY socket option via a "nodelay" option to sock_par(). See the sockets help file for details.

New "fast_hdw_checks" Option For Server Mode

An experimental "fast_hdw_checks" option is now available via spec_par() to enable clients to get a faster notification of changes in hardware status. See the spec_par help file for details. Is used, please report any issues to CSS to allow further tuning of the code.

Fixes For Sigmatech FC501-A Motor Controller

This release includes a couple of fixes for the recently added support for the Sigmatech FC501-A motor controller.

Fixed Crash With Unresponsive OMS PC48

A bug, introduced in spec release 5.07.04-1, where spec would crash when configured for an OMS ISA PC48 motor controller and no such controller was detected, has been fixed.

Fixed Parameter Issue With Attocube Controller

A bug, introduced in spec release 5.08.03-8, which disabled the ability to set values for non-standard optional motor parameters from the config file for the Attocube ANC350 motor controllers, has been fixed.

March 25, 2010 - RELEASE 5.08.06-2

Support For Oregon Micro Systems MAXnet

The OMS MAXnet motor controller is now supported over both RS-232C (serial) and Ethernet interfaces. See the oms help file for configuration details.

March 22, 2010 - RELEASE 5.08.06-1

Support For Dectris Mythen 1K MCA

This spec release includes a first version of support for the Dectris Mythen 1K MCA over the Ethernet interface. See the mythen help for complete details.

Support For Sigmatech FC501-A Motor Controller

This spec release supports the Sigmatech FC501-A motor controller over GPIB and RS-232C interfaces. See the sigmatech help file for complete details.

Fix and Additions For fmt_read() Programming Functions

The fmt_read() and fmt_write() functions allow specific binary data formats to be supported in spec. The source code to the functions included in the standard spec distribution serves as documentation for the feature. This spec release includes a new C function, ff_adjust_byte_order(), which can be called in the read function to adjust the byte order of the binary data if it differs from that of the current platform. Also, the existing function ff_put_head_item(), which can be called in the read routine to transfer header items to the spec user level, now works properly. Finally, the specification of the format name in the spec user-level function calls is now case insensitive.

Enhancement For the ESRF Format For fmt_read()

The fmt_read() implementation for the ESRF data format will now correct data for byte order if the data in the file is different from that of the host. In addition, a fmt_read() call will now properly fill the optional associative array argument with all values from the data file header.

Update to spec Shared Memory Header For Frames

The spec_shm.h file contains an updated header for the spec shared memory structure with new elements called frame_size and latest_frame, and a new flag definition SHM_IS_FRAMES. The intended usage is to communicate to auxiliary programs that 2D data consists of a series of frames, where the frame_size element will contain the number of rows per frame, and the latest_frame element will contain the most recently updated frame number. The version number of the structure has been incremented from 4 to 5.

New array_op() Options For Frames

It is now possible to tag shared data arrays as a "frames" type, which means the data in a 2D array can be described as a series of acquisitions. A "frame_size" parameter is the number of rows per frame. A value of one would be appropriate for a series of MCA acquisitions. A "latest_frame" parameter can be assigned the frame number of the most recently added frame. The values can be set and retrieved using the array_op() function. In addition, certain hardware support may set the frame parameters (see the mythen help file). See the arrays help file for more information on frames.

Fix For Counters-Only Configuration Of Tsuji Counter/Timers

A bug, where a Tsuji counter/timer configured as "counters only" was not started correctly, has been fixed.

Fix For Crash With -p Flag On Startup

A situation where spec could crash when started with the deprecated -p flag directly from the shell has been fixed.

February 5, 2010 - RELEASE 5.08.05-6

Support For Revised Amptek MCA 8000A Firmware

spec now supports the new firmware included with the Amptek MCA 8000A with serial numbers 3660 and higher. The new firmware can be used with USB-to-serial adapters on Linux. See the amptek help file for details.

Fine Tuning Of New Micos VENUS-3 Support

This spec release contains a minor update to the Micos motor controller support added in the previous release to better handle error responses from the controller.

January 12, 2010 - RELEASE 5.08.05-5

Can Now Assign PCI Bus and Slot Numbers For NI 6601/2 Cards

It is now possible to specify the PCI bus and slot numbers of National Instruments 6601/2 timer/counters cards in the spec configuration editor, so that a particular card can be selected when more than one is installed in the same PC. See the ni660x help file for details.

Files Opened For array_dump() Will Close Automatically

If an unopened output file is used as the optional first argument for the array_dump() (or data_dump()) functions, spec will now automatically close the file when the function finishes. Previously, such files remained open and an explicit close() call to remove the file from spec's list of open output files was required. If the file is already open when the function is called, it will stay open and on the list of open files.

Updates To the New Micos VENUS-3 Support

This release includes a couple of updates to the support for the Micos VENUS-3 protocol as used with the new Hydra models introduced in spec release 5.08.05-1. The new setorgconfig command included with Hydra firmware 2.034 is used so that the spec set_dial command will work as expected. Also, the error stack is now cleared when an error is detected, preventing spurious error messages on subsequent commands.

Fix For Recent Bug Concerning EPICS Motor Numbering

A bug introduced in spec release 5.08.04-3 which prevented an EPICS motor with channel number one from being used has been fixed.

December 3, 2009 - RELEASE 5.08.05-4

Fix For Macro Hardware Parameters

A bug introduced in spec release 5.08.05-1 that removed the unit number from the argument list in calls to the prefix_cmd() macro-hardware macro function has been fixed. In addition, an issue where the value of the prefix_ADDR and prefix_CONPAR parameters would be cleared if the prefix_par() macro function was called from the prefix_cmd() macro function has been partially addressed. With this release, the above parameters are not available in prefix_par() although the value of prefix_ADDR can be retrieved using the counter_par() or motor_par() "address" argument.

November 25, 2009 - RELEASE 5.08.05-3

New Write-Only I/O Port Configuration Option

Due to issues with certain PC cards freezing a Linux system when a write-only I/O port is accessed for reading, spec now supports write-only I/O port configuration on the Interfaces screen of the hardware configuration editor.

Fix and Additional Support For Measurement Computing PCI-DDA Cards

Newer revisions of the Measurement Computing PCI-DDA DAC cards (supported via spec's DAC motor facility) appear to freeze a Linux PC if write-only ports are accessed for reading or if ports associated with channels not present on the card are accessed at all. The presence test for the cards now no longer attempts a read of the write-only ports. Also, spec now determines the maximum number of channels for PCI DACs automatically and will overrule a misconfigured value from the config file. In addition, spec now supports Measurement Computing models PCI-DDA02/12, PCI-DDA04/12, PCI-DDA08/12, PCI-DDA02/16 in addition to the PCI-DDA04/16 and PCI-DDA08/16 models previously supported. See the dac help file for more details.

Fix For PI Motor Controller Crash

A bug introduced in release 5.08.05-1, where spec would crash during hardware configuration if the device associated with a Physik Instrumente motor controller channel couldn't be opened, has been fixed.

Fix For Mclennan PM595 Delays On Exit

Previously, when quitting spec, each Mclennan PM595 motor controller configured would add a delay of one second to the time it took for the spec process to exit. Those delays are now gone.

Fix For unix() Return Value

A very old bug, where the return value of the unix() function when used with more than one argument was not the return status of the executed command, has been fixed.

November 16, 2009 - RELEASE 5.08.05-2

Fix For Broken Macro Hardware prefix_ADDR

A bug introduced in the previous release that broke the availability of the prefix_ADDR variable inside macro-hardware macro functions has been fixed.

October 30, 2009 - RELEASE 5.08.05-1

New Support For Controller Parameter Configuration

It is now possible to access the nonstandard optional controller parameters available from the configuration editor Devices screen. These parameters are entered and modified by typing the p command and appear in the config file prefixed with CONPAR. Values can now be accessed from the spec user level using the motor_par() and counter_par() functions. The parameter will be associated with the controller used by the motor or counter mnemonic given as the first argument. In addition, the parameters are accessible from within macro hardware functions as elements of the associative array prefix_CONPAR[] where the array elements are indexed by the parameter name and prefix is the macro function prefix.

Fix For Disabled Calculational Macro Motors

Previously, if the motor_par() "disable" command was used to disable a calculational macro-hardware pseudomotor, a move command for that motor would generate an error message that the motor was disabled, but spec would still send move commands to the associated real motors. That problem is fixed in this release. spec will no longer make mode=1 calls to the prefix_calc() function when the pseudomotor is in a disabled state. The associated real motors are not disabled, but will not move as a result of a move command to the pseudomotor.

A ^C Will Now Override "keep_going" Mode

The spec_par() "keep_going" option (introduced in spec release 4.05.01), which tells spec to keep reading and executing commands from a command file no matter what errors occur, will now return to command level if there is a ^C abort entered at the keyboard.

Shared Arrays Now Working on Mac OS X

A long-standing issue with the experimental spec support on the Mac OS X platform with respect to shared data arrays not working properly has been resolved.

Powder-mode Macro Update

The waitmove call in the _pcount macro associated with the powder-mode macros has been replaced by the new _pcount_em macro which adds calls of user_precount and user_postcount before and after the move_cnt command.

Fix For Position Resolution For Huber H9000

The support for the Huber H9000 motor controller will now send up to nine significant figures to specify the target position in move commands. Previously, only up to six significant figures were used.

Fix For OMS PC48 Issue

Recent updates to the spec support for OMS motor controllers resulted in a bizarre problem with the ISA bus PC48 model OMS motor controller on at least one platform, where the modified initialization sequences sent to all the OMS controllers resulted in a Linux crash. Although the exact mechanism of this crash is unknown, it has been suppressed by adding a couple of ten millisecond delays around the new commands.

Fix For PA In OMS "init_sequence"

The OMS support now correctly recognizes and requires a parameter of 0 or 1 for the PA (power automatic) command when included as part of an "init_sequence" nonstandard optional motor parameter.

New OMS Position Maintenance Details

By default, spec will now turn off position maintenance on OMS_P configured motors on exit. This default behavior can be disabled by setting the nonstandard optional parameter "keep_pos_maint" to a non-zero value. The parameter can be a controller parameter which will set values for all motors on the controller, or a motor parameter which will only set values for the individual motor (and override a controller parameter setting). In addition, spec now turns on position maintenance for OMS_P on start up rather than on the first move command. See the oms help file for details.

Preliminary Support For Micos VENUS-3 and Hydra Model

Support for the latest revision of the Micos firmware, called VENUS-3, as implemented in the Hydra model of their motor controller, is included in this spec release. The support is for both serial and Ethernet interfaces.

Preliminary Support For Physik Instrumente Model C-863 Motor Controller

This spec releases includes support for the Physik Instrumente (PI) model C-863 single-axis DC-motor controller.

Preliminary Support For Korean HMT HCC1 Motor Controller

This spec release includes preliminary support for the Korean-made HMT HCC1 motor controller over a serial interface. See the company's site (www.e-hmt.kr) for a product description.

September 10, 2009 - RELEASE 5.08.04-4

Fix For Crash When Using CAMAC RTC-018

A bug, where configuring an RTC-018 module could sometimes lead to a program crash, introduced when spec was updated over four years ago to support multiple CAMAC crates (release 5.06.02-1), has been fixed.

September 9, 2009 - RELEASE 5.08.04-3

New remote_par() Command For spec Clients

For spec clients communicating with a spec server, a new remote_par() command is available, currently with the following options: "connect" to open a connection to a remote server, "close" to close a connection, "abort" to send a ^C-type event to the remote server and "timeout" to set a timeout for remote_eval() calls. See the server help file for additional details.

A ^C During a remote_eval() Now Passed To Server

If a call to remote_eval() from a spec client is interrupted by a ^C from the keyboard, the client will send the spec server an SV_ABORT event, to which the server will respond as if a ^C had been typed at its keyboard. In addition, any pending commands in the server queue from that client will be flushed from the queue.

Cleanup Macros Now Called From Commands Sent To Server

If a command sent to a spec server encounters an error or is otherwise interrupted, the server will now run the standard cleanup macros, cleanup_once and cleanup_always (and the deprecated cleanup and cleanup1), if any such macros are defined.

Preliminary Support For the Newport Agilis Piezo Actuators

This spec release contains preliminary support for Newport's Agilis Model AG-UC2 controller over a USB interface. Each controller supports two piezo actuators. To distinguish multiple AG-UC2 modules, configure the device serial number in the address field of the configuration editor.

libedit Command Completion For Directory Names Restored

From time to time, the version of the libedit command-line editing library included with the spec distribution is updated to track changes at the upstream source repository. A recent change in the upstream sources, which was included in spec release 5.08.03-5 and subsequent releases, eliminated the feature where command completion for directory names appended a / rather than a space character. The prior behavior is now restored in the patched version distributed with spec. See the editline help file for details on spec's command-line editing library support.

August 9, 2009 - RELEASE 5.08.04-2

Fix For Recently Created OMS Bug

A bug created in the previous release, where OMS motor channels were not necessarily marked as unusable when the associated controller was unresponsive, has been fixed. It was possible for spec to crash in some instances due to this bug.

August 1, 2009 - RELEASE 5.08.04-1

Fix For Server Position/Count Update Throttling

The update in release 5.08.03-1 which limited the rate at which a spec server sends position and count updates to clients inadvertently blocked sending position updates for more than one motor when more than one motor was active. That issue has been corrected. Note, the problem only affected the updates during motion. The final position at the end of the move was always sent correctly for all motors.

Support For Struck PCI Express SIS1100E VME Card

This spec release supports the Struck model SIS1100E PCI Express to VME interface.

Updates For OMS Motor Controllers

Slip detection for OMS motor controllers configured with stepper motors and encoders is now supported. Also, additional OMS commands are permitted in the init_sequence optional parameter introduced in spec release 5.08.03-8. See the oms help file for details.

Encoder Update For Huber 9300 Motor Controller

When moving a motor configured with an encoder on the Huber 9300 motor controller, spec now sends a relative-move command rather than an absolute-move command. Relative moves make it more likely the position after a small move will match the commanded position.

July 17, 2009 - RELEASE 5.08.03-13

Additional Serial Baud Rates Supported

Serial devices can now be configured for 7200, 14400 and 28800 baud. Those rates were not previously supported by spec.

Fix For Canberra Multiport II Support

A bug in the support for the Canberra Multiport II MCA devices for configurations with less than the full complement of six MCA modules, where certain spec commands such as mca_sel("?") would cause spec to crash, has been fixed.

July 9, 2009 - RELEASE 5.08.03-12

New d2ps Geometry Variation

A variation on the standard psic geometry for the ERSF BM02 (D2AM) beamline is now included. The diffractometer differs in that the sample circles are stacked as eta, chi, mu, phi rather than eta, mu, chi, phi as in the standard psic. Currently only the "d1 d2 s1" modes are implemented and only for the eta sample circle fixed at zero. The configuration should be installed as geometry psic with name d2ps. The motor mnemonics and macros are otherwise the same as for psic.

Fix For ESRF/TACO Serial Device Configuration

A bug, introduced in spec release 5.08.03-4, where the spec configuration editor, edconf, did not properly read in serial devices configured to use the ESRF or TACO interface type, has been fixed. With the bug, the configuration editor would display the initial TACO: from the config file as part of the device name and not show the interface type as TACO.

Fix For Using ^C Around TANGO Calls

A problem, where a ^C keyboard interrupt during the TANGO user-level calls of tango_io(), tango_get() and tango_put() could cause memory corruption leading to a subsequent segmentation fault crash, has been fixed.

July 1, 2009 - RELEASE 5.08.03-11

Fix For Out-Of-Bounds Array Bug

A bug, introduced in spec release 5.08.01-9, where repeated access to out-of-bounds data array elements would lead to the message "Out of temporary cells" and made spec unusable, has been fixed.

June 30, 2009 - RELEASE 5.08.03-10

Support For the National Instruments VME-GPIB Module

spec now includes built-in support for the National Instruments VME-GPIB module. See the nigpib help file for more details.

June 20, 2009 - RELEASE 5.08.03-9

Improved GPIB Error Messages

The more frequent GPIB error messages, such as "GPIB timeout", now show the associated GPIB controller number (for other than controller zero) and device address, which may be useful in diagnosing hardware problems when many GPIB devices are involved. This update is only for the National Instrument GPIB controllers, but covers both the built-in and the external driver (or library) support.

Fix To Accommodate Old OMS Cards

Some of the recent updates to the OMS support had made very old OMS controllers (particularly ISA bus models) unusable. That issue is fixed in this release, and the older cards are again usable.

June 18, 2009 - RELEASE 5.08.03-8

Fixed Missing Shared Array Update In array_pipe()

When the array_pipe() function obtains new array data, it now updates the shared-array update flag used by other processes to detect changes in the shared array data.

Minor Fix For Reading Optional Motor Parameters

A small issue, where spec would send a command to certain models of motor controller to set the current value of an optional motor parameter when a motor_par() command was used to read the value, has been fixed. This fix simply eliminates an unnecessary hardware access. The parameter value returned by the command is as before.

Update To Attocube ANC350 Support

The code for the Attocube ANC350 will now update the current values (values returned by motor_par()) for non-standard optional motor parameters included in the config file to the values contained in a .aps file sent to the controller using the motor_par() "load" option.

An Initialization Sequence Can Now Be Configured For OMS Motors

If a non-standard optional motor parameter named "init_sequence" is created for an OMS motor controller motor, the string value of the parameter wil be sent to the controller by spec during hardware configuration as an initialization sequence. Only certain commands, such as those for configuring limits and the general purpose I/O pins, are allowed in the string. See the oms help file for complete details.

June 15, 2009 - RELEASE 5.08.03-7

New TIFF Support With fmt_write(), fmt_read()

spec now includes basic support to save two-dimensional array data to TIFF output files using the fmt_write() function. Code for reading TIFF files using fmt_read() is included, but is disabled by default, as it requires linking with libtiff.a, which is not part of the spec distribution. See the fmt_tiff.c file in the spec distribution for implementation details and how to enable the TIFF read functionality.

Fixed Delimiter Issues With array_dump() From Previous Release

A couple of problems when using the "D=" option introduced for array_dump() in the previous release have been fixed.

Update To Attocube ANC350 Support

The support for the Attocube ANC350 will now track changes to the "sensorunit" parameter made by loading .aps files, by reading the config file or directly through motor_par(). Previously, the parameter's value was read from the controller during hardware configuration and that value was used to label units displayed with the motor_par() "dump" option.

June 11, 2009 - RELEASE 5.08.03-6

New array_dump() Options

Additional options are now available to the array_dump() function. In particular, additional printf()-style format options are available for integer data types, one can now specify an arbitrary delimiter character, and one can now control the number of data elements printed per line when outputting two-dimensional arrays. See the array_dump() entry in the arrays help file for complete details.

Improved Support For UDP Sockets

The user-level socket support for UDP socket connections has been updated to provide more robust functionality. Previously, reading from UDP sockets did not work well.

Improved sock_par() "queue" Option

The "queue" option to the sock_par() command has previously returned the number of available bytes that have been read from the socket into spec, but have not yet been retrieved using sock_get(). (Data could remain in the queue due to a previous sock_get() call only reading up to an end-of-string match or a specific number of bytes.) In this release, if there are leftover bytes remaining in the queue from the prior sock_get() call, that number will still be returned. However, if there are no leftover bytes, spec will now query the underlying kernel driver to see if there is data available and will return that value.

Fix For ser_par() "queue" Option

The "queue" option to the ser_par() function has been long documented to return the number of bytes in the input queue, but has instead returned a fixed value of one if there were one or more bytes available (for UNIX-type serial devices). The function now returns the number of bytes available.

Fix For array_pipe() With 2D Data Arrays

A bug, where the array_pipe() (or data_pipe()) function would only fill the first row of a returned two-dimensional array, has been fixed,

Fix For array_pipe() With Big Shared Arrays

A bug, where the array_pipe() (or data_pipe()) function would generate a spurious error about a too large array when trying to read into a shared array larger than half a megabyte, has been fixed.

May 28, 2009 - RELEASE 5.08.03-5

Fix For Struck SIS1100 Driverless Support

A small timing problem with the Struck SIS1100 PCI cards using spec's recently added driverless support, where the card could become unresponsive to spec after repeated initializations, has been fixed.

New Emergency Stop Feature For OMS MAXv Controllers

For Oregon Microsystems MAXv VME motor controllers, if both limits are found active at the same time, spec will treat that as an emergency stop signal. The effect is very similar to what happens when a single hard limit, in that spec will stop all active motors and reset to command level. The difference is that a different message will be displayed on the screen, and if using spec in server mode, an "emergency_stop" event will be sent to clients. Note, with most models of OMS controllers, it is not possible to detect when both limits are set.

Fix For EPICS Encoder Motor Initial Value

An issue dealing with the initial value displayed for EPICS motors after spec release 5.08.01-4 (and partially fixed in spec release 5.08.02-3), has been fixed for motors where the UEIP (use encoder if present) process variable is nonzero. The order of events produced by the standard EPICS motor record caused spec to report the initial motor position based on the RRBV (raw read back value) process variable without correcting for the encoder resolution. spec will now recalculate the motor position whenever a UEIP event is received.

May 21, 2009 - RELEASE 5.08.03-4

New Polled Macro-Hardware Counter Type

A new polled macro-hardware counter type is available. These counters will be polled using the standard wait() function. Counting won't end until both the master timer and all polled macro-hardware counters have finished. See the mac_hdw file for details.

Support For Attocube ANC350 Piezo Controller

This spec release contains preliminary support for the Attocube ANC350 piezo controller over an Ethernet connection. See the attocube help file for implementation details. The controllers should have current firmware (later than 0.0.2.1) in order for spec's limit sensing to work properly.

New ser_par() Options for DTR, RTS, DSR

The ser_par() function can now be used to set values for the modem control Data Terminal Ready (DTR) and Request To Send (RTS) signals on standard serial interfaces. Also, the Data Set Read (DSR) signal can be read. See the serial help file for details.

Parameter Settings Can Be Combined With ser_par()

Multiple serial interface parameters can now be set with one call of ser_par() using a comma-delimited string of assignments. See the serial help file for details.

Configuration Editor Now Uses TACO For Serial Device Type

The serial interface device type used in the hardware configuration file and configuration editor that was formerly named ESRF is now called TACO. Both spec and the configuration editor will continue to recognize the old name, but the configuration editor will use TACO when writing out updated config files. spec binaries since release 5.01.01 will recognize both names. Previous releases of the configuration editor will not.

May 11, 2009 - RELEASE 5.08.03-3

Final Fix For Local Variables in Recursive Macro Functions

A remaining problem with the fixes in the two previous releases for local variables in macro functions, where a macro function could no longer return an associative array local variable, has been fixed.

May 5, 2009 - RELEASE 5.08.03-2

Tweak Of Fix For Local Variables In Recursive Macro Functions

A bug, introduced in the previous release and associated with the fix for macro function local variables used in recursive calls, where a local declaration of a variable as an associative array within a macro function was broken, has been fixed. Also, a second introduced bug, where using a local associative array within a macro function as an argument to a call of another macro function caused a segmentation fault when running spec in server mode, has been fixed.

March 16, 2009 - RELEASE 5.08.03-1

Install Script Simplified

Questions related to obsolete or little-used hardware options asked by the Install script have been eliminated. Specifically, questions for the cib, cvxi, ksc_scsi and sicl parameters are gone. Note, though, if the associated object files or libraries are still needed, they should be entered as values for the site_obj or site_lib parameters, as appropriate. The updated Install script will automatically convert old install_data files to the new format. Also, the Install script no longer asks whether to include CAMAC or VME support. Such support will be included for all standard installations. (As before, it is still possible to prevent linking in hardware support by manually editing the u_hdw.c file, although there is little reason to go to that trouble.)

Local Variables Now Behave Well In Recursive Macro Functions

Previously, local variables used in a macro function would be reset to zero on return from a recursive call to the same macro function. Now, local variables behave as expected.

spec Server Position/Counts Update Frequency Throttled

Position update events while moving and counter update events while counting sent by a spec server to its clients will now be limited to a rate no higher than four times per second.

spec_par("?") Now Shows Default Values

When the current value differs from the default value, the spec_par("?") command now displays the default value in parenthesis.

New spec_par("set_defaults") Option

A new spec_par("set_defaults") command will now set all the spec_par() parameters to their default values.

New spec_par() Option For Enabling a Motor Warning Message

A new spec_par() option "warn_not_at_pos" enables printing of a warning message whenever a motor doesn't reach its final position. Previously, the warning message was not optional, but was only available when spec was linked with TACO libraries.

Fix For plot_cntl("kill") With Multiple Windows

An ancient bug, where using the plot_cntl("kill") command with multiple plot windows open would make reopening some of the windows impossible, has been fixed.

February 26, 2009 - RELEASE 5.08.02-7

Fix For Recently Broken OMS Encoder Support

The support added in spec release 5.08.02-4 for position maintenance mode with Oregon Micro Systems motor controllers (OMS_P controller type) inadvertently broke the basic encoder support (OMS_E controller type). That problem is fixed in this release.

Fix For Keyboard Generated Stop Signal Issue

The keyboard generated stop signal (usually associated with ^Z) has always been purposely ignored by spec. However, when running a subprocess via the unix() command, such as with unix("vi somefile"), a ^Z would stop the subprocess and spec would hang (although recovery was possible by sending a kill signal to the subprocess via another terminal window). This spec release fixes that problem by allowing spec to receive the stop signal while such a subprocess is running. Thus, both the subprocess and spec are stopped (and both can be resumed with the shell fg command). Note, spec still ignores the keyboard stop signal at all other times.

February 24, 2009 - RELEASE 5.08.02-6

New strdef() Built-In Function

The new strdef() function returns a string containing the definition of the macro name given as an argument. If there is no such defined macro, the function returns its argument.

New Optional "Units" Argument To getval()

The getval() built-in function now takes an optional third argument. If present, it will be appended to the current value displayed in parenthesis after the first argument prompt string:

SPEC.1> p getval("Sample to detector", 100, " mm")
Sample to detector (100 mm)?

New "lisa" surf Geometry

A new liquid surface diffractometer geometry for the LISA instrument at Petra III is included in this spec release.

Support For Additional Physik Instrumente Motor Controllers

The Physik Instrumente (PI) model C-663, C-862 and C-863 motor controllers are now supported by spec. In addition, spec now supports the "home_method" standard optional motor parameter for PI motor controllers. If set, its value will be used as the argument to the controller's FE (find edge) command.

February 20, 2009 - RELEASE 5.08.02-5

Fix For AI Solutions DAQ Modules

A bug introduced with the recent updates to the support for the AI Solutions DAQ (formerly called HANARO KISIM) USB modules, where the elapsed counts, elapsed time, external triggers and count events could sometimes have preposterous incorrect values, both when displayed by mca_par("dump") and when returned by the associated mca_par() option, has been fixed.

February 18, 2009 - RELEASE 5.08.02-4

Server/Client Now Maintains Associative Elements As Strings

The spec server/client protocol transfers associative array index and value elements as strings. Previously, strings containing numbers would be converted to numbers when received. That would cause strings such as "090105" or "0123" to be converted to 0 and 81 respectively, as both would be treated as octal values (the first contains an invalid octal digit so becomes zero). spec now maintains the received values as strings. Note, conversion to numbers will be automatic when the values are used in a number context, just as with any locally generated value.

The local Help File Now Displayed On Start Up

A long documented but never implemented feature, where an optional file named local in the spec help directory would automatically be displayed on start up, is now available.

Fix For OMS Position Maintenance With Steppers

A problem associated with the position-maintenance support added for OMS stepper motor controllers in release 5.08.02-1 has been fixed. The problem was that a motor would run away under certain conditions associated with changing the position registers (as with the spec chg_dial() function).

Fix For XIA DXP Elapsed Time Value

The spec code for the XIA DXP modules now reads the clock rate from the module when it is available rather than using compiled-in values (20 or 40 MHz, depending on model). The clock rate is only used with two mca_par() parameters: elapsed real time as returned by "real" and dead time as returned by "dead".

January 28, 2009 - RELEASE 5.08.02-3

New tlog Log File Type

A new type of log file is available. If the name of an output file begins with the characters "tlog" or ends with the characters ".tlog", all output sent to the "tty" device (the screen) will be written to that file, but unlike regular log files, output sent to other files or devices will not be saved to a tlog file. As with all types of log files, output is not turned off on errors or ^C interrupts, and output generated by functions that "paint" the screen, such as tty_fmt(), tty_move(), plot_move(), show_help() and data_plot(), isn't written to the file.

Log File Carriage Returns Translated

spec now translates carriage return characters to newline characters in log file output. This change will make log files that contain output from updated moves and counts easier to handle with editors and other file handling utilities.

Debugging Now Available For TANGO Functions

The tango_io(), tango_get() and tango_put() functions can now display debugging information. Set the DEBUG level to 128 to see the debugging output.

Extra TANGO Attribute Information Available With tango_get()

Additional information associated with data obtained using tango_get() is available by passing an associative array as an optional third argument. Elements of the array will be assigned the data quality factor, time stamp and other attribute information. See the tango help file for details.

Fix For EPICS Motors

An issue, where spec would display the wrong motor position for an EPICS motor under certain conditions, has been fixed. The problem would only occur if the first event sent to spec for the motor's RRBV process variable had a value of zero while the corresponding dial position from the spec settings file was nonzero. This problem has only been an issue since spec's 5.08.01-4 release, which began using only event notifications for keeping track of EPICS motor positions.

January 22, 2009 - RELEASE 5.08.02-2

Fixes For Image Device Support

A buffer size limitation in image_par() that caused problems with the Frelon cameras has been fixed. A bug, where region-of-interest parameters used with the

image_par(sel, "roi", beg_row, end_row, beg_col, end_col)

invocation couldn't be greater than 128, has been fixed.

Updates For AI Solutions DAQ Modules

The support for the AI Solutions DAQ (formerly HANARO KISIM) USB modules has been updated to enable readout of the 256x256 preview images returned when the device is acquiring data. Also, the restriction on the absolute value of the offset_x and offset_y parameters to the current resolution has been removed. See the updated kisim or aisolutions help file for more information.

January 13, 2009 - RELEASE 5.08.02-1

Updates To spec Code

The majority of the spec package source code has been updated from traditional (or K&R) C to ANSI/ISO Standard C. Although spec is still distributed as a 32-bit application, the code updates also include changes to allow 64-bit distributions in the future. Most of the C files that are included in the distribution will reflect the updates, mainly in terms of function declarations. The software should behave the same as before, although with changes to many thousands of lines of code, it is possible for a new bug to have slipped past the quality control checks. As always, if you note any anomalous behavior in this spec release, please promptly inform CSS.

Position Maintenance Support For OMS Steppers

spec now includes support for the position-maintenance feature for stepper motors with encoders as is available with most OMS motor controllers. See the spec oms help file for details.

Removed Sixteen Motor Limit On Huber 9300

The configuration restriction on the number of motors allowed for the Huber 9300 motor controller has been removed to accommodate new versions of the controller that support more than sixteen channels.

USB Reset Added For XIA DXP

The support for the USB interface on the XIA DXP devices now includes sending an initial USB reset, which fixes a problem that appeared with USB 2.0 versions of the device, where spec could only connect once without cycling the power to the device.

Fix For GPIB-ENET Big Reads

A bug, where spec's built-in support for the National Instruments GPIB-ENET device left gaps in the returned data when reading large blocks of data, has been fixed.

Fix For PCI DAC Motors

A bug, where spec did not enable I/O port access when the Measurement Computing DDA04 or DDA08 (or compatible) PCI analog output boards were used, has been fixed. Note, if other I/O port devices were configured, access would be enabled anyway, and no problems would be observed. If not, spec would crash.

Improved Formatting For TANGO Queries

The output for the "?" and "??" options to tango_io(), tango_get() and tango_put() are now better formatted, particularly with respect to columns lining up properly.

Improved Axis Scaling For timescan Macro

The code for the automatic rescaling of the x-axis (time) in the standard timescan macro has been improved to work better with certain scan parameters, particularly with long sleep times and counting to long monitor times.

November 30, 2008 - RELEASE 5.08.01-13

Update For Tsuji CT16-02/NCT08-01/NCT08-02 Counter/Timers

spec now supports the socket interface available on the Tsuji CT16-02, NCT08-01 and NCT08-02 counter/timers. In addition, the NCT08 support has been updated to use commands that allow count times and monitor presets to be specified to higher precision than with the CT16 (microseconds versus milliseconds for time and to multiples of eight versus 1000 for monitor presets).

October 29, 2008 - RELEASE 5.08.01-12

Fix For Recent Data Array State File Bug

A serious bug introduced in spec release 5.08.01-9, where data array sizes would not be restored properly from the saved state file, has been fixed. Please obtain a updated spec release from CSS if affected.

Compumotor SX Updates

The support for the Compumotor model SX motor controller has been updated to work with more than one controller at a time using separate serial device nodes. Previously, multiple controllers were supported only via daisy-chaining over a single serial node. In addition, the "read" motor_par() command pass-through option will now return the string received by the motor controller. Previously, it didn't.

October 22, 2008 - RELEASE 5.08.01-11

Fix For psic Sectors Limit Check

A bug in the enhanced psic sector search introduced in spec release 5.06.04-1 where possible sectors in the exhaustive search would fail the motor-limit test if the sign (of user*dial) parameter for a geometry motor was negative has been fixed.

Improved EPICS Monitor Support

spec's recently added support for EPICS monitors has been updated to insure pending callbacks for monitored values are evaluated prior to an epics_get(). Previously, a "monitor_check" epics_par() call, some form of a wait() call, calls to the built-in EPICS motor, counter, etc. support or a return to the main prompt was necessary.

Update For Ortec 974/995 Counter/Timer

The default "alarm mode" disabled setting added for the Ortec 974/995 counter/timers for the GPIB configuration in spec release 4.03.10 to accommodate modified Ortec firmware has now also been made the default for the serial interface.

September 25, 2008 - RELEASE 5.08.01-10

Fix For Recently Broken State-File Name Behavior

An error made during a recent code cleanup that resulted in the user-name part of the spec state file names truncated to six characters is corrected in this release. Files in the userfiles directories created using spec releases 5.08.01-8 or 5.08.01-9 can be manually renamed to preserve that state file content.

Command Completion Fix

An old bug, where the command-line editing command-completion feature would produce completions for EPICS, TACO or TANGO functions when the functions were not part of the installation configuration, has been fixed.

September 9, 2008 - RELEASE 5.08.01-9

Fix For spec Client Connecting To Many spec Servers

A problem, where some connection attempts failed when a spec client tried to connect to more than two spec servers by spec name (rather than explicit port number), has been fixed.

Fix For config_mac On spec Server

A bug, where a spec server's config_mac macro wouldn't get called for a reconfig command typed at the spec server keyboard immediately after a client sent a remote command, has been fixed. Note, normally, if a macro named config_mac exists, it will be run automatically after spec reads the hardware config file, both on start up and on the reconfig command (included in the standard config macro).

Fix For Error On Out-Of-Bounds Array Assignment

An attempt to access a data array element beyond the array's size is supposed to generate an error message, but not be treated as a fatal error. A bug, where using an out-of-bounds array element on the left side of an assignment expression would produce the spurious error message "Trying to assign to an immutable" and generate a fatal error, has been fixed.

Fix For MDrive Motor Controllers

An issue with spec's initialization of the IMS MDrive motor controllers which caused problems in recognizing all the configured MDrive channels under some conditions has been fixed. Previously, spec would send an EE=0 command to disable encoders if the channel was configured as MDRIVE and send an EE=1 to enable encoders for an MDRIVE_E configuration. For some models that didn't have an encoder capability, the command would generate an unexpected error, which would be associated with the next command spec issued. With this release, spec no longer sends EE=0 for channels configured as MDRIVE, but will send EE=1 for MDRIVE_E channels. Also, spec's MDrive support has been updated so that unexpected error responses should no longer throw off the command-response synchronization.

August 23, 2008 - RELEASE 5.08.01-8

Updated epics_home Syntax

The epics_home parameter used in the spec Install script can now contain the complete path name to the directory that holds the EPICS channel access libraries. The prior behavior, where epics_home contained the path to either the base directory or the lib directory, continues to be supported.

Preliminary Support For Solaris 10 (x86) Platform

Installation of spec on the Solaris 10 (x86) platform is now possible, although such support is still in the preliminary stage and contains no support for direct access to PCI cards, as is available for Linux on x86 platforms.

Updates To Preliminary Support For the Canberra Lynx (DSA-3000) MCA

Several updates to the preliminary support for the Canberra Lynx (DSA-3000) have been made. Specifically, the command mca_par("device_id") is fixed and no longer causes a segmentation fault, the command mca_par("group_size") has been added as a synonym for mca_par("npts") and the command mca_par("select_group") has been added as a synonym for mca_par("group").

July 14, 2008 - RELEASE 5.08.01-7

Support For Siemens D5000 Diffractometer

This spec release includes support for the Siemens D5000 X-Ray Diffractometer, including both motor moving and counting functions. The connection is over a serial interface.

Fix For Obscure spec Client Error

A spurious instance of the "Not allowed to connect to self" error that occurred when a spec client had configured server resources using the "localhost" host name but where the client was also invoked in server mode with the -S flag has been fixed.

Tweak Macro Tweaked

A minor error of ten-year vintage in the definition of the tw tweak macro for motors has been fixed. Previously, when the option for displaying counts was active, the macro would display the counts associated with S[det] rather than S[DET].

July 2, 2008 - RELEASE 5.08.01-6

Fix For remote_async()/remote_poll()

A problem, where the remote_poll() function could fail to detect a spec server-generated event from a prior remote_async() call, has been fixed. See the server help file for updated details on using the remote_async() and remote_poll() spec client functions.

June 25, 2008 - RELEASE 5.08.01-5

New motor_par() Option To Return "sign"

The "sign" motor parameter, which is +1 or -1 indicating the rotation sense of user angles versus dial angles, can now be read via the motor_par() function.

Fix For GPIB Problems After a Serial-Poll Timeout

An old problem with most of the GPIB controller support in spec, where a GPIB serial poll that timed out could cause subsequent GPIB accesses to fail, has been fixed.

Fix For OMS MAXv Used With Struck SIS3150 USB-VME Module

A problem has been fixed with the recent support for the Struck SIS3150 USB-VME module that caused spec to crash when configured with an OMS MAXv motor controller VME module.

New Configuration Option For Struck SIS1100 PCI Card

It is now possible to configure bus:slot numbers in the ADDR field of the configuration editor to distinguish among identical Struck SIS1100 PCI cards configured to use spec's built-in support. If the ADDR is set to zero, spec will behave as before, with multiple identical PCI cards assigned to VME units in the order in which they are discovered by spec.

Fix For TANGO Support

A problem with the implementation of the built-in symbol TANGO_ERR in the new TANGO C-binding support has been fixed.

June 6, 2008 - RELEASE 5.08.01-4

Fix For EPICS "Monitors"

A problem in the implementation of EPICS monitors in spec release 5.07.02-10 that could result in unexpected timeouts on subsequent epics_get() calls has been fixed. In addition, values for EPICS ENUM types for which monitors have been created are now returned as strings rather than integers.

New EPICS "connect" Option For epics_par()

It is now possible to bundle many initial channel-access PV connections into a single network access by using the new epics_par() "connect" option. Such a call will perform the channel access call to create the connection, but will not force the channel access code to broadcast the request to the network. Thus many such requests can be put into a single broadcast. See the epics help file.

More Efficient EPICS Motor Support

An unnecessary channel access read for motor positions has been eliminated from the spec code, as the current motor position for any EPICS motor is already available via callback events.

May 29, 2008 - RELEASE 5.08.01-3

Fix For Reconnecting To spec Server Motors

A problem introduced in spec release 5.06.03-10, where spec clients might not reconnect to spec server motors after a server exits and restarts, has been fixed.

Fix For Extra "move_done" Events From spec Server Motors

A problem, where "move_done" events would be sent by a spec server before the backlash correction had been performed, has been fixed.

Minor Fix For Canberra Multiport

A bug, where an unrecognized mca_par() parameter sent to the Canberra Multiport MCA code might cause a segmentation fault, has been fixed.

May 19, 2008 - RELEASE 5.08.01-2

Support for Struck SIS3150 USB-VME Controller

spec now includes support for the Struck SIS3150 USB-VME controller.

May 9, 2008 - RELEASE 5.08.01-1

ENHANCEMENTS

Data-Group Data-Type Install Option Eliminated

The option to choose float or double for the data-group data-type configuration has been eliminated from spec's installation script. The type now is fixed at double. (In ancient times, the megabyte of virtual memory and disk storage space that could be saved by choosing float sometimes mattered.) Note, the data-group feature hasn't been used by the standard macros since the release of spec 5 (Feb 1, 2001). Eliminating this configuration option should also eliminate the confusion over whether the storage size applied to anything else in spec beyond the data groups (it didn't).

Attempted Move of "Unresponsive" Motors Now Fatal Error

Attempts to move an unresponsive motor will now cause a fatal error. That is, spec will jump out of any executing statement blocks and return to the highest level prompt. Previously, spec would issue an error message but continue. Most motors are marked as unresponsive during hardware initialization when a presence test fails, although several controllers will mark motors unresponsive after certain communication failures. The EPICS and spec-server support can mark motors unresponsive on disconnect events and responsive again automatically if the connection is restored.

New motor_par() Option To Return "offset"

The "offset" motor parameter, which is the difference between the user and dial motor positions, can now be read via the motor_par() function.

New motor_par() Option To Return "writable" Status

The new motor_par() "writable" option returns a value indicating the permission status of a motor, as set in the hardware config file. If bit 1 is set in the return value, the motor can be moved. If bit 2 is set, the limits can be changed. A fully protected motor will return zero. A fully open motor will return 3.

New Output Options For array_dump

The array_dump() function (and data_dump()) now accept an x (or X) format identifier in the printf()-style optional argument, in addition to the e, g and f formats already recognized. If the "%x" format is used, double values will be converted to integers. In addition, initial characters may be included in the format string, for example, "0x%08x" is valid.

Server Interactive Screen Re-prompts After Client-Generated Output

When a client to a spec server produces output on the server's interactive screen by way of remote commands, the server will now refresh the prompt and any text an interactive user may have typed. Note, though, this feature is only implemented when spec is linked with one of the optional command-line editing libraries (libedit or readline).

New "Scan-Active" Bit In Standard Macro Status Variable _stype

Bit 0x80 in the _stype global variable is now set and cleared by the standard scan macros. The bit is set in the standard _head and resume macros and cleared by the standard _tail and _scanabort macros.

Floating Values Saved With Greater Precision In Configuration Editor

The edconf configuration editor now writes all floating-point values to the config file with twelve digits of precision. Previously the steps-per-degree parameter was written with that precision, but other floating values were written with the default six significant digits.

New Monochromator Configuration Supported

A new two-monochromator configuration is contained in the energy.mac macros. The presence of the motor mnemonics mono and monp selects the new configuration.

New EPICS_ERR, EPICS_ERR_MSG Built-In Variables

The new EPICS_ERR built-in variable (present only when spec is linked with EPICS libraries) will assigned the return value of the channel access calls associated with the spec user-level functions epics_get(), epics_put() and epics_par(). If the channel access return value is ECA_NORMAL, EPICS_ERR will be assigned a value of zero. If there is a non-EPICS error, such as no connection available, EPICS_ERR will be assigned a vale of -1. The new EPICS_ERR_MSG built-in variables is assigned the string message associated with the error.

New TACO_ERR, TACO_ERR_MSG Built-In Variables

New built-in variables TACO_ERR and TACO_ERR_MSG are now included when spec is linked with TACO libraries. The previous global variables ESRF_ERR and ESRF_ERR_MSG are still recognized for compatibility. See the taco help file for more details.

Following Error Generates Fault For Delta-Tau PMAC/PMAC2 Controllers

A fatal following error status will now generate a motor fault with Delta-Tau PMAC/PMAC2 motor controllers, which will have the same effect as hitting a limit, in that any other moving motors will be stopped and spec will reset to command level.

FIXES

Fix For Unresponsive Macro-Hardware Controllers

A bug with the macro-hardware implementation, where a motor channel would be marked unresponsive if the _config() function returned ".error." when called with "mot" argument but not when called with the "ctrl" argument, has been fixed. Now, if the _config() function returns ".error." when called with the "ctrl" argument, not only will all associated channels be marked unresponsive, but also the _config() function won't even be called with the "mot" argument for the associated channels.

Fix For Rare External Shared Array Problem

A bug, where connecting to an external shared memory array could lead to a segmentation fault in spec, has been fixed. The problem could occur if the process that created the shared array was replaced with another process with a shared array of the same name but owned by another user.

Fix For Hardware Parameters Saved In State File

A editing error in spec release 5.07.03-4 that disabled the saving of some miscellaneous parameters associated with hardware and with some of the spec_par() options has been corrected.

Fix For EPICS_M1 Motors With Initial Limit

A problem, where spec didn't flag a limit switch that was active when first connecting to an EPICS_M1 type motor, has been fixed. The symptom would be no limit error message when trying to move the motor in the direction of the limit. (EPICS_M1 motors take initial parameter values from the spec hardware config file while EPICS_M2 motors take initial parameter values from the EPICS database.)

NEW HARDWARE SUPPORT

Support For XIA DXP USB 2.0 Interface

This spec release supports the USB 2.0 interface on the newer XIA Saturn DXP device.

Driverless Support For Struck SIS1100/3100

spec now includes "driverless" support for the Struck SIS1100/3100 PCI-VME bus adapter. With the driverless support, no additional software needs to be installed. Previously, this hardware could only be used with a vendor-supplied Linux kernel driver. Note, the driverless support does not use DMA. If large data blocks are to be transferred, the vendor driver mode may provide better performance.

Preliminary Support For the Newport SMC100CC Motor Controller

This spec release includes preliminary support for the Newport SMC100CC motor controllers over a serial interface.

Preliminary Support For the Canberra Lynx (DSA-3000) MCA

This spec release includes preliminary support for the Lynx (DSA-3000) MCA over an Ethernet interface.

Preliminary Support For the TANGO C-Binding Library

This spec release includes preliminary support for the new TANGO C-binding library, as developed at ESRF. New built-in functions to support the TANGO interface include tango_io(), tango_put() and tango_get(). See the new tango help file for preliminary details.

March 4, 2008 - RELEASE 5.07.04-9

Fix For Crashes With Unresponsive Motor Controller

A bug, where spec would crash when a motor hit a limit or a move was aborted with ^C with some models of motor controller, but only when multiple controllers were configured but not all units were present, has been fixed. The problem was first noted with socket-based Galil motor controllers.

February 17, 2008 - RELEASE 5.07.04-8

New motor_par()/counter_par() Option

A new "added?" option for the motor_par() and counter_par() functions will return a value of 1 if the parameter passed as the third argument has been added as an optional parameter. Both built-in optional parameters, such as "home_slew_rate" and non-built-in parameters, added with the "add" option or configured on the new parameter screen of the configuration editor, are recognized. The "added?" option is the first argument after the mnemonic.

Update For the Delta-Tau PMAC/PMAC2 Controller

It is now possible to configure many of the I variables for the Delta-Tau PMAC/PMAC2 controllers as non-built-in optional parameters using spec's configuration editor. These values will be programmed in the controller during hardware initialization. For parameters named in the range "I00" to "I99", the motor channel number will be inserted between the "I" and variable number. For parameters in the range "I7mn0" to "I7mn9", the m will be replaced with the channel number divided by 4, and the n will be replaced with the channel number modulus 4 plus 1 (that is, values in the range 1 to 4). For parameters that are named with an I followed by a number greater than or equal to 100, no substitutions are made with respect to the I variable name. In addition, I variables associated with the non-built-in optional parameter screen of the controller entry will be sent to the controller with no substitutions made to the parameter name.

Fix For Newport XPS Motor Controller

A bug in the code to support the Newport XPS motor controller, which prevented having more than two motor groups and having more than two motors in a motor group, has been fixed.

February 15, 2008 - RELEASE 5.07.04-7

Micos Controller Fix

A minor update to the recent rewrite of the Micos support addresses a problem in passing very small values to the "setclwindow" command.

Update For Newport ESP-300 Motor Controller

spec no longer considers an axis reported by the Newport ESP-300 motor controller with ID type "unknown" as unusable.

February 4, 2008 - RELEASE 5.07.04-6

Fix For Detel S21DC Counter/Timer

A bug in the recently added support for the Detel S21DC counter/timer from GE Inspection Technologies, where counting to fractions of a second was broken, has been fixed.

Fix For Compumotor ViX Motor Controller

A bug in the recently added support for the Compumotor ViX motor controller, where setting the dial position (to zero - the only possible setting) would generate a spurious time-out error message, has been fixed.

February 2, 2008 - RELEASE 5.07.04-5

Updates For Micos Motor Controllers

A number of problems with the spec support for the Micos Pegasus, Pollux and Pollux2 motor controllers have been addressed. Setting of the optional "dc_settle_time" and "dc_dead_band" parameters (via the Micos "setcltime" and "setclwindow" commands) has been fixed. A new non-builtin parameter "home_distance" is recognized and will be used as the argument to the "nrefmove" command, if set. Otherwise, the default value of +/-100 is used. A number of other issues have been addressed, mostly concerned with syntax differences in the Venus-2 language among different models.

Fix For Configuration Editor New Parameter Screen

A problem where non-integers could only be entered in string mode in the value field of the new parameter screen on the edconf configuration editor has been fixed.

January 30, 2008 - RELEASE 5.07.04-4

Fix For Screen Plot Inconsistency When Plotting Multiple Counters

Previously, if more than one counter was chosen to be plotted via the plotselect macro, the last counter specified was used to calculate the derived values displayed on the screen plots (full width at half max, maximum value, center of mass), while the macros which refer to corresponding values, such as pl_CFWHM (also known as CEN), pl_COM, pl_MAX, etc., would use the first counter, leading to confusion. The plotting macros have been revised so that the first counter specified with plotselect is used to calculate the values displayed at the top of the screen plots.

Merged counters and plotselect Macros

The functionality of the counters and plotselect macros has been combined, so that when invoked without arguments, both ask for which counters to plot and which counters to assign to the DET and MON global variables. Note, though, when invoked with arguments the behavior of the two macros is unchanged in order to preserve backward compatibility. As a reminder, the counter assigned to DET will be the last column in the data file during scans. The MON counter will appear as the #M data file entry, and will be the second to last column in the scan data file. Also, the MON counter is used to calculate the value for the MON_RATE global variable.

Fixed Issues With tty_fmt()

Long standing (but unreported) formatting issues with the tty_fmt() command, such as it breaking lines prematurely under certain combinations of text and space characters, have been addressed.

New Server Mode For Alternate Motor-Limit Behavior

The standard behavior of spec when a motor hits a limit is to stop all currently moving motors, clear the input buffers and reset to the high level prompt. In the original server mode, however, when a motor hits a limit, the server does not stop other motors and reset to the top input level. A new server mode is now available that behaves as normal non-server mode with respect to motor limits. This new server mode (called a "mode-2 server") is activated by starting spec with a -S2 flag rather than the original -S flag. Note, a -S1 flag will also now be recognized and is equivalent to a plain -S.

Macro Motor "get_status" Update

Additional bits are interpreted in the macro motor "get_status" return value. Returning a value with bit 0x10 set indicates an emergency-stop situation and bit 0x20 set indicates a motor fault, which are both currently treated in a similar manner to hitting a limit, with all motors stopped and control returned to the top level prompt. See the mac_hdw help file.

New Support For FZD Sergen Motor Controller

Support for a new motor controller developed at the Foschungzentrum Dresden Rossendorf is included in this spec release. The name of the controller is Sergen, and communication is over a serial interface.

Fixes For fivec and sixc Geometry Calculations

A very old sign error in the calculation of the AZIMUTH variable from motor positions (via the calcHKL macro) in the fivec and sixc geometries has been fixed. Note, the error only affected the value displayed on the screen or printed to the data file. The value used to calculate motor positions (via the calcA macro) wasn't affected. Also, the sign of the CHI angle found via the calcA macro at a particular singular point in the PHI-fixed mode was also sometimes incorrect, and that has been fixed.

Renaming From ESRF To TACO

The built-in functions esrf_io(), esrf_db() and esrf_dc() are now available as taco_io(), taco_db() and taco_dc(), although the original names will remain supported. Also, the library named libESRF.a, included with the spec distribution, has been renamed libTACO.a.

Fix For ACS MCB-4B Motor Controller

A spurious error message with the text "Motor is stopped" that sometimes appeared when aborting a move on the ACS MCB-4B motor controllers has been eliminated.

November 8, 2007 - RELEASE 5.07.04-3

Timing Adjustment For Built-In PCI-GPIB Support

A small increase in the length of a delay during the I/O port programming for GPIB write operations seems to have fixed a time-out problem on at least one system that uses a PCI-GPIB rev 1 board.

November 4, 2007 - RELEASE 5.07.04-2

Update For Compumotor SX Encoder Option

The support for the Compumotor SX motor controller has been updated to work properly with a relative encoder. When configured for an encoder (CMSX_E in the config file), moves will be relative rather than absolute, position read back will be from the encoder and the set_dial command will set both the encoder and the commanded position.

November 1, 2007 - RELEASE 5.07.04-1

New Parameter Screen For Configuration Editor

A new configuration screen is available in the edconf hardware configuration editor to add values for motor and counter parameters and device controller parameters that aren't built into spec or aren't included as standard optional parameters. The new p command displays the additional parameter screen. Usage is available from that screen with the ? and H commands. The ability to edit additional optional parameters will be useful with macro hardware and with future built-in support for non-standard configuration parameters.

New output Property For spec Server

A new output property is available in the spec server. A client can register to have string events sent that mirror output sent to specific files or to the screen. This property is not useful for spec clients, but may be of interest to third party client programs that communicate with a spec server. See the server help file for details.

Redundant Server Motor Position Events Eliminated

The spec server will now only send motor position events to clients when the value of the position changes. Previously, position events were sent more frequently.

settings File Now Updated After sync

After executing the sync command from user level, spec will update the motor settings file whether or not any values have changed. The motivation is to insure positions of calculational pseudomotors will be updated before a subsequent invocation of the edconf hardware configuration editor, as is the sequence in the standard config macro.

Fix For Short Integer Array Assignment

A compiler bug on a number of Linux platforms, where assignments of values greater than 32768 to data array elements of type short were improperly truncated rather than converted to negative values, has been addressed.

Updates To Trinamic Support

The support for the Trinamic QUADpack and SIXpack motor controllers has been updated. spec now supports configuration of most of the controller's parameters, making most home search operations possible. See the new trinamic help file for details.

Update To Accommodate OMS Position Maintenance

Although spec doesn't currently include commands to program an OMS motor controller for position maintenance, it is possible for users to activate the mode via the motor_par() command pass-through feature. To accommodate such users, spec will now program OMS moves (on controllers that support it) with the IP (interrupt when in position) command rather than the ID (interrupt when done) command for axes configured with encoders. When not using encoders, the IP command behaves the same as ID.

Update For TACO ESRF General CCD Device Server

spec's built-in support for the the TACO general CCD device server has been updated to work with three-bytes-per-pixel cameras. Previously, spec would crash if used with such a camera.

October 16, 2007 - RELEASE 5.07.03-5

Micos Update For Encoder

When a Micos motor controller channel is configured to use an encoder, spec will now check bit 0x20 of the status (position out of target window) in addition to the busy bit (0x01) for move completion. In addition, the "dc_dead_band" parameter will now set the Micos setclwindow value and the "dc_settle_time" parameter will now set the Micos setcltime value.

Fix For Mclennan Segmentation Fault

A bug, where spec could crash if configured for a Mclennan motor controller on a serial interface that couldn't be opened, has been fixed.

September 21, 2007 - RELEASE 5.07.03-4

Support For XIA DXP USB Interface

This spec release supports the USB interface on the XIA Saturn DXP device.

Hangup Signals (After the First) Masked On Exit

In release 5.02.03-5, the spec code was modified to catch the SIGHUP (hang-up) signal generated, for example, by window managers when the terminal window containing the spec process was closed. On receipt of the signal, spec saves its state to the state files and exits. In some environments multiple hang-up signals arrive, which could end up corrupting the state file. In this release, subsequent hang-up signals are blocked.

Better Time-Out Recovery For Built-In GPIB-ENET

Due to reports that the recently introduced built-in support for the National Instruments GPIB-ENET had problems with subsequent communications after a timeout while attempting to communicate at an address not present on the bus, this spec release now issues an interface-clear (IFC) message after timeouts, which clears the problem. Note, this IFC-after-timeout feature has only been added to the built-in GPIB-ENET support.

New GPIB Feature For Detecting Listeners

For selected GPIB controllers (currently NI GPIB-ENET and PCI-GPIB), writing a null string to a GPIB device with gpib_put(addr, ""), will now return 1 if a listener is present at address addr or zero if no listener is present. A -1 is returned if the feature is not available with the configured GPIB controller.

Fix For Phytron Segmentation Faults

A bug, where spec could crash if configured for a Phytron controller but no controller was present, has been fixed.

Improved Error Recovery For Mclennan Multiplexed Controllers

The support for the Mclennan PM381 and PM608 multiplexed motor controllers has been updated to avoid certain communication errors and to better recover from those that do occur.

August 29, 2007 - RELEASE 5.07.03-3

New Argument For Macro Hardware Functions

When more than one instance of a macro-hardware counter or motor controller was configured, calls to the macro function that apply to all channels would be made for each such unit with the mnemonic argument set to the string "..". However, all such calls looked identical. spec now includes the controller unit number as the last argument in such calls. See the mac_hdw help file for details.

Fix For Phytron Motor Controllers Over Ethernet-Serial Connection

A problem that prevented Phytron motor controllers to be accessed via Ethernet-to-serial devices has been fixed.

Bug Fixes For Built-In PCI-GPIB Support

A bug in the new built-in support for the National Instruments PCI-GPIB cards, where the end-of-string character for EOS-mode reads was not always programmed correctly, has been fixed. Another bug, where the gpib_put() function didn't return the number of bytes written, has also been fixed.

Another Fix For Built-In GPIB-ENET Support

A bug in the recently added built-in support for the National Instruments GPIB-ENET module, where reading a message longer than 255 bytes could produce a segmentation fault, has been fixed.

July 26, 2007 - RELEASE 5.07.03-2

Fix For Built-In GPIB-ENET Support

A bug in the recently added built-in support for the National Instruments GPIB-ENET module, where reads having a byte count with bits 7 or 15 set (128 or 32768) could produce errors or segmentation faults, has been fixed.

Preliminary Support For AllMotion EZStepper Motor Controllers

This spec release contains initial support for the AllMotion, Inc. EZStepper motor controllers. Steppers and steppers with encoders are supported over a serial interface.

July 20, 2007 - RELEASE 5.07.03-1

Assignment Allowed To Built-In Associative Arrays

In the associative-array assignment feature introduced in spec release 4.05.09 that allowed usage such A0 = A, where both A0 and A are associative arrays, assignment to the built-in associative arrays such as A[], S[] and UB[] was forbidden. Now such assignment is possible. Only elements that match existing elements of the built-in array can be assigned, and only number values are allowed. Elements of the right-hand side array that don't exist in the built-in array or are string valued are silently ignored.

Fix For chg_offset() For EPICS and spec Server Motors

A problem in changing the user offset for calculational pseudomotors (see the mac_hdw help file) where the associated real motors were EPICS motors or spec server motors has been fixed. Previously the chg_offset() call (as used by the set macro) did not send commands to the EPICS data base or the spec server to indicate the user-offset change to the real motors when the chg_offset() was invoked for the calculational pseudomotor.

Fix For Detecting spec Server Connections From Self

The code added in spec release 5.07.02-4 to detect a spec server connecting to itself as a client (which is not allowed) produced false positives under some conditions when the server and client were on the same host. That problem should be fixed in this release.

Debouncing Filters for NI 6601/6602

This spec release implements support for the digital debouncing filters available on the National Instruments PCI 6601/6602 counter/timer cards. See the ni660x help file for details.

Update For Tsuji Counter/Timers

The support for the Tsuji counter/timers has been extended to include model NCT08-01 in addition to model CT16-01B. In addition, a bug which reported incorrect elapsed time for intervals over 2,147 seconds has been fixed.

Update For GE Fanuc VME Driver Support

The support for the Linux kernel drivers for the GE Fanuc (formerly SBS, formerly Bit-3) PCI-to-VME model 61x/62x controllers (and compatible models) has been updated to work with the version 3 drivers. Note, spec still includes driverless support (no kernel drivers are installed) for these controllers.

June 30, 2007 - RELEASE 5.07.02-10

EPICS Monitors Available

Process variable monitors for user-level epics_get() calls are now available using the new epics_par() "monitor_set", "monitor_check" and "monitor_clear" options. Monitors eliminate unnecessary network traffic for process variables that are checked often but change seldom. See the epics help file for details.

EPICS Put Callbacks Implemented

A new wait-time option for the user-level epics_put() function allows spec to wait until the specified channel-access put has been processed. The optional third argument to epics_put() specifies the maximum wait time. See the epics help file for details.

EPICS 3.14 Signal Handling Improved

Previously, due to the threaded implementation used with EPICS 3.14, signal handling in spec, particularly that associated with a ^C interrupt from the keyboard, could easily cause spec to hang in the EPICS library code. spec now blocks signals during key calls to the EPICS channel access library, which should prevent most, if not all, such problems.

June 7, 2007 - RELEASE 5.07.02-9

New "disable_limit_checks" Optional Motor Parameter

A new "disable_limit_checks" optional motor parameter is available. Its value can be set on the second optional motor parameter screen of the configuration editor or with the motor_par() function. A nonzero value disables software limit checks for the designated motor.

New CCDS Built-In Global Variable

A new read-only CCDS built-in global variable is available. Its value is the number of CCD-type devices in the config file, similar to the existing MCAS, MOTORS and COUNTERS global variables.

Increase In Number of GPIB Controllers

Up to eight GPIB controllers can now be configured. The previous limit was four.

Limit Values Limited

The edconf configuration editor tests for corruption of the settings file by checking that none of the dial limits or user offset values are greater than 1e40 in absolute value. Previously, if a user explicitly set the motor limits or offset to values outside that range, the next time the configuration editor was invoked, it would discard the settings file. Now, both spec and the configuration editor silently limit the values of the limits and the user/dial offset to a magnitude of 1e20.

Macro Hardware Value Precision Fixed

Previously, numbers returned by macro-hardware macro functions for commands such as "position" and "counts" were rounded to six significant digits. The precision is now kept to fifteen significant digits.

Fix For Newport NSC200/PZC200 Motor Controllers

A bug that would misassign unit/crate/channel numbers for Newport NSC200/PZC200 motor controllers if the motors weren't numbered consecutively in the config file has been fixed.

Preliminary Support For Detel S21DC Counter/Timer

This spec release includes preliminary support for a counter/timer from GE Inspection Technologies, model Detel S21DC, for use over a serial interface.

May 4, 2007 - RELEASE 5.07.02-8

Fix For Macro Hardware Config Bug In Recent Release

A new feature introduced in release 5.07.02-6 associated with the edconf hardware configuration editor had the unintended consequence of changing the order in which parameters associated with macro-motor and macro-counter controllers were saved. The order has been restored in this release.

April 27, 2007 - RELEASE 5.07.02-7

Non-backwards Compatible Update For Trinamic Motor Controllers

The units of the optional generic motor parameter misc_par_1, have been changed from mA to percent of maximum for the Trinamic motor controller peak current setting. Percent of peak current is a more logical choice for the parameter, as both the old QUADpack and the new SIXpack-2 models have switch-selectable peak-current settings which can't be read by software, so the actual mA value was a best guess by spec in any case.

Fix For CANnes Bug In Last Release

A bug introduced in release 5.07.02-6, where the CANnes PCI card CAN baud rate wasn't set from the value in the config file, has been fixed.

April 23, 2007 - RELEASE 5.07.02-6

Built-In Support for National Instruments PCI-GPIB Modules

This spec release contains a preliminary version of built-in support for both the rev 01 and rev 02 National Instruments PCI-GPIB cards. The rev 01 support introduced in release 5.07.02-1 has been replaced with the new support that works with both revisions. With the built-in support, there is no need to install kernel drivers for GPIB. See the nigpib help file for details.

New Configuration Option For PCI Cards

Most PCI cards do not have switches to select an address. Previously, for such cards, if more than one of the same type was configured, spec assigned the cards unit numbers in the order the cards were discovered. It is now possible to configure bus:slot numbers in the ADDR field of the configuration editor to distinguish among identical PCI cards. If the ADDR is set to zero, spec will behave as before. In this spec release, only the NI PCI-GPIB (built-in) and CANnes PCI cards support the bus:slot addressing. Subsequent spec releases will include support for the feature for other PCI cards.

Updated Support the XIA DXP Modules

Several updates have been made to the support for the XIA DXP modules (both the CAMAC and the parallel port models). The dead-time calculation returned by the mca_par() "dead" option has been modified based on information provided by a user who did a careful reading of the XIA documentation. The value returned is now

100 * [1 - (ocr * livetime) / (icr * realtime)]

where ocr is the output count rate and icr is the input count rate. The previous calculation was

100 * (1 - livetime / realtime)

In addition, mca_par() options "elapsed_real" and "elapsed_live" have been introduced as synonyms for the current "real" and "live", respectively.

Fixes For Trinamic Motor Controller

Problems identifying the Trinamic model (QUADpack vs. SIXpack vs. SIXpack-2) have been addressed. Also, support for spec's "lim+" and "lim-" chg_dial() homing options has been added.

April 5, 2007 - RELEASE 5.07.02-5

Fix For Newport XPS Controller

A bug in the code for the Newport XPS motor controller, where the list of configured positioners obtained from the controller was not parsed correctly, has been fixed.

April 1, 2007 - RELEASE 5.07.02-4

Built-In Support For National Instruments GPIB-ENET

This spec release includes experimental built-in support for the National Instruments GPIB-ENET Ethernet-to-GPIB modules. With the built-in support, it is not necessary to link spec with any NI modules or install any additional drivers. See the nigpib help file for more information.

Installable On 64-Bit Platforms

spec should now install cleanly on 64-bit platforms, assuming the 32-bit compatible library packages are installed. Note, though, spec remains a 32-bit application.

spec Client/Server Updates

Previously, if a spec client's initial connection to a spec server was by port number, then that server exited and a new server with a different spec name became available at the same port number, the client could refer to the new server by the old name. That behavior is no longer allowed. Note, if the initial connection is by name and not by port number, a server reconnecting with the same name at a different port will be considered the same server.

Also fixed, an attempt by a spec server to connect to itself as a client (which wouldn't work well, in any case) is detected and prevented with an error message displayed.

New Sync Option For Certain Motor Controllers

A new option is available to deal with limits when there is a position discrepancy on the few models of motor controllers that only allow the position registers to be set to zero and don't retain the current position if the power is cycled. If the controller position register is zero (likely due to a power reset) and the spec software dial position is nonzero, if the user chooses the option to adjust the user offset (to maintain the user position), there is a new option available to offset the dial limits by the same amount. spec suggests not offsetting the limits, but rather after adjusting the user offset, move the motor to zero and reset the dial position to zero (or do a home search). Such a procedure will restore the dial positions to what they were before the motor controller was reset.

Multiple CANnes PCI Cards Should Now Work

Support for the CANnes PCI cards has been fixed to allow more than one card to be used at a time.

Updates For Trinamic SIXpack-2

The support for the Trinamic QUADpack and SIXpack motor controllers has been updated to accommodate the newer SIXpack-2 model. The 0x45 command (to set power-down mode) is no longer used. (The command isn't supported by the SIXpack-2 and can possibly cause problems with the EEPROM data integrity on the older models.)

Fix For gmci, w21v, id10b, gonio and pi1go Geometries

Code that incorrectly restricted reciprocal space access in the gmci, w21v, id10b, gonio and pi1go geometries with the message "Q > 2k" has been fixed. A factor-of-two error resulted in Q magnitudes greater than k, rather than greater than 2k being rejected.

Bug Fix For ESRF TACO MAR Image Plate Scanner

An old bug in the support for the ESRF TACO MAR image plate scanner where spec would crash unless a particular preventive image_par() command was issued has been fixed.

Fix For ESRF TACO MAXE Motor Device Server

The acceleration calculation in spec for the ESRF TACO MAXE device server has been updated so that the higher slew rates used with motor controllers newly supported by the MAXE no longer result in an integer overflow.

March 16, 2007 - RELEASE 5.07.02-3

Increase In Maximum Number Of Serial Devices

The maximum number of serial devices that can be associated with spec's built-in hardware support has been increased from twenty to forty.

Fix For Software Timer On spec Server

A problem when using the software timer in interrupt mode on a spec server where macro-hardware counters are also configured, where the server command thread would hang at the end of a count period, has been fixed.

Fix For Recent Multiport II Support

Problems in the Canberra Multiport II MCA support introduced in release 5.07.01-11 and associated with setting the number of points (and possibly other parameters) on modules with more than one MCA device have been fixed.

Fix For ESRF TACO/TANGO Camera Device Server

Problems in using a new TANGO device server with the image_par() commands "file_dir", "file_prefix", "file_suffix", "file_inum" and "overwrite", associated with the ESRF general-CCD and image-plate support in spec, have been fixed.

Fix For XIA Huber Slit Controllers (HSC)

spec support for the XIA HSC motor controllers has been updated to accommodate the changed serial number format used in the device's more recent firmware releases.

March 6, 2007 - RELEASE 5.07.02-2

Multiple GPIB Controller Syntax Update

When using multiple GPIB controllers with the generic GPIB functions gpib_put(), gpib_get(), etc., a new addressing option unit.address is available in addition to the existing "unit:address" syntax. See the gpib help file for details.

Multiple GPIB Controller Improved Presence Tracking

spec now keeps better track of the presence of individual GPIB controllers of the same type. Previously, a segmentation fault was possible if a configured controller of a particular type was accessed but not installed, while another of the same type was configured and usable.

New Option To Set Data Bits For Generic Serial Devices

A new ser_par() option "data_bits" can be used to set the number of data bits for generic serial devices. Although the default values set by spec work for almost all serial devices, specific values can be set, if necessary, with this new option. See the serial help file for details.

Preventive Fix For ESRF/TACO Error Message Display

The code that prints error messages from the ESRF TACO device servers has been updated to avoid segmentation faults possible when unexpectedly long error messages are returned by the TACO devices.

Old Motor Position Rounding Bug Fixed

An old bug, where a very particular combination of motor step size, position and user offset could lead to a motor being moved by single steps while other motors are commanded to move, has been fixed.

Recently Introduced Bug With MCA "auto_run" Fixed

A bug introduced in release 5.07.1-11 and associated with the new support for the Canberra Multiport II MCA, but affecting the behavior when using mca_par() to set "auto_run" mode for any MCA, has been fixed.

February 4, 2007 - RELEASE 5.07.02-1

Built-In Support For Additional Older NI GPIB cards

This release of spec contains the option to use built-in support for the National Instruments PCI-GPIB (rev 01) and AT-GPIB (ISA) controllers. With the built-in support, there is no need to install kernel drivers from National Instruments or the open source drivers from Source Forge. See the nigpib help file for details.

January 29, 2007 - RELEASE 5.07.01-11

Support For the Canberra Multiport II MCA

Support for the Canberra Multiport II MCA over both Ethernet and USB interfaces is included is this spec release. See the MPII help file for details.

January 11, 2007 - RELEASE 5.07.01-10

Support Compumotor AX/OEM750 Updated

The support for the Compumotor AX and OEM750 motor controllers has been updated to use separate configuration entries (CMAX and CM750 controller types) so that spec can handle the small differences between the controllers correctly. Choosing the OEM750 controller type will allow spec to properly set the motor speed.

November 28, 2006 - RELEASE 5.07.01-9

Support For Newport PZC200 Motor Controllers

Preliminary support for Newport's PZC200 motor controller is included in this spec release.

Encoder Support For Galil Controllers

Encoder support is now available for Galil motor controllers. Choose controller type GALIL_E on the motor screen of the configuration editor, and set the optional encoder steps-per-degree parameter if the encoder step size differs from the commanded-position step size.

Further Fixes For Hecus ASA-32 MCA

Problems reading back data from the Hecus ASA-32 MCA ISA cards on fast computers are addressed in this spec release by performing a series of heuristic tests on the data and retrying the read if any of the tests fail. Due to limitations within the board's firmware, there is no fail-safe way to ensure the data has been read back correctly.

Update For IMS MDrive Plus Controllers

The support for the IMS MDrive motor controllers has been updated to be compatible with the newer firmware on the MDrive Plus models.

November 24, 2006 - RELEASE 5.07.01-8

Fix For Trinamic Motor Controller Serial Interface

A problem using the serial interface on the Trinamic motor controllers has been fixed.

Additional Fix For start_all Macro Motor Calls

A problem with the update in spec release 5.07.01-4 that eliminated unnecessary "start_all" calls of the macro motor _cmd() function had an unwanted side effect of preventing the calls when the "read_mode" optional motor parameter was set to include the PREMOVE flag. That problem has been fixed.

November 7, 2006 - RELEASE 5.07.01-7

Fix For Hecus ASA-32 MCA

Problems using the Hecus ASA-32 ISA card MCA on faster computers have been addressed with this spec release by slowing down the I/O port access.

motor_par() Bug Fix

A bug, where an out-of-range motor number used as the first argument to motor_par() could cause a crash with the new "add" option, has been fixed.

November 3, 2006 - RELEASE 5.07.01-6

Preliminary Support For IMS MicroLYNX Motor Controllers

This spec release includes preliminary support for the IMS MicroLYNX motors controllers over a serial interface.

Home Search Improvement

For motor controllers with home-search support where the direction of the home search can be specified, if the "home" option (rather than "home+" or "home-") to chg_dial() is used, spec chooses the direction of the home search based on the current dial position. Previously, spec chose the search direction to be towards zero. With this release, the the search direction is chosen to be towards the home position given as the optional third argument to chg_dial() or if that is unset, the "home_position" optional parameter from the config file. If neither is set, then the search is towards zero, as before.

November 1, 2006 - RELEASE 5.07.01-5

Server Events Added For motor_par("disable")

The spec server will now send events to clients when the "disable" argument to motor_par() is used on the server to change the enabled/disabled state of the associated motor. The spec client will keep track of the enabled/disabled state from both local commands and remote events, and the motor must be enabled with both in order to be moved. The return value of motor_par() with the "disable" argument will have bit two set if the motor has been disabled by a remote event.

Home Search Update Delta-Tau Controllers

Home searches are now implemented for the Delta-Tau PMAC motor controller.

New user_filecheck() Hook In newfile

The standard newfile macro contains a new macro hook user_filecheck() which can be used to test or modify the file name to be used as the data file. See the macros/file.mac file in the spec distribution for an example.

Debugging Crash Fixed

A bug, where spec might crash when the debug level was set to 0x40000 (print input context on execution-time errors), has been fixed.

XIA-HSC Bug Fix

A bug introduced in spec release 5.06.02-8, where a reconfig could cause spec to crash if a serial node associated with XIA HSC-1 Huber slit controllers couldn't be opened, has been fixed.

October 22, 2006 - RELEASE 5.07.01-4

Improvement For Macro-Hardware Motors

A problem associated with configurations with multiple macro-hardware motor controllers, where all the prefix_cmd() functions were called with the "prestart_all" and "start_all" commands when any of the macro-hardware motors were moved, even if no motors associated with a particular prefix were being moved, has been fixed.

October 13, 2006 - RELEASE 5.07.01-3

Fix For Recently Broken chg_dials() With Macro Motors

A programming error in spec release 5.06.05-9 that made it impossible to change dial positions for macro motors has been fixed.

EPICS Install Updated

The path for the directory containing the EPICS libraries (the epics_home parameter in the install_data file) can now either be the directory containing the subdirectory named base (as before), or the base directory containing the subdirectory named lib.

October 4, 2006 - RELEASE 5.07.01-2

New Check For Calculational Pseudomotor Limits

spec now checks whether moves of real motors will send any associated calculational pseudomotors outside of the configured limits. Calculational pseudomotors motors are either associated with geometry code (such as the pseudomotors associated with kappa geometries) or implemented via the macro hardware feature (see the mac_hdw help file). In previous releases, limits for calculational pseudomotors were ignored.

Update For x11filt

The x11filt process uses the X library XListFonts() call to obtain a list of possible fonts matching a pattern, using either the default built-in pattern or one obtained from the Font property, as explained in the x11 help file. Previously, the returned list was limited to 512 items. That limit has been raised to 8192 to accommodate the increased number of possible fonts on a modern X installation. Also, a new font debugging property, FontDebug, is available for the x11filt program. See the x11 help file for details.

Fix For Old Mac Science (Now Bruker) MXC Controllers

Code added for support of a new model of the Mac Science (now Bruker) MXC controller in spec release 5.02.04-1 generates an error with prior models that don't support an added MXC command PM (which sets speed and acceleration). spec now silently checks whether the command is available and and will stop sending it if the device doesn't support it.

Preliminary Support For Compumotor ViX Motor Controller

This spec release contains preliminary support for the Parker Compumotor ViX motor controllers over a serial interface.

September 20, 2006 - RELEASE 5.07.01-1

New Invocation Option To Specify Start-Up Command Files

A new -C file start-up option is available to specify command files to be read after all the standard start-up commands files, but before the optional spec.mac file in the current directory. Up to 32 such files may be specified on the command line. See the spec help file for details.

Fixed Timeout Behavior For data_pipe()

The "timeout" parameter added to the data_pipe() function in release 5.06.04-1 was not implemented correctly. This release fixes that problem. By default, the data_pipe() processes block as long as necessary. With this release, setting the "timeout" parameter will prevent the process from taking any longer than the timeout value. Also, if the process exits on its own (perhaps due to a crash), spec will print a message indicating that is what happened. The default timeout of zero will maintain the traditional blocking behavior. See the data_pipe help file for details.

One More Fix For Updated motor_par()

A remaining bug, where some of the standard optional motors parameters could not have values set if the parameters weren't configured in the config file, associated with the new motor_par() features added in release 5.06.04-1 and mostly fixed in release 5.06.04-9, is completely fixed in this release.

Update For Compumotor 6K Motor Controller

The support for the Compumotor 6K motor controllers has been made a bit more robust by flushing out the read buffers before new commands are sent.

September 5, 2006 - RELEASE 5.06.06-10

Updated Support for Delta-Tau Controllers

The existing support for the Delta-Tau PMAC motor controller on an ISA bus has been updated for PMAC2 controllers over socket (Ethernet) interfaces.

Open-Loop Mode Fix for New Focus 8750/53

A problem with position discrepancy messages appearing after aborting a move when using the New Focus 8750/53 controllers with open-loop motors has been fixed. The problem did not appear with closed-loop motors.

August 28, 2006 - RELEASE 5.06.06-9

Home Search For New Focus 8750/53 Updated

The home search feature for the New Focus model 8750/53 has been updated to implement the FIN, RIN, FLI and RLI commands included with the controller version 1.5.4 firmware. The first two search for the index mark on actuators so equipped in the forward and reverse directions. The second two search for the limit switches.

Fix For PI E710 Motor Controller

An old bug in the code for the Physik Instrumente E710 where the configuration choice of serial vs. GPIB was not always correctly detected has been fixed.

August 17, 2006 - RELEASE 5.06.06-8

Additional Updates For AI Solutions DAQ Modules

Bugs in the new code for the AI Solutions DAQ modules (formerly KISIM), which could lead to segmentation faults when switching the configuration between 1D and 2D mode in the configuration file or switching out of emulation mode via mca_par(), have been fixed.

August 4, 2006 - RELEASE 5.06.06-7

Support For Tsuji Model SPM8C-01 Motor Controller

This spec release includes support for the Tsuji Model SPM8C-01 motor controller over a socket interface.

Support For Huber 9300 Motor Controller

This spec release has preliminary support for the Huber 9300 motor controller over serial and socket interfaces.

Fixes For Amptek Pocket MCA

A bug in the code for the Amptek Pocket MCA 8000/8000A that prevented reading back the correct data from other than group zero has been fixed. Also, a bug where the value returned by the mca_par() "battery_type" argument was incorrect has been fixed.

Fix For ESRF/TACO Serial Device Timeouts

A bug, where the RPC timeouts for connections to the ESRF/TACO serial device server were set to 1000 times the requested value (usually 2000 seconds instead of 2 seconds), has been fixed.

July 25, 2006 - RELEASE 5.06.06-6

More Updates For AI Solutions DAQ Modules

A bug in the new code for the AI Solutions DAQ modules (formerly KISIM), which prevented setting the "offset_x" parameter in MCA mode with the mca_par() function, has been fixed. In addition, the internal clock parameter is now reprogrammed, if necessary, for time presets larger than approximately 4.7 hours. Also, when counting to fixed count presets or with no presets, spec will keep track of overflows in the elapsed-time register by using the computer's system clock, thus making the returned elapsed-time value correct for indefinitely long count times.

Fix For Mac Science (now Bruker) MXC Instrument

A bug (introduced three years ago in spec release 5.02.04-1), which broke control of the rslit motor for the then Mac Science, now Bruker, MXC controller, has been fixed.

July 13, 2006 - RELEASE 5.06.06-5

Fix For sleep()

A bug that has been present for at least several years, where a call to the built-in sleep() function with an argument between -1 and zero would cause spec to become stuck, has been fixed.

Fix For _plotconfig() Macro

An old bug in the internal _plotconfig() macro, which resulted in an "Array access SCAN_D[...][] is out of bounds" error message on start up or with the plotselect macro, has been fixed. The error would occur if the scaler channels were rearranged in the config file such that an existing scaler's number (as returned by the cnt_num() function) became greater than or equal to the value of the global variable PLOT_CNTRS_MAX (default value of 10). The previous work around for this bug of increasing the value of PLOT_CNTRS_MAX is no longer necessary.

Updated Code For AI Solutions DAQ Modules (Formerly KISIM)

The support for the HANARO KISIM USB modules has been rewritten for redesigned modules, now produced by the Korean company, AI Solutions. See the updated kisim or aisolutions help file for information on the new support.

July 12, 2006 - RELEASE 5.06.06-4

Fix For config Issues When Changing Limits

A rare problem, where motor limits would revert to their prior values when reentering spec after using the config macro and configuration editor to change them, has been fixed. The problem only occurred when motor position discrepancies were resolved (either silently or with user intervention) in favor of the hardware causing the settings file to be updated during the built-in motor synchronization call that occurs just before possibly modified config and settings files are reread.

Fix For OMS MAXv Controller When Moving Off Limits

A timing problem with the new Oregon Micro Systems MAXv VME motor controller firmware that sometimes made it impossible for spec to move a motor off a limit switch has been worked around.

Fix For Ortec MCS PCI Initialization

A problem with spec's presence test and initialization of the Ortec MCS PCI multi-channel analyzer hardware that could occur if the board was actively acquiring during spec's hardware configuration procedure has been fixed by making sure acquisition is off before testing the board's memory.

July 10, 2006 - RELEASE 5.06.06-3

Fixed the Updated Support For EPICS Serial Record

The updated support for the EPICS serial record that was included in release 5.06.06-1 had many problems which should now be fixed.

July 5, 2006 - RELEASE 5.06.06-2

Newport NSC200 Support Updated

The preliminary support for the Newport NSC200 motor controller has been updated to fix a few problems.

June 30, 2006 - RELEASE 5.06.06-1

Updated Support For EPICS Serial Record

This spec release includes updated support for the EPICS serial record. In particular, the new asyn record is supported. Support for the older Hideos-based generic serial record is still included, and many bugs with the older support have been fixed. spec automatically sorts out which serial record is being used.

Fix For Server Motor and Counter Properties

An old coding bug that may have caused generally insignificant problems with the spec server when motor or counter properties were received from a client, with the most noticeable being incorrect command serial numbers, has been fixed.

June 2, 2006 - RELEASE 5.06.05-11

Support For Inel PEM Motor Controller

This spec release supports the Inel PEM motor controller over a serial interface.

Insure User-Units Mode Is Off For OMS Controllers

spec will now send the "UF" (user off) command to each axis of an OMS motor controller during hardware configuration to make sure user units are off to accommodate at least one site that switches control between spec and software that turns user-units mode on.

May 12, 2006 - RELEASE 5.06.05-10

Initial Support For Newport XPS Motor Controller

This spec release contains initial support for Newport's XPS motor controller. This motor controller communicates exclusively via sockets and contains its own computer and operating system. Motor parameters must be configured by downloading and uploading the XPS configuration files by ftp. spec mnemonics must match the XPS motor names in the XPS system.ini file. spec will send slew rate and acceleration parameters, as set in spec's config file, but those parameters will only be accepted by the XPS if the values are not greater than the maximum values set in the XPS stages.ini file. Although the value of spec's steps-per-degree parameter is ignored for calculating positions for these motors, the value is used in spec's code for rounding motor positions to their intrinsic resolution. Thus, set the parameter to a value the same order of magnitude as the value in the stages.ini file. (Unfortunately, there is no command in the XPS protocol to retrieve the value, other than retrieving and parsing the configuration files, which is beyond spec's scope.)

May 3, 2006 - RELEASE 5.06.05-9

Fixes For Compumotor 6K Motor Controller

A couple of problems with the support code for the Compumotor 6K motor controller have been fixed. Unnecessary AXSDEF calls, which could lead to lost positions, are now avoided for all models, including those with eight motors. A problem, where the final position of a motor was sometimes not read at the end of a move when multiple motors were active, has been fixed.

April 30, 2006 - RELEASE 5.06.05-8

Preliminary Support For Newport NSC200 Motor Controllers

Preliminary support for the Newport NSC200 motor controller is included with this spec release.

April 26, 2006 - RELEASE 5.06.05-7

New Option To Set Stop Bits For Generic Serial Devices

A new ser_par() option "stop_bits" can be used to set the number of stop bits for generic serial devices. The default value of one works for almost all serial devices. A value of two can be set when needed. See the serial help file for details.

New Option To Test For Motor Limits

New motor_par() options "high_lim_hit" and "low_lim_hit" return nonzero if the associated motor limit is active (for most supported motor controllers).

Further Update for OMS VME MAXv Support

Problems with the support code for the OMS MAXv motor controller that weren't fixed in release 5.06.05-4 have now been fixed with the help of OMS support engineers.

April 21, 2006 - RELEASE 5.06.05-6

New sixc Mode

A new chi-fixed, phi-fixed, mu-fixed mode is available with the standard sixc geometry.

April 12, 2006 - RELEASE 5.06.05-5

Fixes For Compumotor 6K With Encoders and With Servos

The spec support for the Compumotor 6K motor controller now uses relative moves (rather than absolute moves) if the axis is configured for an encoder. Also, when starting up, the initial configuration commands now work correctly if servo motors are configured, avoiding unnecessary AXSDEF calls, which could lead to lost positions.

Update For ESRF TACO LeCroy 1151 Counter Support

The spec support for the LeCroy 1151 counters via the ESRF TACO facility now allows more than one such counter module to be configured.

April 2, 2006 - RELEASE 5.06.05-4

Update For OMS VME MAXv Support

The code for the Oregon Micro Systems VME model MAXv controller has been modified to be a bit more robust in the face of communication errors.

March 22, 2006 - RELEASE 5.06.05-3

Longer Count Times Implemented For NI 660x Cards

The code for the National Instruments 6601/6602 PCI counter/timer card will now automatically select the slower time base when necessary to allow for longer counter times, now up to nearly 12 hours.

March 22, 2006 - RELEASE 5.06.05-2

Fix For Amptek PX4 Attenuation

The recently added support for the Amptek PX4 MCA should have set a bit in the configuration buffer but didn't, which resulted in the input signal being attenuated by fifty percent. The bit is now set.

March 8, 2006 - RELEASE 5.06.05-1

Fix For Comment Parsing On Macro Invocation Line

Since the earliest versions of spec (ca. 1986), the $# and $* symbols in ordinary macro definitions (replaced by the number of arguments and all the arguments, respectively) have always inappropriately included any # prefixed comments on the invocation line. Consider the macro definition

1.SPEC> def test '{print $#, " $* ", $*}'

Prior behavior was:

2.SPEC> test 1 2 3 # 4 5 6
7  1 2 3 # 4 5 6  123

(Since the second $* isn't in quotes, the comment is effective after the argument substitution.) New behavior is:

2.SPEC> test 1 2 3 # 4 5 6
3  1 2 3  123

Not sure why this problem went unnoticed and unfixed all this time.

Fix For ESRF VCT6 Timer Polling

The polling of the counting/busy status for the ESRF VCT6 timer now also checks for the status bit that indicates the unit is preparing to start counting. Previously, not checking this bit wasn't a problem, but with faster computers, spec's polling for busy status can occur before counting has actually started.

Fix For Amptek PX4 Parameter Display

A bug in the new code for the Amptek PX4 where an incorrect high-voltage setting was displayed with the mca_par("pars") command has been fixed.

Fix For Kinetic Systems 3388

A bug introduced with implementation of support for multiple CAMAC crates in release 5.06.02-1 that broke support for the Kinetic Systems 3388 CAMAC-to-GPIB controller has been fixed. In addition, the KS 3388 can now be used in other than crate zero, and more than one KS 3388 can be used at a time.

February 22, 2006 - RELEASE 5.06.04-12

Support For Amptek PX4 MCA

spec now supports the Amptek PX4 Digital Processor MCA over both USB (on Linux and Mac OS X) and serial interfaces. See the new px4 help file for details.

February 21, 2006 - RELEASE 5.06.04-11

Recent libedit Problem With ^C Handling Fixed

Some obscure problems with signal handling when linking spec with the optional libedit library version included with spec releases since 5.06.03 have been fixed.

February 16, 2006 - RELEASE 5.06.04-10

USB Support Under Mac OS X

The USB support in spec is now available on Mac OS X platforms in addition to Linux. To enable the USB support on the Mac OS X platform, spec must be linked with the libusb library, available at libusb.sourceforge.net .

February 9, 2006 - RELEASE 5.06.04-9

Support For Physik Instrumente C-630 Motor Controller

spec now supports the Physik Instrumente model C-630 (Apollo) motor controller. This controller uses a serial interface.

Fix For spec Client's Server Lookup

A bug in the spec client server-lookup algorithm has been fixed. Previously, if a spec client connected to multiple spec servers on the same host using port numbers for some (such as "localhost:7000") and spec process names for others (such as "localhost:fourc"), the code would sometimes direct commands to the wrong server. The bug was probably associated with the updates to the lookup algorithm in spec release 5.06.03-1.

Fix For Unconfigured Optional Motor Parameters

The new motor_par() features introduced in release 5.06.04-1 broke old behavior that allowed setting values for optional motor parameters that were not explicitly assigned values in the config file. With the new features, motor parameters not in the config file can be created (to exist only in the current spec session) using the new motor_par() "add" option. This spec release will restore compatibility with past releases by doing an automatic "add" of any of the standard optional motor parameters not otherwise assigned values in the config file when values are set with motor_par().

Fix For Synchronizing Motor Positions

A bug in the implementation of the new motor_par() features in release 5.06.04-1 that could cause problems with synchronizing motor positions in some situations has been fixed.

February 2, 2006 - RELEASE 5.06.04-8

New prefix_ADDR Variable For Macro Hardware Functions

The string value of the controller ADDR parameter for macro hardware controllers, as set on the Devices screen of the edconf hardware configuration editor, is now available in the associated macro functions as a local variable with the name prefix_ADDR. See the mac_hdw help file for details.

Fix For Compumotor 6K With Negative Step Size

The spec code that supports the Compumotor 6K motor controllers will no longer supply a negative argument to the DRES command, as was the previous behavior when spec's steps-per-degree motor parameter was negative. (The 6K doesn't accept negative values for that parameter.)

Fix For Broken spec Server Motor Initialization

A bug in the implementation of the new motor_par() features introduced in release 5.06.04-1, which prevented spec clients from connecting to spec server motors that didn't have a configured encoder step-size parameter, has been fixed.

Fix For Server/Client Associative Array-Element Transfers

A coding bug in release 5.06.04-5, where spec server/client transfers for single elements of associative arrays using prop_get() and prop_put() were broken, has been fixed.

January 24, 2006 - RELEASE 5.06.04-7

New user_scan_plot Hook In Standard Macros

The standard scan_plot macro, called for each point of a scan, now includes a call of user_scan_plot, which local users can define to perform special actions before the standard _plot (normally defined as rplot) macro is called. By default, user_scan_plot is defined as an empty macro using cdef().

Fix For TACO Serial Interface

A bug, where the TACO device-server timeout was not set correctly for baud rates of 38400 and above, has been fixed.

Bug Fix For Out-Of-Bounds Array Access

A bug, where assignment of a value to a data-array element indexed beyond its dimensioned size could cause a segmentation fault on Solaris platforms, has been fixed.

January 23, 2006 - RELEASE 5.06.04-6

Fix For TACO and EPICS Serial Interface

A bug, which would cause problems only with the Galil Optima, IMS MDrive and New Focus 8753 motor controllers and only when used with the TACO or EPICS serial-line interface, has been fixed.

January 19, 2006 - RELEASE 5.06.04-5

syms -v Now Escapes Embedded Double Quotes

The built-in command syms has a -v option to list symbols and values in a format that can be used as input to spec. Previously, symbol values with embedded double-quote characters (") were not escaped with a backslash, thus making the syms output not suitable as further input. That problem is fixed. Previous behavior was as follows:

1.FOURC> x[0]="a \"string\""

2.FOURC> syms -v x

x["0"] = "a "string""

New behavior is:

2.FOURC> syms -v x

x["0"] = "a \"string\""

Bug Fix To Allow Macro Functions To Return Arrays

A bug, which prevented certain associative array representations from being used as return values from macro functions, has been fixed. An example of what didn't work before is

def foo2() '{
        local x[]
        x[0]="test"
        return(x)
}'

Associative Array Elements Keep String Value In Server/Client Calls

String-valued associative array elements that represent numbers (of the form "1e6" or "0x123", for example) will now maintain the string representation when passed to and from spec server and clients using the server/client protocol. (See the server help file for details on passing associative arrays.)

Associative Array Initialization Keeps String Value

Associative array initialization of the form

x = [ 0 : "1e6" , 1 : "0x123" ]

will now maintain the string representation of the array elements. Previously, values were converted to numbers.

December 16, 2005 - RELEASE 5.06.04-4

New motor_par() Option for Macro Motors

The new read-only parameter "chan0" returns the motor number of the motor associated with channel zero of the unit and module of the specified motor. This feature allows for simplified implementation of general-purpose calculational pseudomotors.

New Configuration Parameter Available for Macro Hardware

The configuration editor now allows entry of an arbitrary string in the ADDR field for macro motors and counters. The contents of this field can be retrieved with the motor_par() and counter_par() option "address". All macro-hardware motor and counter channels associated with the controller will return the parameter.

Fix For Recently Broken counter_par()

A coding bug in release 5.06.04-1 that broke counter_par() for device-dependent parameters has been fixed.

Update For timescan, loopscan Macros

The _timescan macro used by both timescan and loopscan has been modified to take into account the duration of the optional sleep times when calculating the range of the x-axis for plotting.

December 14, 2005 - RELEASE 5.06.04-3

String-Valued Mnemonics Now Work With motor_par() and counter_par()

Previously, the motor_par() and counter_par() functions only accepted number-valued symbols as the first argument. Now, string-valued symbols containing the string representing the motor mnemonic are recognized. That is, the following syntax will now work as expected:

{
   local s
   s = "chi"
   p motor_par(s, "step_size")
}

Another Bug Fix For Recent motor_par() Changes

Another bug associated with recent changes for the motor_par() function, which would result in a segmentation fault only in server mode and only with string-valued optional motor parameters in the config file, has been fixed.

Update for ESRF DC Motor Device Server Support

The previous limit of four motors per controller for the ESRF (TACO) DC Motor device server has been removed.

Fixes For Negative Step Size For Several Motor Controllers

Possible problems when using a negative step size with the Newport ESP300, the Newport 4000 series and the Compumotor SX motor controllers have been addressed.

December 7, 2005 - RELEASE 5.06.04-2

Bug Fix For Recent motor_par() Changes

A programming bug associated with changes in the previous spec release that could cause a segmentation fault and could prevent the setting of a number of optional motor parameters has been fixed.

Fix For PSD-50M Number Of Channels

An oversight in the original code for the MBraun PSD-50M MCA, where the number of channels could not be changed from the default 1024, has been fixed. The "npts" option to mca_par() can now be used to set or retrieve the number of channels. Note, the number of channels is only relevant to data read out and the clear command.

November 28, 2005 - RELEASE 5.06.04-1

New Motor Parameter and Counter Parameter Features

Site-defined motor and counter parameters may now be included in the config file. These parameters will be accessible in spec via the standard motor_par() and counter_par() functions. Currently, the configuration editor edconf will read and save the parameters, but the parameters are not viewable or editable with edconf. Thus the parameters must be added manually.

In addition, arbitrary, temporary run-time motor and counter parameters may be created using

motor_par(mne,  sv, "add")

where s is the parameter name and v is the initial parameter value. The same syntax works for counter_par(). These temporary parameters disappear when spec exits and after a reconfig command. This feature might be useful with calculational macro pseudomotors (see the mac_hdw help file).

New "timeout" Parameter For data_pipe()

By default, calls to the user code embedded in the data_pipe() functions are expected to return within one second. This release includes a configurable time-out parameter to accommodate special user needs. The command

data_pipe("timeout", sec)

changes the timeout to sec seconds for all subsequent newly created data_pipe() processes. The command

data_pipe(program, "timeout",  sec)

changes the timeout to sec seconds just for the named data-pipe process. For both calls, if the sec argument is missing, the current timeout is returned.

Enhanced Sectors Scheme For psic Geometry

The sector transformations for the psic geometry have been rewritten to perform an exhaustive search of possible angle transformations. The new search algorithm makes additional angle settings available, usually in situations where one or more of the diffractometer angles are at special positions, such as multiples of pi over 2. In addition, transformations that violate motor limits are eliminated in the preference ranking schemes. See the psic help file for details.

New Theta-Fixed Mode For zaxis

A new theta-fixed mode for use near 00L scattering vectors is implemented for the zaxis geometry. See the geo_zaxis.c file included in the spec distribution for implementation details.

Fix For Theta-Fixed Mode In fourc

A bug in the recently introduced theta-fixed mode for the fourc geometry has been fixed.

New "initialize" Option For XIA DXP Devices

A new "initialize" mca_par() option is available for the XIA DXP devices. This option will reload the firmware and execute all the initialization functions associated with startup and the reconfig command.

Fix For XIA DXP Devices

Users have reported from time to time that the XIA DXP libraries return the error "must stop run before beginning a new run". To avoid this message and resulting error, spec now always calls the dxp_stop_run() DXP library function before calling the dxp_start_run() function.

More Updates For Struck SIS 3820 Scalers

Another new counter_par() option, "test_pulse_mask", is implemented for the Struck SIS 3820 scalers. The value of the argument is used to program register 0x218 (part of Struck's firmware release 1.0A). This register allows the 25 MHz internal test pulse train to be routed to any channel. If a nonzero value is written to this register, spec will enable counter test mode and the 25 MHz test pulses in the operation register (register 0x000) during counting. It is then necessary to mask the channels that are to count external signals using the mask written with this command. Note, spec will always mask channel 0 on the master unit, as spec uses that channel to measure elapsed time based on the 50 MHz internal signal.

Initial Support For ESRF MUSST As MCA

The Multipurpose Unit for Synchronization, Sequencing and Triggering (MUSST) from the the ESRF Control Electronics group is now supported as an MCA device in spec. The interface is GPIB.

Update For ESRF/TACO Serial Device Server

Previously, ^C aborts would turn off reading from the ESRF/TACO serial device server, thus preventing macro-hardware implementation of calls such as "abort_one" from working. That problem has been fixed. (Similar behavior for the standard serial support and the EPICS serial support was corrected in spec release 5.02.03.)

Macro-Function Argument Precision Increased

All number values passed to macro-hardware macro functions are now sent with nine-digit precision. Previously, six-digit precision was used for most calls.

Macro-Function counter_par() Support Enhanced

The macro-hardware counter macro functions now fully support the counter_par() facility.

November 2, 2005 - RELEASE 5.06.03-11

Nonfatal Bug In MVP-2001 Support

A bug in the support for the MicroMo MVP-2001 (present since the code was created for spec release 5.05.01-3), where spurious error messages of the sort "serial device X isn't configured" could be displayed during device configuration, has been fixed.

October 27, 2005 - RELEASE 5.06.03-10

New reconnect Option For esrf_io()

A new "reconnect" option is available with the esrf_io() function. The option is also available directly for the ESRF/TACO camera devices via image_par(). Such an option allows remaking the connection without the disruption caused by the complete hardware reinitialization associated with reconfig. The command closes the connection to the device via the dev_free() TACO function and reopens the connection to the same device using the same timeout and UDP/TCP protocol via dev_import().

New Theta-Fixed Mode For fourc

A new theta-fixed mode is available with the four-circle geometry code. Currently, though, the sectors transformations are not implemented for this mode. Only sector 0 is available.

Server/Client spec Motor Version Incompatibility Fixed

A problem where spec clients from releases 5.06.02-2 through 5.06.03-9 are not compatible with spec motor servers from prior releases has been addressed with this release. Clients in the above range did work with spec motor servers in the same range and will now work with servers from this and later releases. Clients from this release onward will work with all previous spec motor server releases.

debug Macro Fix

A syntax error introduced in the debug macro in release 5.06.03-8 has been fixed.

Mclennan Motor Fix

A programming error introduced in the code that supports the Mclennan PM301/381, PM600 and PM608 motor controllers in release 5.06.03-2 that would produce a segmentation fault when an attempt was made to move a motor associated with one of the above controllers has been fixed

October 17, 2005 - RELEASE 5.06.03-9

Updates For Struck SIS3820 Scalers

New counter_par() options "invert_inputs", "invert_outputs", "input_mode" and "veto_inhibits" are available to allow additional flexibility in configuring the Struck SIS3820 VME Scaler module. If passed with nonzero arguments, the "invert_inputs" and "invert_outputs" will have corresponding bits set in the module's operation-mode register when the device is programmed for counting. The "input_mode" option can be set to values from 0 through 6 to override the default input mode 2. A value can be passed using the "veto_inhibits" option that will be written to register 0x214 of the module (only available with firmware 1.9 and greater). Currently, options are reset to default values after every start up and reconfig.

October 17, 2005 - RELEASE 5.06.03-8

The "disable" motor_par() Option Now Passed To Macro Motors

The _par() function for macro motors will now be called when the "disable" option to motor_par() is called to change the disabled status of a motor. See the mac_hdw help file for details.

String-Valued Generic Motor Parameters Passed to Macro Motors

Previously, if the value of a generic motor parameter (one named misc_par_N were N is from 1 to 6), was set to a string, the string value was not passed to the _par() function of an associated macro motor. That problem has been fixed.

Support For Tsuji PM4C-05A Motor Controller

spec now supports the Tsuji model PM4C-05A motor controllers. The controller can be used with spec over GPIB or serial interfaces. The controller is selected as TSUJI4C on the Motor screen of the configuration editor. The optional "misc_par_1" motor parameter, if set, will enable the controller's hold-off mode for the associated axis.

Support For New Focus 8751 Closed-Loop Picomotors

The support for the New Focus 87XX Picomotor Controller has been extended to include support for the 8751 closed-loop controllers. Such support requires New Focus firmware version 1.5.4 or higher in the model 8752 ethernet controller. spec will automatically detect the presence of the closed-loop controllers.

New Debugging Level For Server-Client Socket I/O

The new debugging bit 0x800000 will print only the socket I/O transactions associated with spec server and client communications. That output will no longer be displayed with debugging bit 0x40 (64).

October 3, 2005 - RELEASE 5.06.03-7

New Option To remote_stat()

If a second argument of "?" is used with the remote_stat() function on a spec client, the return value is a string indicating the status of the connection specified by the first argument. Possible return strings are "up", "trying", "lost" and "no connection". See the server help file for details.

New Tracking Option For X19C surf Geometry

The X19C variation of the surf geometry now includes an option to turn off sample height and detector height tracking with the incident angle motions. This is the same option that has been available with the X22B and CMC surf variations. Tracking is generally turned off to speed alignment of the motors associated with the incident angle. The settrack macro can be used to turn tracking on or off. By default, tracking is on.

Bug In Handling of SV_ABORT Fixed

Deficiencies in the original implementation of the handling of SV_ABORT protocol command (which is intended to mimic a ^C action from the keyboard) by a spec server have been addressed. Previously, reception of an SV_ABORT packet could cause the server to become stuck in a loop on reads of the input socket stream and/or to fail to carry out the abort actions on subsequent SV_ABORT packets.

Recently Introduced spec Client Bugs Fixed

The release 5.06.03-1 update that was intended to allow servers to be interchangeably specified by port number or spec version name had problems that could cause a spec client to crash or not properly recognize an existing connection. Those problems have been fixed.

September 19, 2005 - RELEASE 5.06.03-6

Bug Fix For Compumotor 6K

A programming bug that could cause bad positions to be reported for the Compumotor 6K motor controller has been fixed.

September 17, 2005 - RELEASE 5.06.03-5

Fix For XIA X10P Support

The changes in release 5.06.02-1 to add support for multiple CAMAC crates inadvertently broke the support for XIA X10P parallel port MCA device. That problem has been fixed. (Note, the X10P support in spec does work with the Radiant Vortex X-ray detector.)

September 13, 2005 - RELEASE 5.06.03-4

Fix For Compumotor 6K Encoder Support

spec now sends the ENCCNT command to the Compumotor 6K motor controllers, which is needed to enable encoder position read back. spec now also properly uses the configured encoder step-size parameter to determine the user angle associated with the encoder position.

August 20, 2005 - RELEASE 5.06.03-3

Fix For FAST ComTec MCDLAP ISA Board MCA Support

A bug in the recently introduced support for the FAST ComTec MCDLAP that prevent the "soft_preset" mode from working has been fixed.

August 3, 2005 - RELEASE 5.06.03-2

Fix For Compumotor 6K Support

A problem that prevented spec from recognizing certain eight-motor Compumotor 6K controller configurations has been fixed.

August 3, 2005 - RELEASE 5.06.03-1

Updated For GCC Release 4

The spec code has been updated to compile cleanly with gcc 4.x, as used with Fedora Core 4 Linux, Mac OS 10.4, etc.

Pseudocounters Now Ignore Scale Factor

For pseudocounters (those counters with controller type NONE in the config file), spec shouldn't change the value assigned to the corresponding element of the S[] scaler array. However, in prior releases, spec would divide the value in S[] by the config-file scale factor on every call of getcounts. Since the scale factor is normally set to one, this was seldom an issue. In any case, with this release, spec will ignore the scale factor for pseudocounters. The configured scale factor can be retrieved, though, via the "scale" option to counter_par().

Two Issues With the spec Client Addressed

Previously, if a spec client configured to use spec server hardware was started before the server was started, and if a user-level call, such as remote_cmd(), was also issued before the server started, when the server finally did come up, the client would not connect to the server for the configured hardware. That problem has been fixed.

Also previously, if a server was specified by both a symbolic name, such as host:fourc, and a port number, such as host:6510, spec would attempt to create two connections, even if the first was using the same port number as the second. The two connections were problematic in some situations. Now the spec client will check if the two specifications refer to the same server and use the same connection when appropriate.

Support For FAST ComTec MCDLAP ISA Board MCA

Initial support for the FAST ComTec MCDLAP ISA Board MCA is now included with spec.

Fix For Mclennan Motor Controllers

Previously, errors were sometimes generated when changing base and slew rates on a multiplexed Mclennan motor channel on a Model 381 or 608 controller if the new base rate was higher than the old slew rate. spec now makes sure the slew rate is reprogrammed first, when necessary.

Fix For IMS Motor Controllers

A problem, where a failed serial communication link to an IMS motor controller could lead to endless looping in spec, has been addressed.

July 15, 2005 - RELEASE 5.06.02-9

Support For Scientific Solutions GPIB Controllers Updated

The Scientific Solutions IEEE-488-CL/PCI GPIB controller is now supported by spec on Linux. The support is entirely built into the spec code and no kernel driver is required. The support shares code with the register-compatible ISA GPIB controllers from Scientific Solutions (formerly Tecmar). Also, the code has also been updated to allow multiple boards of this type (both ISA and PCI) to be used with spec simultaneously. In addition, the timing in the polling loops of the code has been improved.

Support For Scientific Solutions Labmaster PCI Timer/Counter

The Scientific Solutions Labmaster DPCI with Am9513-based timer/counter functionality is now supported by spec.

Update For Am9513-Type Counter/Timers

A number of updates have been made to the Am9513 code. Multiple PC cards with Am9513 chips may now be used. An improved gating system is implemented, although it requires adding an additional jumper between two connector pins. However, boards without the jumper will still work. See the am9513 help file for details.

Fix For Hecus ASA-32 MCA Card

Missing code in the Hecus ASA-32 MCA card support needed to set the time preset when the MCA "soft_preset" mode is active has been put in place.

Fix For newfile Macro

An old bug in the newfile macro where a typo in a variable name resulted in a harmless but unintended reset of the EPOCH variable when an existing file was reused, has been fixed.

June 12, 2005 - RELEASE 5.06.02-8

Fixes For Unit Number Assignment

Previously, for a number of motor controller and counter types, when using more than one controller of the same type, if the device associated with one of the controllers couldn't be opened during hardware configuration, the unit numbers assigned to additional controllers of the same type would be shifted. Although, this behavior was not normally encountered, it was annoying to users when it did occur, which usually happened when spec couldn't connect to controllers interfaced via Ethernet. In this spec release, the code for most of the motor controller types has been changed to avoid the unit number reassignment.

Bug Fix For End-Of-String For Several Socket-Interfaced Controllers

A bug in the end-of-string detection that affected only the Galil, New Focus model 8752/53 and Compumotor 6K motor controllers, and only over socket interfaces, has been fixed. The bug could result in communication problems with the controllers, although only problems with the 6K have so far been reported.

Accommodate TACO Plus TANGO Install For ESRF

The spec installation script now accommodates linking with both TACO and TANGO libraries simultaneously, as is now needed in the ESRF instrument control environment.

May 22, 2005 - RELEASE 5.06.02-7

New zeta Geometry

A new four-motor geometry for a diffractometer located at NSLS beamline X21 is included. The geometry is called zeta. The geometry motors are called nu, zeta, delta and theta.

Support For OMS MAXv Motor Controller

This spec release supports the new Oregon Micro Systems MAXv VME motor controller module.

Fixes For Compumotor 6K

A problem with setting the axis definition on the Compumotor 6K to stepper or server to reflect the spec hardware configuration file has been fixed. Also, an issue where the unit number assignments would change if configured controllers were unavailable has been addressed.

May 4, 2005 - RELEASE 5.06.02-6

Fix For Optional Motor Parameters With Linked Configurations

An old bug, where for linked configurations, the MOTPAR optional parameters encountered in the config file for motors not part of the active geometry were assigned to the last motor that was part of the active geometry, has been fixed.

May 2, 2005 - RELEASE 5.06.02-5

Fix For DAC Motor Timing

Short (< 10 millisecond) sleeps have been added after PCI- and ISA-board DAC motors are set to allow the DACs time to settle, apparently required in some configurations when more than one DAC channel on the same card is to be "moved" at the same time.

Fix For Macro-Hardware Motor Start Command

A bug, where the first parameter sent with the "start_one" key in the call to the macro motor "_cmd" macro function had been inadvertently sent as the final position after a backlash correction was applied, rather than final position for the first part of a two-part move with backlash, has been fixed.

April 27, 2005 - RELEASE 5.06.02-4

Option Added To OMS Multiplexing

The multiplexing support for the OMS motor controller, where a single channel can be used to drive up to sixteen motors, has a new motor_par() option available. When set, the order in which the multiplexed channels are moved will be reversed. By default, when more than one motor is commanded to move at the same time, the motors are moved in the channel number order. The command

motor_par(mne, "mplex_reverse", 1)

will cause the motors to be moved in reverse channel number order, while

motor_par(mne, "mplex_reverse", 0)

will restore the default order.

April 25, 2005 - RELEASE 5.06.02-3

Fix For Server-Mode "status/quit" Property

A problem, where the server property "status/quit" was often not sent to registered clients when the server exited, has been fixed.

April 24, 2005 - RELEASE 5.06.02-2

Support For Parker/Compumotor 6K Motor Controller

This spec release includes support for the Parker/Compumotor 6K motor controller over serial and Ethernet interfaces. The code includes support for encoders, servo motors and home searches, although some details of the implementation of these features may require refinement. The support for these motor controllers includes a new spec feature for detecting an emergency stop. If any of the 6K limit or trigger inputs have been preprogrammed using the LIMFNC or INFNC firmware commands for behavior D (emergency stop), spec will check whether the corresponding bit is set before starting a move and when a move has finished. In the former case, spec will warn the user that the emergency stop is active. In the latter case, spec will print a message that an emergency stop has occurred.

New Motor Property

A new emergency stop motor property has been incorporated into the spec infrastructure. Currently, the only motor controller which can trigger the property is the Compumotor 6K. spec's behavior on receiving an emergency stop is much the same as hitting a limit. However, unlike with an active limit, spec will allow a new move to be started while the emergency stop is active.

New kappa Geometry Variation For Crystalogic Diffractometer

A new kappa geometry variation is included to support Crystalogic kappa diffractometers where the detector angle is controlled by an elevator. The configuration is automatically selected if, in addition to the standard fourc and kappa motors, a motor with mnemonic xlhgt is included in the config file. For such a configuration, the tth motor should be configured with controller type NONE, as it will be a pseudomotor. In addition, two geometry parameters, g_xtalogic_d1 (the vertical distance between the instrument center and the driven point below the detector table) and g_xtalogic_d2 (the horizontal distance between the instrument center and the detector table vertical axis) are included with the standard geometry macro files.

Further Improvements For Struck SIS 1100/3100 V2 Driver

Additional modifications to the recently updated support for Struck's version 2.0 Linux driver for their SIS 1100/3100 PCI-to-VME controller turned out to be needed.

April 22, 2005 - RELEASE 5.06.02-1

Initial Support For Multiple CAMAC Controllers

This release of spec allows up to four CAMAC crate controllers to be used at the same time, however, with a number of limitations. (Previously, only one crate controller could be used.) Currently, except for the Jorway 73A, the KS3929 and the DSP 6001 controller models, only one instance of a particular type or model of a controller can be used at a time. Also, so far the only CAMAC modules that can be installed in other than the first crate (crate 0) are the XIA DXP-4C/4C2X MCA, KS-3655, KS-3610, QS-450, RTC-018, KS-3112, KS-3116, KS-3195 and E250 modules. In addition, the user-level functions ca_get(), ca_put(), ca_fna() and ca_cntl() currently only work with the first crate. The multiple crate support will be extended for multiple identical controllers, additional modules and to the user-level functions in the future as needed.

To configure additional controllers from the edconf configuration editor (invoked by the config macro), use ^F or ^B on the CAMAC entry of the Interfaces screen. To configure modules in the additional crates, type C from the CAMAC crate screen to cycle through the crates associated with each controller. For scaler modules installed in other than the first CAMAC crate, the crate number must be entered in the same field as the unit number on the Scaler screen of the configuration editor using the crate/unit notation, as in 1/0 for crate 1, unit 0. For motor modules installed in other than the first CAMAC crate, the crate number is entered as [crate/]unit/channel in the unit/[module/]channel field of the motor screen.

If only one crate is configured, the config file syntax is the same as before. When multiple crates are configured, additional information specifying crate number for each module and controller is added to the config file.

Updated Code For CAMAC DAC Modules

The support for the CAMAC KS-3112, KS-3116, KS-3195 and E250 (used as DAC motors) has been rewritten to use the "new" (as of 1995) motor formalism. This change should be invisible for the most part, but does allow these motors to be accessed via the spec server. Also, the optional unit/channel configuration feature is now available for these motor channels.

Fix For XIA DXP CAMAC Module

A bug that prevented the XIA DXP parameters from being modified using the mca_par() function where spec incorrectly indicated the parameter was "read only", has been fixed.

Improved Memory Mapping For Struck SIS 1100/3100

The Struck SIS 1100/3100 PCI-to-VME controller on Linux has room for sixty-four 4 megabyte memory maps. Previously, if all were used, an attempt to map a new region would fail. In this update, spec will now reuse mapping registers in a circular fashion, thus making it possible to access the entire 4 gigabyte A32 VME address space.

Fix For Extra Echo In Piper Mode

A recent bug (introduced with the piper mode fix in spec release 5.05.05-7), that caused commands to be echoed twice when the file descriptor option to the -p command line option was zero, has been fixed.

Fix For Start-up With No config File

Although there is little reason to start spec with no config file, a bug which would cause spec to crash in that situation has been fixed.

April 13, 2005 - RELEASE 5.06.01-8

Fix For Hecus ASA-32 MCA Card

A bug in the support for the Hecus ASA-32 MCA ISA card that affected the clear operation has been fixed.

April 4, 2005 - RELEASE 5.06.01-7

Update For Struck SIS 1100/3100 V2 Driver

Support for the Struck SIS 1100/3100 PCI-to-VME controller on Linux has been updated to work with Struck's new Version 2 driver. The new driver supports Linux 2.6 kernels. When configuring spec to work with the new driver, note the default device name for the first controller has changed from /dev/sis1100 to /dev/sis1100_00remote.

March 21, 2005 - RELEASE 5.06.01-6

Fix For PI E710 Motor Controller

An adjustment to the code for the Physik Instrumente Model E710 Picomotor Controller has been made to allow it to work with socket-to-serial devices.

March 10, 2005 - RELEASE 5.06.01-5

More Improvements For Micos Motor Controllers

The Micos VENUS-2 compatible motor controllers on occasion send the same response twice, such that subsequent commands and responses become unsynchronized. spec now examines responses to most commands to make sure the response contains the correct number of arguments. If the number of arguments is incorrect, spec will flush the input buffer for the Micos controller and send the command again in order to reestablish synchronized communication. (This code is considered a work around for a defect in the Micos firmware.)

March 9, 2005 - RELEASE 5.06.01-4

Enhanced Powder-Mode Macros

The powder-mode macros will now return the rocked motor to its position at the start of the scan, taking into account the backlash correction, if needed. (See the setpowder help file for more information.)

Additions To psic Macros

The standard psic geometry macros now include suitable definitions for the traditional fourc macros an and uan, which move del and eta; pl and upl, which move chi and phi; and th2th, which scans del and eta.

Fix For MicroMo MVP-2001 Motor Controller

A bug in the support for the MicroMo MVP-2001 motor controller that prevented motor channels numbered ten and above from working has been fixed.

March 3, 2005 - RELEASE 5.06.01-3

Improvements For Micos Motor Controllers

This release includes some new code to address communication synchronization issues with the Micos VENUS-2 compatible motor controllers that have been observed after ^C aborts.

Another Fix For EPICS Motors Powder-Mode Behavior

The renewed attention (see below) to powder-mode behavior for EPICS motors revealed that the backlash parameter for the EPICS powder-mode motor, set to zero during a powder-mode scan, did not get restored at the end of the scan. Such behavior has always been the case, but is now fixed.

February 24, 2005 - RELEASE 5.06.01-2

Fix For EPICS Motors Powder-Mode Behavior

The recent addition of the new powder-mode motor_par() parameters in spec release 5.05.05-1 adversely affected use of powder mode with EPICS motors. This release should correct the problem.

February 16, 2005 - RELEASE 5.06.01-1

Fix For spec Exiting On Start Up On Macro Hardware Macro Errors

Previously, during the initial hardware configuration for the case of macro hardware (see the mac_hdw help file), errors in the macro functions associated with the hardware that would normally cause spec to reset to command level would cause spec to exit. Now, spec will continue running, although the particular macro function call that contained the error will exit.

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.

January 21, 2004 - RELEASE 5.04.04-10

Workaround For New Focus 8750/53 Firmware Bug

A workaround for a bug in the recent firmware for the New Focus 8750/53 motor controllers that prevented the existing spec code from working with these controllers is included in this spec release. Motor controller firmware release 1.0.13 did not have the bug. Firmware releases 1.3.1 and 1.5.3 are known to have the bug, and spec assumes all releases in between do, too.

January 15, 2004 - RELEASE 5.04.04-9

Fix For New Unit/Module/Channel Motor Numbering

The optional module numbering for motors that was introduced in release 5.04.03-2 didn't allow motors to have the same unit and channel numbers but different module (crate) numbers. That problem is now fixed.

unix() Will Strip Initial Null Bytes From Output

When the unix() function is used to assign the output from the command given by the first argument into the string variable given by the second argument, initial null bytes in the command output will now be stripped away.

Support For MEN M97 Counter/Timer Modules

spec now supports the MEN Mikro Electronik GmbH M-Bus model M97 timer/counters. The current support is based on the M97 module being installed in an MEN A201S 6U VMEbus Carrier Board.

January 12, 2004 - RELEASE 5.04.04-8

Support For MEN M8 VME To GPIB Controller

spec now supports the MEN Mikro Electronik GmbH M-Bus model M8 GPIB controller. The current support is based on the M8 module being installed in an MEN A201S 6U VMEbus Carrier Board. Multiple M8 controllers can be used.

January 9, 2004 - RELEASE 5.04.04-7

Update For Struck SIS3820 Multi-Channel Scaler Update

spec now works with updated firmware version 1.02 for the Struck SIS3820 multichannel scaler. These updated modules now have all the functionality required to use them as a timer/counters with spec. Firmware 1.01 is no longer supported. spec now automatically routes the internal 50 MHz time base to channel zero, if that channel is configured as the time base. Also, spec now keeps track of unlimited overflows in all channels and will restart the timer as necessary to accommodate arbitrarily long count times, whether counting to time or to monitor counts.

More Robust Code For Tsuji PM16C Over Ethernet

spec now includes code to retry read commands when using the Tsuji PM16C motor controllers over the Ethernet interface. spec will resend commands to read values up to four times if there are timeouts when waiting for a response from the motor controller. In addition the Ethernet timeout value has been reduced from five to two seconds. The reason for the change is due to reported timeouts when the controller is used on a busy network.

Another Fix For Mclennan PM608 Motor Controllers

A bug, where the Mclennan PM608 motor positions were not tested for synchronization with positions stored on the computer, has been fixed. (The fix in release 5.04.04-2 was not completely effective.)

January 7, 2004 - RELEASE 5.04.04-6

Fix For Recently Introduced CAMAC SMC Bug

A bug (introduced in release 5.02.02-7 and associated with changes made to accommodate server mode), that caused bogus motor positions to be returned for the CAMAC Joerger SMC motor controllers when used without associated counters, has been fixed.

January 7, 2004 - RELEASE 5.04.04-5

Real Fix For Catching Signals In Server Mode

A bug in server mode only, where spec inappropriately blocked several signals (including the hang-up signal generated when a window running spec is closed), and which was reported to be fixed in release 5.04.04-2, but wasn't, is now really fixed.

January 6, 2004 - RELEASE 5.04.04-4

Fix For Struck SIS1100/3100 VME Controller

A bug, where spec would crash after repeated reconfig commands with the message "No more room for VME memory maps" when using the Struck SIS1100/3100 VME Controller, has been fixed.

January 5, 2004 - RELEASE 5.04.04-3

"pgm" Format Now Accepts 16-Bit Data

The "pgm" file format for the fmt_write() and fmt_read() functions now supports 16-bit data, in addition to the existing support for 8-bit data.

Update to PC-DIG Frame Grabber Support

The support for the Coreco Imaging (formerly ITI) PC-DIG frame grabber has been revised. It is no longer necessary to configure a camera type in the ADDR field of the configuration editor. spec will now obtain the needed configuration parameters from the initialized itifg driver module.

January 4, 2004 - RELEASE 5.04.04-2

Fix For Catching Signals In Server Mode

A bug in server mode only, where spec inappropriately blocked several signals (including the hang-up signal generated when a window running spec is closed), has been fixed.

Language Dependence Removed For External Shared Arrays On Linux

spec now uses a different method for finding available existing shared arrays (needed for the extern shared usage) that doesn't depend on the locale-dependent output of the ipcs command. The new method is only available on Linux platforms, however.

When using utilities built with prior versions of the sps shared-array library or when running on non-Linux platforms, the language locale can be set to English for a single command as follows:

shell> LANG=en onze &

The above starts the onze 2D-image display utility as a background process with the LANG environment variable set to English.

Homing Implemented For IMS MDrive Motor Controllers

spec now implements home searches for the IMS MDrive motor controllers. spec uses MDrive input pin three as the default home input.

Support For Tsuji CT16-01B Counter/Timer

spec now supports the Tsuji Electronics Model CT16-01B 16-channel counter/timer over GPIB and RS-232C interfaces.

Support For Hasylab MCA 8701 VME Module

spec now supports the Hasylab home-grown VME MCA known as model 8701.

Fix For Mclennan PM608 Motor Controllers

A bug, where only the first channel of each Mclennan PM608 motor controller was tested for synchronization with positions stored on the computer, has been fixed.

Fix For Amptek Pocket MCA

spec now automatically disables the security locking feature of the Amptek "Pocket" MCA 8000/8000A on startup. Otherwise, if the security locking had been turned on elsewhere, spec would be unable to modify the device parameters or control the device.

November 20, 2003 - RELEASE 5.04.04-1

Tilde Expansion Now A Built-In Feature

The tilde expansion feature for path names, where ~ is expanded to the spec user's home directory path, and ~name is expanded into name's home directory path, is now included in the base spec code. Previously, the feature was only available when an optional command-line editing package (such as GNU readline) was linked in.

Increased Maximum Number of Motors

A spec installation (at ESRF) has finally run up against the compiled-in limit of 160 motors. To accommodate them, the maximum number of motors has been increased to 200. (The next time the limit is reached, the spec code will be modified to allow an unlimited number of motors.)

New motor_par("module") Option

A new "module" option to the motor_par() function returns the configured module number of a motor. Optional module numbers were introduced into the motor configuration in spec release 5.04.03-2.

New Home-Position Optional Motor Parameter

A new parameter is available on the first optional motor-parameter configuration screen to configure the home position (in dial units) of the motor. spec will use this parameter, if set, to assign the dial position automatically on home searches. Motor controllers that currently have this feature implemented are the OMS models, the Newport MM4000/5/6 models, the Mclennan PM600/8 models and the ANKA Gamma RST driver. The parameter is accessible via the "home_position" option to the motor_par() function. If the home-position argument is given to the standard home macro or in the chg_dial() function, that value will take precedence over the value in the config file.

Fix For Tsuji PM16C Ethernet Interface

A timing issue with the Tsuji PMC16C motor controllers when used with the Ethernet interface, where the controller wouldn't respond quickly enough between closing and opening the connection (as occurs during reconfig) has been accommodated by inserting a small delay in the spec code before the connection is reopened.

Updates To Mclennan Motor Support

A number of updates to the Mclennan motor controller have been made, including the following: The PM608 model, which is a multiplexed version of the PM600, is now supported. Home searches are now implemented for the PM600 series. Also, the spec code should now work in both "quiet" and "verbose" modes (as set by configuration switches on the motor controller). Finally, the new unit/module/channel configuration can be used for the multiplexed PM381 and PM608 motors, where the module number corresponds to the controller address.

Updates To IMS MDrive Motor Support

New spec code addresses the latest non-backwards compatible firmware (version 1.043) from IMS for their MDrive motor controllers. Also, the commands for doing home and limit searches with the MDrive controllers are now included in this spec release. Finally, the error messages returned by the controller when spec attempts to set already configured input switches to the convention for limit assignments (switch 1 for plus limit, switch 2 for negative limit) are suppressed. spec sends the commands to ensure the limit switches are available, although the software will still detect limits if the switches have already been programmed to another convention.

Data Group Fix

An old bug that affected use of data groups in the functions data_dump(), data_fit(), data_plot() and data_pipe(), where spec could experience a segmentation fault if the starting point argument was greater than zero, has been fixed.

Bug Fix For chelp Utility On OSX

A bug, where spec's stand-alone help formating utility, chelp, inappropriately ran in interactive mode on Mac OSX platforms when its output had been redirected through through a pipe, has been fixed.

Fix For ANKA RST Gamma Simulate Mode

Missing checks on whether spec was operating in simulate mode in calls of the anka_par() function have been added.

Fix For Detecting ESRF TACO Maxe Controller Failure

spec now includes a check for for ESRF TACO Maxe controller failure. If there are three consecutive failures of the dev_putget() calls for a particular motor, spec will mark the motor channel as unusable. The user must perform a reconfig to reenable the motor (after fixing whatever caused the hardware failure).

ESRF Warning Message Restored

A warning that motors did not reach the final position, which disappeared from spec when the Maxe support was modernized in release 5.02.03-4, has been restored. Also, the warning can now appear for non-Maxe motors, but only for TACO-enabled spec installations.

October 26, 2003 - RELEASE 5.04.03-8

Bug Fix For read_motors() Flags

A bug, where setting bit 2 of the flags argument to read_motors() was supposed to indicate that position discrepancies should be resolved silently in favor of the hardware but didn't, has been fixed.

October 5, 2003 - RELEASE 5.04.03-7

Fix For Nested eval() Calls With Macro Functions

A bug, where the return values of macro functions in nested calls of eval() were sometimes lost, has been fixed. This bug was discovered when a macro hardware _par() function was called from inside a macro hardware _cmd() function.

Improved Error Handling When Opening Socket Connections

spec now uses a more sophisticated technique for opening socket connections. Previously, if a host specified by IP address was unreachable, the internal connect() call would hang until interrupted with a ^C. The new algorithm will time out after a default interval (currently four seconds) if the host cannot be reached.

Improved Testing Of Connections To spec Server

When a spec client opens a connection to a spec server on startup or on a reconfig, errors such as an unresolvable host name or an unreachable host will now generally produce an immediate error message, with no more attempts made to connect to that server until the next reconfig. If the host is up and reachable, but there is no spec server available at the designated port, the spec client will keep trying, as in previous versions. However, now a warning message will be printed on the first try.

Fix For Crash in spec Clients When One Server Platform Was Down

A bug that could result in a crash during hardware initialization when a spec client was configured for spec servers on multiple platforms where the computer running one of the servers was down has been fixed.

Another Motor Position Rounding Fix

The fixes in releases 5.02.03-5 and 5.03.01-3 that dealt with an obscure rounding bug and then with the unintended consequences of the first fix require one more fix. Now, motor positions near zero can again be set as small as the step size, even if the step size is less than 1e-10.

Fix For a Particular Am9513 Counter/Timer

Although spec doesn't officially support the Measurement Computing PCI CTR-05/10 Am9513 compatible counter/timer modules (because they contain a flaw which prevents counting to monitor to work), the cards can still be used with spec for counting to time. For the CTR-10 model that contains two counter chips, spec now probes the correct addresses for the second counter chip. Previously, the registers associated with the digital I/O were probed, which would disturb the contents of those registers.

September 24, 2003 - RELEASE 5.04.03-6

New counter_par() Option

The command counter_par(mne, "monitor?") returns nonzero if the hardware counter channel associated with mne can be assigned as the monitor preset channel using the command counter(mne, "monitor"). Currently, counter/timers with such a capability are the Kinetic Systems 3640 (CAMAC), the Joerger VSC16/8 (VME), the Struck SIS3820 (VME), the National Instruments 6601/2 (PCI), the MURR device (GPIB) and the EPICS scaler record.

Updated counters Macro

The counters macro, used to assign the channels associated with the main detector counter and the monitor counter, will now use the counter_par() function to change the counter hardware monitor assignment for hardware that supports monitor channel assignment via software.

Support For Munich BR-tronik IPS Motor Controller

spec now includes support for a motor controller called the BR-tronik IPS, designed, built and used at LMU Munich.

September 4, 2003 - RELEASE 5.04.03-5

Motor Offset Rounding Bug Revisited

The fix of an obscure motor rounding bug in spec release 5.02.03-5 created another bug that was partially fixed in release 5.03.01-3, but not entirely. The bug would, under certain circumstances, cause 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. This release should complete the fix begun in the 5.03.01-3 release,

Support For SBS Model 946 Version 2 Driver on Sun

The SBS 946 version 2 driver for Sun platforms for the SBS model 61x/62x VME controllers is now supported.

September 1, 2003 - RELEASE 5.04.03-4

Portability Issues Addressed

Several code changes were needed to allow spec to compile using gcc version 3.3. Also, problems with state- and settings-file locking over NFS have been addressed.

August 27, 2003 - RELEASE 5.04.03-3

New remote_stat() Client Function

A new remote_stat() function is available on the spec client to check whether a particular server is currently connected. See the server help file for additional information.

New status/ready Server Property

A new "status/ready" property is available on the spec server that will return a value that indicates whether the server is ready to execute the next client command. See the server help file for additional information.

Bug Fix For Watched Variables in Server

A bug introduced just before the server/client code was put into the official release, where "watched" variables became unregistered in the server the first time they were modified, has been fixed.

Improved Hex Dump For Socket Debugging

The optional hexadecimal debug format for socket I/O (selected with DEBUG bits 0x400040) will now also show offsets and printable ASCII representations of the data, along the lines of conventional hex-dump utilities.

show_state Utility Checks New Checksum

The show_state utility, available to display the contents of a user's state file, will now also do a test on the state-file checksum that was introduced in the previous spec release.

Improved Error Messages On Array Allocation Failure

spec will now print the name and requested dimensions of arrays that are too big for the memory allocation calls.

Initial Support For Struck SIS3820 Scalers

spec now includes support for the Struck SIS3820 multichannel scaler (MCS) VME module. The initial support only covers use of the device as regular preset counters (of which there are 32 channels). MCS support will come later. The current SIS3820 firmware does not allow the counters to be read back while counting, but that feature is expected to become available in a forthcoming SIS3820 firmware update.

Support For Compumotor OEM750 Motor Controllers

The code that supports the Compumotor AX motor controller has been modified to allow it also to work with the Compumotor models OEM750, OEM650, OEM350 and OEM010 motor controllers. Select CMAX as the controller type and "Compumotor AX (Serial)" as the device type for all such motors.

August 18, 2003 - RELEASE 5.04.03-2

Server/Client Updates

A number of updates are included for the new server/client features introduced in release 5.04.03:

  • Server port number assignment is now flexible. A server can be assigned a single port number, a range of port numbers or left to use a built-in default port number range (6510-6530). The spec invocation argument syntax for server mode has changed to reflect the new options.
  • New hello commands are available for clients to discover servers.
  • spec clients can specify a server on a particular host by either a port number or by a spec process name.
  • A better job is done reestablishing input stream alignment on both server and client in the event nonconforming data is received.
  • Improvements have been made to the locking among threads in the server, fixing some race conditions.
  • The handling of associative arrays when passed to and from the server works better.
  • Problems with byte swapping (when needed) in the server are fixed.

See the revised server help file for further information.

New Optional Module Number For Motor Unit/Channel

To accommodate motor controllers that require more than two parameters (unit and channel) to specify motors, the edconf configuration editor now allows either two or three slash-separated numbers. If three numbers are given, the first is unit, the last is channel and the middle is the new parameter, which spec will refer to as module number. The motor controllers in spec that currently require a module (or crate or rack or sub-unit) number (ACS SPI-8, DCX serial, ECB in multiplexed mode, Mclennan PM381, New Focus 8732/8750/8753 and XIA HSC) still use the overloaded channel number to pass the information, but will be modified to recognize the new module number feature in future releases.

Argument Change For Macro Hardware _config() Macros

The arguments for the macro hardware _config() macros, when called for the individual motor and counter channels, have been changed to accommodate the new module number option. The calling sequence is now prefix_config(mne, type, unit, module, chan). See the mac_hdw help file for details.

Fix For edconf Default VME Addresses

The hardware configuration editor edconf now correctly shows the default address when VME modules are selected on the Devices screen.

Fixes For Socket-To-Serial Support

The socket-to-serial support in spec, which allows any supported serial device to be used via compatible Ethernet-to-serial adapters, was missing some internal code which could prevent certain motor controllers (Compumotor AX and 3000, MAC Science MXC, Mclennan PM301, Newport MM2000/3000 in daisy-chain mode, PMC DCX-100, Rigaku RINT-2000 and XIA HSC) from working properly in socket-to-serial mode. The missing code has been added.

Improved Detection of Corrupted State Files

This spec release attempts to do a better job of detecting corrupted user state files, automatically doing a fresh start rather than crashing or quitting with an error message. The state file is now written out with a checksum, which will be recalculated and compared before the file is used to restore the state. Also, additional checks are done on the sanity of parameters as the file is read. State files from prior spec releases will still be recognized, but state files saved with this version will not be usable by older spec releases.

prdef Source-File Comment Fixed

An old bug, where the comment printed by prdef to show the source file for the macro incorrectly eliminated embedded /../ strings, has been fixed. Unnecessary ./, /./, and /../ are still eliminated and SPECD is still substituted for the path of the spec auxiliary file directory, but all should now be done correctly.

Help Formatter Bug Fix

A bug introduced in spec release 5.01.03, where the help formatter would break lines containing highlighted text before they were full, has been fixed.

New suv Geometry for ESRF D32 Beamline

The initial adaptation in spec of a geometry called suv is included for the surface ultrahigh vacuum instrument at the ESRF D32 beamline.

July 22, 2003 - RELEASE 5.04.03-1

New Encoder Option for Mclennan PM600

If the PM600_E controller type is selected in the config file for the Mclennan PM600 motor controller, spec will read the encoder position rather than the commanded position from the controller.

July 20, 2003 - RELEASE 5.04.03

New Server/Client Feature

The spec server/client features, long in development, are now included with the standard spec release. See the server help file for details on the implementation. Although the server/client features work well in many situations, there are probably still flaws that need further development to correct. Please start gently with the current release. Keep CSS appraised of any anomalies noticed or features that seem lacking.

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.

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.

April 20, 2002 - RELEASE 5.01.03

Updated Help Viewer

The spec help viewer has been updated. The viewer can now jump to keyword locations given by line numbers in the SPECD/help/.links file. Also, new commands to move forward and back by single lines and by half a screen are available when the viewer is used directly (rather than sending output through a pager).

Addition To Standard Scan Header

The default _head macro now also writes the contents of the UB[] and Q[] arrays in the scan headers prefixed by #G3 and #G4 respectively. The obsolete M[] array, previously written prefixed by #G2, has been eliminated. Also, the output format for all #G parameters has been changed in the _head_par from %g to %.10g macro, which increases the number of significant figures from six to ten.

Small Fix For kappa Code

A bug in the kappa geometry code where the cut points for the chi and phi angles were not applied to the calculations of the angles has been fixed.

Support For Alternate zaxis Configuration

The geo_zaxis.c code has been modified to support an alternate configuration that includes a refraction correction on ALPHA and BETA. The correction only occurs if the new geometry parameter ALPHA_C (defined as Q[21]) is nonzero.

Alternative EPICS Motor Naming Convention

An alternative to the motor naming convention used at APS for the EPICS motor record process variables is now available. See the epics help file for details.

Support For Socket-based Serial Interface

spec now supports Ethernet-to-serial devices such as the ATOP Technologies TigerLink. Only the device-independent sending and receiving of serial data over sockets is implemented. Configuration of baud rate, parity and other parameters must be taken care of outside of spec. To configure such a device, select SOCKET in the ADDR (for controllers) or TYPE (for a generic user-level serial interface) fields and enter the host name and port number separated by a colon in the DEVICE field.

Support For VME DAC Motors

The DAC motor support now includes VME DAC modules that use A16 addressing to set a single DAC 12- or 16-bit output register.

Support For ACS MCB-4B Motor Controller

The new Advanced Control Systems MCB-4B motor controller with RS-232C interface is now supported.

Support For Ortec Trump-PCI MCA

spec now supports the Ortec Trump-PCI MCA on Linux platforms.

Upgrade For Orsim MCA-7700 and Ortec Trump MCA

The support for the Orsim MCA-7700 and Ortec Trump MCA now implements counting to a peak preset. Use the new "peak_mode" mca_par() option to select. Also, some problems with setting and clearing the region-of-interest (ROI) have been fixed. In addition, a new "auto_clear" mca_par() option is available. When set, the MCA will be cleared before starting. The auto-clear mode is on by default.

Preliminary Support For Roentec MCA

The Roentec XFlash MAX MCA is now supported. This MCA uses a serial interface.

Upgrade For IMS Motor Controllers

spec now supports the Intelligent Motion Systems (IMS) motor controllers in non-party-line mode. Previously, only the daisy-chained party-line mode was implemented.

Fix For Riso ECB Motor Controllers

A buffer overflow bug that resulted in segmentation faults with the RISO ECB motor controllers on some platforms has been fixed.

Fix For GPIB Devices

A buffer overflow bug that could causes segmentation faults with spec's built-in support for a few GPIB devices on some platforms has been fixed.

March 22, 2002 - RELEASE 5.01.02-9

Kappa Geometry Installation Bug Fixed

A bug, where the kappa geometry wouldn't be installed correctly if the fourc geometry wasn't also installed, has been fixed.

setplot Revised

The setplot macro has been revised to eliminate confusing prompts.

esrf_io() Associative Array Bug Fixed

A bug, where esrf_io() would fail to correctly pass the elements of an associative array returned by a macro function, has been fixed.

February 26, 2002 - RELEASE 5.01.02-8

New Serial Configuration Options

All serial devices can now be configured for the additional baud rates 57600, 115200, 230400 and 460800. Generic serial devices can now be configured for hardware flow control.

Multiple EPICS Scaler Modules Supported

spec now allows configuration of EPICS generic scalers as either counter/timer units or as a counter-only units. Only one module can be counter/timer, as spec only allow one master timer. Additional modules must be configured as counters only.

New Doc String Syntax

As a prelude to new documentation tools for macros and command files, spec now recognizes a special character sequence to delimit extended comment text. Now, everything between pairs of triple double quotes """ is a comment. The comment block can span lines, but not files. Unlike comments that begin with a pound sign #, the doc string comments will not be saved with a macro if input as part of the macro definition.

Bug With Shared Arrays and Unglobal Fixed

A bug, where using the shared array, global and unglobal declarations in a statement block could lead to a segmentation fault, as in

{ shared array data[100];  unglobal data;  global data }

has been fixed.

February 5, 2002 - RELEASE 5.01.02-7

x11filt Enhancements

A number of enhancements have been made to the X11 plotting. The x11filt window will now respond to a close operation from the window manager, as might be initiated by a title-bar button or window-ops menu item. A static detached copy of the window can be created by simultaneously pressing the control key and any mouse button while the mouse cursor is over an active plot window. Also, a new plot_cntl("cmd=numb") command provides access to a number of special operations, including creating a detached window. See the x11 help file for more information.

February 3, 2002 - RELEASE 5.01.02-6

Fixes For psic Geometry

A bug in the psic geometry code, where the azimuthal reference vector was calculated incorrectly when specified by angles (sigma and tau) rather than components, has been fixed. Another bug, which disallowed user-entered azimuthal references vectors where the sum of the squares of the components was less than one, has been fixed. Also, the sectors calculations now check that the allowed sectors don't violate naz-fixed or qaz-fixed conditions. Also, for kappa-mode psic, the sectors code will display the motor positions for the real motors (keta, kap and kphi) rather than the pseudo motors (eta, chi and phi) by default. Both and real pseudo motors will be displayed for each sector in verbose format (ShowSect 2 along with the corresponding values for omega, qaz and naz.

January 28, 2002 - RELEASE 5.01.02-5

Clarification Of Array Behavior

The recent enhancements that included implementation of the relational (<, <=, ==, !=, >, >=) and Boolean (!, &&, ||) operators for data arrays gave ambiguous results in several cases, particularly when comparing an array with a scaler. Such a comparison now unambiguously produces a scaler value. The result is true if and only if the relation is true for each element of the array and the scaler. Otherwise, the result is false. In the case of Boolean operations, an array is considered true if any element is nonzero. If all elements are zero, the Boolean value of an array is false. In the case of string arrays, only single rows are allowed as Boolean operands, and an empty string or a string representation of zero evaluates as false, while anything else is considered true.

Improved Version of x11filt

The code in the x11filt program that draws the X graphics plot window for spec has been reorganized to better exclude unsuitable fonts - only fonts with registry iso8859-1 are now allowed. In addition, the event handling has been reorganized such that only one process per window will ever be created. Previously, for displays with no backing store, a second process was created for reasons not to be explained here.

January 24, 2002 - RELEASE 5.01.02-4

Expansion of PC DAC Motor Support

Support for selected PCI cards for use as DAC motors is now included. Currently, the Measurement Computing PCI-DDA08/16 and the CyberResearch CYDDA02/04/08HRP boards are supported in this manner.

January 20, 2002 - RELEASE 5.01.02-3

Refinement Of String Array Behavior

Various aspects of the treatment of string arrays have been modified due to popular demand. The print command no longer indicates trailing null bytes for each row of a string array, but does continue to display embedded null bytes. When assigning to a complete row of a string array, bytes in the row unfilled by the assignment will be set to zero. Also, when assigning to a complete row, numbers are assigned as strings.

Addendum to Serial/Socket Timeout Behavior

A fast poll for ser_get() and sock_get() has been implemented and is recognized by setting the timeout value to the minimum of 0.001 second, for example, as ser_par(0, "timeout", .001).

January 15, 2002 - RELEASE 5.01.02-2

Wizard Mode Fix

A problem with wizard mode on Solaris platforms has been fixed.

January 10, 2002 - RELEASE 5.01.02-1

New Server Macros

A new set of macros provides a simple interface to enable one instance of spec to send commands to another via the user-level socket functions. The macros are distributed in the file server.mac in the macros subdirectory of the spec distribution. See comments in that file for details.

Fix For Socket Timeout and Close

The behavior for sockets waiting for a connection in "listen" mode with the timeout parameter set to zero has been fixed to block indefinitely rather than return immediately. The "close" option to sock_par() will now close both of the sockets associated with a "listen"-mode socket. Previously, sock_par() with "close" would need to be issued twice.

January 7, 2002 - RELEASE 5.01.02

New fourc Parameter

The four-circle C code module geo_fourc.c distributed with spec has long contained a couple of optionally compiled lines of code that affected the sector where the chi motor would be located in the omega-zero and omega-fixed modes. A new geometry parameter g_omsect along with a new macro setomsect have been added to the distribution that allow this sector option to be selected without recompiling the code. The default value of zero for g_omsect maintains the prior default behavior. If g_omsect is nonzero, the value for chi will be reflected about the x-y plane if Q[x] is negative, i.e., the transformation becomes chi + 180 - chi.

Improvements To the Serial and Socket Interface

The code for the socket and and serial (RS-232C) interfaces has been reorganized and features have been added. The ser_get()/sock_get(), ser_put()/sock_put() and ser_par()/sock_par() functions now have the same consistent syntax and behavior. The buffer size for reads without a byte count is increased from 511 to 8191 bytes. New commands to ser_par()/sock_par() are available to check if there are left-over characters in the input queue and to flush the queue. See the serial and sockets help files for more information.

edconf Box Outline Change

A new -b flag for the edconf configuration editor forces the use of standard ASCII characters (+, - and |) to draw a box around menus and subwindows. Otherwise, special line-drawing characters available with some fonts will be used. Previously, the ASCII characters were always used with xterm windows. The default is to use the line-drawing characters, but as not all X fonts provide them and as there is no way to detect whether the chosen font has them, this new option is available. A new EDCONF_BOX_FLAG global variable is also included in the standard macros. If nonzero, the config macro will invoke edconf with the -b flag.

edconf Backup File Permissions Fixed

A bug, where the read/write permissions of the backup config and settings files were not always maintained by the configuration editor, edconf, has been fixed.

December 15, 2001 - RELEASE 5.01.01-10

Associative Array Looping Bug Fixed

A bug, where the usage

for (var in arr)
    delete arr[var]

resulted in occasional segmentation faults, has been fixed.

December 6, 2001 - RELEASE 5.01.01-9

Kappa Diffractometer calcP_fromR C Code Fixed

A bug in the new feature that calculated pseudomotor positions from real motors for the kappa versions of the fourc, fivec and psic geometries has been fixed. The feature was accessed with the calcP_fromR macro.

SCIPE Code Fixed

The recent overhaul of the internal socket code in spec broke the SCIPE support. The SCIPE support has now been repaired.

December 5, 2001 - RELEASE 5.01.01-8

Preliminary Support For Newport ESP-300

Preliminary support for the Newport ESP-300 motor controller is included in this spec release. The controller is supported over both GPIB and RS-232C interfaces.

November 22, 2001 - RELEASE 5.01.01-7

clone() Bug Fix

An unfortunate programming lapse, which resulted in a segmentation fault on some platforms when using the new clone() function to make a copy of a macro, has been corrected.

November 17, 2001 - RELEASE 5.01.01-6

fourc Bug Fixed

A bug in the fourc geometry code for locating the cut point for the tth motor has been fixed. On Linux and HP platforms, the bug resulted in the cut point always being treated as zero. On Solaris platforms, the bug resulted in impossibly large values for the tth motor. The bug was in all previous spec release 5 versions.

Technoland C-KP 402 Counter Bugs Fixed

Two bugs found in the new code for the CAMAC Technoland C-KP 402 Counter have been fixed. The first bug limited the 48-bit counters to 32 bits. The second bug prevented the last two channels of the eight available channels from being accessed.

Preliminary Support For the MBraun PSD-50m MCA

spec now supports the old MBraun PSD-50m MCA. This MCA uses an RS-232C interface.

Support For Keithley KPCI 3140 As Counters Only

spec now supports the Keithley KPCI-3140 PCI counter card, but only as four 32-bit counters. The card cannot be used with spec as a timer or preset counter.

November 6, 2001 - RELEASE 5.01.01-5

Plotting Bug Fixed

A bug introduced in release 5.01.01-1 that would often make it impossible to get plots of the data has been fixed.

New Time Scan Macros

Macros to scan detectors over time are now included with the standard spec macros. The new macros are called timescan, which scans continuously and loopscan, which scans for a finite number of points. See the macro definitions for details. These macros are from the ESRF BLISS collection.

Bug Fix in home Macro

A bug in the home macro introduced in release 4.05.10-3, which would produce syntax errors when the macro was used with the optional "+" or "-" arguments, has been fixed.

PCI Timer/Counter Found and Supported

An Am9513 type PCI counter has been found that does not suffer from the flaw contained in the Measurement Computing PCI-CTR05. This release of spec supports the ICS Advent PCIDCC5/10/20-P timer/counter cards. See the vendor's pages at www.icsadvent.com for more information.

Driver For PCA-II Updated For Linux 2.4 Kernels

The CSS pca.c driver for the obsolete Nucleus PCA-II MCA card has been updated to work with Linux 2.4 series kernels.

October 29, 2001 - RELEASE 5.01.01-4

Overhaul Of User-Level Socket Access

New sock_get() and sock_put() built-in functions have been added to replace the "read" and "send" options to sock_io(). A new sock_par() function replaces the other uses of sock_io(). (Use of sock_io() is still supported, but is now deprecated.) See the sockets help file for details.

New Names For ser_get() and gpib_get() Options

The options "short", "short_swap", "long" and "long_swap" are now recognized as synonyms for "int2", "int2_swap", "int4" and "int4_swap" in the ser_get() and gpib_get() functions.

October 29, 2001 - RELEASE 5.01.01-3

VME A24 Address Space Supported

spec now supports the A24 addressing mode through the vme_get(), vme_put() and vme_move() functions. The optional modifier argument must include the string "A24".

Bug Fix For Serial Devices With Hardware Handshake

A old bug, where spec would hang when closing unresponsive serial devices configured for hardware handshake, has been fixed.

Bug Fix For Crash On Macro Function Syntax Error

A bug, where spec could crash when executing a macro function that had a syntax error involving the macro function argument, has been fixed.

October 16, 2001 - RELEASE 5.01.01-2

Fix For Indirection Operator @

The code for handling array elements as arguments to the indirection operator @, as in { a = "x[10]"; @a = 1 } has been fixed. Previously, the operator only worked correctly with existing elements of existing associative arrays. Other cases produced segmentation faults. Elements of associative arrays are now handled correctly, whether existing or not. Elements of data arrays are not yet supported, but use produces an error message, not a core dump.

October 3, 2001 - RELEASE 5.01.01-1

Fix For MCA soft_preset Mode

Previously, when counting to a monitor preset with an MCA in "soft_preset" mode, the MCA would not stop at the end of the count period. Now, when counting to monitor, the MCA is started and stopped via software commands just as if "soft_preset" mode was disabled.

Fix For Several Timers

A missing bit of C code that would halt all counters and acquisition devices when an EPICS, SCIPE, ESRF CAEN 560 or MURR timer stopped has been added. Previously, although the counters associated with the particular timer would be stopped, unrelated counters were not.

New mca_par() Options

New "chans" and "max_chans" options to mca_par() return the current number of channels and the maximum number of channels available, respectively.

October 2, 2001 - RELEASE 5.01.01

Modifications and Fixes For User-Level Serial Access

The user-level generic access to RS-232C devices through the functions ser_get(), ser_put() and ser_par() has been modified and enhanced. The ser_get() function can now take a data-array argument, which allows reading binary data, including null bytes. All forms of ser_get() now use the current "timeout" value, which defaults to two seconds, but can be modified with ser_par(). Previously, ser_get() with just the device address argument would not timeout. Also, leftover characters (up to 512) from a ser_get() that has been satisfied with a byte count or an end-of-string match are now retained for the next ser_get(). There is a new "flush" option to ser_par() to flush any buffered characters. See the serial help file for details.

Enhancements For User-Level GPIB Access

The gpib_get() function can now take a data-array argument, which allows reading binary data, including null bytes. See the gpib help file for details.

Preliminary Support For Physik Instrumente C-860

Preliminary support for the Physik Instrumente C-860 "Mercury" single axis DC-motor controller is included. Several of these controllers can be daisy-chained over an RS-232C interface.

Data Array Enhancements

Previous restrictions on the usage of the string-array data type have been removed. In most situations, a string array is handled the same as a byte array. Exceptions to that rule include the treatment of string arrays by the print command, where the arrays are written as strings rather than a list of numbers, and the sscanf() function, where a scanned number can be stored as a string in a string array. Most functions that accept strings as arguments will now also accept a single row of a string array.

Also, the "row_wise" and "col_wise" arguments to array_op() now return the correct values for arrays where the mode hasn't been set explicitly.

Hardware Locking Fixed On Solaris and HP Platforms

Hardware locking now works again on Solaris and HP platforms. It had been ineffective on those platforms since release 4.04.01 about three years ago.

input(-1) Bug On Solaris Platforms Fixed

An old bug, where the input(-1) function didn't work correctly on Solaris platforms (the function returned the EOF character, rather than 0 if no input was available), has been fixed.

rdef Of Macro Function Bug Fixed

A bug, where using rdef to define a macro function that has no arguments resulted in an ordinary macro being created, has been fixed.

cplot_plot Macro Update For Release 5

An oversight, where the cplot_plot macro didn't work correctly with the new data-array based plotting macros in spec release 5, has been corrected.

PCI Detection Bug Fixed

A bug, where spec would not find the last PCI card in a Linux system, has been fixed.

Debugging Bug Fixed

A bug in the run-time context debugging display (level 0x40000), which could sometimes produce a segmentation fault, has been fixed.

Overhaul Of Alternate SBS (Bit3) VME Support

The release of the SBS (Bit3) Linux driver model 1003 v1.0 for the 616/617/618 PCI-VME adapters has made the CSS kernel-level driver bit3.c obsolete. However, at this time the SBS model 1003 driver is not ported to Linux 2.4 kernels, such as are installed with Red Hat 7.1 Linux. Rather than update the old CSS bit3.c driver, spec now offers support for the SBS PCI cards using user-level code only, independent of kernel version. The new code allows access to any part of the A32 address space, unlike the old CSS driver-based code, which had to be configured to use a particular 4 Mbyte window. The CSS user-level code is adequate for register-based VME devices such as the OMS motor controllers and the Joerger scalers, but does not support DMA transfers. The old CSS bit3 driver and the /dev/bit3 device node can be eliminated from the system when this new release of spec is installed.

Z-Axis Code Updated

The z-axis geometry code has been updated to use the current conventions. Among other changes, singularities in the calculations and other errors no longer cause the code to reset to command level. Instead, the calc() functions (included in the definitions of calcA and calcHKL) return nonzero when there is an error. In addition, there are now cut-point parameters for each geometry motor.

September 4, 2001 - RELEASE 5.00.04-8

DAC-Motor Bug Fix

A bug introduced with spec release 5 that caused a segmentation fault when DAC motors were configured has been fixed.

August 15, 2001 - RELEASE 5.00.04-7

Support for Mclennan PM600 Motor Controller

This spec release includes preliminary support for the Mclennan PM600 motor controller.

August 14, 2001 - RELEASE 5.00.04-6

Fix For SBS (Bit 3) VME On Linux

A problem, where an unexpected new "feature" in the revision 1.0 SBS Model 1003 driver for Linux prevented spec from working properly with A32 devices has been fixed.

August 7, 2001 - RELEASE 5.00.04-5

Revised fivec and sixc Geometry Code

The sixc geometry code has been revised to use the current spec conventions of returning an error rather than resetting to command level when a calculation fails. Also, cut points are now available for all geometry motors. The fivec geometry code has been revised quite a bit to use algebra equivalent to that used in the sixc calculations. The revisions do appear to affect the angles calculated for the motors, which brings in to question whether the previous calculations were completely correct. Also, the fivec implementation now allows two mirror-image configurations, just as in the sixc implementation. The setconfig macro selects the configuration.

Now possible To Use NI ENET-GPIB With GPIB PC Cards

It is now possible to use the National Instruments ENET-GPIB simultaneously with the NI AT-GPIB and/or PCI-GPIB cards. The method involves a bit of a hack to get around the name-space conflict that otherwise occurs. See the new makeCIB file in the spec distribution for hacking details.

July 31, 2001 - RELEASE 5.00.04-4

Fixes For EPICS MCA Record Support

CSS's first opportunity for testing the three-year-old spec support for the EPICS MCA record with real hardware revealed several coding bugs, which are now fixed. CSS looks forward to comments from any users of this code.

July 29, 2001 - RELEASE 5.00.04-3

Support For Mclennan PM381 Multiplexor

This spec release includes preliminary support for the Mclennan PM381 multiplexor. When the user requests moves by multiple motors connected to the multiplexor, spec automatically sends commands to move each motor in turn.

July 26, 2001 - RELEASE 5.00.04-2

SBS (Bit 3) VME On Linux Requires New SBS Driver

This release of spec requires the new revision 1.0 of the SBS Model 1003 (non-beta) driver when using the SBS Models 616, 617, 618 and 620 PCI-to-VME adapters. The earlier beta releases of the driver are incompatible with the new driver.

SBS (Bit 3) VME Support Updated

spec's support for the SBS (Bit 3) VME drivers and adapters for Sun, HP and Linux platforms has been updated.

edconf Update

The edconf configuration editor now asks for confirmation when inserting a motor using the i command.

Fix For Kappa-Mode wh Display

A bug in the fourc and fivec kappa-mode geometries, where the motors displayed with wh and similar macros showed non-geometry motors under certain conditions, has been fixed.

July 19, 2001 - RELEASE 5.00.04-1

Internal Updates

This release includes internal code reorganization that should have no impact on function or behavior.

June 24, 2001 - RELEASE 5.00.04

String Array Enhancements

The functions array_plot(), array_pipe() and array_dump() can now take string-type data arrays as arguments. For these functions, each byte of the string array will be treated as a signed eight-bit integer. Also, the print command now translates unprintable bytes in a string-type data array to backslash-escaped strings. Previously, the raw bytes were output, which could corrupt the text display.

Kappa Support Added To fivec Geometry

The five-circle geometry (fivec) now includes support for the kappa configuration of the diffractometer. The implementation is similar to the kappa variations for the fourc and psic geometries.

New Option For epics_get()

The epics_get() function can now take an optional third argument to specify the number of elements to read into the array named by the second argument. Previously, if the second argument was an array, and the EPICS process variable was an array type, spec would transfer the entire array.

Consistency Fix For psic Macros

The order of the geometry motor arguments for the cuts macro had the nu and mu motors in reverse order from the convention used elsewhere in the psic macros. The order is now consistently nu, then mu.

Small Fix For Energy Macros

The code in the energy.mac macros has been changed to be more precise with respect to decoding the monochromator type from the motor mnemonics. Previously, having both a mono and monu mnemonic with a single-motor monochromator would cause errors.

Support For Mclennan PM301 Motor Controllers

This spec release includes preliminary support for the Mclennan PM301 motor controller.

Fix For XIA DXP Real-Time Value

This version corrects an error in the recently added support for the XIA DXP 4C2X module. The factor-of-two error in the values returned for the "real" and "dead" arguments to the mca_par() function has been fixed.

Bug Fix For Multiple OMS PCI Cards

A bug in the new code to support the OMS PCI motor controller card, where only one card could be detected, has been fixed.

June 1, 2001 - RELEASE 5.00.03-4

Retry Added For NI GPIB "Not CIC" Error

spec will now automatically perform one retry of operations which were unsuccessful due to a "not CIC" (not controller-in-charge) error for National Instruments GPIB controllers. These errors occur mainly when a second process initializes a connection to the GPIB-ENET (ethernet) controller. Previous behavior on this error was for functions such as gpib_get() or gpib_put() to return -1 on the first try after getting a "not CIC" error.

Several Memory Errors Fixed

Several minor memory access errors uncovered using third-party memory consistency testing software have been fixed. These errors are not known to be associated with any observed spec failures. The memory access problems occurred during initialization of the data group storage, display of help files, removal of cdef-type macros and initialization of the VDL ESRF counter parameters saved in the state file.

Fix For Help Pager Options

An error, where the command line the standard macros assigned to the PAGER variable previously included the -w flag for versions of the less utility greater than 337, has been corrected. That option caused the first line of text after a scroll or new page to be highlighted.

ESRF CCD Updates

This release includes updates to the ESRF CCD support

May 17, 2001 - RELEASE 5.00.03-3

Bug Fix For Associative Array Scope Declarations

A bug, where in a scope statement such as

global  t1[], t2[], t3[]

that has a list of names that explicitly designates associative array type and only the last name in the series would be made global, has been fixed. The bug also affected such a list following the local keyword.

May 16, 2001 - RELEASE 5.00.03-2

Bug Fix For eval() Execution

A bug with the evaluation of the commands in an eval() string has been fixed. The problem occurred in the case where the eval() argument contained a curly-bracket delimited statement block that included a macro function that did not use an explicit return. If that macro function was followed by additional statements in the statement block, those subsequent statements didn't get executed.

Bug Fix For eval() Return Values

A bug with the return value of the eval() function has been fixed. In the case where the eval() argument was a macro function, eval() did not return the macro function return value.

Bug Fix For Long Strings

A bug in the spec release 5 rewritten lexical analyzer, where input strings longer than 8K (such as a very long macro definition) might cause a segmentation fault, has been fixed.

Bug Fix For prdef Of Long Macros

A bug from release 5.00.03, where prdef with a macro larger than 8K would cause a segmentation fault, has been fixed.

Bug Fix For OMS PC58

A bug, where the config file information for the Oregon Micro Systems model PC58 motor controller could not be read, has been fixed.

Bug Fix For ACS SPI-8 Fix

The fix in spec release 4.05.10-9 to send the command to enable limit switches had the wrong start character in the command string. The correct start character is now sent.

May 8, 2001 - RELEASE 5.00.03-1

Initial Support For Delta-Tau PMAC Motor Controller

This release of spec contains preliminary support for the Delta-Tau PMAC motor controller.

More Fixes For ACS SPI-8

The code for the Advanced Control Systems SPI-8 motor controller does better checking on whether replies from the controller are formatted properly. spec also now has a provision for adding small delays during communication with the controller using the motor_par() function. The commands "mdelay", "wdelay" and "rdelay" are used to set delays after sending the move command, before writing a message and before reading a reply, respectively. The default value for "mdelay" is 0.1 sec, while the default values for "wdelay" and "rdelay" are zero. The values for the delays apply to all motor channels associated with all SPI-8 controllers.

April 10, 2001 - RELEASE 5.00.03

New getsval() Function

A new getsval() function is available. This function has the same syntax as the existing getval(), but unlike getval(), which converts octal or hexadecimal input (number strings that begin with 0, 0x or 0X) to the corresponding decimal value, the getsval() function returns the literal string as entered.

Standard Macros Now Use getsval() Where Appropriate

The standard macros have been modified to use the new getsval() function where appropriate, such as for entering file names. Also, all instances of the obsolete getvar macro have been replaced with getval() or getsval().

New clone() Function

A new function named clone() is available to duplicate an existing object. It currently only works for macros. Also, currently a clone of a cdef chained macro becomes an ordinary macro. Usage is clone(dest, src).

Fix For Signal Handling

Signal handling in spec has undergone many changes over the history of the program, as the type of hardware has changed from mostly interrupt-driven to mainly polled, and also as the kernel system calls for handling signals have evolved. Somewhere during these changes, the signal blocking spec did during certain critical code got broke. In particular, typing a ^C to abort motors with some GPIB motor controllers would cause the controller to hang. This version restores proper signal blocking and the problems with ^C should be improved.

Fix For Single Array Element In Binary Array Operations

When two data arrays of different dimension are subject to a binary operator, spec performs the operation on the elements the arrays have in common. That has been true even when one of the arrays was only a single element. With this release, an array or subarray of only one element is treated as a scaler when used with a binary operator and another array.

Release 4 State Files Readable

This version of spec Release 5 can now handle state files from Release 4. Previous versions would force a fresh start. A fresh start is normally recommended, though, in order to read in the new standard macro files.

Better Memory Accounting

The memory accounting displayed with the memstat command has been adjusted to better take into account the overhead used by the C library malloc() routines. Note, though, spec still cannot account for every byte used as overhead by the C library functions, but this release does appear to do a better job at estimating.

Support for OMS PCIx Motor Controller

spec now supports the Oregon Micro Systems PCIx motor controller. Up to eight of these four-motor cards can be used with a PCI bus computer (currently on linux only).

Support For Oriel 18133

spec now has a configuration option for the Oriel 18133 Encoder Mike Controllers over a PC board (ISA) interface.

Fix For ACS SPI-8

The Advanced Control System SPI-8 motor controller has the limit switches disabled by default, and previously spec did not send a command to enable the limits. spec now does send the LE command during hardware initialization to enable limits. The motor_par() option "nolimits" with argument of 0 or 1 will enable or disable limits, respectively, for a particular motor.

March 1, 2001 - RELEASE 5.00.02-4-BETA

New Version Of XIA DXP Vendor Code Required

spec must now be linked with the new version of the XIA vendor libraries to use their DXP digital MCA CAMAC models. However, both the older 4C and the newer 4C2X models are supported. See the dxp help file for details.

Preliminary Support For CAMAC Technoland C-KP 402 Counter

Initial support for the Techonoland Model C-KP-402 fast 8-channel 48-bit CAMAC counter module is included in this spec release.

February 21, 2001 - RELEASE 5.00.02-3-BETA

Old Bug with ESRF TACO MAXE Fixed

An old bug in the code for the ESRF TACO MAXE device server, where a DEVFAULT state in the server would cause spec to core dump or exhibit other anomalous behavior, has been fixed.

MURR Motor Controller Support Expanded

The code to support the motor controllers built and used at the University of Missouri Research Reactor (MURR) has been updated to work with very old versions of the motor controller (prior to firmware release 2.30).

February 16, 2001 - RELEASE 5.00.02-2-BETA

Renamed Global Symbol In plotarray.mac

The "last-data-point" symbol in the macro file plotarray.mac is back to being named LDT from its short-lived name LDP. This change is to avoid headaches at ESRF, where the symbol has been named LDT for the last several years. This value of this symbol is the index of the current data point of the current scan in the scan data array SCAN_D. See the plotarray.mac file for details.

February 13, 2001 - RELEASE 5.00.02-1-BETA

Sub-Array Fix For VME and Image Functions

spec now handles all sub-arrays properly for the vme_move(), image_get() and image_put() built-in functions. Previously, certain subarrys, such as a complete row that wasn't the first row, would be interpreted as the first row.

Crash On Usage Errors Fixed

A bug in the initial Release 5 distribution, where using the wrong number of arguments in a built-in spec function resulted in a segmentation fault rather than a usage message, has been fixed.

Fix For Updating Accelerations Parameters

An old bug, where spec did not send a new acceleration parameter to a motor controller when the motor speed was changed using motor_par() for motor controllers where the acceleration parameter is a function of the motor speed, has been fixed.

Fix For ACS SPI-8 Motor Controller

A bug, where the acceleration parameter sent to the Advanced Control System Model SPI-8 motor controller was not calculated correctly, has been fixed.

Delays Available For MM-3000 Motor Controller

The motor_par() options "wdelay" and "rdelay" are now available for the Newport MM-3000 motor controllers. The values for each specify delay times to insert before sending and reading messages, respectively. Presently, they are only used with the GPIB interface. On fast PCs, the communication is too fast for the motor controller to keep up.

RELEASE 5

Welcome to the first installment of spec Release 5. Most of the modifications for this first release are internal and won't be visible to the user. These changes are to accommodate new features - most are still under development, though. Some of the changes, however, are currently usable.

One powerful new feature now available is the eval() function. This function parses and executes its string argument, and can be used within an executing statement block. Calls of eval() can even be nested. This function opens up many possibilities for new and interesting macros.

One feature for which the ground work has been laid, but is not quite ready for general use, is the built-in Python interpreter. Python is an interpretive language with a relatively clean syntax and many capabilities, including some that should eventually allow spec to work with a tightly coupled graphic user interface (for those users who want such a thing). See www.python.org for Python information.

Another feature still in the works is spec server mode. This mode of operation will allow spec to function as a pure hardware controller, with other instances of spec or other software programs running as clients.

February 1, 2001 - RELEASE 5.00.02-Beta

INTRODUCTION

New eval() Function

The new eval() function takes as argument a string which contains input for the spec parser. The string is parsed and executed. If the string is an expression, its value is returned. If the string is a statement or statement list, true (nonzero) is returned if there were no errors executing the statement(s) and false (zero) is returned if there was an error. Note, errors encountered during execution of the eval() string do not reset spec to the command level. Instead, the errors simply cause eval() to return an error, allowing execution of the calling statement block to continue.

Switch To C-Library malloc()

spec continually allocates and frees memory - usually in small amounts - while collecting and parsing input and while executing commands. Historically, spec used its own memory allocation routine, as early C library implementations would lead to excessive memory fragmentation. The C library allocation routines are much better these days (particularly, the GNU malloc() routines), and release 5 of spec now uses those.

As a result of the switch in memory allocation, the format of the information printed by the memstat built-in command has changed. spec still keeps track of how it is allocating memory in categories such as parse tree, symbols, macros, etc., but the total allocation statistics are now obtained from the C library. In particular, a "not tracked" value counts memory allocated by non-spec code linked with spec, such as C library functions or other vendor libraries.

On linux platforms, the C library memory allocation has the great advantage that requests for big chunks of memory are allocated using the mmap() system call, which allows the memory to be returned the operating system when freed. Normally, programs only grow in size and can't return memory.

No More lex

The lexical analyzer portion of spec has been coded directly in C to remove spec's dependence on the original UNIX lex utility, and to provide greater flexibility for future code development. Users shouldn't notice any difference in behavior.

Using Modified yacc Parser

spec is now using a customized version of the yacc parser generator to generate a re-entrant parser to accommodate a threaded version of spec. Users shouldn't notice any difference in standard behavior.

fourc and kappa Geometries Combined and Revised

Several changes have been made to the organization and behavior of the four-circle and kappa geometry code. First, the kappa-geometry C code and macros have been merged with the four-circle code and macros. Second, errors in the calculations now cause the calling calc() functions to return an error value of -1 rather than resetting to command level. Third, cut points have been introduced for all the motors associated with the diffractometer. Finally, a variation of the four circle manufactured by Picker (model 3645, perhaps others) where the motions of the chi and phi motors are mechanically linked, is available. See the geo_fourc.c file for details.

Memory Fix For Nested and Recursive Macro Functions

A problem with unbounded memory growth with nested and recursive macro functions has been fixed.

Array Plot Macros Now the Default

Although the file macros/plotarray.mac, which contains new versions of the plotting macros, has been included with the spec distribution for more than a year, not until this release have those macros been installed as the default plotting macros. These new macros define all the standard plotting macros to use data arrays rather than data groups for storing and plotting data. There should be no problems using these macros with the standard scan macros, but users who have developed local macros with direct manipulation of data groups may need to make some changes. If that proves difficult, the old plotting macros that use data groups are included in macros/plot.mac, and can be used instead.

RELEASE 4.05.10-4

These notes summarize the cumulative changes made for spec release 4.05.10-4 as of November 6, 2000.

PCA-3/PCA-Multiport MCS-Mode Fix

A bug, dating from the original 1993 version of the code, where the number-of-passes preset in multi-channel scaling (MCS) mode was not set correctly, has been fixed.

RELEASE 4.05.10-3

These notes summarize the cumulative changes made for spec release 4.05.10-3 as of October 29, 2000.

New Home Option For chg_dial()

The chg_dial() function for motors now takes an optional third argument when used with the home-search options. If present, the value of the third argument is used to set the motor's dial position when the home or limit position is reached. (A home-search is initiated on motors that support them when the second argument to chg_dial() is "home", "home+", "home-", "lim+" or "lim-".) The home macro now also takes an optional third argument, which, if present, is the dial position to use with chg_dial().

Home Commands Implmented For OMS Controllers

spec now implements home commands for the Oregon Microsystems motor controllers. See the oms help file for details.

RELEASE 4.05.10-2

These notes summarize the cumulative changes made for spec release 4.05.10-2 as of October 25, 2000.

New Binary Output Options For ser_put() and gpib_put()

The ser_put() and gpib_put() functions can now take a data array as the second argument. The binary values in the array will be output. By default, the entire array (or subarray, if specified) will be sent. An optional third argument can be used to specify the number of array elements to send. For short and long integer arrays, the data will be sent using native byte order. The "swap" option of the array_op() function can be used to change the byte order, if necessary. For the typical string-valued second arguments, an optional third argument would specify how many bytes to write.

New String-To-Data-Array Assignment Implemented

It is now possible to assign strings to any type of data array. The ASCII value of each character in the string is assigned to successive elements of the array. Only as many characters of the string as will fit in one row of the array will be assigned. The null byte at the end of the string is not assigned.

New Options For image_par() and Fix For image_get()

Three new options are available for image_par(). The "info" option prints the native data type, the number of rows and columns, the current binning values and the current region-of-interest values. The "bin" option can be used to set row- and column-binning to the same value. When used to get a value, it returns the current binning if row- and column-binning are the same, or -1 if they are different. The "roi" option can be used to set all four region-of-interest values in one call. The values should be given in the order: beginning row, ending row, beginning column, ending column. Also, an oversight in the code for image_get() that prevented sub-array arguments to work properly has been remedied.

Small Problem Fixed For Ortec Counters

A problem with the Ortec NIM-bin counters, where the "display" option of counter_par() (used to read the number of the channel being displayed) could cause a segmentation fault when used with certain versions of the National Instrument GPIB driver, has been corrected.

RELEASE 4.05.10-1

These notes summarize the cumulative changes made for spec release 4.05.10-1 as of September 28, 2000.

Fix To Restore Tty State When spec Is Killed

If spec is linked with the readline library, then the readline input routine changes the tty modes, including turning off echo. Previously, spec did not restore the tty state changed by readline when killed via a SIGQUIT or SIGTERM signal sent by another process. That problem has been fixed.

More Multiplexors Allowed With CAMAC E500 Motor Controller

Support for the homemade multiplexor used with the CAMAC E500 motor controllers has been modified to allow up to three of the 16-motor multiplexors to be run from the same E500 channel. Contact CSS for details.

RELEASE 4.05.10

These notes summarize the cumulative changes made for spec release 4.05.10 as of September 27, 2000.

Support For Burleigh 6200ULN Inchworm Controller

The Burleigh 6200ULN Inchworm motor controller is now supported over the Burleigh 671 ISA PC-card interface. See the burleigh help file for details.

New em_io() Function For SPring-8

The new built-in function em_io() is available when spec is linked with the SPring-8 Equipment Manager RPC-based hardware support. See the new equipman help file for details.

Support For NI GPIB-ENET on Linux

spec now supports configuration of the National Instruments GPIB-ENET hardware on The NI software and the Linux system must first be configured correctly. spec must also be linked with the cib.o file included with the NI distribution.

Support For FAST ComTec MCD/PC Board MCA

Initial support for the FAST ComTec MCD/PC Board MCA is now included with spec. The MCA communicates using a PC parallel port.

Bug Fix For Rigaku Controllers

A bug in the code for the Rigaku RINT-2000 motor controllers, where moves of the AC/DC motors used to control the sample changers, slits, etc., caused problems such as read timeouts on subsequent commands, has been fixed.

RELEASE 4.05.09-6

These notes summarize the cumulative changes made for spec release 4.05.09-6 as of August 27, 2000.

New Calculations For kappa and psic Geometries

A calc() function is now available in the kappa and psic geometries to calculate pseudomotor positions from real motor positions and vice versa. The macro calcP_fromR is defined as calc(8, 0) and fills in the pseudomotor positions A[] array with angles calculated from the real motors values in A[]. The macro calcR_fromP is defined as calc(8, 1) and calculates real motor positions from the pseudomotor positions.

New Error Behavior For kappa Geometry

The kappa geometry code has been revised to no longer return to the main prompt in the event of an error associated with the reciprocal space calculations. Instead, the calc() functions underlying the definitions of calcHKL, calcA, etc., return a nonzero value on errors. The code for the other geometries will be modified similarly in the near future.

RELEASE 4.05.09-5

These notes summarize the cumulative changes made for spec release 4.05.09-5 as of August 6, 2000.

Support For the JVL Motor Controller

The JVL Industri Elektronik (Denmark) Model SMI20-B stepper motor indexer is now supported.

Tsuji Motor Controller Support Expanded

spec now supports the Tsuji Electronics (Japan) new model PM16C-04 motor controller. In addition, the ethernet interface, available on both the -02 and -04 models, is now also supported (in addition to the already supported GPIB and RS-232C interfaces).

Phytron Motor Controller Initialization Changed

spec now uses a more robust scheme for insuring the Phytron parameters are set correctly.

RELEASE 4.05.09-4

These notes summarize the cumulative changes made for spec release 4.05.09-4 as of July 6, 2000.

Old edconf Bug Fixed

An old and rarely seen bug that caused the configuration editor edconf to core dump upon failure of a terminal data-base library call has been fixed.

RELEASE 4.05.09-3

These notes summarize the cumulative changes made for spec release 4.05.09-3 as of July 5, 2000.

New Option For Motor slop Parameter

Normally, if the optional motor parameter slop is set, spec silently resolves discrepancies between the hardware motor reading and spec in favor of the hardware. Now, if the slop parameter is set to a negative number of steps, spec resolves discrepancies smaller than the absolute number of steps in favor of spec's position by modifying the hardware position register.

RELEASE 4.05.09-2

These notes summarize the cumulative changes made for spec release 4.05.09-2 as of June 16, 2000.

Internal Bookkeeping Bug Fixed With array_op("swap")

An old bug where twenty calls of array_op() with the "swap" argument within the same statement block would result in an "Out of temporary cells" message has been fixed.

RELEASE 4.05.09-1

These notes summarize the cumulative changes made for spec release 4.05.09-1 as of June 13, 2000.

Compumotor SX Controller Support Updated

The spec code for the Compumotor SX Indexer has been updated to work properly with encoderless motor configurations.

RELEASE 4.05.09

These notes summarize the cumulative changes made for spec release 4.05.09 as of June 7, 2000.

The gpib_get() Function Can Read More

The gpib_get() function can now read up to 8,192 bytes. The previous limit was 512 bytes.

Associative Arrays Can Now Be Assigned

spec now allows associative arrays to be assigned to and to be returned by macro functions. When an existing associative array is assigned to, all previous elements of the array are deleted.

The dcb() Function Is Upgraded To 32 Bits

The little-used dcb() function that returns the decimal equivalent of its binary-coded-decimal argument now handles 32-bit arguments. Prior behavior was to limit arguments to 24 bits, dating from the old CAMAC days.

ESRF CCD Support Updated

This spec release includes the current ESRF CCD camera built-in support.

RELEASE 4.05.08-7

These notes summarize the cumulative changes made for spec release 4.05.08-7 as of May 10, 2000.

New cdef'ed user_Fheader and user_Pheader Macros

New macros called user_Fheader and user_Pheader are included in the standard _head macro. They are designed as hooks for users to insert commands to print to the data file and printer, respectively. Unlike the traditional Fheader and Pheader macros, these new macros are to be maintained using the chained-macro function cdef(), so that portions of the definitions can be selectively added and removed.

Motor and Counter Mnemonics Checked

Previously, neither the spec executable nor the edconf hardware configuration editor checked whether motor and counter mnemonics contained disallowed characters. Mnemonics containing disallowed characters are now rejected.

NT-2400 Bug Fix

An old bug in the code for the LEC NT-2400 motor controller, where the config file backlash parameter was used as the base-rate parameter, has been fixed.

New Command to Set DXP Gate Behavior

The external gate on the the XIA DXP modules can now be enabled. See the dxp help file for details.

Sleeping Message Cleared in do_sleep

The do_sleep macro now clears the last "Sleeping 1" message from the screen after the sleep has finished.

RELEASE 4.05.08-6

These notes summarize the cumulative changes made for spec release 4.05.08-6 as of April 19, 2000.

PAGER Detection Fixed (Again)

Another bug that prevented proper detection of the version of less and subsequent assignment of the proper string to the PAGER variable has been fixed. Symptoms appeared on platforms with version 332 or earlier of the less utility.

RELEASE 4.05.08-5

These notes summarize the cumulative changes made for spec release 4.05.08-5 as of April 15, 2000.

Minor Improvements For sock_io()

spec now sets the SO_KEEPALIVE socket option on all sockets created by sock_io(). Also, the host name part of the hostname:port argument no longer has to be an actual host name for a socket opened in "listen" mode. The host name part can now be any string and is used only to identify the connection for subsequent sock_io() calls. Also, for sockets opened in "listen" mode, spec now sets the SO_REUSEADDR socket option, which does away with the several minute delay often observed to be needed before a socket could be reopened for listening after a spec restart.

RELEASE 4.05.08-4

These notes summarize the cumulative changes made for spec release 4.05.08-4 as of April 13, 2000.

Fixes For Multiple VME Controllers

On-site testing revealed a few minor bugs that prevented a second VME controller from completely working correctly. Those bugs have been fixed.

RELEASE 4.05.08-3

These notes summarize the cumulative changes made for spec release 4.05.08-3 as of April 3, 2000.

Local Associative Array Bug Fixed

A problem with local associative arrays declared within macro functions that are called more than once within a statement block has been fixed. Previously, the commands print, for (var in arr) and if (var in arr) would show any associative array elements previously referred to in prior calls to the macro during execution of the surrounding statement blocks. Although the elements shouldn't have been recalled at all, they would be recalled with a number value of zero, or a string value of the null string. Now any previously used array elements will not be included in the array commands above, unless, of course, they have been set within the current macro function invocation.

sock_io() Bug Fixed

A bug introduced in spec release 4.05.05, where the implicit newline end-of-string character was often not recognized during a sock_io() "read", has been fixed.

POLL Option For Software Timer For Buggy Sun

The software timer on Solaris platforms in spec versions built using threads has a new implementation to work around operating system bugs. The software timer can now be configured as INTR or POLL mode in the configuration editor. When in INTR mode on Solaris with threads, only integral counts times are allowed. In POLL mode, any count time is allowed, but accuracy in count times is sacrificed. Note, POLL mode can be selected on any platform, but should not be, due to the accuracy problem.

Small edconf Bug Fixed

An old and insignificant bug in the configuration editor, where the display of the user position with non-zero offset did not update correctly on the screen when the step-size parameter was changed, has been fixed.

ESRF TACO MAXE Bug Fixed

A small bug in the code for the ESRF TACO MAXE device server for motors with encoders, where the values were truncated rather than rounded to integers when converting from encoder reading to motor position, has been fixed.

RELEASE 4.05.08-2

These notes summarize the cumulative changes made for spec release 4.05.08-2 as of March 30, 2000.

Support For SPring-8 Equipment Manager RPC-based Counters

Prelimiary support for the counter/timers built and used at the SPring-8 synchrotron in Japan is now included in spec.

RELEASE 4.05.08-1

These notes summarize the cumulative changes made for spec release 4.05.08-1 as of March 17, 2000.

sock_io() Fix For HP Platform

A bug, which prevented the "listen" mode of the sock_io() function from working on HP platforms, has been fixed.

RELEASE 4.05.08

These notes summarize the cumulative changes made for spec release 4.05.08 as of March 9, 2000.

Fixed Some Old Input Parsing Problems

A very old problem related to using a backslash \ to continue a line or to escape a space or tab character on input has been fixed. The problem only occurred when typing arguments to a macro, where the macro definition referred to the arguments by argument number ($1, $2, etc.).

psic Geometry Fixes

Several more numerical problems in the calculations for certain psic geometry modes have been fixed.

Bit-3 Linux Drivers Now Supported

spec now supports use of the SBS Bit-3 PCI-to-VME adapters on Linux using the drivers provided by SBS Bit-3. Note, currently the SBS driver is known to work only on Red Hat 6.0 and 6.1 systems.

Phytron IXE-A Motor Controllers Supported

The Phytron IXE-A motor controllers work very similarly to the IXE-C controllers that spec already supports. However, the IXE-A controllers require a multiplier factor for time-related quantities, such as motor speed and acceleration. spec now includes that factor. The controller type is detected automatically from the version string returned by the instrument.

Home Search Added For Tsuji PMC-16C Controllers

spec now supports home search on the Tsuji PMC-16C Motor controllers.

Recently Introduced OMS VME-58 Bug Fixed

A bug, introduced in the recent VME modification for spec release 4.05.06-2 and that made the Oregon Micro Systems VME-58 unusable, has been fixed.

RELEASE 4.05.07-1

These notes summarize the cumulative changes made for spec release 4.05.07-1 as of February 25, 2000.

KS-3929 SCSI-To-CAMAC Now Supported On Linux

The Kinetic Systems 3929 SCSI-to-CAMAC controller is now supported on Linux platforms.

Clarified Error Message With I/O Port Access

Previously, if no I/O ports were configured, access with the port_get() and port_put() functions would neither access the given port nor produce an error message. spec now prints the missing error message.

RELEASE 4.05.07

These notes summarize the cumulative changes made for spec release 4.05.07 as of February 23, 2000.

wiz_passwd Improved

The wiz_passwd utility, used to make changes to the spec_wiz password, now prints an error message and exits immediately if the user doesn't have permission to write the SPECD/passwd file. Also, the super user no longer needs to enter the current spec_wiz password in order to change it.

Warning In gethelp() When PAGER Is Bad

If the program assigned to the PAGER variable returns an error code, spec now prints an explanatory error message that suggests what the the user should do to view the spec help files.

Linux Drivers Adapted For Greater Range Of Kernel Versions

The spec kernel-level drivers for Linux now compile and install on a wider range of kernel versions. Note, for most installations, the Linux kernel-level drivers aren't required, as spec offers user-level support for the specific hardware involved.

Support For Compumotor AX Motor Controllers

The old Compumotor AX motor controller is now supported.

Support For PMC Corporation DCX-100 Motor Controllers

The PMC Corporation DCX-100 motor controllers are supported in a number of configurations as both PC boards and as RS-232C devices. These boards are used as OEM components in motor controllers made by Dynaoptic Motion.

Support For Pacific Scientific MA-6420 Motor Controllers

The Pacific Scientific model MA-6420 motor controller is now supported over the RS-232C interface.

Support For SCIPE Detectors

The SCIPE detectors, as used at the APS DND CAT, are now supported.

RELEASE 4.05.06-3

These notes summarize the cumulative changes made for spec release 4.05.06-3 as of February 4, 2000.

Bug In Presence Test For SBS Bit-3 On HP and Sun

A bug, associated with the new feature which allows multiple VME controllers and that prevented spec from working with the SBS Bit-3 drivers on HP and Sun platforms, has been fixed.

Bug With Joerger VME Scaler Fixed

Another bug, associated with the recent VME changes and that resulted in a segmentation fault when counting using the Joerger VSC16/8 VME scaler, has been fixed.

RELEASE 4.05.06-2

These notes summarize the cumulative changes made for spec release 4.05.06-2 as of January 18, 2000.

Bug In sscanf() Function Fixed

An old bug in spec's sscanf() function, where the "Out of temporary cells" error message would appear if too many data-array items were given as arguments, has been fixed.

RELEASE 4.05.06

These notes summarize the cumulative changes made for spec release 4.05.06 as of January 5, 2000.

Multiple VME Controllers Allowed

It is now possible to have more than one VME controller in use simultaneously. In the configuration editor, use ^F and ^B to display additional entries on the interfaces screen for the up-to-four controllers. The default controller is controller zero. To specify VME addresses for motor controllers and counters that use the additional VME controllers, enter the address in the configuration as the controller number followed by a colon and the module address, as in 2:0xfc00 for a module using VME controller number 2 at address 0xfc00. For the user-level functions vme_get(), vme_put() and vme_move() use the same notation as above for entering the controller unit number. Note, though, the address arguments will have to be passed as strings, as in vme_put("2:0xFE00", 0x12). Note also, the CSS bit3.o driver used on Linux systems still only supports one 616/7/8 module. CSS awaits the imminent release of the SBS Bit-3 driver for Linux, which will support multiple modules.

Support For the Orsim MCA 7700 Included

Initial support for the Seiko EG&G Ortec model Orsim MCA 7700 is included with this release of spec. Both the ethernet and GPIB interfaces on the MCA are supported.

Support For Meteor Frame Grabber On Linux Updated

The support for the Matrox Meteor PCI frame grabber card has been improved. See the meteor help file for details of the current functionality.

Updates For XIA DXP MCA CAMAC Modules

The code for the XIA DXP MCA CAMAC modules has been updated. spec now includes the XIA library functions in the spec distribution. It is no longer necessary to enter the names of the XIA object files during installation. Several bugs in the XIA library have been fixed, allowing new DXP configuration files to be loaded without restarting spec. See the dxp help file for information.

Presence Test For Jorway 73A Improved

The presence test for the Jorway 73A SCSI-to-CAMAC module previously gave false positives. That behavior has been corrected.

Workaround For EPICS Motor Record RES Not Posting

Previously, spec had been monitoring the RES process variable, intending to handle motors with and without encoders in a simple way. That was ineffective as changes to RES are in fact not posted by the EPICS motor record. spec now instead monitors both MRES and ERES and fetches the new RES value when either of the two change.

Typo In psic.src Fixed

The definitions for the F_QAZ and F_NAZ macros were reversed and have been corrected.

Old Bug With sleep() Fixed

A bug, where the deprecated use of sleep() with a negative integer argument (for the number of clock ticks) resulted in a pause for the time specified by the argument, followed by a pause of random (perhaps very long) duration, has been fixed. Use of negative arguments is still deprecated - use fractional arguments to specify sleep times of sub-second precision.

Bug With PAGER Detection Fixed

The check in the start-up command files that assigns a default value to the new PAGER variable introduced in spec release 4.05.02 contained a number of errors, making the check useless. The commands have been fixed.

Bug Fix For Wizard Mode

A bug introduced in release 4.05.04, where the spec_par("specwiz", 1) function that prompts for the spec wizard password was broken, has been fixed.

Bug Fix For ca_cntl()

A bug, where the ca_cntl() function was completely ineffective in sending the "init" (or "Z") and "clear" (or "C") commands, has been fixed. The bug has been present since ca_cntl() was introduced in spec release 3.02.01 (ca. 1995).

RELEASE 4.05.05

These notes summarize the cumulative changes made for spec release 4.05.05 as of November 8, 1999.

Number Of Motors Increased From 99 to 160

The built-in limit on the number of configured motors has been increased from 99 to 160. Note, this limit is not a fundamental constraint. If there are sites that require more than 160, please contact CSS - the limit can be easily raised. Eventually, the artificial limit on the number of motors will be removed altogether.

New EOS Option For Socket Reads

The "read" mode of the sock_io() function now accepts an optional end-of-string (EOS) argument. If present, characters will be read from the socket until either characters that match the EOS arrive or the read timeout expires. See the sock_io help file for details.

Minor Bug Fix For Riso ECB Controller

A bug, where the message displayed on ECB-motor hardware errors was slightly garbled, has been fixed.

RELEASE 4.05.04

These notes summarize the cumulative changes made for spec release 4.05.04 as of October 14, 1999.

Contents of A[] and S[] Restored On Start Up

The contents of the motor position array A[] and scaler value array S[] are now restored from the state file on start up, as was the case prior to release 4.04.01.

Debug Level Changes Can Take Effect Within Statement Blocks

Values assigned to the debug variable DEBUG now take affect immediately. Previously, the level of the debugging messages would only reflect changes to DEBUG after a return to the main interactive prompt.

Better Input Processing While Reading Strings From Keyboard

The character processing done when the keyboard is read for the input(), yesno() and getval() functions now handles the special erase, kill and EOF characters consistently, with both backspace and delete recognized as erase characters.

Raw Mode Turned Off On Exit

spec now makes sure terminal raw mode is turned off when exiting. Previously, if spec exited via a quit or terminate signal while still in raw mode (as from an input(0) call), raw mode did not get turned off.

$$ Recognized As Documented

The spec manual has long documented that $$ would produce a single $ in a macro. That behavior is now implemented.

Behavior Of FRESH Variable Modified

The FRESH variable introduced in release 4.04.05 is still nonzero while reading the start-up command files and executing the start-up macros if spec is starting fresh, but its value is reset to zero before the first main interactive prompt. That insures the start-up macro files that do initializations using if (FRESH) will not do the initializations (possibly resetting parameter values already modified by the user) if the macro files are read a second time.

Optional Type Argument For epics_get()

The EPICS-related function epics_get() can now take a second argument to specify what type of data to retrieve via channel access. Such a feature may be useful when a number value for a process variable of type ENUM is needed, as otherwise the string value is returned. See the epics help file for details.

Generic Serial Device Support Through EPICS Available

spec now supports the EPICS generic serial record. Thus, the EPICS serial record can be selected for use with spec's generic ser_get() and ser_put() functions. In addition, any motor controller, timer/counter, etc. which runs over a serial interface for which spec already has built-in code can be configured to use the EPICS generic serial record.

RELEASE 4.05.03

These notes summarize the cumulative changes made for spec release 4.05.03 as of September 20, 1999.

Recent Bug in port_get()/port_put() Functions Fixed

A bug, introduced in release 4.05.01, which resulted in segmentation violations if the functions port_get(), port_get2(), port_put() or port_put2() were called, has been fixed.

Some Minor Enhancements To Install Program

The install_data file, which contains the site-dependent installation parameters, is now used as dependency for u_hdw.o and u_hook.o in the make-file, to help insure that spec gets rebuilt when the installation specifications are changed. Also, the get_opts program now accepts a ^D command to jump out of the specifications queries at any time.

Fixes For Stand-Alone Help Utility

The stand-alone help utility chelp will no longer change tty modes if the output is to a file or a pipe, and will no longer include the character sequences that indicate highlighted text if output is to a file.

The gpset Comments No Longer Are Written To Screen

The standard gpset macro that documents changes to geometry parameters no longer prints messages to the screen, but does still write comments to the data file if one is opened and to the printer if one is configured.

Additional Standard Macro File For surf Geometries

In order to allow multiple versions of the surf geometry to exist in the same installation directory, spec now recognizes an additional standard macro file with a name of the form conf/conf4.mac (where conf is the name by which spec was invoked and conf4 is the first four letters of that name.

Further Developments For the psic Geometry

Further work on the psic geometry includes the following: The cut points for all the diffractometer angles can now be set by the user. A preliminary implementation of sector transformations is available. Also, the first draft of the psic help file is included.

Support Non-encoder Version of IMS Motor Controller

The initial version of the code for the Intelligent Motion Systems motor controllers assumed use of an encoder. Users can now choose IMS or IMS_E in the configuration editor to select whether particular motor channels have encoders available. The difference in the code is whether the current position is read back from the IMS module with a z or a Z command.

Workaround Implemented For OMS Firmware Limit Bug

A workaround for an OMS motor controller firmware bug that prevented a clean recovery after hitting a limit switch is included. After hitting a hardware limit, the first command spec would send to move to a position in the opposite direction did not always work. The workaround is to explicitly send a command to move in the opposite direction, then to send the command to move to the specific position.

Support For a Channel Multiplexor With OMS Motor Controllers

Preliminary support for a one-to-sixteen channel multiplexor is now included with the OMS motor controller support. Contact CSS for implementation details.

Support For SPring-8 Equipment Manager RPC-based Motors

A motor controller built and used at the SPring-8 synchrotron in Japan is now supported in spec.

New spec_par() Option To Set Default EPICS Timeouts

The default timeout for the EPICS channel access ca_pend_io() call can now be set using spec_par(). See the epics and spec_par help files for details.

RELEASE 4.05.02

These notes summarize the cumulative changes made for spec release 4.05.02 as of July 11, 1999.

Modified _updateHKL Macro

The _updateHKL macro, used by the ubr and umk macros to display the updated position of motors and reciprocal space position during moves, has been modified to print as many of the diffractometer motors as is possible to fit in the width of the screen. Previously, no more than five motors were shown.

New user_scan_tail Hook In Standard Macros

The standard _tail macro, called at the end of each scan, now includes a call of user_scan_tail, which local users can define to perform special actions at the end of scans. By default, user_scan_tail is defined as an empty macro using cdef().

Fix For Certain GPIB Driver and Motor Controller Combinations

A problem with internal buffer overruns with certain motor controllers when used with some GPIB drivers has been fixed. Affected motor controllers include the Huber SMC 9000, the Newport/Microcontrole ITL09 and MM2500, the Advanced Control Systems MCB, the custom controller MMC-32 used at NSLS and the custom MURR controller used at the Missouri Research reactor. The National Instruments GPIB driver version for Linux was confirmed to exhibit the behavior, although other drivers may behave similarly. Symptoms of buffer overruns often appear as random crashes or unexpectedly flaky behavior in the software.

RELEASE 4.05.01

These notes summarize the cumulative changes made for spec release 4.05.01 as of June 13, 1999.

New Go-To Feature For Command Files

The dofile() and qdofile() functions, used by the do and qdo macros, now take an additional optional argument to specify a starting line in the command file. If the argument is an integer, the number specifies at which line to start reading the file. (Currently, only positive integers are allowed.) If the argument is anything else, it is considered a search string, and text is read from the file starting at the first line containing that search string. The metacharacters *, which matches any string, and ?, which matches any single character, are allowed in the search string. Initial and trailing white space is ignored in the file.

New Option To Keep Going After An Error In a Command File

You can now tell spec to keep reading and executing commands from a command file no matter what errors occur. The new "keep_going" option to spec_par(), if set, will tell spec not to return to command level and the main interactive prompt on any type of error. Instead, the next line from the current command file will be read. Note, depending on where the error is in a file, reading subsequent lines may generate more errors, particularly if the error occurs inside a statement block.

New Error Recovery Options For GPIB and Other I/O

It is now possible to arrange that various hardware errors will not cause spec to reset to command level. If the variable HDW_ERR exists, it will be assigned a hardware error number, currently defined as follows:

1 - Generic error
2 - GPIB no listener
3 - Timeout
4 - A non-fatal error
5 - Function called with bad argument
6 - Trying to access unconfigured hardware
7 - Function called with bad address

If the value of HDW_ERR is -1 before the call to the user-level hardware access function, no reset to command level will take place for any errors. Otherwise, traditionally fatal errors (all errors other than timeouts or the explicitly "non-fatal" errors) will still be fatal. The following functions currently may set HDW_ERR: ca_get(), ca_put(), gpib_get(), gpib_put(), gpib_poll(), gpib_cntl(), port_get(), port_getw(), port_put(), port_putw(), ser_get() and ser_put().

New show_state Utility

A new utility called show_state that can display the more interesting contents of the saved state files (command history, variable assignments and macro definitions) is available. Note, the state file is only updated when a spec session is terminated or the user types the savstate command. The utility is designed to be able to read state files from all platforms, regardless of native byte order. Type show_state - to see usage options.

Backwards Compatibility For Previous State File Versions

spec will now try to maintain a measure of compatibility with prior versions of the saved state files, such that updates to new releases of spec will less often require a fresh start.

New Option For Error-Log Files

A new kind of log file is available that records typed commands, error messages and optional time stamps. The file is intended to be useful to administrators trying to diagnose user problems. A file opened for output named elog or that ends in .elog is such a file. Commands entered at the spec prompt are logged prefixed by a #C. Error messages produced by the built-in C code, or generated by the new eprint or eprintf() built-in keywords (described below), are logged prefixed by a #E. If time stamps are enabled (via the new spec_par() option described below), the UNIX epoch and the corresponding date string are logged (at the time-stamp interval) prefixed by a #T.

New eprint and eprintf() Built-In Commands

A built-in command eprint and built-in function eprintf() are available that can be used with the new error-log files. The behavior is exactly the same as print and printf(), respectively, except that if an error-log file is open, the generated strings will also be written to that file, in addition to any other files or devices turned on for output, as usual. The strings written to the error-log files will be prefixed with the #E characters. If the error message is more than one line, only the first line will have the special prefix.

Macros Revised To Use eprint and eprintf()

Most (but not yet all) of the standard macros have been modified to use the new eprint and eprintf() output commands for printing error messages. There is no difference in behavior, except that if an error-log file is open and turned-on, the error messages will also be logged to that file.

New "elog_timestamp" Option For spec_par()

The time interval for the optional time stamps for the new error-log file capability is set using the spec_par("elog_timestamp", value) where the units of value are minutes. The default value is 5 minutes. Note, time stamps are only added before a command or error message is logged, so that the interval between time stamps can be greater than that specified if no commands are being typed or errors generated.

New array_op() Option To Tag Shared-Array Type

Shared arrays can be tagged with a type that will be available to other processes accessing the array. Usage is array_op("tag", arr, arg) where arr is the array and arg is "mca", "image", "scan" or "info". Use array_op("untag", arr) to remove the tag information.

New array_op() Option To Swap Bytes

The command array_op("swap", arr) will swap the bytes of the array arr. The command can change big-endian short- or long-integer data to little-endian and vice versa. For most built-in data collection, spec automatically swaps bytes as appropriate, but this new function is available for other cases that may come up.

New Option To Set Help File Pager Program

spec will now examine the environment variables SPEC_PAGER and PAGER, in turn, to obtain the name of a program to use for paging through spec help files. Such a program can be an alternative to spec's built-in paging code, allowing searching and line-by-line perusal. A new built-in variable PAGER can be also be assigned to directly, overriding the environment variables. If a version of less greater than version 332 is installed on the spec platform, the standard macros will assign the PAGER variable a string that invokes the less utility with some special flags if the PAGER variable is otherwise unset.

New motor_par() Options To Retrieve config File Values

New options to the motor_par() function, "config_step_size", "config_acceleration", "config_velocity", "config_base_rate" and "config_backlash", return the values for the associated parameters as were originally read from the config file. Such a feature might be useful for restoring these values after macros had made some changes for a particular scan.

Warning Message On Moving Motors With Wizard Powers Suppressed

The warning printed when motors are moved using wizard powers has been turned into a debugging message printed when the warning-message debug level is turned on.

Warning Message On Output Left On Suppressed

The warning messages about output files being left on after errors has been eliminated as it seemed to confuse some users.

Scan Header Warns If No Data File Open

The scan header information printed to the screen with the standard macros now warns that no data files is open if the DATAFILE variable have either the value "null" or "/dev/null".

Bug In Optional Read Mode For Motors Fixed

A bug, where the new feature introduced with release 4.04.01 that allowed control of when motor position-register were read by spec by selecting a read mode on the optional motor configuration screen of the configuration editor didn't have actually have any effect, has been fixed.

Bug In Contents Display In scans.4.c Fixed

A recently introduced bug in the data file contents displayed with the contents utility and the scans.4 C-PLOT user function, where the month was off by one, has been fixed.

Improved External Signal Handling

When the spec process is sent a SIGINT signal from another process while the spec process is waiting for user input in the readline library routines, spec now does complete ^C-type processing. Previously, moving, counting and other acquisition would be aborted, but the other ^C-type processing, such as executing cleanup macros or closing output files would not be done.

Linux Drivers Updated For 2.2.x Kernels

The four kernel drivers pca.c, bit3.c, dsp.c and pio.c that are sometimes used with spec have been modified to be compatible with the Linux 2.2.x series kernels.

Fixes For Newport PM500 Motor Controller

Some fixes in the code supporting the Newport PM500 motor controller are included.

New CCD Support in ESRF Distribution

Some new CCD device support is included in the ESRF version of spec.

Fixes For psic Geometry

A number of fixes in the geometry calculations for the new psic geometry are included. More fixes are expected in the future.

Updates To surf Geometries

A new CMC configuration is included for the surf geometry for the diffractometer to be installed at the CMC CAT at the APS.

New Support for Opaque Data Type In esrf_io()

The "opaque" data type is now supported by the esrf_io() function, but only in transferring data to spec and only to the data-type array variables. One must be sure to declare an array of the type appropriate to the data and also to arrange for byte swapping, if necessary.

Fix For ESRF TACO Device Initialization

A one second delay has been added between successive dev_free() and dev_import() library calls in spec's ESRF TACO support to workaround a bug in the OS/9 system that is not otherwise handled by the device server library or drivers. The delay should fix the problem with the message "Can not import device ID/foo/0" appearing on every other reconfig.

RELEASE 4.04.07

These notes summarize the cumulative changes made for spec release 4.04.07 as of April 19, 1999.

New Option To scans.4

For scans that contain an MCA-type spectrum at each data point, the scans.4 C-PLOT user function (or the stand-alone scans utility) can now pick out individual spectra. The syntax is the scan number, followed by the @ symbol, followed by the point number, where points are numbered starting from one. For example, fn . 3@12 will read the spectra of the 12th data point of scan 3. Note, the spectra must follow the corresponding non-MCA data at each point and the option for reading MCA data must be selected.

Problem With Setting Dials On OMS Motor Controllers Fixed

With some newer, faster PC computers, there was a problem changing the dial position with the OMS PC cards. When spec sent a read-position command immediately after sending a load-position command, the new position was not yet available, resulting in an error message. spec now delays ten milliseconds after loading the new dial position before sending any other commands, which cures the problem.

Initial Support For Encoders On OMS Motor Controllers

The OMS_E controller choice in the configuration file will now make a difference. If a motor channel is configured as having an encoder, spec will read the motor position using the RE (read encoder) OMS command, rather than the RP (read position) command. Additionally, the chg_dial() function (used by the set_dial macro) will update both the encoder and command register positions appropriately. Note, the motor parameter for encoder step size must also be configured correctly. (From the configuration editor motor screen, type m twice to reach the screen where the parameter can be entered.)

EPICS changes

Two changes were made in the EPICS support. The epics_get() function now returns the string value for ENUM data types. Previously, the short-integer value was returned. Also, for the EPICS scaler support of the Joerger VSC16/8 VME scaler module, as an extra precaution, all scaler channels are initially disabled as a gate source each time the config file is read.

RELEASE 4.04.06

These notes summarize the cumulative changes made for spec release 4.04.06 as of April 4, 1999.

Problems With Truth Value Of the Null String Fixed

In release 4.04.04, a fix for a bug concerning number/string comparisons that was a side effect of a fix in release 4.04.01 introduced yet another bug, this time concerning the evaluation of string expressions in conditional statements. With this release, the behavior for the truth value of an expression is as follows: If the expression is a number or a string representation of a number, such as 0, 0x0, 0.0e-3, 0000, etc., the value is false (or zero). Otherwise, the value is true (or 1). If the expression is a string and not a number, the value of the null string "" is false (or zero), while anything else is true (or 1). A string that contains an initial number followed by characters that aren't part of the number is not considered to be a number. Thus a string such as "0xyz" would evalate as a non-null string, i.e., true.

Harmless History Numbering Bug Fixed

A bug, where the main command prompt history number was not incremented immediately after execution of a macro that contained a macro function, has been fixed.

Bug With motor_par() and ESRF Motors Fixed

A bug, where spec might dump core if the command motor_par(mne, "device_id") was run with an ESRF TACO motor that was not successfully imported from the device server, has been fixed.

Bit 3 Model 618 PCI-to-VME Adapter Now Detected

The spec driver for the Bit 3 Model 616/617 PCI-to-VME Adapter boards now also recognizes the Model 618 Adapter, which has the same functionality but uses a fiber optic link to the VME crate.

RELEASE 4.04.05

These notes summarize the cumulative changes made for spec release 4.04.05 as of March 9, 1999.

Trailing Carriage Returns In Command Files Allowed

Input files can now include trailing carriage returns, such as are added to each line of a text file created on a DOS-like operating systems.

Added an s1d2 Geometry

A new geometry with two detector motions and one sample rotation is included.

Jorway 73A SCSI-CAMAC Controller Supported On Linux

The Jorway 73A SCSI-CAMAC controller is now supported on linux using the generic SCSI driver facility. Make sure the kernel file sg.c is compiled with SG_BIG_BUFF defined as 32768, that the byte-order jumper on the 73A is set to X1-X2 for big-endian, the SCSI terminator resistors on the 73A are removed if the 73A is not the last device and that the SCSI ID on the 73A doesn't conflict with any other device. Use the command cat /proc/scsi/scsi to view the SCSI devices present. The first device listed is associcated with /dev/sga, the second with /dev/sgb, etc.

Improvements For ECB Controller

spec now handles the multiplexed power supplies that are on the RISO ECB motor controllers properly.

Fixed Reversed Limit Sense On TSUJI Ccontrollers

A bug, where spec had the sense of the clockwise and counter-clockwise limits for the TSUJI PM16C motor controller reversed, has been fixed.

RELEASE 4.04.04

These notes summarize the cumulative changes made for spec release 4.04.04 as of January 21, 1999.

Recently Introduced Bug Concerning Number/String Comparisons Fixed

A side effect of the "String-Valued Symbols That Look Like Numbers Won't Get Changed" fix in release 4.04.01, which broke certain relational operations between numbers and string representations of numbers, has been fixed.

Problems In split() Fixed

The code for the split() function has been rewritten to eliminate a not well-understood platform-dependent bug that caused nonsense function results. In addition, the splitting behavior has been changed to conform to the results produced by the standard awk utility. In particular, empty fields are always counted when the delimiter is other than the default space character.

Assignment Bug Fixed

A bug (introduced in release 4.03.01), where the assignment of the value of an element of an array passed as an argument to a macro function to a scaler within the macro function could cause a core dump, has been fixed.

RELEASE 4.04.03

These notes summarize the cumulative changes made for spec release 4.04.03 as of January 6, 1999.

Limit On TCP esrf_io() Transfers Removed

A previous constraint of 8,192 bytes on the length of data array transfers to TACO device servers using the esrf_io() function has been removed. There is now no limit imposed.

Preliminary Support For RISO ECB Motor Controllers

spec now includes support for the RISO ECB spectrometer interface system motor controllers.

Bug Fixed In Assigning Values To Associative Arrays In Macro Functions

The new feature in release 4.04.01 where elements of global associative arrays accessed only for reading were not made part of the array introduced a couple of obscure (for most users) bugs. A bug where values assigned to global associative arrays in macro functions did not "stick" when the array name was passed as an argument to the macro function is fixed.

Added a calcE_local to calcE macro

A macro named calcE_local is now called from the standard calcE macro after the new value for LAMBDA has been calculated. By default, calcE_local is defined as a null macro, but can be defined by local sites as needed.

Provision For NI GPIB Driver On Linux

To allow users to try the GPIB driver now offered by National Instruments on linux platforms, the linux versions of spec can now be linked with and configured for the NI-supplied cib.o file that interfaces user programs to the NI-supplied driver.

Support For IMS Motor Controllers

Preliminary support for the Intelligent Motor Systems IM4831IE motor controller is now included.

RELEASE 4.04.02

These notes summarize the cumulative changes made for spec release 4.04.02 as of November 24, 1998.

Recent Bug Introduced With data_pipe() Fixed

The improvements in the data_pipe() function made in spec release 4.03.13 last July mistakenly introduced a two-second time limit on the data-pipe process response. That time limit has been removed.

Improved xxx_par(... "device_id") Implementation

Information provided by motor_par(), counter_par(), mca_par(), mca_spar() and image_par() with the "device_id" parameter is available for additional devices.

Old (Small) Memory Leak Fixed

An old (and relatively insignificant) internal memory leak associated with deleting or redefining selected portions of chained (cdef()) macros has been fixed.

Fix To Restore Motor Velocity With EPICS Powder Mode Moves

A bug that prevented the velocity parameter for EPICS motors to be restored to its normal value after powder-mode scans for the powder-mode motor has been fixed.

New -N Start-Up Option

Normally, spec uses the name by which it was invoked to establish the command prompt and the name of the directory in SPECD in which the configuration-dependent files exist. A new -N my_name start-up option is available to use my_name instead. This command also sets the geometry to my_name. Follow this option with the -g option to choose a different name for the geometry.

Support For New Focus Picomotor Controllers

The New Focus Model 8732 Picomotor controller is now supported by spec.

RELEASE 4.04.01

These notes summarize the cumulative changes made for spec release 4.04.01 as of November 8, 1998.

Built-In S[] and A[] Arrays Now Dynamically Sized

The sizes of the built-in (associative) arrays for scalers S[] and motors A[] are now set to the number of counters and motors, respectively, as found in the config file. Previously, the arrays were dimensioned to the maximum number of channels allowed.

Indirection Operator (@) Now Works With Associative Array Elements

The indirection operator @ can now be used with associative array elements, as in

SPEC> a = "arr[3]"
SPEC> arr[3] = PI
SPEC> print a, @a
arr[3] 3.14159

Associative Array Elements Accessed Read-Only Don't Become Global

Previously, any reference to an array element of a global associative array would create a global instance of that array element, even if the reference was only to a value of an unset element. Now, such references do not create a global instance of the array element. The only way to make the element global is to assign it a value.

Allow Embedded Comments in data_read() and array_read() Files

The data_read() function, which reads data from files into data groups, and the array_read() function, which reads data from files into data arrays, both now allow embedded comments in the text file input. Previously, the comment character # was only allowed at the beginning of a line.

"transpose" Option Added to array_op()

A new operation to transpose rows and columns of a data array is available with array_op("transpose", arr).

Can Now Attach to Existing Shared Memory Arrays

It is now possible to hook up to an existing shared memory array created most likely by another instance of spec running on the same platform. The syntax is

extern shared array [spec:[pid:]]arr

where the optional parameter spec is the name of the spec version that created the array, the optional parameter pid is the process ID of the version and arr is the name of the array. The first two arguments can be used in case more than one instance of the shared array exists. Examples include:

extern shared array data
extern shared array fourc:data
extern shared array fourc:1234:data

String Subarrays Now print Correctly

The print command now prints out subarrays of string-type data arrays correctly. Previously, only complete rows would be printed.

Bug With Subarrays In Certain Array Operations Fixed

A bug, where binary operations between arrays did not work properly with certain subarray syntax, has been fixed. There was no problem when the operands were complete arrays.

Fixed Bug With "i_>=_value" In array_op() and data_anal()

An old bug, where the "i_>=_value" operation didn't return the correct value for both the data_anal() and array_op() functions, has been fixed.

String-Valued Symbols That Look Like Numbers Won't Get Changed

Old behavior in spec, where referencing the number value of a string variable with a value such as "020" would modify the string value to match the number value in decimal (16 in this case), has been changed. The string values are no longer modified.

Hardware Lock File Changed

The settings file is now used to establish hardware locking, rather than the file named userfiles/hdw_lock, which is now no longer used. This change makes hardware locking work properly with shared configurations.

Also, if a second instance of spec is forced into simulate mode due to a hardware lock, if the first process exits releasing the lock the second process can gain control of the hardware (using reconfig) without exiting.

Simulate Mode More Robust

The coding for simulate mode has been tightened up. It should now be quite robust in terms of avoiding hardware access over all the supported interfaces (GPIB, RS-232C, CAMAC, VME, PC I/O port and ethernet socket) from both the built-in C code for motor controllers, counter/timers, MCA-type and 2D-type image devices, and from the generic hardware access functions, such as gpib_put(), port_get(), etc. Note, though, that in simulate mode, the motor_par(), counter_par(), mca_par() and image_par() functions can still change the software values for speeds, step-sizes, regions of interest, etc., so such values should be restored on leaving simulate mode.

New (Optional) Hardware Read Mode (For Most Motor Controllers)

For most motor controllers, spec normally only reads the hardware registers when the position is known to have changed, as at the end of move. The hardware read mode can now be configured on the second optional motor parameter screen of the configuration editor.

Another Try At Cleaning Up Orphaned x11filt Processes

Another attempt at solving a not well understood problem where for certain users on certain platforms, the x11filt processes don't go away, is included. The code now include a watch-dog timer that checks for the existence of the spec process that spawned it every five minutes, and exits if that process is gone.

Very Long Device Names Allowed In Configuration Editor

The edconf configuration editor now allows device names to be up to 64 characters long.

Bugs in wiz_passwd Fixed

Bugs in the wiz_passwd utility where the encrypted password would be missing or the SPECD/passwd file would be empty have been fixed.

New surf Configuration For Kiel University

A new flavor of the surf geometry, as used at Kiel University, is included in the spec distribution.

Further Development For Psi-Circle Geometry

A first (tentative) release of the new geometry code for the psic geometry is included.

Cleanup Macros Cleaned Up In dscan Macros and Others

All references to cleanup macros in the standard macros have been rewritten to use the new cleanup_once macro defined using the cdef() chained-macro function. The new versions are easier to read and make it safe to have multiple dscan macros in the same statement block.

Various Modifications To Standard Macros

Scan macros now automatically show as many counters as will fit on the screen.

A new fcom macro function replaces the com macro and is more efficient.

A new waitacq macro with associated user_waitacq is included.

A new user_setpos is included in the standard set macro.

A new user_scan_loop macro is included in the standard _loop macro.

A new user_ct macro is included at the end of the standard ct, uct and related macros.

Rigaku RINT-2000 Hardware Support

Preliminary support for the Rigaku RINT-2000 type of instrument is included. Motors and scalers are controlled through a single serial port.

Missing Error Messages On Import Errors With ESRF Device Servers Fixed

A bug, where error messages from failure of the ESRF/TACO dev_import() function were not printed, has been fixed.

EPICS Scaler Changes

The support for the reportedly obsolete Mizar 8310 scaler records, which was removed in spec release 4.03.08 has been restored, to accommodate users who still use that device.

Also, the names in the config file for the EPICS scalers have been changed from EP_SCALE and EP_MIZAR to EPICS_SC and EPICS_MZ for clarity. The configuration editor will recognize the old names and automatically convert to the new names when it writes out the config file.

RELEASE 4.03.14

These notes summarize the cumulative changes made for spec release 4.03.14 as of August 31, 1998.

More New Options For sock_io()

The sock_io() function now accepts a "listen" option, which allows other programs or instances of spec to make a connection, such that strings can be sent and received between, for example, two instances of spec using the "send" and "read" options to sock_io(). See the sock_io help file for details.

Made Certain Errors Non-Fatal

The functions cnt_name(), cnt_mne(), motor_name() and motor_mne() now return -1 for invalid arguments rather than resetting to command level.

New tw (tweak) Macro For Motors

A new full-featured tw macro is included. It allows multiple motors to be tweaked simultaneously, and can count and display the results after each move. See the tw help file for details.

Minor Changes To Standard Macros

A number of changes to the standard macros - some cosmetic, some functional and some fixes - are included.

New is_using_motor() and is_using_counter() macro functions test whether the corresponding channel is named "unused" or has been disabled with the "disable" option to motor_par() or counter_par() The macro functions are now used to determine whether the corresponding channel should be listed in the various macros that display all the motor or counter channels, such as wa, show_cnts, etc.

The onp, offp, ond, offd macros have a semicolon appended to get rid of certain misleading more> prompts which occur when the last thing spec parses is an else-less if.

A new ifp macro contains tests to see if a PRINTER device is configured. Many of the macros that write info to PRINTER have been simplified using ifp and by using fprintf(PRINTER, ...) rather than onp/offp.

New user_prescan_head and user_postscan_head hooks are included in the standard _head macro.

A new a5scan macro (with 17 arguments) is included with the standard scans.

The updated move macros have been reorganized. A new _update() macro function replaces _update1 through _update6. A new _updateHKL macro replaces _update2hkl through _update5hkl. Definitions for the old names in terms of the new macros are included for backwards compatibility. In addition, the looping in the updated moving and counting macros has been rewritten to simplify the macro code.

Fix For contents Utility

The recently revised version of the contents utility has been fixed so that the data output goes to "standard output" rather than "standard error".

Fix For Princeton CCD

The code for the Princeton Instruments CCD cameras using the ST-138 interface with the SDV card on Sun computers has had one of the problems with timeouts fixed.

MCS mode for Nucleus PCA-3 and PCA-II

The data returned in multichannel scaling mode (MCS) for the Nucleus PCA II, PCA-3 and PCA Multiport devices is changed a bit. Previously, spec automatically discarded the first and last channels of the data when in MCS mode, as they apparently always contain garbage. However, returning two less than the number of channels in the configured size is confusing to the user. It is more appropriate for the user to discard channels or explicitly read only the good channels in the calls to mca_get().

Tsuji PM16C Bug Fix

A bug, introduced with the last bug fix for the Tsuji PM16C motor controller and that made the device unusable in release 4.03.13, has now been fixed.

Support For New ACS SPI-8 Motor Controller

Preliminary support for the new Advanced Control Systems SPI-8 motor controller is included. Each motor controller can drive eight channels. A number of controllers can be daisy chained off one serial port. See the ACS home page for more information on the controller.

Parallel I/O Driver For ILL 2D Detector

A new kernel driver and hardware support code for a 2D detector used at ILL and interfaced to spec through a high-speed 16-bit digital input board is included for use on linux PC platforms.

RELEASE 4.03.13

These notes summarize the cumulative changes made for spec release 4.03.13 as of July 26, 1998.

New Options For syms Command

The syms command now takes options to specify the type of variables displayed and the output format style. The new -v option formats the output so that the variables and their current values are displayed in the form of assignment statements. If that output is saved to a command file, it could be read in later to restore the variables' values. See the syms help file for details.

Multiple Concurrent data_pipe() Processes Implemented

Mmore than one data_pipe() process can now be running at a time. The new option data_pipe("?") lists the active processes.

Added New Cleanup Macros: cleanup_once and cleanup_always

Two new built-in macro names are recognized. If defined, a cleanup_once macro will be executed on errors or ^C and then be undefined. If defined, a cleanup_always macro will be executed on errors and ^C, but will not be removed. Definitions for these macros will be constructed in the standard spec macros using the cdef() (chained macro) function, in order to allow various clean-up actions be added and removed during the flow of block of statements.

Sort Limits For lsdef, prdef, syms Removed

The "too many symbols for sort" message will no longer appear when the lsdef, prdef or syms commands are used when there is a long list of items.

Associative Array Elements Are Printed with print

The print command will now print out all the elements of an associative array.

Fixed Communication Problem With Silena MCA

Communication with the Silena MCA over a GPIB interface has been made a bit more robust.

Fixed Harmless Prompt Bug With else-less if

A bug, where the prompt would incorrectly be more> (to indicate an unclosed curly bracket) has been fixed. The behavior would occur under certain conditions that included having a curly bracket as the next input token after an else-less if statement block.

Fixed Obscure Bug With unix() Function

A bug where spec would hang (ignoring the interrupt and quit keyboard signals) under a particular sequence of commands has been fixed. The sequence required a call to the unix() function using two arguments, where the shell command in the first argument didn't produce any output to place in the string given by the second argument. That call needed to be followed by having either a graphics filter or data-pipe process started up, followed by another unix() call.

edconf Menu Scrolling Improved

The "drop-down" menus in the edconf configuration editor now wrap around smoothly when moving up from the top or down from the bottom of long lists. In addition, the ^F and ^B commands can be used to scroll a screenful at a time. Also, when selecting an item within the menus, the normal up/down keys and arrow keys can be used.

Several ESRF Fixes and Features Added

A number of fixes and additions involving ESRF hardware and device access are included. The esrf_dc() function now works properly with a leading //host in the device names. The esrf_io() function now takes a single "?" option that will list all the devices available on the current NETHOST. An optional second argument can contain a pattern using the * metacharacter to filter the devices listed. See the esrf help file for more information. Also, the ESRF local hardware development for the Frelon camera, Sensicam device server and MCA device server have been incorporated into this release.

Support For XIA HSC-1 Huber Slit Controllers

Initial support for the X-Ray Instrumentation Associates HSC-1 Huber slit controller is included. See the xiahsc help file for details.

RELEASE 4.03.12

These notes summarize the cumulative changes made for spec release 4.03.12 as of June 15, 1998.

New config File Format For Geometry-Linked Scalers

Now individual scaler channels can be associated with particular diffractometer geometries, just as with motors, when linked config files are used. (See the config_adm help file.) To implement this feature, the format for the scaler information in the config file has been changed in a non-backwards compatible manner. Instead of single characters T, M or C to indicate the function of the scaler, a hexadecimal number is used to contain that and other information. Old versions of the config file will be automatically converted to the new format when new versions of spec or the configuration editor edconf are run, but scaler information in config files with the new format will not be read properly by previous releases of spec and edconf.

New Version of z-axis Geometry

The old zaxis geometry code has been replaced with new code that includes support for an orientation matrix, among other features. See the geo_zaxis.c source code for the implementation. The previous zaxis code is in geo_zaxis_old.c

Another gamma Pseudomotor For the sixc Geometry

A second type of pseudomotor configuration for the gamma motion for the six-circle geometry is implemented. This configuration uses a linear screw configuration to translate the gamma motor in an arc as used at UNI-CAT at APS.

Scan-File contents Utility Works Faster

The contents utility, which prints a table of contents of standard spec data files, has been sped up by using new built-in C code in the scans.c and scans.4.c files instead of the awk script used previously.

Minor Updates To scans.4, Including a Bug Fix

The scans utility and the C-PLOT scans.4 user function have new options to print out scan file table of contents. While the -p option still prints out the short format contents, the new -P option prints out the contents in a long format. In addition, if the verbose flag is set using +v, the data file comments are also displayed. Also, a very old bug that randomly (although rarely) caused scans.4 to crash when fclose() was called with an already-closed file pointer has been fixed.

Support For Two RTC-018 Modules

spec now supports two RTC-018 CAMAC modules in use at the same time, with the first module used for counting to time presets and the second module used for counting to monitor presets. Previously, with one module only, users needed to manually change the input source cable. Note, the gates from the two RTC-018 modules need to be properly tied together when connected to scaler inhibit inputs.

New Ethernet-Based NT-2400 Hardware Support

spec now offers preliminary support for the Laboratory Equipment Corporation NT-2400 ethernet-based hardware controller. This device (from Japan) can include motor controllers, timer/counters and MCA modules. See the nt2400 help file for details.

Fixed Crash With Too Many Motors In config File

A bug where spec could crash if there were too many motors in the config file has been fixed.

Fixed Problem With Trailing Space In config File

When using particular utilities other than spec's configuration editor edconf to modify the config file, users found extra space characters got added to the end of each line, which spec inappropriately included in the motor and counter names. The code has been fixed so that such trailing space is removed automatically.

New Options For sock_io()

A timeout can now be set for socket reads with the sock_io() function. In addition, a byte count can be specified for a read in addition to the previous read-until-newline behavior. See the sock_io help file for details.

New Busy-Wait Calibration On Startup (Linux Only, So Far)

On startup on linux versions, spec does a calibration for a busy-wait loop, which is used to implement delays of less than a few tens of milliseconds.

Fixed Problem With Tsuji PM16C On Fast PCs

Older versions of the Tsuji PM16C motor controller have timing problems with GPIB on faster CPUs, such as 200+ MHz pentium with the linux GPIB driver. spec now includes a timing patch that allows spec to work properly, at least on linux.

Fixed Bug With Software Timer

A bug where use of the software timer with powder-mode scans would hang the scan has been fixed.

Fixed Bug With Princeton CCD on SDV Interface

A bug in the timeout feature in spec that automatically restarts the Princeton CCD interface when a bug in Princeton hardware causes the interface to hang has been fixed to account for the added time taken when using kinetics mode. The estimated time for normal acquisition is also obtained more reliably now.

Fixed Bug With More Than 24 CAMAC Scalers

An old bug where spec would crash when the DSP QS-450, the KS 3640 or the KS 3610 CAMAC scaler modules were used with more than 24 channels configured has been fixed.

Fixed Bug Recognizing Certain Versions of PCA Multiport

A bug where the version string returned by certain firmware versions of the PCA Multiport MCA was not recognized such that spec reported the device as unusable has been fixed.

Compiled Under HP-UX 11.0

spec has now been built on HP-UX version 11.0 and awaits a site willing to give it a try.

RELEASE 4.03.11

These notes summarize the cumulative changes made for spec release 4.03.11 as of April 9, 1998.

CPU Usage When Idle Reduced

The mechanism spec uses to allow automatic hardware polling while waiting for user input has been changed to reduce CPU usage when hardware is idle. The CPU usage in the previous versions was not significant except for sites that ran many instances of spec on the same platform. In such an environment, frequent context switching among the processes kept the load average high.

Added Alpha Platform

A new target for DEC Alpha platforms is included in the spec installation script.

SCIPE Actuator Support Included

Preliminary support for the SCIPE protocols over TCP/IP sockets for "actuator" devices is now included. (SCIPE is a simple protocol for device control developed at the DND CAT at the Advanced Photon Source.)

XIA DXP Module Support Included

Preliminary support for the X-Ray Instrumentation Associates DXP MCA module is now included.

LeCroy 4434 CAMAC 32-Channel Scaler Supported

The LeCroy 4434 CAMAC 32-channel Scaler is now supported by spec.

Fixed Block Mode For KS3929 On Solaris Platforms

CAMAC block mode transfers on Solaris 2.x platforms using the CSS kernel driver for the Kinetic Systems 3929 SCSI-to-CAMAC controller now work properly. The new version of the CSS driver needs to be installed.

Bug with HP E/ISA Errors Fixed

A bug that could cause spec to hang when HP E/ISA ports were configured but couldn't be properly opened has been fixed.

Fixed Bug with EPICS Debugging

A recently introduced bug that could result in core dumps if EPICS debugging was turned on has been fixed.

RELEASE 4.03.10

These notes summarize the cumulative changes made for spec release 4.03.10 as of March 16, 1998.

Improvements To the showscans Utility

The showscans utility, which uses C-PLOT to create 12-scans-per-page summary plots of spec data files, has been improved. A new -n flag turns off the default normalization of the data. When normalization is on, the data is checked after normalization to make sure the ranges are plottable. Also, the x-axis labels are now chosen more carefully.

OMS Motor Controller Code Updated

This release contains a rewrite of the code for the OMS motor controllers. The code now supports the unit/channel configuration option in the configuration editor. That means that each motor can be assigned to a particular controller unit and channel number, rather than being assigned consecutively. Because the revised code uses different internal routines for the motor functions, the messages displayed to the user and order and format of commands sent to the controllers will be different than in the previous releases.

Ortec Timer Code Revised

To accommodate changes in the Ortec 974/995 firmware, the handling of these Ortec timers has been modified. In particular, spec no longer uses "alarm mode" with GPIB interface timers, as the behavior associated with that mode differs among firmware versions.

Fixed Bugs In array_pipe

Some bugs associated with using data array arguments with the array_pipe() function have been fixed.

RELEASE 4.03.09

These notes summarize the cumulative changes made for spec release 4.03.09 as of March 9, 1998.

Device Unit Number Configuration Easier

The configuration editor now allows positioning the cursor in the unit-number field for MCA and CCD devices, for GPIB controllers and for generic serial devices. Entering a number in that column will swap rows.

Allow More Than 99 Scalers or Motors Per Unit

The configuration editor now allows entering values greater than 99 in the NUM field for motor and counter devices.

New Warning If Software Timer Not Completely Configured

The configuration editor now warns when exiting if the software timer is not configured on both the device screen and the scaler screen.

Fix a Possible Core Dump When x11filt Exits

A core dump that occurred when the x11filt process exited under certain conditions has been fixed.

Improved Debugging Messages For EPICS

The debugging information shown for EPICS (debug level 128) has been redone.

Fixed Max Number Of EPICS Scalers

The code has been fixed to allow up to sixteen EPICS scalers per unit. Previously the limit was eight.

Preliminary Support For EPICS MCA

Initial support for the standard EPICS MCA device support is included.

Preliminary Support For Jorway 73A SCSI-CAMAC On HP-700

Initial support for the Jorway model 73A SCSI-to-CAMAC controller for HP-700 platforms (HPUX 9.x and 10.x) is included.

Preliminary Psi-Circle Code

A temporary version of geometry code for a new configuration of six-circle diffractometer is included. The diffractometer uses two circles to orient the detector and four circles to orient the sample. Huber calls this diffractometer a psi configuration. Newport has a similar model, but with a kappa-geometry configuration for the sample circles. The code will support both. In the current version, the reciprocal-space-to-angles code is basically that from the traditional six-circle with suitable transformations for the different detector circle configuration.

Improved Signal Blocking Around GPIB Accesses

The signal generated by a ^C at the keyboard is now blocked more robustly surrounding GPIB accesses. In particular, a situation where the semaphore used to control access to the GPIB by multiple instances of spec would became misset after a ^C has been fixed.

Fixed Bug With Using Multiple Joerger VME Scalers

A bug which prevented spec from working correctly with more than one Joerger VSC16/8 VME scaler module has been fixed.

Debug Warning On Nested or Recursive Macro Functions

A message will be printed if the debug level is set to produce warnings (2048) and if a macro function is called recursively.

Error Message Now Printed If Nonexistent Function Called

Entering f(arg) where f is neither a built-in function nor a macro function now generates a syntax error during parsing. Previously, such a construction was treated as a valid instance of the catenation operator.

RELEASE 4.03.08

These notes summarize the cumulative changes made for spec release 4.03.08 as of January 20, 1998.

KS 3388 CAMAC-To-GPIB Support Upgraded

All the standard GPIB operations available with spec are now supported for the Kinetic Systems Model 338 GPIB-to-CAMAC controller. Previously only the gpib_put() and ASCII gpib_get() functions were available.

GPIB Secondary Address Supported

spec now supports GPIB secondary addressing modes from the user-level GPIB functions such as gpib_put(), gpib_get(), etc. To use a secondary address, the address field must be a string of the form "pri_sec", where pri is the primary GPIB address and sec is the secondary GPIB address.

EPICS epics_get() For String Records Fixed

A bug, introduced in spec release 4.03.04, that prevented the user-level epics_get() function from returning the value of a process variable having the type DBF_STRING, has been fixed.

HP Targets Now Linked With libdld

spec for the HP 700 platforms now includes the flags -ldld in the link line. The dynamic loader library is required for certain configurations, such as use of the SICL library on HP 10.2.

HP I/O Port Access Bug Fixed

A bug, where special device nodes in /dev/ioports/ didn't get created automatically if the particular E/ISA device required a long list of port addresses, has been fixed.

RELEASE 4.03.07

These notes summarize the cumulative changes made for spec release 4.03.07 as of January 5, 1998.

file_info() Usage Fixed

The usage file_info(filename, "-e") now returns nonzero if the file exists and zero if it does not, as the documentation states. Previously, the return values were the opposite, which was not what was intended.

Check For Process Existence With file_info()

The function file_info(pid, "alive") returns nonzero if the process associated with the process ID pid exists and zero otherwise.

New read_motors() Function

A new built-in function called read_motors() has been introduced. It replaces both the getangles and getdials built-in commands. For backwards compatibility, the standard macros now contain definitions for the two commands in terms of the new function. The argument to read_motors() is a bit flag with definitions as follows. If bit 1 is set, the function returns dial values, otherwise user values are returned. If bit 2 is set, a forced read of all hardware takes place. (For efficiency, normally most motor controllers are not read if the position hasn't been changed by a move.) If bit 3 is set and if there is a discrepancy between the software and hardware, the software will be silently corrected to match the hardware. Note, the forced-read and "silent-sync" features are not yet implemented for all motor controllers. Contact CSS for hardware-specific information.

Improvements For the @ Operator

It is now possible to create arrays with the @ operator. For example, one could create or refer to a series of arrays with code such as

for (i=0; i<10; i++) {
      s = sprintf("image_%d",i)
      array @s[256][256]
}

New Debugging Modes

A couple of (experimental) debugging modes are implemented to help diagnose runtime errors in macros and command files. DEBUG flag 0x20000 is similar to flag 2, which prints information about nodes during execution of the parse tree, but the new mode prints a somewhat more readable version. DEBUG flag 0x40000 turns on a mode that attempts to print out the context around the input line that generates a run-time error. This mode should not be used during normal operation, as it consumes extra memory and execution time to save all the needed information.

Motor-Listing Macros Updated

Use of the obscure _mo_loop macro in the standard macros has been eliminated. A new show_motor_info() macro function that is more understandable is now used, and the macros that call it, such as wa, lm, _head, etc., have been revised. Note, the _mo_loop macro is still currently included in the standard macros to maintain compatibility with local macros that may call it.

New wu Motor Macro

A new wu (where user) macro is included that is similar to the wa (where all) macro for displaying motor positions, but only prints the mnemonic and the user positions of the motors.

New wiz_passwd Utility

To cope with shadow password files and missing crypt() library routines, spec now comes with its own wiz_passwd utility for setting the specwiz password in the file SPECD/passwd.

Bug In Saving Pseudomotor Positions Fixed

Previously, when a move command only changed the positions of pseudomotors, the positions would not be saved to the settings file until a real motor was moved or some other command that wrote out the motor settings was executed. The problem was manifested when a reconfig command (which reads the settings file) was issued after moving a pseudomotor, at which time the position of the pseudomotor would revert to its previous value.

Raw input() From Pipes Possible

When spec is invoked with the arguments -p *pid fd*, as is the case when running from a GUI front end, if fd (the input file descriptor) is zero, the raw tty modes available with the input() function and used with gethelp() are now available. Previously, the raw tty modes were not available at all when the -p flag was used.

Number Of Queued Command Files Increased, Open Message Deferred

Previously, the "Opened command file ..." message was printed and the file opened when the command file was put on the queue using the dofile() or qdofile() functions. Now, the files are not opened until it is actually time to read them, and the "Opening ..." message isn't printed until the file is actually opened. Also, the number of files that can be queued for input is raised from 8 to 64. A new debugging level of 0x10000 will produce messages that show when input files are queued.

User Names No Longer Truncated For State File Name

The names of the user state files (stored in the userfiles subdirectories of spec's auxiliary file directory) are now formed with the complete user name, rather than just the first six characters (except on the remaining supported platforms that only allow fourteen-character long file names). Thus users such as opid18a and opid18b will now have distinct state files.

OMS PC48 Supported

The Oregon Micro System PC48 PC board motor controller is now supported.

RELEASE 4.03.06

These notes summarize the cumulative changes made for spec release 4.03.06 as of November 17, 1997.

More Significant Digits For Step Size

The motor step size is now saved in the config file with up to twelve significant digits. Previously, six was the maximum. Note, the screen display still shows only six.

Support For PGM Binary File Format

The fmt_read() and fmt_write() functions now recognize the pgm form of the "portable pixmap" file format. Usage might be:

ubyte array image[480][640]
image_get(0, image)
fmt_write("image.pgm", "pgm", image)

Fixed Bug in Not Finding Output Files When Restarting

A bug, where under certain conditions spec would not find a data file if spec was started from a different directory than the one in which the data file was opened, has been fixed.

New surf Configuration For NSLS X22B Beamline

A new flavor of the surf geometry, as used at the NSLS X22B beamline, is included in the spec distribution.

Implemented Standard Features For PCA-3 and Multiport MCAs

The code for the Nucleus PCA-3 and Multiport MCA models now includes support for the new spec standard MCA features such as auto-run and soft-preset modes. See the new mca help file for more information.

Support For Four-Chip Am9513 Counter Boards

spec now supports up to four Am9513 chips on PC ISA-bus counter boards, such as the ComputerBoards CIO-CTR20.

Support For Phytron Motor Controllers

spec now includes support for the Phytron IXE-alpha C motor controller boards.

Preliminary Support For Meteor Frame Grabber on Linux

Preliminary support for the Meteor PCI frame grabber card is now included. The support is only available on linux platforms and requires that the linux driver for the board be installed.

Fixes For Oriel 18092

Several code fixes are included for the Oriel Encoder Mike 18092 motor controller.

Fixed Bug Limiting EPICS Scaler Channels to Eight

A bug, where the number of generic EPICS scalers per controller was limited to eight in the configuration editor, has been fixed. Up to sixteen channels may now be configured.

RELEASE 4.03.05

These notes summarize the cumulative changes made for spec release 4.03.05 as of October 13, 1997.

Bug In data_dump()/array_dump() Fixed

A bug in the parsing of the optional format arguments to the data_dump() and array_dump() functions that sometimes mixed up the field-width specification with the number of points-per-line specification has been fixed.

Bug In Data Group Size Check Fixed

A bug where one of the constraints on data group size was not checked in the internal code has been fixed. The constraint of 65,536 total points in a data group is actually less for certain values of the number-of-elements parameter. The manifestation of the bug was that if a data group was configured which exceeded the lower constraint, it was possible to either create an excessively large data-points file in the userfiles area, or to have the data-group data scrambled. The internal check on the size constraint has been fixed, and the syntax of data_grp() has been expanded to aid in creating maximally sized data groups, as described next.

New Auto-Sizing Feature For data_grp()

A new syntax option for the data_grp() function is available. If the number of points is zero, as many points as are allowed will be configured. If the number of points is negative, as many points as are allowed up to the absolute value of the argument will be configured.

New Option To data_info()

The new option "precision" will return the number of bytes per data group element. The data type is set at installation time. The return value will likely be four for float and eight for double. Any number can be used for the data group argument.

RELEASE 4.03.04

These notes summarize the cumulative changes made for spec release 4.03.04 as of September 30, 1997.

Fix for Colors On X11 Plots

The code for color allocation for the X11 plot windows has been improved so that if a chosen color can't be allocated (usually due to other processes hogging the display's color map) it's more likely the substituted color will maintain contrast between the foreground and background of the plot (unlike previously). In addition, a message will be printed indicating that the selected color was unavailable.

Additions To energy.mac

A new monochromator type is now supported by the standard monochromator macros. The new type is a three-motor monochromator such as is used at several APS beamlines, and is recognized by the motor mnemonics mono, mon_y and mon_z. See the comments in the macros/energy.mac file of the standard spec distribution for additional details.

In addition, the monochromator settings are now stored in a file whose name is returned by the new standard macro function called mono_settings(). The default file is SPECD/mono_settings. (The old name for the file was SPECD/g_mo_d.mac.) The local spec administrator can configure another name or location for the monochromator settings file by putting suitable definitions for the mono_settings() macro in the appropriate site-dependent macro file. See the comments in macros/energy.mac for more information.

Also, the setmono macro has been rewritten to better handle the various permission issues associated with the monochromator settings file. To prevent users from changing the settings, the file should exist but be unwritable by users.

Removed user_getangles Correction From sixc Macros

The following correction to the counts for the sixc geometry:

def user_getcounts 'S[det] /= cos(rad(A[gam]))'

is no longer included in the standard sixc macros. If needed, the correction is more appropriately included in the SPECD/sixc/conf.mac optional site macro file by the local spec administrator.

New Support For Tsuji Motor Controller

spec now supports the Tsuji Electronics Co., Ltd. Model PM16C-02N 16-Channel Stepping Motor Controller over GPIB and RS-232C interfaces.

New Support For Ortec Trump Multichannel Buffer

spec now supports the Ortec Trump 2K/8K Multichannel Buffer ISA PC cards.

Block Mode Implemented For Solaris 2.x KS 3929 SCSI-CAMAC Driver

The CSS driver for the Kinetic Systems 3929 SCSI-to-CAMAC module now supports block mode transfers.

Fixes For ITL-09/MM2500 Motor Controllers

A bug introduced in release 4.02.02 where spec set the origin-search speeds to zero has been fixed. spec now also programs the origin-search "turn-around" time using the value configured for the home-acceleration parameter.

RELEASE 4.03.03

These notes summarize the cumulative changes made for spec release 4.03.03 as of August 13, 1997.

Preliminary Implementation Of New sock_io() Function

The new sock_io() function for sending and reading messages over a UNIX socket has been added to spec. See the sock_io help file for details.

Unused _units, UL, UN References Removed

The standard macros have had obsolete and unused references to the _units macro and the UL and UN symbols removed.

RELEASE 4.03.02

These notes summarize the cumulative changes made for spec release 4.03.02 as of June 24, 1997.

Tilde (~) Expansion Also Included For unix()

The recently added tilde-expansion capability is now also included for the unix() function.

Detector Counts Saved In reflex File

A comment containing the value of S[DET] is now included with each reflection added to the reflex file used when fitting the orientation matrix.

UB Calculation In New twoc Code Fixed

Inconsistencies in the UB code in the new geo_twoc.c have been fixed.

Old Bug With %c Format in sscanf() Fixed

A very old bug, where the %c conversion in sscanf() did not work at all, has been fixed.

Support For E/ISA Boards On HP 700 Substantially Cleaned Up

Problems with spec's support for E/ISA boards on HP 700 platforms have been fixed. In addition, the support is now available on HP-UX 10.20 platforms. All the ISA boards supported by spec should now be usable on the HP 700. See the ioports help file and aux/README.hp file in the spec distribution for more information.

Made raw-mode Serial Interface Really Raw

Previously, when setting raw mode for RS-232C ports, spec left software flow control enabled on certain platforms. That prevented completely raw byte-stream I/O in applications that required it. spec now makes the raw serial lines completely raw.

New Features For MCU-2 Motor Controller Support

The unit/channel configuration feature is now implemented for the ACS MCU-2 motor controllers. In addition, motors can be configured as MCU_O, which means that spec will send instructions based on the old PROMS, which don't require a start character before each command. Previously spec would first try to get a response with the start] character, then without.

New Support For The Nucleus MicroFast MCA PC Boards

spec now supports the MicroFast MCA PC boards from The Nucleus.

New Support For The Ordela AIM Neutron Detector

spec now supports the Ordela AIM/312 2D detector.

RELEASE 4.03.01

These notes summarize the cumulative changes made for spec release 4.03.01 as of June 11, 1997.

First Step in Changing Standard Macros From Data Groups To Arrays

The standard scan macros now call the macro function scan_data() instead of the function data_nput() to store the scan data. This change is the beginning of the the transition from use of data groups to the new data arrays in the standard macros. The plot.mac file includes a definition of scan_data() that calls data_nput(). Shortly, a new plot.mac version will be included in the spec distribution that has the plotting macros also defined in terms of the data arrays.

New and Revised Standard Macros

New onwiz and offwiz macros aid in using "wizard" mode. The onwiz macro prompts for the wizard password and starts a timer that will turn the mode off in ten minutes. An optional argument set the timer duration in seconds. A negative argument prevents installation of the timer.

The FRESH built-in variable is used instead of the test for the "unset" attribute of many global symbols for deciding whether to assign default values when the standard macro files are read in. A new unset macro function simplifies the test for the "unset" attribute in other instances.

The new file_info() function has replaced most of the unix("test ...") calls.

Revisions Relating To Handling Of Orientation Matrix

The built-in code and macros that deal with the orientation matrix, UB, have been modified a bit. The changes should make running spec easier for users who enter values for UB manually.

The calcG macro will now immediately calculate a new orientation matrix from the entered lattice parameters and the entered primary and secondary orientation reflections. (Previously, the macro simply set an internal flag - actual recalculation of UB was deferred until the new values were needed.)

Also, now only macros that change the values of the lattice parameters (setlat, setrlat) or the orientation reflections (or0, setor0, or1, setor1, or_swap) include calcG. (Previously, calcG was included in irrelevant macros.)

A new macro USER_UB, defined as calc(4,1), returns a value of 0 if UB was calculated the conventional way from the lattice constants and two orientation reflections using calcG, a value of 1 if any element of UB was assigned a value directly (if the value is different from that calculated by calcG), and a value of 2 if UB was calculated using the built-in least-squares refinement code.

The save macro now saves the UB values in the save file if USER_UB is set. Otherwise a calcG is included at the end of the file, as before.

The value of LAMBDA corresponding to each of the two orientation reflections is now saved with the save macro and displayed with the pa macro to aid in record keeping (the value is not used in any calculations).

The new macros showUB for displaying the current values for the UB matrix and enterUB for typing in values for the UB matrix are included in the standard distribution.

All the geometry source files that use the orientation matrix (geo_fourc.c, geo_twoc.c, etc.) have been modified to accommodate the changes, as have the macro source files.

HKL Rounding Now Configurable

The rather arbitrary and not universally appreciated "feature" where spec rounded values for H, K, and L (and other geometry values derived from motor positions) to five significant digits has been made optional. By default, the rounding is now turned off. It can be turned on using spec_par("HKL_rounding", 1e5) where the argument indicates the magnitude of the rounding, i.e., one part in 1e5, for example. Note, values with an absolute value less than 1e-10 are still rounded to zero whether or not the optional rounding is turned on.

New @ Indirection Operator

A new indirection operator has been introduced. It allows reference to a variable whose name is the string value of another variable. For example:

SPEC> a = "b"
SPEC> b = PI
SPEC> print a, @a
b 3.14159

Relative Moves For tty_move()

Relative moves are allowed with tty_move() using syntax that requires adding +/-1000 to the number position arguments. Both coordinates must specify either relative or absolute moves. If one coordinate specifies a relative move, the absolute move in the other coordinate will be ignored. Please note, not all terminal types support relative moves.

New "resized?" Option to tty_cntl()

A new "resized?" option to the tty_cntl() updates the ROWS and COLS variables in the event the window size has changed and returns a nonzero value if the window size has changed since the last call to tty_cntl("resized?").

New Sequences For tty_cntl() and tty_move()

The new sequences \[up], \[do], \[le] and \[nd] for up, down, left and right (non-destructive space) are recognized by tty_cntl() and the string argument of tty_move().

Enhanced unix() To Put Command Output In A String

The unix() function can now take a second and third optional argument. The second argument is the name of a variable in which to place the string output of the command in the first argument. The maximum length of the string is 4096 bytes (including a null byte). The optional third argument can be used to specify a larger size.

Array Updated Status Available For Non-Shared Arrays

The array_op("updated?", arr) function will now work with all arrays, not just with shared memory arrays. The function returns nonzero if the data in the array has been accessed for writing since the last check, otherwise returns zero.

Macro Functions Can Return Data Arrays

Macro functions can now return a data array. No new array storage is allocated. The return value refers to the same storage as the array used in the macro function.

Can Use local and global To Make Associative Arrays

By appending empty square brackets to the symbol names following the local and global keywords, the type of the symbol can be forced to be an associative array. Such a feature is useful when using symbols as arguments to macro functions before their type has been established by usage.

Cooked Mode For Tty Automatically Restored

"Cooked" mode is now automatically restored before the main prompt is issued after a call to input(-1), which puts the tty into no-echo, wake-up-on-every-character mode. Previously, a call to input(0) or a ^C-type error reset was required.

Recognize Tilde (~) Escapes In File Names

If spec is linked with the optional GNU readline library during installation, tilde expansion will now be performed in the conventional manner. The sequences ~/ and ~any_user/ will be replaced by the full path names for the current user's and any user's home directory, when those characters are used in the arguments to the open(), close(), on(), off(), dofile(), qdofile(), file_info() and chdir() functions.

delete Command Works With 2D Associative Arrays

The delete command now accepts 2D associative-array element arguments.

New Test If GPIB Controller Is Responsive

The function gpib_cntl(addr, "responsive") will return a nonzero value if the GPIB controller (not device) associated with addr is present in spec's configuration file and responds to spec's presence test.

User-Editable Source Files For Binary File Read/Write

The spec distribution now includes source files that allow users to create their own binary file formats for the new fmt_read() and fmt_write() functions. Note, though, the details of the interface are still evolving. Contact CSS for implementation details.

Fixes In fmt_read() and fmt_write()

A number of fixes are included for various bugs in the fmt_read() and fmt_write() functions.

Partial Fixes For String Arrays

Bugs relating to the use of the new string arrays have been fixed. Display of string arrays with the print command has been fixed to print the elements properly even if the elements are not null-terminated. Note, though, use of the string arrays is not yet completely robust. If rows of the array do not end with a null byte, some spec functions that operate on the arrays may generate a memory fault.

Fixed Broken Feature That Warns Of Disappeared Files

The feature added several years ago that would notify users of open output files that had been removed from the file system had been broken for some time, but is now working again.

Fix For array_plot()

The array_plot() function will now work properly with a one-element array.

Fix For whatis()

The whatis() function has been fixed to return the correct values for array elements, as in whatis("G[0]"). Recent releases of spec did not work correctly, which broke the test for UNSET status in some of the standard macro files.

Fix For getline()

The getline() function has been fixed to reopen a file that has been removed and recreated between calls to getline().

Parity Configurable For Specific Serial Devices

Even or odd parity can now be configured for RS-232C motor controllers, counters, etc. Previously only a no-parity mode was allowed.

Linux I/O Port Access Privilege Handling Revised

spec now handles the problem of gaining I/O port access on linux in a different way, such that the kernel patch previously used is no longer needed. However, spec must now be installed as a set-user-id root program.

Fix for X11 Fonts On Plots

The x11filt program has been changed to ignore any X resource for a nonapplication-specific default font. Only the spec.Font resource will be considered. This fix solves the poor font size selection some users have experienced with spec's X11 plot windows.

Fixes For EPICS Motor Driver

A couple of improvements have been made in the support for the EPICS motor driver. The motor resolution is now read back using the proper numeric type, so it no longer depends on the setting of the precision variable. Also, the offset parameter that relates user and dial units is now correctly set in the EPICS data base.

Preliminary Implementation Of ESRF DC Motor Server

Initial support for the new ESRF DC motor device server is included.

RELEASE 4.02.04

These notes summarize the cumulative changes made for spec release 4.02.04 as of May 12, 1997.

New Tty Control In tty_move() and tty_fmt()

All the tty attribute-control strings available with the tty_cntl() function can now be included in special character sequences (as in \[md] and \[me] to start and end bold mode, for example) in the strings passed to the tty_move() and tty_fmt() functions.

New end_mac Built-In Macro

If a macro named end_mac is defined, its contents will be executed when spec exits in normal fashion. The end_mac macro will not be run if spec is killed or exits due to a fatal error. If there is an error while executing the commands in end_mac, spec will exit anyway, and the end_mac macro will remain defined.

2D Associative Arrays Enhanced

The following syntax using 2D associative arrays is now available:

test["index1"]["val0"] = "data0"
test["index1"]["val2"] = "data2"
test["index2"]["val1"] = "data1"
test["index2"]["val3"] = "data3"

for (i in test["index1"])
        print i, test["index1"][i]

if ("val2" in test["index1"])
        print "yes"

GPIB and CAMAC Sharing Fixed

The HP SICL GPIB controller can now be configured as a shared controller. GPIB problems that occurred when the KS 3929 SCSI-to-CAMAC controller was configured as shared but the GPIB controller was not have been fixed.

Fixed Motion Bug With Large Backlash and Move Magnitudes

A very old bug, where motor backlash movements didn't get done when the product of the backlash magnitude and the move magnitude exceeded the maximum value for a long integer, has been fixed.

Code For Princeton Instruments ST116 PDA Fixed

Support for the ST116 PDA has been updated to work with spec release 4. The mca_get() routine now returns the number of points read, as is the current convention. The status byte sent by the instrument at the end of the data stream and formerly returned by mca_get() is now available using mca_par("status_byte").

Command Completion Tuned

spec now does context-dependent command completion for the lsdef, undef, prdef, lscmd, syms and unglobal commands when linked with the GNU readline library. (Command completion lists the possible valid completions or fills in a unique completion when the <tab> key is pressed after partial input.)

x11filt Core Dump Fixed

A bug that sometimes caused a core dump from the X11 filter program x11filt when DISPLAY could not be opened has been fixed.

RELEASE 4.02.03

These notes summarize the cumulative changes made for spec release 4.02.03 as of April 18, 1997.

Wizard Password Can Be In a SPECD/passwd File

The spec wizard password can now be located in a file named passwd in the spec auxiliary file directory (useful if shadow passwords are used, as the shadow file containing the encrypted password can be read only by root). The format of the file is the same as in the conventional passwd file, although this file need only contain the one line for the specwiz user. The wizard password is used with the ^W command in the edconf configuration editor and with wizard mode with the spec_par("specwiz", 1) function.

The uct and counters Macros Fixed Up

The counters macro will now check that the scaler channels are within range. The uct macro will now print only the first six counters, if there are more than six counters configured. Note, the uctn macro can provide an updated display of more than six counters.

Support For Bit 3 VME Workstation Controllers Fleshed Out

spec now supports access to the full A32 and dual-port memory address space, including DMA transfers to and from spec data arrays, with the Bit 3 Model 466-1/467-1 VME controllers on Sun platforms and the Model 487-1 VME controller on HP platforms.

Support For Princeton Instruments CCD Camera Controllers Improved

The code for the Princeton Instruments CCD camera controllers has been revised a bit. Kinetics mode is now supported. The image_par() function argument "kinetics" is used to turn the mode on or off. The argument "kinwinsize" is used to set the number of rows in the kinetics-mode window.

Bug Fixed With 0xFF Printed After Parsing Macro Functions

Odd behavior, introduced with the recent fix of an obscure bug dealing with parsing macro functions, where a character with ASCII value 255 would be sent to the screen after a macro function was parsed, has been corrected.

RELEASE 4.02.02

These notes summarize the cumulative changes made for spec release 4.02.02 as of March 31, 1997.

New vme_move() Function

A new vme_move() function copies data between VME A32 address space and spec data arrays. See the vme help file for more information.

Macro Source Files Displayed With prdef

The prdef command will now display (as a comment) the name of the source file in which the macro was defined. This feature, which is on by default, can be disabled using spec_par("show_prdef_files", 0).

Can Now Configure Parity For raw Serial Interface

The options raw evenp and raw oddp can now be selected on the Interfaces screen of the configuration editor for generic serial devices.

Bug with cdef() Fixed

Using the chained macro function cdef() with just one argument will create an empty macro with the given name. If the macro already exists, it will do nothing. Previously, such usage was undefined.

file_info() Bug Fixed

A bug with the new file_info() function, where use with a single argument to test for the existence of a file could result in a segmentation violation, has been fixed.

Bit 3 VME Support on Sun Platforms

The Bit 3 S-BUS VME controllers for SunOS 4.x and Solaris 2.x platforms are now supported.

New Feature For NSK Motor Controller

The function motor_par(mne, "read") will now return the strings read for the NSK motor controller.

Tweak Macro Enhanced

You can now change the tweak step size in the tw macro by typing a numerical value at the tw prompt.

More Flexible ESRF Format Read

The fmt_read() function for the ESRF data-file format now works with headers that are not exactly 1024 bytes long.

Additions To gmci Geometry

The gmci geometry, as used at CEA in Grenoble, now includes the latest revisions from the users there.

RELEASE 4.02.01

These notes summarize the cumulative changes made for spec release 4.02.01 as of March 9, 1997.

New Default X11 Plot Titles

spec now sets the default X11 plot title to the name by name of the running program followed by the filter number as in fourc 1, fourc 2, sixc 1, etc. The plot title can still be changed using plot_cntl("title=...").

Improved File-Write Error Handling

When there is a write error on output to a file, spec will turn off further output to the file until there is a on() or open() call. That gives the user an opportunity to close() the file if no further output is possible, due perhaps to a down NFS connection. Previously, spec would continue attempts to flush any pending output, even after write errors.

New xxx_par(... "device_id") Partially Implemented

The motor_par(), counter_par(), mca_par(), mca_spar() and image_par() functions all now take a new "device_id" parameter. In the case of ESRF device server devices, the return value is the string name of the imported device. For some ESRF devices, the return value will be "?" if the device was not successfully imported. For non-ESRF devices, the return value may be "?" or some other identifier such as GPIB address or CAMAC slot.

exit Bug In Macro Functions Fixed

A bug, whereby an exit command in a macro function didn't reset to command level, has been fixed.

Mnemonic Checking Fix Fixed

The 4.01.15 fix to prevent the same mnemonic being used for both a motor and a counter led to some problems when restarting spec after it terminated abnormally. Now the mnemonics are kept straight.

scans.4 Fix For @A Array Data

A bug in scans.4.c, where \ continuation lines of @A array data were not ignored when the MCA data wasn't asked for, has been fixed.

X25 surf Modifications

The surf geometry for the NSLS X25 diffractometer will now work with either a one- or two-motor detector-height stages.

Distinct Configuration For NI GPIB-ENET

There is now a distinct configuration choice for the National Instruments GPIB-ENET controller on platforms that support that device. With the GPIB-ENET configuration selected, spec will block keyboard signals during calls to the subroutines in the NI cib.o module, as experience has shown those routines are not rebust with respect to signals.

More Changes For the MM2500/ITL09 Motor Controllers

On the advice of the manufacturer, spec now sleeps for 100 msec before reading a response to a command sent to the MM2500/ITL09 motor controllers. Perhaps that will help.

RELEASE 4.01.17 BETA

These notes summarize the cumulative changes made for spec release 4.01.17 BETA as of February 18, 1997.

Fixed Macro Function Bug From Previous Release

The fix of the obscure else-less if parsing bug in the previous release introduced a new bug relating to the parsing of macro functions. Both bugs are now fixed, with the hope no new bug is created.

No More calcG in gpset

As there is no need for the gpset macro to contain an invocation of calcG, it no longer does.

RELEASE 4.01.16 BETA

These notes summarize the cumulative changes made for spec release 4.01.16 BETA as of February 9, 1997.

mca_par() Calls To Disabled Or Unresponsive Devices Fixed

spec now handles mca_par() calls to user-disabled or to unresponsive MCA hardware devices by printing an error message and returning a -1. Previously, spec's behavior varied for the different MCA devices.

Unresponsive GPIB Controller No Longer Resets To Command Level

When accessing GPIB devices with gpib_get(), gpib_put(), etc., after the configured GPIB controller fails the presence test, spec will no longer silently reset to command level. Instead gpib_get() will return a null string, and the other functions will return -1.

Improvements For the MM2500/ITL09 Motor Controllers

The code for the MM2500/ITL09 motor controller should now do a better job of handling timeouts in reading responses from the controller and in programming parameters for a unit that has had values erased from its non-volatile memory.

Bug With Long Time Presets For Silena MCA Fixed

A couple of bugs in the code for the Silena MCA, where count times longer than 6533.5 seconds were not handled correctly, have been fixed.

RELEASE 4.01.15 BETA

These notes summarize the cumulative changes made for spec release 4.01.15 BETA as of January 31, 1997.

data_pipe() Works With New Arrays

The data_pipe() function can now take array arguments in addition to data groups. See the data_pipe help file.

Fixed Parsing Bug With else-less if

A bug with parsing if statements that didn't have a matching else statement when the body of the if statement contained a call to a macro function has been fixed.

Fixed Parsing Bug With if Block As Macro

A very old and obscure parsing bug, where spec would not accept the else keyword following an if statement when the statement block of the if statement was a macro containing a curly-bracket-delimited statement block, has been fixed.

Fixed Bug Allowing Same Mnemonic For Motor and Counter

A bug, where one could configure the same motor mnemonic for both a motor and counter, has been fixed. spec will now print an error message.

Support For Bit 3 VME Controller on HP

The Bit 3 Model 487-1 E/ISA VME controller with the Bit 3 Model 933 support software is now supported by spec on HP 700 series platforms.

Support For Bit 3 PCI-VME

The Bit 3 Model 616 and 617 PCI-VME controllers are now supported, but only on linux platforms. The Model 617 is the more expensive model as it provides DMA capabilities. Presently, spec does not support DMA transfer, so the new 616 is the recommended controller.

Support For Joerger VSC16/8 VME Scaler

The Joerger VSC16/8 VME scaler module is now supported by spec. This VME device requires a controller with A32/D32 capabilities. Presently, the Bit 3 Model 616/617 controllers on linux and the Bit 3 Model 487-1 on the HP 700 series platforms are the only supported controllers with the capability.

Support For Galil DMC-1000 PC Board Motor Controller

spec now provides preliminary support for the Galil DMC-1000 PC board motor controller, currently, only for stepping motors.

Added vme_get32() and vme_put32()

See the vme help file.

Oriel 18092 GPIB Interface Supported

spec now supports the GPIB interface on the Oriel 18092 Encoder Mike controller, in addition to the serial interface. Also, the unit/channel configuration is supported for this controller. Also, a bug in setting the gain parameter has been fixed. (The manual incorrectly states the gain is set with an SD command. The actual command is SG.) See the oriel help file for more information.

Fixed Oriel 18011 Bug

A bug, which made the Oriel 18011 motor controller unusable with spec and which had gone unnoticed and unreported for the last three years, has been fixed.

Am9513 Looks For Second Chip At Two I/O Ports

The code for the Am9513 based PC boards for timing and counting will now probe for the second Am9513 chip at both the base+4 and the base+2 addresses. The National Instruments board places the second chip at base+2, which now almost makes the board usable with spec. To fully use the board, the prewired connections of the time base to the counter inputs must be changed by modified the printed circuit board.

RELEASE 4.01.14 BETA

No notes.

RELEASE 4.01.13 BETA

These notes summarize the cumulative changes made for spec release 4.01.13 BETA as of December 22, 1996.

New Options To Force Row-Wise or Column-Wise Arrays

For the functions array_dump(), array_fit() and array_plot(), it matters whether each row or each column of a two-dimensional array corresponds to a data point. Previously, spec took the larger dimension of the array to correspond to point number. That is still the default behavior, but now the new "row_wise" and "col_wise" arguments to array_op() can force the sense of the array. See the arrays help file for details.

New Arrays Work With esrf_io()

The new array data type can now be used with the esrf_io() function for device server commands that require D_VAR_CHARARR, D_VAR_SHORTARR, D_VAR_LONGARR, D_VAR_ULONGARR, D_VAR_FLOATARR and D_VAR_DOUBLEARR, data types.

KS 3929 SCSI-To-CAMAC Supported on Solaris 2.x

CSS now provides a driver for the Kinetic Systems 3929 SCSI-to-CAMAC module for Sun Solaris 2.x platforms. See the drivers/sol2_ksc3929/README file included with Solaris 2 distributions.

Signal Blocking For HP-LAN GPIB

Due to problems reported with the HP-LAN GPIB device hanging when transactions are interrupted with a signal generated by a keyboard ^C, that signal is blocked during calls to the HP SICL library for that GPIB controller.

RELEASE 4.01.12 BETA

These notes summarize the cumulative changes made for spec release 4.01.12 BETA as of December 11, 1996.

More Improvements To X11 Font Handling

The default font pattern for the X11 high resolution window is now restricted to mono-spaced fonts. In addition, scalable fonts are now supported. Also, a new "fonts=..." option to the plot_cntl() function is available to select a fixed size or scalable font while running spec. See the x11 and new plot_cntl help files for more information.

RELEASE 4.01.11 BETA

These notes summarize the cumulative changes made for spec release 4.01.11 BETA as of November 16, 1996.

2D Associative Arrays Implemented

The associative arrays that have always been available with spec may now be used with two-dimensional array indices. Internally, The arrays are hashed using the string value of the first index, followed by the character \034 (^\), followed by the string value of the second index. A user can access such a 2D array element using a single index constructed according to the above recipe.

Bugs Fixed For the MM2500/ITL09 Motor Controllers

Two bugs with the Newport MM2500 and MicroControle ITL09 motor controllers have been fixed. spec now allows up to eight seconds for the acceleration ramp to be built. The previous three second timeout was too short. Also, a bug where the multiplier and divisor factors were sometimes incorrectly set has been fixed.

Ortec GPIB Power-On Message Flushed

spec now does a GPIB read with a very short timeout when initializing the Ortec 9XX counter/timers in order to flush out the message sent when the modules are first powered up. Previously, users had to perform a gpib_get() from the spec prompt to flush the message.

Multiple GPIB Controllers Now Allowed

spec now allows up to four GPIB controllers to be configured by the same instance of spec. In the configuration editor, use the ^F and ^B command on the GPIB controller line of the Interfaces screen to configure each controller. In the config file, the unit number is specified as @gpib_0, @gpib_1, etc. GPIB addresses can be entered using the unit:address syntax. If no unit: prefix is given, unit zero is used. In the config file, GPIB unit numbers are coded in the GPIB address as

unit * 100 + address.

From spec, the gpib_get(), gpib_put(), etc., commands can use either the above coding or the "unit:address" syntax. Note that sharing a GPIB controller among multiple instances of spec is still possible, but spec still uses only one semaphore to regulate access to each shared controller. Thus, if there are two GPIB controllers shared by more than one process, when any process accesses either controller, other processes will be blocked from accessing both controllers until the first process releases the semaphore.

Some Improvements for National Instruments GPIB

An old bug, apparently not manifested until recently where a short integer was used to hold transfer counts, which should have limited transfers to 32K or 64K bytes, has been fixed. Also, the error message printed with National Instruments GPIB controllers are now a little more informative. Also, the ECIC error (Not Controller In Charge or lost Controller In Charge during command) no longer causes an error reset. That change is to accommodate sharing of the GPIB-ENET model, which seems to always generate an ECIC error when a new process connects to it.

New Platform Targets

The new installation platforms esrf_linux, and epics_solaris2 are available.

New gmci Geometry

A new gmci geometry, as used at CEA in Grenoble is supported.

Some Improvements To X11 Font Handling

On a number of linux installations, the font data base (consisting of the files /usr/lib/X11/fonts/*/fonts.dir), is often incorrect on new installations, which leads to Bad name errors with the spec X11 graphics. The x11filt program now prints a lengthly error message explaining that the system administrator should fix the problem by running the mkfontdir utility. In addition, some font debugging is available by entering the commands plot_move(0,0," ",9901) to enable font debugging and plot_move(0,0," ",9900) to disable it.

Image Handling Of ROI and Binning Changed

No text.

spec Installation Faster With Respect To GNU Readline

Previously, when spec was installed configured to be linked with the GNU readline library, the library source files were compiled even though the object modules were included in the spec distribution in a library archive. The installation procedure has been modified to avoid the extra time-consuming compilation.

ESRF MCA Bug Fixed

A bug with the ESRF MCA code, where the values reported for real and live time were swapped, has been fixed.

fmt_read()/fmt_write() Bugs Fixed

No text.

calcG Removed From setE Macro

It turns out there is no need for the calcG macro in setE so setE no longer contains calcG.

Silena 7328/7329 MCA Supported

spec now supports the Silena 7328/7329 MCA on a GPIB interface.

New esrf_io() Data Type Added

The D_STATE_FLOAT_READPOINT data type is now supported in the esrf_io() function.

RELEASE 4.01.10 BETA

These notes summarize the cumulative changes made for spec release 4.01.10 BETA as of October 2, 1996.

OMS PC-58 and Bit-3 403 Ported To HP

The Oregon Micro Systems PC-58 ISA motor controller and the Bit-3 Model 403 ISA VME controller can now be used on HP platforms with E/ISA slots. These boards require both I/O port access and memory mapping.

EPICS Unit/Channel Numbering Starts At One

When using the manual unit/channel number configuration, EPICS motor channels are now numbered starting from one, rather than zero, as is the case with most spec motors. The change is to match the conventional motor numbering of an EPICS data base.

EPICS Scaler Enhancements

spec support for the EPICS scaler records now uses callbacks to determine when counting is finished. Previously, the less efficient polling method was used.

SIGINT From Another Process Handled Better

Previously, for spec installations where spec was linked with the GNU readline library, if another process sent spec a SIGINT signal, spec would ignore the next line of input. That should no longer be the case.

RELEASE 4.01.09 BETA

These notes summarize the cumulative changes made for spec release 4.01.09 BETA as of September 17, 1996.

GPIB IFC Can Now Be Asserted

You can now use gpib_cntl(a, "ifc"), to send the IFC (interface clear) message to reset the GPIB bus. See the gpib help file for more information.

array_op("contract") Improved

When used with one-dimensional arrays, the "contract" option of array_op() will now use the first argument after the array name as the contraction factor. Previously, that first argument was ignored, and the following argument was used.

edconf Bug On HP Fixed

A problem, seemingly only manifested on the HP platforms, where the edconf configuration editor would exit prematurely while writing out the configuration and motor settings file when the path name for the files was too long, has been fixed.

RELEASE 4.01.08 BETA

These notes summarize the cumulative changes made for spec release 4.01.08 BETA as of September 10, 1996.

Removed Files No Longer Recreated On Startup

Previously, if a file opened in a spec session was removed before a subsequent session, spec would recreate the file on startup. That no longer happens. Instead a warning message is printed that the old file file has disappeared. Of course, the next time output is directed to a file by the same name, spec will create a new instance of the file.

Parser Bug Fixed

A bug, where spec would expand the macro name in a def or rdef statement immediately following an else-less if statement inside a statement block, has been fixed.

Case Insensitive dev_import() For ESRF Devices

spec now does a case-insensitive hashing of device names to keep track of which devices are in use. Previously, spec would attempt to re-import a device if the name was spelled with a different capitalization scheme.

New image_par() Options

The image_par() function now accepts the options "beg_col", "end_col", "beg_row" and "end_row" with values to set the image_get() region of interest.

New vme_get() and vme_put() Functions

The new functions vme_get() and vme_put() are available for doing A16, D8 transfers to VME modules. A24, A32, D16 and D32 transfers await a future release.

New Array Functions

The new functions array_fit(), array_dump() and array_plot() do for arrays what data_fit(), data_dump() and data_plot() do for data groups.

array_op() "x_at_min" and "x_at_max" Commands Fixed

The "x_at_min" and "x_at_max" options to the array_op() function now work correctly.

New array_op() Options

The array_op() function now accepts the "rows" option to return the number of rows in an array, the "cols" option to return the number of columns in an array and the "updated?" option, which returns nonzero if values in a shared array have been modified by spec or a cooperating external process. In addition, the "?" option lists whats options are available.

EPICS Motor Enhancements

There are now two kinds of EPICS motors available, selected as either EPICS_M1 or EPICS_M2 in the configuration file. The first is for spec-configured motors, where the motor parameters is the spec configuration file are written to the EPICS data base. The second is for EPICS-configured motors, where spec obtains the initial motor parameters from the EPICS data base. In either case, parameter values set using motor_par() while spec is running will be set in the EPICS data base. For EPICS_M2 motors, position discrepancies between spec and the EPICS data base will be always resolved in favor of EPICS. Also, the unit/channel configuration feature is now available for EPICS motors.

OMS PC-58 Motor Controller Now Supported

The Oregon Micro Systems Model PC-58 motor controller is now supported on linux platforms and in driverless mode only. Both the I/O-port address and memory-map address must be set in the configuration file to agree with the board jumpers. The interrupt on the board should be disabled.

Memory-Map Address Configurable For PC Boards

For PC boards requiring both a memory-map address and an I/O port address in their configuration (such as the Bit-3 Model 403 VME controller and the OMS PC-58 motor controller on linux platforms), the configuration editor now allows entry of the memory-mapping address in hexadecimal in the DEVICE column.

RELEASE 4.01.07 BETA

No notes.

RELEASE 4.01.06 BETA

No notes.

RELEASE 4.01.05 BETA

These notes summarize the cumulative changes made for spec release 4.01.05 BETA as of August 20, 1996.

Command Completion Available With GNU Readline Library

The command-completion feature of the GNU readline library is now enabled (if spec is linked with the GNU readline library). In this preliminary implementation, possible completions for the first word of a command are built-in keywords and macro names. Possible completions for subsequent words are filenames. The tab key is what is initially bound to the command-completion function.

Added Protection From State File Corruption

Previously, there was an opportunity for the state file to get corrupted on exiting, if a signal arrived at an indelicate time. Signals are now properly blocked during the save state that occurs when spec exits. The problem seemed to only show up when spec was run as the back end of a GUI program that sent redundant signals when terminating spec.

New FRESH Built-In Variable

A new built-in variable named FRESH exists. It has a nonzero value if spec was invoked with the -f (fresh start) flag or if a fresh start was forced by an incompatible state file version. The value is zero otherwise.

New cdef() Options

The chained-macro function cdef() now accepts two additional flags: cdef("name", "", key, "enable") and cdef("name", "", key, "disable"). The first case enables the parts of the chained macro name associated with key, while the second case disables those parts. If name is the null string "", then all chained macros that have parts associated with key will have those parts enabled or disabled.

New file_info() Built-In Function

A new file_info(file_name [, cmd]) built-in function provides most of the information available about a file or device available from the stat() system call. If invoked with only the first file_name argument, file_info() returns zero if the file exists and nonzero otherwise. If file_name is the string "?", the possible values for cmd are listed. See the funcs help file for more information.

More Attribute Control Strings For tty_cntl()

Attribute strings to set bold, blink, reverse-video and underline mode are now available with the tty_cntl() function. See the funcs help file for more information.

tty_move() Parses New Attribute Escape Strings

New attribute escape sequences have been introduced to simplify designing text screens in spec. The syntax of the sequence is "\[xx]" where xx is one of the two-character control strings recognized by the tty_cntl() function, such as cl to clear the screen or so to start stand-out mode. Presently, only the tty_move() function recognizes these sequences. Adapting the tty_fmt() function to parse the strings is in progress.

Change In Parsing Of \[

To accommodate the "\[xx]" escape sequences, a backslash preceding a left square bracket is now passed through the lexical analyzer.

New Var in  Array Syntax

A syntactical feature for associative arrays (forms of which are available in the standard awk and gawk utilities) is now available in spec. Namely the construction

if (var in assoc_array) {
             ...
}

will evaluate true or false depending on whether the associative array assoc_array contains an element with index var. In addition, the construction

for (var in assoc_array) {
           print assoc_array[var]
}

will run through each element of the associative array assoc_array assigning to var the string value of the index of each element. Note, though, the order in which the elements are assigned is indeterminate and not constant.

New delete Keyword For Associative Arrays

Individual elements of associative arrays may be removed using the new delete keyword, as in

delete misc["foo"]

New array_op() Commands

New commands are available for array_op() to determine whether the array is in shared memory and the number of rows or columns in the array. In addition, array_op("?") lists the possible operations.

New Facility To Read and Write Binary Data

The new fmt_read() and fmt_write() functions are available for reading and writing the new array data type from and to binary files. A variety of binary formats will be supported, and there will be provisions for users to modify existing or add new formats. The facility includes provisions for reading and writing file header information.

String-Array Data Type Introduced

Preliminary implementation of a string-array data type in available. Each row of the array can contain one string. The array must be dimensioned with enough columns to accommodate of the strings anticipated. spec will allocate one extra byte per row to make sure the strings are null terminated.

New image_par() Options

The image_par() function now takes two new options. With the "auto_run" mode turned on, image devices will be started and stopped with spec's built-in counting functions. With the "soft_preset" mode in effect, when in "auto_run" mode, the image device is programmed with the count time passed to spec's counting function. Otherwise, the device is started and stopped when the configured timer starts and stops.

A config_mac Macro Will Be Run After reconfig

If a macro named config_mac is defined, it will be run automatically after reading the hardware configuration file on program startup and after the reconfig command (run from the standard config macro).

No More Unwanted Files Named pipe

Previously the special output file name "pipe" was only special when spec was invoked with the -p flag. At sites where spec is sometimes used with the -p flag, macros that opened "pipe" would leave files named pipe lying about when spec wasn't invoked with the -p flag. Now, the output file name "pipe" is always special. When not invoked with the -p flag, spec ignores commands to send output to "pipe".

Shared Arrays Now Readable By All

The shared-data segment used by the shared arrays is now created with permissions set to allow any user to read the data.

More Robust Method Of Storing Miscellaneous State Parameters

The method for saving certain miscellaneous items in the state file, such as the spec_par() and plot_cntl() options and various hardware parameters, has been improved. Previously relinking spec would generally cause the saved values of the parameters to be lost.

More Robust Handling Of Missing Settings File

Previously, if the motor settings file was missing or empty, spec would automatically switch to simulate mode. That behavior has been changed. Although a missing settings file indicates some sort of administrative or system problem, users have indicated they would prefer spec not to switch to simulate mode, so that they can run the config macro to change the motor settings.

ESRF MCA Start/Stop Functions Enhanced

No text.

Princeton Instruments CCD Support Enhanced

No text.

ESRF MAXE Bug Fixed

A bug relating to using the ESRF MAXE motor controller with the unit/channel configuration, whereby it was possible for the wrong motor to move, has been fixed.

OMS Limit Bug Fixed

An old bug, where motors controlled by any of the supported Oregon Micro Systems motor controllers couldn't be moved off of a limit switch, has been fixed.

Fix for PI Motor Controller

A bug, where use of a too-small buffer for reading a reply from the Physik Instrumente C-804 DC motor controller caused various problems elsewhere in spec, has been fixed.

Unit/Channel Configuration For the E500 Fixed

Bugs in the new unit/channel configuration option for the DSP E500 CAMAC motor controllers have been fixed.

Fix For the Newport MM2000 PC Board Motor Controller

A recently introduced bug that prevented the PC board version of the Newport MM2000 motor controller from working at all has been fixed.

Fixes For the Huber 9000 Motor Controller

Two bugs relating to the Huber SMC 9000 stepping motor controller have been fixed. Step sizes other than 1000 steps per degree are now allowed. A truncation error that sometimes occurred on reading the motor position has been corrected.

RELEASE 4.01.04 BETA

These notes summarize the cumulative changes made for spec release 4.01.04 BETA as of July 17, 1996.

NEW DEVELOPMENTS

The following are new developments for release 4.

Input Push Back Handling Improved

The code that handles the macro expansion has been brought into the modern era. Previously, a temporary file was used to handle very large macro expansion. Now expansion is handled entirely in dynamically allocated memory. The new scheme is more efficient, and allows clear macro debugging messages.

Revised Macro Debugging Format

The output format for macro debugging (DEBUG=256) has been redone.

Source Code Control Introduced

The source code for spec release 4 is now under source code control. Such a change won't mean much to the user, but it does indicate we are getting serious about this release.

CAMAC Driver Ported to linux

The CSS CAMAC driver for the DSP 6001/2 with PC 004 CAMAC controller is now available on linux. See the drivers/README file for more information.

PARALLEL CHANGES FROM RELEASE 3

Special Check For an xterm by edconf

On some platforms, the curses library calls made from the edconf configuration editor from an xterm window caused strange characters to appear on the screen. That problem has been fixed.

show.awk Bug Fixed

A bug in the show.awk script, where there wasn't a pause when there were less than twelve plots on the last page when the -w (wait) flag was used, has been fixed.

Princeton Applied Research 283 Device Supported

Preliminary (and only partial) support for the Princeton Applied Research Model 283 Potentiostat/Galvanostat is available.

Anorad Motor Controllers Supported

Preliminary support for the Anorad I-Series motors controllers is available.

KS 3988 GPIB-To-CAMAC Bug Fixed

A recently introduced bug in the presence test for the Kinetic Systems 3988 GPIB-To-CAMAC controllers has been fixed.

RELEASE 4 - text in preparation

These notes describe the general features added to spec for release 4.

Introduction

spec release 4 has been in the works for many months. It includes many new features to make the program easier to use and to support new hardware devices. One of the main reasons for the new release is to accommodate two-dimensional detectors. To that end, a new array data type has been added, along with functions and operators to work on the arrays.

Preliminary support for a number of CCD cameras is already available, including models from Princeton Instruments and Photometrics.

Descriptions of the new features in release 4 follow.

New Macro Functions

Macro function are now available. Macros can now be defined to return values and can be used as operands in expressions. The macro definition can include function arguments, which then become available to the body of the macro function. For example,

def factorial(n) '{
        if (n <= 1)
                return(1);
        return(n * factorial(n-1))
}'

New Array Data Type

A new type of data array has been created. Besides eventually replacing the never-popular data groups in the standard macros, the new arrays add new capabilities to spec. Unlike spec's traditional associative arrays, which can be indexed by arbitrary numbers or strings and which store elements in no particular order and not particularly efficiently, the new array data types are indexed by consecutive integers starting from zero and store data in contiguous memory, allowing efficient access. The new arrays must be declared and dimensioned with the new array keyword to allow spec to allocate memory for the array and to distinguish the new arrays from the associative arrays. See the arrays help file for detailed information.

New CCD Camera Support

Support for image acquisition using CCD cameras is now part of spec. Currently hardware support is available for a Photometrics model on an HP 700 platform, several Princeton Instruments models on Sun platforms using an S-Bus SDV interface card and for the ESRF Frelon camera over several interfaces. Support for additional cameras will be added as user needs are made known to CSS.

The image_get(), image_put() and image_par() functions are available for reading the image and controlling the hardware. Also, the new functions fmt_write() and fmt_read() allow the array data from the CCD cameras to be written to and read from binary data files.

New Password Protection For Designated Motors

A new option to the spec_par() function allows spec administrators to gain access to motors locked out in the config file to ordinary users. This features allows the administrator to position the motors without having first to go into the configuration editor to change access modes. Entering spec_par("specwiz", 1) causes spec to prompt for the "Wizard's password". If entered correctly, the characters _WIZ are appended to the prompt to remind the user of the special powers, and motors configured with protected status can be moved. Entering spec_par("specwiz", 0) disables the special mode. The encrypted specwiz password is taken from the /etc/passwd file, just as with the specwiz feature for the configuration editor.

New srand() Function

The new function srand(value) sets the seed value for the random number generator used by the rand() function to the integer value. This feature allows the same sequence of random numbers to be generated reproducibly by resetting the seed to the same value.

whatis() Function Enhanced

The whatis() function now produces a text description of the object specified by its first argument, if a second nonzero argument is supplied. The whats macro takes advantage of the new syntax.

New MCA Features

mca_par("disable")
mca_get(array)
mca_put(array)
mca_spar(), mca_sput(), mca_sget()
numbering is fixed in config file with @
numbering needn't be consecutive
mca_sel("?")
ROI support

PCA-II, PCA-3, PCA Multiport implements array get/put

Can Dynamically Assign Monitor Channel

For certain counters, the scaler channel used for the monitor preset can be changed using the command counter_par(mne, "monitor"). Counters that currently support this feature are the KS 3640 CAMAC counter, the Joerger VSC16/8 VME scaler and the generic EPICS scaler.

Unlimited String Length For printf() Family

There is no longer a limit to the lengths of strings that can be printed or formatted using the print, printf(), sprintf() and fprintf() functions.

ser_get(), ser_put() Revised

The ser_get() function has been revised, rationalized ser_par(sel, "timeout")

Macro Facility Internals Rewritten

The internal code for handling macros has been entirely rewritten. Also, the internal copies of the macros are now saved in the same file with the other state information. There are no more userfiles/user_tty#M in the auxiliary file directory

New Version of GNU Readline Library Bundled

A newer version of the GNU readline library is now bundled with spec.

Obsolete Functions and Commands Are Gone

The long-obsolete fixstate and getstate commands are gone (although the once-related savstate command still exists). The obsolete functions pl_xget(), pl_yget(), pl_put(), pl_anal(), pl_dump() and plot_pts() have been eliminated from the program, although, for the sake of way-backwards compatibility, the file macros/compat.mac contains replacement definitions for the functions.

New Hardware Support

Highland Tech VME HLV 544 motor controller

BI9000 correlator support

Many improvements to ESRF support

new config screen for MCA/CCD

other config changes ....

RELEASE 3.03.26

These notes summarize the cumulative changes made for spec release 3.03.26 as of May 27, 1996.

Default Hardware Poll Interval Changed From 40 To 10 msec

The hardware poll interval, used with non-interrupt driven devices, has been changed from 40 to 10 milliseconds. The value can be changed using

spec_par("hdw_poll_interval", msec)

where msec is the poll interval in milliseconds. The function spec_par("hdw_poll_interval") returns the current value. Note that the actual interval may vary. Most platforms have a resolution of only ten milliseconds in the system clock, and different platforms round msec up or down.

Improvements For the Microcontrole ITL09 Motor Controller

A number of improvements have been made for the Microcontrole ITL09 motor controller. In particular, the nonconsecutive unit/channel numbering feature of the configuration editor is now supported for this controller.

Support For Newport Model MM2500 and MM4000 Controllers Added

The Newport Model MM2500 and MM4000 motor controllers are now supported by spec.

MMC32 Delay Is Now Configurable

The sleep delay inserted after each command sent to the NSLS MMC32 motor controller is now user configurable. Use

motor_par(mne, "delay",  msec)

where mne is the mnemonic of any motor controlled by the MMC32 and msec is the delay time in milliseconds. The delay affects all motors controlled by the MMC32. The default value is 100 msec.

RELEASE 3.03.25

These notes summarize the cumulative changes made for spec release 3.03.25 as of May 7, 1996.

The twoc Code Has Been Revised

The geometry code and macros for the two-circle diffractometer have been rewritten to use an orientation matrix and to allow least squares refinement of the lattice parameters. The setlat and setrlat macros are used to set the direct or reciprocal lattice parameters. The or0 and setor0 macros are used to set the orientation reflection. The reflex_beg, reflex_end and reflex macros are used to save reflections used to refine the lattice parameters, in the same way as described in the Four-Circle Reference. The ALPHA and BETA parameters have been eliminated. Note, if you desire, the previous version of twoc can be installed by selecting twoc_old from the installation menu. Be sure to start fresh the first time running the new version of twoc.

New .Xdefaults Option For Size Of Plot Points

You can now choose among several pixel patterns for drawing the smallest points on the spec X11 high-resolution plots. The selection is made in the .Xdefaults resource file. See the explanation of the DotSize resource in the x11 help file for details.

No CAMAC Z Issued On Startup With DSP 6001 In Driverless Mode

By user request, spec no longer issues the CAMAC Z crate initialization command on startup when using the DSP 6001/2 CAMAC crate controller in driverless mode. (With the CSS driver, whether the automatic Z is issued is determined by a driver-installation option.) The function ca_cntl("Z") can always be issued at the spec prompt to initialize the crate, if necessary.

Small Change In count_em Macro

The COUNT_TIME variable is now set to the current count time before (instead of after) the call of the user_precount macro in the count_em macro that is called by all the standard counting macros.

RELEASE 3.03.24

These notes summarize the cumulative changes made for spec release 3.03.24 as of April 1, 1996.

Improvements For Newport MM2000 and MM3000 Motor Controllers

A number of improvements have been made for the Newport (formerly Klinger) MM2000 motor controller. The nonconsecutive unit/channel numbering feature of the configuration editor is supported for this controller. Also, serial-interface daisy-chaining is now supported. The Newport MM3000 model has firmware compatible with the MM2000, so is also now supported by spec.

Improvements For Huber SMC 9000 Motor Controller

The nonconsecutive unit/channel numbering feature of the configuration editor is now supported for the Huber SMC 9000 motor controller. spec now allows more than one of these controllers to be configured. In addition, the error checking has been improved, although the nature of the controller makes the potential for recovery after a communications error unlikely. In addition, a command pass through capability is now available using

motor_par(mne, "send",  cmd)

to send the command cmd to the controller and

motor_par(mne, "read",  cmd)

to send the command cmd and return as a string an expected reply. The motor mnemonic argument mne only serves to select which controller to use. Unlike the implementation for other controllers, the motor number must be explicitly included in the user message for the Huber SMC 9000. For example,

motor_par(tth, "send", "BEEPOFF")

results in the string "BEEPOFF;\r\n" being sent to the controller associated with the tth motor.

Pseudomotor chg_dial() Bug Fixed

A bug, where the chg_dial() function (as used by the set_dial macro), didn't work properly for pseudomotors or any motor with NONE as controller in the config file, has been fixed.

Bug Fix For Alternate Command-Line History

A bug, where the number of commands saved in the run-time history list was not limited when using the optional, alternate command-line history library, has been fixed. The run-time history is now limited to 1,000 commands, just as is the history saved in the state file.

RELEASE 3.03.23

These notes summarize the cumulative changes made for spec release 3.03.23 as of March 13, 1996.

New Site-Dependent Install Parameters

The spec Install program now prompts for additional parameters for site-dependent compiler flags, site-dependent object modules and site-dependent libraries.

Experimental User-Configurable Pseudomotor Code

Files dealing with an experimental, user-configurable, compile-time pseudomotor capability are included in this distribution. Consult CSS before attempting to use.

RELEASE 3.03.22 - Several Portability Fixes

March 5, 1996: Several minor changes have been made for portability considerations.

RELEASE 3.03.21 - Bug In edconf Wizard-Mode Fixed

February 21, 1996: A bug, where the optional motor parameters could not be read in on wizard-mode protected motors, has been fixed.

RELEASE 3.03.20

These notes summarize the cumulative changes made for spec release 3.03.20 as of February 13, 1996.

Code For CAMAC Kinetic Systems 3640 Counter/Timer Overhauled

Problems with the software handling of the custom hardware gating on the Kinetic Systems 3640 CAMAC counter/timer, as used at CHESS (and elsewhere), have been fixed.

New motor_par() Option for ESRF Maxe Motor Device Server

The new motor_par() option,

motor_par(mne, "get_pars")

reads the current base rate, acceleration and slew rate parameters from the ESRF Maxe device server and updates the values that will be returned by motor_par() with the "base_rate", "acceleration" and "velocity" arguments.

RELEASE 3.03.19

These notes summarize the cumulative changes made for spec release 3.03.19 as of February 1, 1996.

Improvements To the chelp Stand-Alone Help Viewer

The stand-alone spec help file viewer chelp will now use the same rules as spec for selecting the auxiliary file directory. A .BI -D " directory" option will override a SPECD environment variable, and the environment variable will override the compiled-in default. Also, chelp has been fixed to no longer change tty terminal modes if the standard output is not a tty, such as when the output of chelp is piped through a standard file browser such as more or less.

Wizard-Mode edconf Bug Fixed

A bug, whereby optional motor parameters (from the edconf m screens) would not be read in by edconf for motors with wizard-level protection, has been fixed.

RELEASE 3.03.18

These notes summarize the cumulative changes made for spec release 3.03.18 as of January 19, 1996.

DISPLAY Can Now Be Assigned and Exported

spec now includes DISPLAY as one of its built-in variables. The environment variable DISPLAY is used by X Window clients to figure out on which host to run. On startup, spec will set the value of DISPLAY from the environment variable. If DISPLAY is not set in the environment, the value saved in the user's state file will be used. The value of DISPLAY can be changed while running spec, and the current value will be exported to new x11filt processes as they are spawned. For example,

DISPLAY="host1:0"; plot_cntl("filter1,open")
DISPLAY="host2:0"; plot_cntl("filter2,open")

will create plot windows on two different hosts.

Argument Restrictions For chg_dial(), gpib_get() and ser_get Eased

Previously, when string values were needed for the second argument of the chg_dial(), gpib_get() or ser_get() functions, the argument had to be in the form of literal string constant. Now, a string-valued variable can be used. To call gpib_get() or ser_get() with an end-of-string delimiter that starts with a number, use a string constant.

Keithley-Metrabyte CTM-10 Fully Supported

The second AMD Am9513 counter chip on the Keithley-Metrabyte CTM-10 PC timer/counter board can now be accessed from spec. In the configuration file, select the Metrabyte or Labmaster PC Board device as for the CTM-05 board, but configure it for five channels. With the CTM-10, two additional 32-bit scaler channels are available. In addition to the jumpers need for the CTM-05 board, you must also connect output 1 of the first chip to gates 2 and 4 of the second chip. The additional scaler channels should be connected to the source 3 and source 5 inputs of the second chip.

Initialization Problem with Nucleus PCA-3 Fixed

spec now includes a longer delay (1 second) after resetting the Nucleus PCA-3 board during hardware initialization to give the board time to become responsive to commands issued from spec.

Either Compumotor 4000 Serial Port Can Now Be Used

The Compumotor 4000 motor controller has two serial ports. Previously, port 1 had to be used with spec. Now either port can be used. As this motor controller is so little used, the change in the configuration file to select among the two ports is not backwards compatible.

EPICS Motor Control Improvements

A number of changes have been made in the support for the EPICS motor driver as used at APS. The DMOV record is now monitored for motor status, rather than MOVN. The automatic backlash capabilities in the driver are now used. spec now also loads the values for base rate and backlash steps from spec's configuration file into the EPICS data base, along with the other motor parameters such as steady-state speed and acceleration.

RELEASE 3.03.17

These notes summarize the cumulative changes made for spec release 3.03.17 as of January 9, 1996.

New Startup Option To Set spec_par() Parameters

The parameters available through the spec_par() function can now also be set on the command line when spec is invoked using a -o par=value syntax. For example,

fourc -o auto_file_close=2 -o check_file_names=no

turns on the option to close idle output files after two hours and turns off the option to check output file names for nonstandard and unprintable characters. In the future, spec_par()-type options may may be introduced that must be set on the command line as they relate to initialization actions taken before the first prompt is issued.

Bug In SunOS 4.x Support Of KS-3929 SCSI-CAMAC Code Fixed

A bug, introduced in the Sun platform support for the Kinetic Systems 3929 SCSI-CAMAC controller in spec release 2.02.01 (when the HP platform support was added), which sometimes made spec unusable with that module on the Sun platform has been fixed. Also, crate inhibit is now automatically cleared when spec initializes the 3929 on the Sun platforms (as spec already does for the 3929 on the HP platform).

Bug In Setting CAMAC Inhibit Fixed

A bug, where trying to set CAMAC crate inhibit using the command ca_cntl("inhibit", 1), was both ineffective and also led to segmentation violations on some platforms, has been fixed.

RELEASE 3.03.16 - PCA-II Driver For linux Available

December 17, 1995: spec now supports operation of the Nucleus PCA-II MCA card in live-time mode on linux systems with a CSS-provided loadable-module driver. The driver is installed with the install_pca script in the drivers subdirectory of the spec distribution. The interrupt number and base address, as set by the dip switches on the PCA-II board, should be specified when installing the driver if they differ from the defaults. See the README file in the drivers directory for further information on installing the driver. See the pca help file for important information on the need to replace a resistor on the PCA-II board for interrupts to work with certain PC motherboards. (Note, if you are using the CSS PCA driver on System V/386-type UNIX platforms, you must install the new version of the driver for use with this and subsequent spec releases due to a small, but incompatible change made in the driver to accommodate linux.)

RELEASE 3.03.15

These notes summarize the cumulative changes made for spec release 3.03.15 as of November 28, 1995.

New Auto-Close Option For spec Output Files

A new option is available to automatically close output files that haven't been accessed for some interval of time. Calling

spec_par("auto_file_close", hours)

sets the interval to hours, which can have a non-integral value. When the auto-close option is enabled, each time an on(), off(), open(), close() or fprintf() function is called, spec will check its list of opened output files. Any files which have not been written to for the length of time given by hours will be closed. Enabling this option can help prevent errors when your macros or commands do not close files when appropriate, resulting in spec running out of resources to open additional files. As files are opened automatically when sent output, auto-close mode operates transparently for the most part. However, if you change to a different working directory between the time the file is first opened and subsequently automatically closed, and if the file is not opened by an absolute path name, the next time you refer to the file, spec will reopen it using a relative path based on the current directory. Calling spec_par("auto_file_close", 0) disables the mode. By default, the mode is initially disabled.

New plot_cntl() Option To Set X11 Window Geometry

The option plot_cntl("geometry=string"), is now available. With the x11 high-resolution plot windows only, this function sets the size and position of the window. The format of the geometry string is the same as expected by standard X windows applications, as in

plot_cntl("geometry=512x380-0+10")

As with the conventional syntax, not all parts of the geometry string are required.

New showscans Options

The showscans utility, which makes twelve mini-plots per page of a spec data file using C-PLOT, has two new options. The new -w option will cause C-PLOT to wait for a <return> from the keyboard after each page is displayed. (This option should not be used when sending the output to a printer.) The new -x option is a shorthand for the options -zi "x11 -rotate" -w, which are the best options to use to interactively view showscans results on an X windows display.

Improved Debugging For ESRF Device Servers

The debugging messages printed for all spec calls of the dev_putget() routine, used to access the ESRF device servers, now show the command name and the values of the input and output arguments in a consistent format. These messages are displayed when hardware debugging is enabled by including bit 0x40 (64) in the value assigned to the built-in variable DEBUG.

RELEASE 3.03.14

These notes summarize the cumulative changes made for spec release 3.03.14 as of November 16, 1995.

Easier-To-Use Choice Menus For Configuration Editor

The configuration editor edconf now displays all the choices for such things as motor-controller type and serial-device baud rates in a menu box. The up and down or <> keys can be used to select among the choice items.

New Invocation Options For Configuration Editor

The configuration editor edconf takes two new options. The -D specdir option can be used to specify the spec auxiliary file directory. The -g geo option can be used to specify the geometry to be edited if the multiple geometry feature (selected using the GEO# keywords in the config file) is enabled. For example,

edconf -D /usr/local/lib/spec.d -g fourc spec

will edit the configuration file in the directory /usr/local/lib/spec.d/spec, and while in the configuration editor, the G command will toggle between displaying all motors and only those associated with the fourc geometry group.

New -g geo Flag

spec can now be invoked with a -g geo flag to force loading of macro files and activation of geometry calculations for a particular geometry such as fourc, surf or kappa while using the configuration files taken from the name by which spec is invoked. For example,

spec -g fourc

will use the configuration files from the SPECD/spec directory but will operate in four-circle mode.

Alarms Blocked During Critical Code When Using Software Timer

The SIGALRM signal, used by the software timer in spec, is now blocked during critical code, such as during the RPC calls used by the ESRF device server libraries, to prevent those calls from being interrupted and generating error returns.

Minor Bug Relating to Text Output Fixed

A bug in the implementation of the unlimited length output strings introduced in release 3.03.10 has been fixed. A manifestation of the bug was that when spec debugging was turned on and used with a debugging log file, some messages generated by the print command would not appear on the screen.

Bug In Data-Pipe Installation Fixed

An error in a Makefile in release 3.03.11 that generated an error message during spec installation when copying the dpmake utility has been fixed.

RELEASE 3.03.13

These notes summarize the cumulative changes made for spec release 3.03.13 as of October 19, 1995.

More Significant Digits For Motors In Data File

The _ascan, mesh and Escan standard macros have been changed to write up to eight significant digits of the positions of the scanned motors to the data file. The _head macro has also been changed to write up to eight significant digits of the positions of all the motors in the standard scan header. Previously, the maximum number of significant digits was six. However, when spec calculates motor positions, it rounds the calculated value to the motor step size. Thus for most motors, there will be no visible change in the data files.

Support For Bit 3 Model 403 ISA-To-VME Controller On linux

spec now has direct support for VME devices using the Bit 3 Model 403 ISA bus to VME bus adapter. Currently, this support is only available under linux. Support on the HP 700 platforms with E/ISA bus will be added shortly. As for VME devices, spec currently supports the Mizar 8310 VME counting module and the Oregon Micro Systems VME8 motor controller module. Support for the Joerger Model VSC8 8-channel scaler and the Highland V540 micro-stepping controller will be added shortly.

Linux I/O Port Access Checks For CSS Kernel Patch

CSS provides a kernel patch for linux that allows non-root users access to I/O ports for hardware control. Previously, if spec was run without the patch by a non-root user, spec would die from a segmentation violation at the first attempt at accessing an I/O port. Now, spec will print a message that the I/O ports are unavailable and suggest the kernel patch be installed.

Support For Simultaneous HP and IOtech SICL GPIB

The CSS-modified IOtech SICL GPIB library introduced in spec release 3.03.01 is now available and supported in spec in a version with with SICL function names that occupy a different name space from the standard SICL library. This changes allows, for example, both an HP SICL library and the CSS-modified library to be linked into the same spec executable. The disjoint name-space version is selected in the .i config file with the keyword PC_IOTSICL_H (PC_IOTSICL_H_L for the shared version). From the configuration editor, select the "IOtech SCSI GPIB (ESRFized)" GPIB device.

RELEASE 3.03.12

These notes summarize the cumulative changes made for spec release 3.03.12 as of October 10, 1995.

GTERM Defaults To "x11"

spec now sets the GTERM environment variable to "x11" by default if the variable is unset in the environment.

New Clean-and-Fresh Flag -F

A new -F command line argument not only starts spec fresh (as with the -f flag) but also disables the reading of all startup macro files. This flag can be of use to front-end programs that want to ensure which macros are defined by explicitly specifying macro files to be read.

config-File Motor Flags Saved In Hex

The flags column for motors in the hardware config file is now saved in hexadecimal in order to make it easier to interrupt geometry assignments in linked geometry configurations when viewing the config file directly.

Klinger Motion-Master Doesn't sync Motors Before Move

spec no longer performs automatic synchronization of hardware registers and software positions before each move for motors controlled by the Klinger Motion Master 2000. This change apparently solves some problems reported by users.

Support For HP E2050 LAN/HP-IB Gateway

spec now recognizes the HP E2050 LAN/HP-IB Gateway device. The config file entry for the device name, which is used as the argument to the SICL iopen() subroutine, must have the format

lan[hostname]:interface

where lan is the symbolic name for the device set in the /usr/pil/etc/hwconfig.hw file, hostname is the host name or IP address of the gateway and interface is host-name parameter in the gateway on-board configuration (set via telnet to the gateway).

Support For Bi Ra 5302 64-Channel ADC as Counters

spec now supports the Bi Ra Model 5302 ADC CAMAC module. This module allows up to 64 analog inputs. spec treats each channel as a counter, so each channel should be configured on the configuration editor scaler screen. The value entered for the scale factor is interpreted as the channel gain. The ADC conversions are performed on the getcounts command.

Bug Fixed in data_pipe() Overhead Code

A bug in the data_pipe.o overhead function where the user-callable function get_input_data() transferred the number of data points, rather than the number of points times the number of elements for double-sized spec data, has been fixed.

RELEASE 3.03.11 - data_pipe() Beta Release

August 7, 1995: The data_pipe() facility is now in beta release. This facility allows integration of external programs with spec, somewhat along the lines of C-PLOT user functions. See the data_pipe help file for detailed information.

RELEASE 3.03.10

These notes summarize the cumulative changes made for spec release 3.03.10 as of July 29, 1995.

Unlimited Length For Input Strings

Previously, string constants in spec were limited to 8,192 bytes. That limit has been removed. spec now allocates memory for strings as needed.

Unlimited Length Strings For printf()

Previously, the length of the result of a printf(), fprintf() or sprintf() was limited to 8,192 bytes. That limit has been removed.

Unlimited Length Macros

Previously, the length of macro definitions was limited to 8,064 bytes. Macros may now be as long as one desires.

Input Push-Back Space Increased

The size of the input push-back space has been doubled from 65,536 to 131,072 bytes. The input push-back space holds macro expansion text, so does effectively limit the maximum length of a macro.

More Format Specifiers Recognized By printf()

The printf() function now recognizes the %X, %E, %G, %i, %b and %p format specifiers if they are recognized by the underlying C library version of printf().

Better Checking For port_getw() and port_putw()

Previously, the 16-bit PC I/O port access functions port_putw() and port_getw() did not check if the high-byte port was included in the config file I/O port configuration. In the configuration file, the number of consecutive addresses to be enabled is in terms of 8-bit addresses. If the high-byte port was not configured, spec would not have enabled access to the high-byte port, and a port_getw() or port_putw() call would result in spec terminating with a segmentation violation. spec now prints an error message and resets to command level if access is attempted without proper configuration.

X11 Geometry Parsing Fixed

A bug, where the X11 high-resolution graphics filter didn't treat negative values for the x and y position in the geometry string correctly, has been fixed. A negative value for x or y, including the value -0, now specifies the position of the right side of the X11 window relative to right side of the root window, as is the usual convention.

RELEASE 3.03.09

These notes summarize the cumulative changes made for spec release 3.03.09 as of July 8, 1995.

More Simultaneous High-Resolution Plots

The number of allowed simultaneous high-resolution plot-filter processes has been increased from two to five. The functions plot_cntl("filter1") through plot_cntl("filter5") select the active filter.

New plot_cntl() Option To Set X11 Window Title

The option plot_cntl("title=string"), is now available. With the x11 high-resolution plot windows, the title given by string is used in the XSetWindowProperties() call to set the window and icon labels. On most X11 window managers, that means the title will appear in the window's title bar.

EPICS Support On Linux Platforms Now Available

spec is now working with EPICS (Release 3.12.13Beta) on linux platforms. When installing spec, select the epics_linux target.

Install Script Now Prompts For EPICS or ESRF Directories

When installing spec on platforms that use the ESRF device servers or the EPICS channel access libraries, the installation script will now prompt for the directory that contains the appropriate libraries. Previously, the installation "makefile" used the names ./dserver for the ESRF platforms and ./epics for the EPICS platforms, and the local spec administrator was responsible for making those names symbolic links to the correct directories.

Obscure Macro Bug Fixed

A fairly old bug that caused the wrong definition to be returned for the first macro defined after starting fresh has been fixed. The bug was most often manifested by the repeated message cleanup:  undefined appearing when starting fresh when there was an error in the startup macro files.

RELEASE 3.03.08 - Fixes For SGI Platforms

June 28, 1995: This release includes fixes to restore spec source code portability to Silicon Graphics platforms.

RELEASE 3.03.07 - Kappa Geometry Improvements

June 27, 1995: spec now supports a vertical configuration of the kappa diffractometer. The new setvmode macro (from the kappa.src macro file) can be used to enable the vertical configuration features in the geo_kappa.c source file.

RELEASE 3.03.06

These notes summarize the cumulative changes made for spec release 3.03.06 as of June 18, 1995.

Support For Heidenhain Encoders on MCU-2

spec now supports the MCU-2 motor controllers that have been specially modified to read Heidenhain absolute encoders. Select the MCU_H motor controller type on the motor screen of the configuration editor and enter a value for the "encoder steps per deg/mm" parameter on the motor parameter screen when using that hardware combination.

Bug In PCA-3/Multiport Code Fixed

A recently introduced bug (12/94) in the code for the Nucleus PCA-3 and Multiport devices that prevented the offset parameter to be set to zero using motor_par() has been fixed.

RELEASE 3.03.05

These notes summarize the cumulative changes made for spec release 3.03.05 as of June 11, 1995.

New VERSION Built-in Variable

A new read-only built-in variable VERSION contains the current spec version number.

Allow Multiple CAMAC QS-450 Quad Scalers

spec now allows more than one CAMAC DSP QS-450 Quad Scalers to be used at the same time.

RELEASE 3.03.04

These notes summarize the cumulative changes made for spec release 3.03.04 as of May 30, 1995.

Hardware Poll Interval Is Now Adjustable

When the wait() function is called to wait for polled motors, timers or other acquisition devices to finish, spec sleeps for a small interval between each check of the hardware. Previously, that interval was built into the code and set (in recent releases) to 40 msec. That sleep time can now be changed using the new "hdw_poll_interval" parameter to the spec_par() function. The units of the parameter are milliseconds. The default value is 40 msec. A value of zero is allowed, though not recommended if the computer is being used for anything else.

RELEASE 3.03.03

These notes summarize the cumulative changes made for spec release 3.03.03 as of May 28, 1995.

New Omega-Type Four-Circle Diffractometer

The four-circle geometry code and macros have been modified to work with an omega-type four-circle diffractometer. With this diffractometer, the theta and two-theta circles are mechanically coupled, such that the when the two-theta circle is moved, the theta circle moves half the distance. The theta circle can also be moved independently of two-theta. This configuration corresponds to replacing the independent theta motion with an omega = theta - two-theta/2 motion. If there is a motor with the mnemonic th in the config file, spec assumes a standard four-circle diffractometer. If there is no th motor, but if there is a motor configured with the mnemonic om, spec assumes the omega-type configuration. The fourc.src macro file should be reread after changing the configuration. One can start fresh or type newmac to do that.

RELEASE 3.03.01

These notes summarize the cumulative changes made for spec release 3.03.01 as of May 24, 1995.

New Option To Change Step Size With motor_par()

For the rare circumstances where it may be necessary, spec now allows the motor step-size parameter to be changed using

motor_par(mne, "step_size",  value)

Since such changes should not be undertaken lightly, spec requires they be explicitly enabled using

spec_par("modify_step_size", 1)

Rereading the config file resets the step size parameter to the value in the config file.

No-Echo Option With -p

If the file descriptor argument to spec's -p startup option is zero, spec will not echo text received from that file descriptor to the standard output, as was the case previously. (The -p option is used by GUI-type programs that invoke spec as child process.)

New Continued-Lines Option With data_dump()

The optional argument fmt1 to the data_dump() function, which has the form "%#", and specifies how many data points (specified by the number #) are to be printed on each line, has a new option. If the number # is followed by the letter C, a backslash is added to each continued line, appropriate for saving MCA data in manageable length lines. New versions (since May 1, 1995) of the C-PLOT scans.4 user function interpret the continued lines correctly for MCA data.

Improvements To scans.4

The version of the scans.4 C-PLOT user function distributed in the spec aux directory has new features. In particular, there is no longer a compiled-in limit for the number of points that can be read as raw data or the number of scans that can be contained in one data file. Also, the data file syntax recognized by scans.4 has been expanded. Directives of more than one letter that begin with #@ are now recognized. New directives for reading MCA-type data have been added. See the spec scans help file for more information.

New motor_par() Options for OMS Controllers

A command pass through capability is now available for all versions of the OMS motor controller using

motor_par(mne, "send",  cmd)

to send the command cmd to the controller and

motor_par(mne, "read",  cmd)

to send the command cmd and return as a string an expected reply. For example,

print motor_par(tth, "read", "RP")
240000

results in the string "AX RP\n" being sent to the controller.

Bug With the Klinger MotionMaster 2000 Fixed

spec's code to support the Klinger MotionMaster 2000 motor controller was developed on units that did not have all four motor modules installed. It turns out that with all modules installed on the ISA bus version, spec must pause about half a second after sending the emergency stop character # (which it sends when initializing the board) before the board is able to communicate again. Such a pause is now part of the code.

New motor_par() Option for ACS MCU-2

On ACS MCU-2 motor controllers equipped with the option to read Heidenhain absolute encoders, the function

motor_par(mne, "encoder_position")

will return the current encoder position.

CSS-Modified Library Available For IOtech SCSI488/H

CSS now provides an alternative libsicl.a for use with the IOtech SCSI488/H SCSI-to-GPIB module on the HP 700 platform. This version doesn't require a daemon process, as does the IOtech version. Contact CSS to obtain this version of the library.

CAMAC Crate Sharing Available With KS 3929 on HP 700

When using the Kinetic Systems 3929 SCSI-to-CAMAC module on the HP 700 platform with the CSS-provided software interface, CSS now allows more than one version of spec to have access to the crate at a time.

Standalone Library For KS 3929 on HP 700

CSS has created a subroutine library for use with local programs that require access to the Kinetic Systems 3929 SCSI-to-CAMAC module on the HP 700. This library allows simultaneous access to the CAMAC crate by spec and the local programs. Contact CSS to obtain the library.

RELEASE 3.02.02

These notes summarize the cumulative changes made for spec release 3.02.02 as of April 4, 1995.

New getenv() Function

A new function getenv(s) returns the string value of the environment variable s.

edconf Asks To Confirm Rereading After Edits

The hardware configuration editor edconf now asks you to confirm whether you want to reread the starting or backup configurations (with the r or R commands) if you have made changes to the configuration before having saved them.

Help File Format Changes

The behavior of some of the formatting sequences used in the spec help files has been changed and some new sequences added. The changes allow HTML versions of the files to be created using nroff or GNU groff. See the comments in help/Makefile for information on that.

Escan Macro Change

The Escan macro, when used with the fixQ option, now takes extra measures to ensure that the position in reciprocal space does not drift.

newfile Macro Revision

The newfile macro now separates motor names by at least two spaces in the data file header.

New counter_par() Options

The counter_par() function now supports the following arguments for all controllers:

"unit"
returns the unit number of the indicated counter.
"channel"
returns the channel number of the indicated counter.
"responsive"
returns nonzero if the hardware appears to be working for the indicated counter.
"controller"
returns a string that indicates the controller type of the indicated counter.

New motor_par() Options

The motor_par() function now supports the following arguments for all controllers:

"unit"
returns the unit number of the indicated motor.
"channel"
returns the channel number of the indicated motor.
"responsive"
returns nonzero if the hardware appears to be working for the indicated motor.
"controller"
returns a string that indicates the controller type of the indicated motor.
"active"
returns nonzero if the indicated motor is currently moving.

National Instruments GPIB Support for linux

spec now supports the linux GPIB driver for the National Instruments AT-GPIB card. That driver is available via anonymous ftp from koala.chemie.fu-berlin.de.

CAMAC E500 Channel Multiplexor Improvements

The code for the E500 multiplexor has been changed to insure that the multiplexed motors are always restarted with consistent motor phases relative to the last move of the particular motor. In addition, if more than one multiplexed motor is commanded to move, each such motor will automatically be moved in sequence. The sequence is the order in which the motors are numbered in the config file.

cdef Bug fixed

A bug in the code that reads the portion of a user's state file that stores the cdef-type macros has been fixed. The bug could produce buffer overruns leading to unpredictable side affects.

New D32 Surface Geometry

A new surf_d32 configuration, as used at ESRF beamline D32, has been added.

RELEASE 3.02.01

These notes summarize the cumulative changes made for spec release 3.02.01 as of February 18, 1995.

Expanded Syntax for data_plot() and data_dump()

The element arguments to the data_plot() and data_dump() functions can now be combined in a single space- or comma-delimited string. This change will make a task such as creation of plotting macros to plot a variable numbers of curves in the same plot window easier.

Stand Alone Help File Viewer Now Included

The spec distribution now includes the stand alone CSS help file previewer chelp. This file will automatically be installed in the same directory as the other executables.

edconf Treats Change In Step Size Differently

Previously, changing the step-size parameter in the configuration editor caused the accumulator value to change to keep the motor positions fixed. Users have requested that the behavior be altered so that the accumulator would remain fixed, but the user and dial positions would scale with the change in the step size parameter. That change has been made.

More Efficient Output-File Flushing

Previously, spec flushed file output after each print-type command to an output file or device. spec users have reported that on certain platforms where the output was to an NFS-mounted file system, this frequent flushing introduced considerable delays. spec now performs flushing less frequently. A "flush_interval" parameter, that can be set by the spec_par() function, specifies how many seconds to allow between output buffer flushing. The default "flush_interval" is 0.5 seconds. If the interval is set to zero, the previous frequent-flushing behavior will be restored. Output to the screen is still flushed immediately. Output to other devices is also flushed each time the main spec prompt is issued.

Get Count Scale Factor

The function counter_par(mne, "scale") will return value of the scale factor set in the config file for the indicated counter.

New CAMAC ca_cntl() Function

A new function ca_cntl() allows users to perform CAMAC initialize, clear and inhibit crate operations from within spec on all CAMAC controllers supported by spec. Both ca_cntl("Z") and ca_cntl("init") issue the CAMAC Z (crate initialize) command. Both ca_cntl("C") and ca_cntl("clear") issue the CAMAC C (crate clear) command. The usage ca_cntl("inhibit", 1) sets crate inhibit, while ca_cntl("inhibit", 0) clears crate inhibit. During normal operation, users should not need to issue these commands. Users should probably issue a reconfig after sending a crate initialize or clear.

Increase In Number Of Devices That Can Be Configured

The configuration editor edconf now allows entry of up to twenty rows each of information for non-CAMAC motor controllers and timer/counter devices, MCA-type data acquisition devices, generic serial devices and PC I/O port addresses. The commands ^F and ^B select display of additional rows.

Optional Motor Configuration By Unit/Channel

The configuration editor now allows entering of unit/channel information for motors as an alternative to the automatic consecutive unit/channel assignment normally used. Note: at present, only selected motor controllers (E500, ESRF MAXE) in spec recognize unit/channel information. Unit/channel information, when used, must be enterned for all motors associated with a particular type of motor controller. Manual unit/channel numbering is turned on simply by entering values in the form unit/channel in an otherwise blank cells. Entering a single number changes just the channel number. Entering ^D turns off manual numbering. No consistency checking is done on the assignment in the configuration editor. spec does check for consistency when reading the config file, though. The config file uses the syntax

MOT012 = E500:0/3 ...

to store the unit/channel information.

New Motor Position Discrepancy Message (For Some)

A new motor-position discrepancy message has been deployed (currently for selected motor controls only). The new message gives hints to the appropriate course of action when motor position discrepancies arise. The new message is currently implemented for the following motor controllers: Oriel 18092, NSLS MMC32, Huber 9000, MicroControle ITL09, Klinger MM2000, NSK, PI, EPICS motors and ESRF motors. The rest of the motor controllers will be converted to the new message shortly.

Fixed Recursion Bug With Undefined cleanup Macro

A bug that under certain circumstances produced a continuous stream of cleanup: undefined messages has been fixed.

Memory Leaks Fixed

A couple of small memory leaks in spec have been fixed. Also, the memstat command now does a more complete job of memory accounting, including the addition of new categories for memory allocated by cdef() macros and memory allocated for configured hardware.

Macro Fix Involving calcG

To make it easier for users to work with a manually entered orientation matrix, the calcG macro (which sets a flag to indicate the orientation matrix should be recalculated using the current values of the lattice constants, orientation reflections and X-ray wavelength) has been relocated to the sav_ub macro. calcG was formerly included in the savegeo macro (which is defined differently for each diffractometer geometry), which calls sav_ub. (The savegeo macro is called by the save macro, which saves important parameters in a command file.) For users who enter the orientation matrix manually, the sav_ub macro should be redefined with a macro that writes the contents of UB to the save file.

Improvements in Internal Pseudomotor Code

Recent improvements in the internal code for pseudomotors have been propagated to the geo_sixc.c, geo_surf.c, geo_w21h.c and geo_w21v.c source code. The changes require use of the new internal C-code functions set_pseudo_targ() and set_pseudo_pos(). Contact CSS for technical details on adding pseudomotors to geometry code.

Motor/Counter Disabling Implemented

The functions

motor_par(mne, "disable" [, 0|1])

and

counter_par(mne, "disable" [, 0|1])

now work for all motors and counters to disable hardware access of the indicated motor or counter. All usable motors and counters are reenabled on startup and reconfig.

MCA-type Devices Can Be Disabled

Normally MCA-type devices are started and stopped the same as other configured counters by the tcount() and mcount() functions. The function

mca_par("disable" [, 0|1])

now allows that automatic starting and stopping to be disabled. The command works on the device currently selected with the mca_sel() function. Such devices can still be started and stopped using mca_par("run") and mca_par("halt"), and will also be stopped by a ^C typed at the keyboard.

New mca_put() Function

A new function mca_put(g, e) is available. For certain MCA-type devices, this function will send the data in data group g element e to the device.

CAMAC Block Mode Transfers For Selected Controllers

CAMAC block mode transfers are now implemented for the Kinetic Systems 3929 SCSI-CAMAC controller on HP 700 platforms and for the Kinetic Systems 3988 GPIB-CAMAC controller. Block modes transfers are used by some MCA-type modules.

More CAMAC Presence Tests

Simple CAMAC presence tests have been added for the Kinetic Systems 3512 and 3610, the DSP QS450, and the LeCroy 2301, 3512 and 3588 modules. These tests simply see if a module in the selected slot responds to a suitable CAMAC command. The test can't confirm whether the appropriate module is present. Presence tests for CAMAC modules such as the Kinetic Systems 3640 and the DSP E500, where the module can return a unique ID, continue to be performed.

Changes For the CAMAC E500

Several changes have been made in the code for the DSP E500 motor controller. The E500 will no longer make moves smaller than the backlash at the base rate. Rather, the normal acceleration profile will be used. In addition, the E500 will no longer read all the configured motors with each getangles. Rather, positions will be read during hardware configuration, at the end of moves, on sync commands and while moving. Also, the motor positions will not be checked for consistency with the controller before each move, as was done historically. Finally, the E500 code will recognize the new, optional unit/channel configuration information that may be present in the config file.

Changes For the CAMAC KS 3640

The Kinetic Systems 3640 no longer asserts and clears crate inhibit during counting.

Changes For the CAMAC LeCroy 2301

The LeCroy 2301 MCA buffer now implements the mca_par("chan#") to read the contents of channel # and mca_par("chan#", value) to set the contents of channel #. Also the module supports the new mca_put() function. In addition, the LeCroy 2301 now uses CAMAC block-mode transfers on CAMAC controllers where spec supports such transfers.

Changes For the CAMAC DSP 2190/4101

The DSP 2190 MCS Averager/4101 Histogramming Memory now uses CAMAC block-mode transfers on CAMAC controllers where spec supports such transfers.

Changes For ESRF MAXE Motor Controllers

There is now no longer a limit within spec on the number of MAXE controllers that can be configured. The MAXE controller supports the new unit/channel motor configuration option.

Bug With ACS MCB Motor Controller Fixed

A bug in the code in the ACS MCB motor controllers, where rate parameters may not have been set correctly for certain motors, has been fixed.

Better edconf on HP700 Platforms

On the hp700 platforms, the configuration editor edconf is now built with the HP V.4 Curses Library (libcur_colr.a). This library fixes bugs in the less-than-optimal screen updating of the standard curses library. The version of edconf shipped with spec will be statically linked with this library, since it is not part of the standard HP-UX .q instant-ignition installation (although it is included on the HP-UX distribution media).

RELEASE 3.01.06

These notes summarize the cumulative changes made for spec release 3.01.06 as of December 18, 1994.

mca_sel() Changes

The reconfig command no longer performs an automatic mca_sel(0), unless the currently selected MCA-type device is no longer configured. Also, mca_sel() now returns the number of selectable MCA-type devices when passed a valid argument.

Block-Mode CAMAC Transfer Implementation

spec now has its first implementation of CAMAC block-mode transfers for reading MCA-type CAMAC modules. Currently, block mode is only implemented for the Kinetic Systems 3929 SCSI CAMAC controller on HP platforms using either the Kinetic Systems software or the CSS software. Currently, only the LeCroy 3588 Histogramming Memory Module makes use of block-mode transfers. Other CAMAC controllers and CAMAC MCA modules will be converted to use block mode transfers in the future.

New mca_put() Function

A new function mca_put(g, e) is available to load values from spec data group g, element e into the currently selected MCA. Currently, this function is only implemented for the LeCroy 3588 Histogramming Memory Module.

New data_info() Function

The new data_info(grp, s) function returns data group configuration information. See the data help file for more information.

Comments Allowed In data_read() Files

The data_read() function will now ignore lines in the input file that begin with the character #.

Motors and Counters Can Be Disabled for cdef()

A new option for the counter_par() and motor_par() functions allows individual motors and counters to be disabled, presently, only for the purposes of having portions of a cdef() macro keyed to the motor or counter mnemonic selectively included or excluded in the cdef()-macro definition. The function motor_par(mot, "disable", [1|0]) disables the motor mot if the third argument is nonzero. Otherwise a disabled motor is enabled. If only two arguments are present, the functions returns 0 if the motor is enabled and 1 if the motor is disabled. A -1 is returned if the mot is not a valid motor. Rereading the config file reenables all motors and counters. Similar syntax applies to counter_par(). In the near future, motors and counters that are disabled will not be accessed by spec.

The Nucleus PCA-3 Supported and PCA-Multiport Improved

The Oxford/Tennelec/Nucleus PCA-3 multichannel analyzer PC board is now supported in spec. This board is a replacement for the PCA II, and is the board of the choice for new purchases. Unlike the PCA II, the PCA-3 does not require a kernel driver to count to presets or perform dead-time correction. In addition, spec now includes additional functionality for the PCA Multiport module. See the pca help file for more information.

Support For KS 3116 16-bit D/A

The Kinetic Systems 3116 16-bit can now be used as a DAC motor.

E/ISA Bus Support On HP 700

spec now supports E/ISA port access on suitably equipped HP 700 platforms. spec's port access functions port_get(), port_put(), etc., and the built-in support for all the PC card motor controllers, counters, etc., that don't require a driver on PC UNIX systems, are now available on the HP. See the file aux/README.hp for information on setting up the system configuration files.

National Instruments GPIB now supported on HP 700

spec can be linked with National Instruments GPIB support modules (cib.o files) on HP 700 platforms. Currently, only the GPIB-ENET module and software has been tested.

Improved Support For the KS3929 SCSI-To-CAMAC on HP 700

spec now includes direct support for the KS3929 SCSI-to-CAMAC controller on the HP 700 platforms. It is no longer necessary to purchase the expensive KS software package.

Can Use 19200 and 38400 To Indicate Baud Rate

The strings 19200 and 38400 are now recognized by spec and the configuration editor as synonyms for the baud rates previously specified by exta and extb.

New Version Info File

spec distributions now include a Version file that contains version numbers for all the files used to create the spec distribution. This information should aid in the communication between CSS and local spec administrators in determining exactly what version of the package is installed.

vi-Mode Code Now Included With GNU Readline Library

The optional GNU readline library source code aggregated with the spec distribution now also includes the modules to support vi-editing mode. Use ESC-^J or ESC-^M to switch between emacs- and vi-editing modes while running spec. To start up in vi-editing mode, put the line

set editing-mode vi

in the .spec_keys file in your home directory.

Bug In Creation Mode of hdw_lock Fixed

A bug in the per-diffractometer hardware-locking feature, whereby the initial copy of the hdw_lock file was created with the wrong access modes, has been fixed. With the wrong modes, hardware locking would be in place only for the same user who created the initial hdw_lock file. The mode of existing hdw_lock files will be corrected when spec is updated. To fix existing installations, change the mode of each userfiles/hdw_lock file to 0666. Per-diffractometer hardware locking was introduced in spec release 3.00.07.

RELEASE 3.01.05

These notes summarize the changes made for spec release 3.01.05 as of September 14, 1994.

Protection Against Funny Characters In File Names

spec can now optionally prevent you from (accidentally) creating files with names containing nonstandard characters. By default, this protection is enabled. Use the function spec_par("check_file_names", 0) to disable the feature. When the feature is enabled, if a file name passed to the on() or open() functions contains any of the characters ()[]{}|$'`*?;!&<>\@, the space character, any control characters or any characters with the eighth bit set, and the file doesn't already exist, spec will print a error messages and reset to command level.

Some Old Problems In Four-Circle Phi-Fixed Mode Fixed

Some singularities in the angle calculations in phi-fixed mode for the four-circle geometry, particularly at phi = 0, are now avoided.

Fixed Some Recent Bugs In the Installation Program

Versions of the spec installation script dating from April 1994 until now weren't installing the high-resolution filter programs properly. That bug has been fixed.

Some Fixes To x-axis Labels In Plots

A bug in the automatic ranging of the x-axis numbering for reversed ranges that caused the ranges not to encompass all the data points has been fixed. In addition, incomplete erasure of previous numbers when the x-axis ranges change in updated plots has been mostly fixed.

Small Improvement to High-Res Plot y-Axis Labels

The formatting of the y-axis labels has been modified to prevent truncation of long label strings.

Bug In Using Two High-Res Filters Fixed

A bug where not doing a plot_cntl("open") after a plot_cntl("filter2") could cause a segmentation violation has been fixed. Now, when the second high-resolution filter isn't explicitly opened, ASCII plots will be drawn by the plotting functions when the second filter is selected.

Bug In Data Group Code Fixed

A difficult-to-manifest bug in the data group code where the data points could become scrambled when data groups were freed should now be fixed.

More Serial Devices Allowed

The number of user-level serial devices allowed in spec has been increased from three to eight.

Small Improvement To Ortec 9XX Timer Code

Code has been added to help prevent the Ortec timer from hanging when operating in updated counting mode.

Bug In Ortec 994 Blind Timer Mode Code Fixed

A bug, where when counting to monitor counts using the blind timer mode, the number of elapsed seconds at the end of the count time was not correctly estimated from the software clock, has been fixed.

Fix For ACS MCB-4 Bug

A bug in the Advanced Control Systems MCB-4 motor controller, where the controller occasionally and unexpectedly sends a null byte at the start of a string has been accommodated in spec.

Support For the MicroControle ITL09 Motor Controller

Initial support for the MicroControle ITL09 motor controller on GPIB and RS-232C interfaces is now available.

Optional Angular Unit Parsing Available

The command spec_par("parse_units", 1) enables parsing of unit suffixes. By default, unit-suffix parsing is disabled. Numbers typed as input to spec's parser with one of suffixes in the table below appended will automatically be multiplied by the corresponding factor.

1r  = 57.2958      radian
1mr = 0.0572958    milliradian
1d  = 1            degree
1md = 0.001        millidegree
1mm = 1            millimeter
1um = 0.001        micrometer
1m  = 0.0166667    minute
1s  = 0.000277778  second

Note, however, suffixes on numbers converted from strings or entered using the getval() function are not parsed. The only known use for unit-suffix parsing is with the user-contributed macros in the file macros/units.mac. These macros require that unit suffixes be supplied for all motor position arguments in the standard spec macros.

SPECD Environment Variable Used By Utilities

The utilities showscans and tidy_spec will now use the value of the environment variable SPECD, if it is set.

tidy_spec Revised

The tidy_spec utility that reports on and cleans up user state files has been revised so that any user can use the utility to report on state-file disk usage and clean up one's own state files. The owner of spec's auxiliary file directory (normally specadm) and the super user may clean up anybody's state files using tidy_spec. Type tidy_spec - from the shell to see tidy_spec's usage.

RELEASE 3.01.04

These notes summarize the changes made for spec release 3.01.04 as of June 12, 1994.

New motor_num() and cnt_num() Functions

New functions motor_num(mne) and cnt_num(mne) that return the motor or counter number corresponding to the mnemonic or number given as as argument have been added. If no motor or counter is configured with the given mnemonic, the function returns -1. The argument can either be a string or a number.

New Automatic Hardware Polling

On platforms with polled motor controllers, timers or acquisition devices, spec can now automatically poll the devices to determine when they are finished. The polling occurs while waiting for keyboard input at the main prompt. When using the GNU readline library, the polling occurs while waiting for each character to be typed. When using the standard spec history, the polling occurs only before the first character is typed. Automatic hardware polling can be disabled using the "auto_hdw_poll" option to the new spec_par() function described below.

New spec_par() Function To Set Internal Parameters

A new function spec_par(option [, value]) is available to set miscellaneous internal operating parameters of spec. Typing spec_par("?") lists the available parameters and their current values. Option settings are saved in the state file.

Default Plot Options Changed

The startup default colors for high resolution plots have been changed from those appropriate to VGA terminals to those appropriate for X11 windows. You can still type def_colors after the global variable GTERM has been set to select the default colors appropriate to the current graphics device. Also, the startup default plotting options have been changed to enable low-resolution screen plots during and after each scan and to disable printer plots after each scan.

Renamed Startup Macro File

The name of one of the startup macro files that spec will read if it exists has been changed from conf/site.mac to conf/conf.mac, where the directory conf is the name by which spec was invoked, while the second conf is literal.

New cdef Function

A new function to create "chained" macros has been introduced. See the funcs help file for more information.

Improvements Made In wait()

Previously, the wait() function would poll all busy devices, even when asked to wait for only moving or counting to finish. Now, only hardware that is busy doing that which wait() is being asked to wait for will be polled.

New quit Command

There is now a command called quit that will cause spec to terminate, just as ^D does. The command must be at the beginning of a line either typed on the keyboard or read from a command file. Including quit in a macro definition will not work.

New Workaround To Configure Extra Devices

Some installations require more motor controllers or serial devices than spec's configuration editor edconf allows. Now edconf has been changed so that spec administrators can add extra devices to the config file by hand. Although the extra devices won't appear on the edconf screens, they won't be eliminated from the config file as before, and will be available to spec. Eventually, edconf will be upgraded to handle as many devices as needed.

Code For Scientific Solutions GPIB Board Improved

The user-level code in spec that drives the Scientific Solutions (Tecmar) GPIB board has been tightened up and made to run faster. Note that this is the only GPIB board supported on linux platforms.

Code For Compumotor 4000 Motor Controller Improved

Problems with the code for the Compumotor 4000 motor controller when running on a GPIB interface faster CPUs have been fixed.

Support for Kinetic Systems 3512/3514 ADC

The Kinetic Systems 3512/3514 16-channel ADC CAMAC modules may now be used as counters with spec. When configuring these counters on the scaler screen of the configuration editor, selecting a negative scale factor will treat the ADC contents as twos-complement data. A positive scale factor means to treat the ADC contents as unsigned binary data.

Driverless Support for KS 2926 CAMAC Controller

Joining the trend of using user-level, polled code rather than kernel drivers for spec hardware devices, the Kinetic Systems 2926 can now be used in a driverless configuration. The board interrupt should be disabled in this case.

Support For the NSK Megatorque Motor Controller

The Nippon-Seiko Megatorque DC motor controller is now supported by spec over a RS-232C interface.

Support For the Physik Instrumente DC Motor Controller

The Physik Instrumente C-804/C-812 DC-Motor Controller is now supported by spec over a GPIB interface.

The kappa Geometry Is Now Usable

The geometry code for the kappa configuration is now available.

Software Timer on SYSVR3 Platforms Improved

The software timer on System V/386 3.2 now reports updated time with subsecond resolution. Note, however, the accuracy of alarms on the version of UNIX fluctuates by almost a second.

More Install Options

The Install program now prompts for additional parameters relating to special hardware options, namely whether an SICL GPIB driver is being used and whether the Kinetic Systems SCSI-CAMAC driver is being used.

Bug in Install Fixed

A bug in the new multiple geometry installation feature introduced in the previous release, that made the feature not work if the target name differed from the standard name, has been fixed.

Bugs in MotionMaster 2000 Fixed

A couple of bugs in the most recent versions of the Klinger MotionMaster 2000 code have been fixed.

input(0) From Pipe Works

The function input(0) when used with spec invoked with the -p flag can be used to see if any input characters are available on the input pipe. When the input is from the pipe, the function returns the number of characters available to be read. When the input if from the keyboard, the function returns the null string if no characters are available, or the first character available if the user has typed something.

Messages Used With the Pipe Input Option Changed

The messages sent back to a program (such as a GUI) that run spec through a pipe are being reorganized. Contact CSS for details.

RELEASE 3.01.03

These notes summarize the changes made for spec release 3.01.03 as of May 9, 1994.

New Macro Hooks Available

New hooks into the standard macros are now available. The macros waitall, waitmove and waitcount now include calls to user_waitall, user_waitmove and user_waitcount respectively. These are defined as empty macros when spec starts fresh. In addition, the new macros

def chk_move  '(wait(0x21) || USER_CHK_MOVE)'
def chk_count '(wait(0x22) || USER_CHK_COUNT)'
def chk_acq   '(wait(0x24) || USER_CHK_ACQ)'

replace the wait() calls in the updated moving and counting macros, with the new standard global USER_CHK_ variables available to the user. Also, the move_em macro is now defined by default to include the new user hook macros as follows:

def move_em '
    user_premove
    move_all
    user_postmove
'

New COUNT_TIME Global Variable

The count_em macro now saves the count time in the new standard global variable COUNT_TIME to make the value available to any other interested macros. The count_em macro is the lowest level counting macro called by the standard macros.

Installation Now Supports Multiple Geometries

spec's installation program now allows you to specify the geometries and names of up to 32 configurations that are to be installed together. One binary file will be created that includes the code for all the specified configurations. Each name configuration will be a hard link to that file.

More Plot Points Per Group

The maximum number of total plot points per group has been increased from 32,768 to 65,536. The total number of points allowed in all groups is now 262,144.

Plot Points File Now Truncated When Starting Fresh

The plot data file saved with the user's state file in the userfiles directory is now truncated when the user starts fresh or when the data in the file appears corrupted. Previously, the file would have to be removed to decrease its size. Note, the file can grow as large as the total number of allowed plot points times the number of bytes per point. For the default data format (single precision), the maximum size is currently one megabyte per user state file.

New Serial Device Configuration Option

To support serial devices that don't use the standard UNIX tty interface, (such as a serial board in a VME crate accessed through ESRF dev_putget() functions or EPICS channel access), the configuration editor provides a new field for serial devices. For the traditional serial devices, the characters <> appear in the field. Other serial interfaces can be selected by stepping through the choices. In the config file itself, the type of serial interface is indicated by prepending characters such as ESRF: or EPICS: to the device name.

RELEASE 3.01.02

These notes summarize the changes made for spec release 3.01.02 as of March 31, 1994.

Closing X11 Plot Window From Window Manager Works

Previously, it was necessary to type plot_cntl("kill") to clean up after closing the X11 plot window. Also, it was often necessary to kill x11filt processes that were left over after closing the window. spec now will automatically recreate the plot window the next time data is plotted if the plot window has been closed or killed from outside of spec. Also, the processes that create the window now trap "window-destroy" events and are much more likely to exit no matter how the windows are closed.

GPIB Sharing Improved

The code to share one National Instruments board with multiple copies of spec running on the same computer has been improved, particularly with respect to the code for the GPIB-to-CAMAC controllers. When a new process first accesses the GPIB driver, the driver resets the board, Although spec can not prevent that reset, the error checking and command retry in spec has been much improved, eliminating many of the problems observed by users.

Long Input Lines Won't Crash spec with readline

Previously, when using the optional GNU readline command line editing and history library, input lines longer than 512 characters would cause spec to crash. Now, input lines longer than 512 characters are safely truncated. In the future, there will be no restriction on input line length.

New stop() Function

A new hardware control function, stop(w), has been introduced to synchronously halt moving, counting or other asynchronous data acquisition. If the bit corresponding to w=1 is set, moving is halted. if the bit corresponding to w=2 is set, counting and other data acquisition is halted. If w is zero or missing all asynchronous activity is halted.

New atan2() Function

The math function atan2(y, x) returns the arc tangent of y/x using the signs of the arguments to determine the quadrant of the return value. The return value is in the range -PI to PI.

New port_putw() and port_getw() Functions

New functions for 16-bit I/O port access on AT-bus computers are available.

New Motor Parameters

The motor screen of the configuration editor now has additional subscreens for entering optional motor parameters. The optional parameters are used with some of the supported motor controllers. The parameter subscreens are accessed by typing the new m command. Optional parameters are entered by typing in a value. Parameters are deleted with the new ^D command. The additional parameters are added to the config file after the line that describes the basic motor parameters using:

MOTPAR:dc_gain = 1500

All of these parameters can be changed or assigned with the motor_par() function.

Klinger Motion Master 2000 Changes

The Klinger Motion Master 2000 motor controller can now be used with the PC port interface. The config file identifiers has been changed from KL2000 to MM2000. All of the optional parameters are now taken from the config file.

y-axis Significant Digits Adjusted

The number of significant digits shown on the y-axis numbers is now automatically adjusted to match the range in the data.

ACS MCU2 Changes

The slop parameter is now taken from the optional motor parameters available in the config file.

Huber SMC 9000 Supported

The Huber SMC 9000 GPIB motor controller is now supported.

RELEASE 3.01.01

These notes summarize the changes made for spec release 3.01.01 as of February 23, 1994.

VME Support

spec now supports VME. Currently, the only supported VME controller is the National Instruments VME controllers for SunOS 4.1.x S-Bus systems and System V/386 and System VR4.x PC platforms. The supported VME modules are the Oregon Micro Systems motor controllers and the Mizar MZ 8310 timer/counter.

Revised Signal Handling

Code to handle asynchronous signals from hardware and user interrupts has been revised (again). Signal blocking around hardware access has been improved.

Revised Sleep Handling

The implementation of the sleep() function has been redone to avoid the use of alarm signals and/or the interval timer, resulting in more robust performance.

HP SICL for GPIB Support

spec now supports the HP Standard Instrument Control Library (SICL) for its GPIB cards.

RELEASE 3.00.07

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

New Startup Macro File Name

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

motor_par() Changes

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

Orientation Matrix Directly Accessible

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

New data_anal() Options

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

Driver Support For Nucleus PCA II Card

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

Driverless Support For DSP 6001/2 CAMAC Available

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

High-Res Graphics Speed Up For MCA-Type Plotting

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

X-Axis Log Plotting

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

Additional Installation Parameters

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

Per Diffractometer Hardware Locking

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

New prompt_mac Built-In Macro

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

New getline() Function To Read From a File

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

Bug In split() Function Fixed

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

OMS Configuration Designation Changed

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

ACS MD8 Multiplexing Support With E500 Motor Controller

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

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

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

RELEASE 3.00.06

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

Quoted Strings Can Be Passed To Macros

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

CAMAC May Be Configured in Polled Mode

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

Binary Mode gpib_get() and ser_get() Improved

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

New sscanf() Function

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

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

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

Unidirectional Powder Mode Option Available

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

Bug In data_anal() Fixed

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

Bug In data_plot() Fixed

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

RELEASE 3.00.05

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

Minor Bug In gpib_get() Fixed

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

Minor Change In GPIB Addressing

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

Eliminated Historical 24-Bit Test On Motor Steps

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

Debugging Output Sped Up

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

Reported Problems With Am9513 Counters Addressed

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

Bug In rdef Fixed

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

RELEASE 3.00.04

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

New ser_get() Mode

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

Increased Maximum Number Of Counters

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

Increased Maximum Number Of Data Points

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

New printf() Format Option

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

Integer-To-Float Conversion On Intel Improved

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

Getting Data Group Status

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

More Hardware Options For powder Mode

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

State Commands Made Obsolete

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

time() Fix For Sun Solaris 2

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

Microvax GPIB Problems Fixed

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

RELEASE 3.00.03

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

Internal Memory Size Constraints Eliminated

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

New Plot Title Variable

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

Reverse Video Standout Mode Shunned

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

Ortec Timer Bug Fixed

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

Alternate Command Line History Available

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

RELEASE 3.00.02

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

Automatic Globalization

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

Support For Ortec 918

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

Ortec Timer Bug Fixed

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

Compumotor 4000 Bug Fixed

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

RELEASE 3.00.01

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

String, Macro and History Size Limits Increased

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

New counter_par() Function

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

New image_par() Function

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

New plot_cntl() To Return Current Colors

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

Ortec Counter/Timer Code Revamped

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

Fixed Bug With \x

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

Memory Leak On Sun Fixed

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

Bug With time() On Sun Fixed

A bug where the built-in function time() did not return fractional seconds on SunOS systems has been fixed. .. @(#)chg2_15.rst 6.1 08/01/12 CSS .. Copyright (c) 1991,1992,1995 Certified Scientific Software .. .. versioninfo: "changes" "spec 2.15 Release Notes" "08/01/12" "chg2_15.rst 6.1 08/01/12 CSS" .. .ds ]D fHspecfP 2.15 Release Notes

DESCRIPTION

These notes summarize many of the modifications made for spec release 2.15, as of February 21, 1992.

INCOMPATIBILITIES

Release 2.15 includes a number of changes that make certain prior usages obsolete.

  1. The getmca() function has been eliminated. A new interface to MCA-type devices has been established using the functions mca_par(), mca_get() and mca_sel(). See the funcs help file for details.
  2. The syntax of the C-PLOT user function scans.4 has been modified slightly to clear up ambiguities concerning how the data points are to be normalized. The -m and -t flags have been replaced with a +n or -n flag to indicate whether the data is to be normalized, and .BI m= col and .BI t= col arguments to specify column numbers for the monitor-counts or time normalization values. If columns aren't specified, the normalization is taken from the #M or #T directives in the data file.
  3. The method for subtracting a linear background based on a scan's end points has been changed. A new macro, based on the new internal data-handling routines and named do_bg, is now provided. See the plot help file for more information.
  4. Two arguments to plot_cntl() have been renamed. Use plot_cntl("open") and plot_cntl("close") instead of plot_cntl("openpl") and plot_cntl("closepl"). Also, the arguments to plot_cntl() that specify the graphics terminal type have been eliminated. Instead, a new global variable named GTERM, which can take its value from the environment or be assigned to, is used to specify the graphics device type.
  5. The macros named U and P introduced in the last release are now named UN and UP. The name U is now reserved for the array of orientation matrix parameters used with a number of geometry configurations.

USER INTERFACE

The internal data-handling portion of spec has been entirely rewritten, adding greatly to the types of data manipulation that can be done within spec. The data help file explains the new functions. In brief, the internally stored data points are divided into independent groups. Each data point can have several numbers associated with it, such as H, K, L and counts from the detector. In addition a number of functions are provided that allow math operations on all the data points in a group or among groups, and the reading of values into a group from a file.

Data points are now saved in the state files. Thus, when scans are continued after exiting and restarting spec, the entire data set can still be plotted and saved.

The gethelp() function, used by the help macros, now responds to single character commands to page forward and back or quit, instead of waiting for a newline to be typed.

When built-in functions are used with the wrong number of arguments, an error message is now printed that indicates what the correct usage is.

A new built-in macro named cleanup1 will be called on errors or user aborts, if it has been defined. This new macro will be called after the cleanup macro if they are both defined.

The high resolution graphics programs for SunTools and X Windows have been improved. In particular, the X Window filter does a better in loading the correct font. The filter for SunTools has been entirely rewritten.

High resolution screen plots can now show error bars. Error bars are calculated as the square root of the y-data values. Use the setplot macro or call the function plot_cntl("ebars") to turn error-bar drawing mode on.

The colors on high resolution plots on color display devices are now assigned using the plot_cntl() function. Also, use of colors can be turned on or off with the plot_cntl() function. See the funcs help file for details.

Pseudomotors and pseudocounters can now be configured by selecting the controller named NONE. Pseudomotors may be linked to the motions of other motors in the geometry code (see how the alf motor is used in geo_w21h.c for an example.) Otherwise choosing NONE as the controller type lets you execute counting and moving commands without being in simulate mode.

A software timer is now available. Use it by selecting the SFTWARE controller in the configuration file. This timer uses the system clock to gate the scalers, MCAs, etc.

The high-resolution graphics on AT&T System V/386 systems can be displayed on a different virtual terminal then you use for the text. Set GTERM to something like vga_vt07 to use /dev/vt07 as the virtual terminal for graphics. You shouldn't be using the selected virtual terminal for a login session. You will have to use the terminal hot keys to switch back to the text screen in order to type commands to spec.

spec now checks for write errors after most output is sent to the various files and devices. In the event of a write error, spec resets to command level.

MACROS

A new getscan macro lets you read in scan data from an existing data file. With no arguments, you will be prompted for the name of the spec data file, the scan number, and columns for x and y. You can also provide all four values as arguments. Once the data file name and column numbers have been entered, you can subsequently call the macro with just the scan number as a single argument.

A new _scan_time macro prints the estimated counting time for a scan. The macro is called as part of the default scan_head macro. The reintroduced MON_RATE variable is used in the estimate of the scan time if counting to monitor counts. MON_RATE is the average monitor counts per second and is automatically calculated in the count macro. If the global settle-time variable _sleep is nonzero, that time for each point is also included in the estimate.

The scan_on macro that continues aborted scans can now also be invoked using the name resume.

The teramp macro which ramps the temperature controller to a new value has been upgraded. You can now specify an optional third argument, which is the desired controller step size. A small step size will result in shorter intervals between each temperature step. The macro won't let the step size get too small, though, as it insists on at least a 0.2 second interval (actually set by the global variable TERAMP_MIN) between changes, in order to give time to program a slow interface.

The scan macros now assign a value to Y_L which is used as the y-axis label in the plots. In most cases, the assignment is Y_L = cnt_name(DET).

The current scan number is now included on screen plots.

Mesh scans can now do real-time screen plots. The screen plots are erased at the beginning of each row (or is it column?) of the scan.

The macros pts, plot_res, lp_plot and splot now all take one to three optional arguments. The first argument specifies the data group to plot, the second argument specifies the element to use for the x-axis and the third argument specifies the element to use for the y-axis.

A new macro named cplot_plot creates a command file for the C-PLOT program to plot the current data points. The plot is sent to the filter given by the CP_FILTER global variable. Optional arguments specify plot group and x-axis and y-axis elements, as described above.

The analysis results printed at the top of the plots are now defined by the macros splot_res1, splot_res2 and rplot_res. These macros can be redefined to suit a particular experiment.

The colors used by the splot and rplot macros for the various plot elements are contained in the global string variables splot_col and rplot_col, which can be modified to suit individual tastes. See the description of plot_cntl() in the funcs help file and the colors help file.

The lp plots have been moved from macro code to built-in code. If plot_cntl("lp") is called before a call to data_plot(), the plot output will be all printable ASCII with no cursor positioning sequences and formatted for 132 column-wide output.

Counters named "unused" will not be included in the output from the uct, ct and show_cnts macros or in the data files produced by the standard macros.

New standard macros, fon and foff, are provided to turn on and off an arbitrary file. The macros take an argument, which is the name of the file.

To accommodate motor controllers that operate in polled mode, a new macro name move_poll has been placed after the move_em statement in macros such as mv, mvr, br, etc. By default move_poll is defined as a null macro. For polled controllers, it should be defined as waitmove to have the backlash completed before the next prompt.

The warning message in the distributed fourc.src macro file regarding use of the default X-ray wavelength of 1.54 Angstroms has been removed, as it confused certain synchrotron users who have monochromators.

FUNCTIONS

A new form of the input() function lets you check to see if something has been typed at the keyboard without getting stuck waiting for something to be typed. If invoked as input(0), the function will return a null string if nothing has been typed. Otherwise it returns a string consisting of the first character of what was typed.

The syntax of chg_dial() has been expanded to accommodate motor controllers that use home (or origin) switches. The second argument may be one of the strings "home", "home+", "home-", "lim+" or "lim-". With one of the above arguments, the motor indicated by the first argument will move until it hits the home switch or the clockwise or counter-clockwise limit switch. At present, most motor controllers do not implement the home or limit search feature. See the new home and zero macros for a sample implementation.

A new function, fprintf(), has been added. This function works as printf(), but takes an initial string argument that is the name of a file or device. The text is printed only on the named file or device (and log files), unlike printf(), which prints to all turned on files and devices.

A new function, gpib_cntl() has been added. This function sends the GPIB messages GTL, LLO, DCL, SDC and GET to the addressed device. See the gpib or funcs help files for details.

New functions, port_get() and port_put(), are available on PC (AT-type bus) computers to read and write bytes to IO ports. Ports must be first selected in the config file. Ports may be configured read/write or read only.

A new function, split(), can be used to split a string into substrings and assign each substring to an array element. See the funcs help file for usage.

GEOMETRY CODE

The fourc geometry code and macros have been generally fixed up. The sign convention for ALPHA has been changed due to popular demand. Negative two-theta values are now handled correctly when calculating the orientation matrix and reciprocal space positions. The default orientation reflections have been changed to physically reasonable values. Zone mode phi and chi angles are now treated as frozen angles and are saved in the state file, along with the two vectors that define the zone. Cut points are now also saved in the state file. The freeze macro now takes arguments to specify the value(s) of the current mode's frozen angle(s). The two-theta and omega cut points have been eliminated (two theta values will always be between -180 and 180 degrees). New sz, setor0 and setor1 macros let you set the zone plane and the orientation reflections without moving motors.

The portion of the four-circle geometry code in the source file geo_fourc.c that dealt with orientation matrix calculations has been relocated and the orientation matrix code can now be used by any geometry. Also, a new macro file, ub.mac, now contains the orientation-matrix specific macros.

Since the orientation-matrix code has been generalized to work with any geometry, the names used to refer to the primary and secondary reflection angles have been changed to g_u00, g_u01, etc., for the primary reflection, and g_u10, g_u11, etc., for the secondary reflection. New (redundant) macro aliases, tth0, th0, chi0, phi0, tth1, th1, chi1 and phi1, have been created for the primary and secondary orientation reflections in the fourc geometry.

The gpset macro is redefined to include a calcG call for geometries that use an orientation macro. (The calcG call is necessary to have the orientation matrix recalculated.)

A new sectors macro is available with the fourc geometry. The macro prints the motor positions that would be used for all the possible sectors for the (HKL values given as arguments.

A geometry-less version of spec can be installed by choosing the spec geometry target.

A new setrlat macro can be used to set the reciprocal lattice parameters. (The setlat macro sets lattice parameters in direct space.) New macros calcD and calcR calculate direct-space lattice parameters from reciprocal-space lattice parameters and vice-versa.

New geometry code for configurations called w21h and w21v have been added. The code is for a diffractometer used at LURE W21.

New geometry code for a configuration called fivec has been added. The code is for a diffractometer built by MIT and used at NSLS X-20.

New geometry code for a configuration called s2d2 has been added. The code is for a diffractometer built by AT&T Bell Labs and used at NSLS X-16 and X-25.

The MIT surface diffractometer geometry code and macros have been revised to reflect the current diffractometer configuration.

The surf geometry code has been expanded to include a liquid surface diffractometer used at the BNL HFBR.

HARDWARE

On AIX systems, spec enforces a lock on the GPIB device, such that only one process can open it at a time. (On all systems that use a National Instruments GPIB board, only one process should be using the GPIB device at a time.)

The ACS Steppak MCU code has been revised to better handle certain read errors. Also, a motor controller keyword MCU_E is available in the config file to indicate that encoders are being used on a motor. If so indicated, when there are position discrepancies between spec and the controller that are below a threshold amount, the controller's position is automatically taken as correct. In addition, the home and limit search capabilities now available with chg_dial() have been implemented.

The code for the Ortec 9XX counter/timer code has been changed to better detect if the "dwell" switch is set incorrectly.

The Ortec 997 single channel counter is now recognized.

Support for the Oxford Tennelec/Nucleus PCAII MCA PC board is now included. The board supports multichannel scaling and pulse height analysis modes. The macros to use the board are still in an early stage of development.

Support for the Compumotor 3000 motor controller on serial and GPIB interfaces has been added. (There are problems, though, when using this motor controller with the National Instruments GPIB driver on IBM PS/2 AIX 1.2 due to bugs in the GPIB driver and the Compumotor controller.)

Support for the Compumotor 4000 motor controller on serial and GPIB interfaces has been added.

Support for the Microcontrole SIX19 motor controller on a serial interface has been added.

Support for the INEL XRGCI motor controller and timer-counter device has been added.

Support for the Kinetic Systems 2926 IBM PC Interface with 3922 Parallel Bus Crate Controller has been added. The source to the driver is in the file drivers/ksc.c. The script to install the driver is install_ksc.

Support for the Kinetic Systems 3929 SCSI Crate Controller is now supported on Sun Sbus systems. The instructions for installing the driver are in drivers/ksc.README.

Support for the National Instruments GPIB11-2 for the Q-bus is now supported on BSD 4.3 and Ultrix systems.

Support for the National Instruments GPIB-SPARC1-B for Sun computers is now supported.

Code for the Scientific Solutions GPIB board now supports the gpib_poll() and the new gpib_cntl() function.

The code for the LeCroy 2301 MCA has been rewritten to use the new mca_par() and mca_get() functions. See the lc2301 help file for details.

The Nicomp TC-100 autocorrelator is now supported. Access to it is through the mca_par() and mca_get() functions. See the nicomp help file for details.

The Klinger MC-4 motor controller output pins used for gating an external counter and checking for completed moves have been changed from pins 1, 2 and 3 to pins 6, 7 and 8 to avoid conflict with the controller's plug-in remote control device.

UTILITIES

The number-of-columns directive in scans.4 (#N) can now take an optional second argument which is the number of data points per line. The number of numbers per line of data is the product of the two arguments. For example, #N 1 16 would indicate there are 16 data points per line, while #N 4 4 would indicate there are four data points per line, with each data point having four numbers associated with it. In both examples, there would be 16 numbers printed on each line. The purpose of this new feature is to allow representation of MCA data in a visually compact form. (There is no saving in file space, as both a space character and a newline character consume one byte.)

ADMINISTRATION

The edconf program (invoked by the config macro) has had the devices screen split into two screens, one for devices (motors, scalers and MCAs) and one for interfaces (CAMAC, GPIB, serial and I/O ports).

The number of motor controllers and scaler devices allowed has been increased.

Serial devices used with ser_get() and ser_put() can now have raw or cooked line characteristics selected using edconf. In cooked mode, you can also add noflow, igncr, evenp or oddp modes.

The "user can move motor" and "user can change limits" fields displayed by the edconf program have been combined into just one field. Also the number of wizard protection levels has been increased from one to three. Parameters that are protected are now indicated on the motor screen with square brackets.

A facility for sharing a single copy of the config and settings files among several spectrometers that have some motors in common is now available. See the config_adm help file for more information.

New commands to insert i or delete d motors using edconf are available.

When installing spec for the first time, a default config file is created that contains names and mnemonics for all the required geometry motors.

A new administrative utility called tidy_spec is provided to clean out old user state files from the spec auxiliary file directory. Invoked without arguments, the utility prints the disk usage by user, terminal, geometry and age. Arguments are available to remove files by user, terminal, geometry or age. Type tidy_spec - to see usage. When installed by the Install script, the file modes of the program restrict its use to owner and group. The Install script also patches the tidy_spec executable to make the configured auxiliary file directory the default.

The spec.msgs messages file, used in earlier versions to help cope with the limited program size available on the 286 and PDP 11/73 platforms, has been done away with. All currently supported platforms can easily accommodate the extra 30 kilobytes or so of data space that are thus needed by the program.

MISCELLANEOUS

spec is now available for the IBM RS/6000 running the AIX operating system. CAMAC support is currently only through a Kinetic Systems 3988 GPIB-to-CAMAC crate controller.

New startup options, -p and -q, have been added to make spec work as the tail end of a windowing front-end program. The -p option says that input from spec is from a pipe. The -q option can only be used with -p and says that spec should operate quietly and not write messages to the "tty" device unless it is explicitly turned on.

Internal signal handling (signals are associated with typing ^C, with internal timers and with certain hardware controllers) code has been rewritten (again) to make spec more robust.

A number of internal limits have been increased, including the maximum number of bytes of macros, the size of the internal memory arena and the length of strings that can be printed.

BUG FIXES

The showscans program is now automatically patched when it is installed to reflect the correct auxiliary file directory. Previously, the path name /usr/lib/spec.d was built in.

A bug in the scans.4 C-PLOT user function that calculated error bars incorrectly when the #I second normalization was being used has been fixed.

A bug in the motor moving code where, when in simulate mode, simulated motor positions would change when they weren't supposed to has been fixed.

A bug in the powder-mode macros where powder mode would not work properly if the powder-mode motor was not one of the motors involved in the geometry calculations has been fixed.

A bug in the CAMAC TS201 counter/timer code where the variable that kept track of detector overflows never got cleared has been fixed.

Another bug in the CAMAC TS201 counter/timer code where, when counting to certain values of monitor counts, the count time was off by a factor of two or so from what it should be, has been fixed.

A bug in the Oregon Micro Systems PCX code where backlash was done on the wrong motor for certain multi-motor moves has been fixed. Also, several modifications were made to make the code more robust.

A bug in the code for the Ortec 9XX counter/timers where the program would get stuck printing an error message under certain conditions has been fixed.

A bug in the code for the LeCroy 2301 MCA, where channel counts greater than 32,768 were saved as negative numbers, has been fixed.

Bugs in the code for the Scientific Solutions GPIB board that prevented it from working on 386 machines have been fixed.

DESCRIPTION

These notes summarize many of the modifications made for spec release 2.14, as of January 8, 1991.

INCOMPATIBILITIES

Release 2.14 includes a number of changes that make certain prior usages obsolete. You must modify any home-grown macros to take into account the following changes:

  1. The customized scan output hooks involving the macros Plabel, Pout, Flabel and Fout have had the position of the space character changed from before each string in the label to after each string. You must edit your macros if you assign values to any of the above or if you have written new scans based on the standard scan macros.
  2. The argument of the wait() function, as programmed, did not match the documentation. The documentation stated that bit 1 represented motor status and bit 2 represented counter status. As programmed, these bit assignments were reversed. The program has been changed to match the documentation. You must edit your macros if you call the function wait() directly.
  3. The config file now contains information describing each scaler's label, mnemonic, function and hardware type. The scaler-name array S_NA[] no longer exists. New string functions, cnt_name(i) and cnt_mne(i), return the name and mnemonic of scaler i. You must edit your macros if you make any reference to the symbol S_NA[].
  4. The value returned by the getcounts command in S[sec] is now in seconds, rather than milliseconds. You must edit your macros if you divide S[0] by 1000 anywhere.
  5. The yesno macro has been replaced by a yesno() function. You must edit your macros if you invoke yesno anywhere.

USER INTERFACE

The history command now takes a numerical argument that limits the number of the previous commands displayed. In addition, if the the argument is negative, the recalled commands are displayed in reverse order. The number of input lines saved for history recall has been increased from 50 to 100.

High resolution scan plots are how available with VGA, EGA and Hercules graphics adapters on System V/386 and VENIX 286 platforms; with the X Window System Version 11 on PS/2 AIX, Ultrix and SunOS; and with SunView on SunOS. You should set a GTERM environment variable to vga, ega, cga, herc, x11 or sun before invoking spec to select the appropriate graphics parameters. The setplot macro lets you select whether or not to use high resolution plotting and if so, how to depict the data (lines, points, dots).

Text-mode plotting has been moved from macros to built-in C code. The plots are drawn much faster and are now available with any terminal described by the system terminal database. The names of the macros used to do the screen plots and the real time plots (splot and rplot) have not changed, although terminal dependent macros such as ansi_rplot and vt52_plot have been eliminated.

The built-in symbols ROWS and COLS contain the screen size used for drawing the plots (and displaying help files). These are initially taken from the environment variables LINES and COLUMNS, or if unset, from the system terminal database entry described by your TERM environment variable. You may reassign values to the variables if you change your screen size (for example on an workstation using windows).

spec now prevents multiple instances of the program being run using the same state files.

When spec is run from pseudo ttys (for example, on an X Windows workstation or over the network), the state file is associated with the name ttyp#, rather than the actual name of the pseudo tty.

You can now create a state not associated with any tty, by starting spec with the .BI -T " name" command line option.

A new variable, CWD, keeps track of the current working directory of the running program. The pwd macro has been changed accordingly to simply print the value of CWD, rather than spawn a subshell to execute the command.

The help utility has been entirely rewritten. Help files are formatted on the fly to fit the size of the screen or workstation window. In addition, standout mode is used to highlight text that would be printed in an alternate font.

The number of nested command files allowed has been increased from five to eight.

MACROS

If a macro named begin_mac is defined, it will be run after the startup command files are read but before input is read from the keyboard.

The motor scans ascan, a2scan and a3scan have been been rewritten in terms of a general macro called _ascan that scans an arbitrary number of motors. An a4scan that calls _ascan is now also provided, as is a d4scan. These scans introduce a number of new global variables (_nm, _m[], _f[], _s[], _d[]) that you should avoid using in your own macros.

A new standard macro called chk_beam has been inserted into the macros that do normal, updated and powder-mode counting during scans. In general, these macros are now written along the lines of:

for (;;) {
    count_func(count_time)
    waitcount
    getcounts
    chk_beam
}

where count_func() is tcount(), mcount(), etc. By default, chk_beam is defined as break, meaning the infinite loop is immediately exited after counting. However, you can define chk_beam to not break out of the loop unless the monitor counts, for example, are above some threshold. Such a feature can be useful at a synchrotron where beam dumps or fills that occur during unattended data taking could result in many useless scans. See the count.mac macro source file for an example of a complete chk_beam macro.

A new option to the setscans macro asks you to enter a value for a sleep (or settle) time to delay before counting at each point in a scan. The value is stored in the global variable _sleep (which you can also change simply by assigning it a value). The scans all execute a sleep(_sleep) call before counting. Set _sleep to zero for no delay.

The macro that continues aborted scans, scan_on, now accepts an argument to adjust the current point number in the scan (except for mesh scans). For example, scan_on -1 redoes the previous point, while scan_on 3 skips the next three points. Giving a very large number will force the end-of-scan plots, etc., without taking any more data points.

A new set of macros lets you define a set of scans do be done together. The scans must all be of the same type and must be in terms of a single scan variable. You may however define regions, point densities and count times differently for each scan. The setreg macro (for set regions) asks you to configure each scan. The doreg macro executes the group of scans. A number of global variables beginning with the characters _reg_ have been introduced to keep track of the region scan configuration.

The ct macro, if aborted with a ^C, will now execute a cleanup macro that reads the scalers and shows the counts that were accumulated before the ^C.

The names det and mon are no longer built into the macros, since scaler mnemonics may now be set to arbitrary values in the config file.

The show_cnts and uct macros have been rewritten to show the accumulated counts in all the configured scalers.

The _head and _loop macros have been modified to include counts from all configured scaler channels in the data file. Previously, only the detector and either monitor or seconds scaler contents were saved for each point.

The MON_RATE global variable has been eliminated from the standard macros due to lack of interest.

Many of the standard macros involving motor positions have had hooks inserted to support a feature involving customizable position units. This feature is not currently available to most users of spec, and the changes will not affect the functionality of any of the macros. However, the names _units, _setfmts, _suffix, P, U, UL, UNITS, PFMT and VFMT are used by this feature and are henceforth reserved for use by the standard macros.

FUNCTIONS

The function motor_par() can now return several parameters from the config file. Also, the motor velocity and the number of steps to use for backlash can be set from user level. See the motors help file for details.

A new function, ca_fna(), allows arbitrary CAMAC access. See the funcs help file for details. At present, it is up to the user to avoid addressing slots that are being used for motor control or counting.

A new function gpib_poll(), returns the serial poll status of a device on the GPIB bus. This function is currently only available with National Instruments GPIB controllers. See the gpib help file for details.

New functions, cnt_name(i) and cnt_mne(i), return the name and mnemonic of scalers as set in the config file.

A new function, plot_cntl(mode), is used to control the built-in plotting features. The argument mode is a string of comma- or space-delimited options. See the funcs help file for details.

A new function tty_cntl(mode) is used to send terminal-specific special sequences to the screen. The argument mode is a string. Recognized strings are "ce" (clear to end of line), "cl" (clear screen and home cursor), "cd" (clear to end of display), "so" (begin standout mode), "se" (end standout mode) and "ho" (home cursor).

A new function tty_move(x, y [, s]) positions the cursor at column x and row y of the screen, and prints the optional string s at that position. The upper-left corner of the screen is column 0 and row 0. If x or y are negative, the position is taken from the left or bottom of the screen. Output written by this function goes only to the tty device, regardless of what devices have been turned on with the on() function.

A new function plot_move(x, y[, s]) works just as tty_move(), above, when high-resolution graphics mode is off. When high-resolution graphics mode is on, plot_move() draws to the graphics screen.

A new function plot_range(xmin, xmax, ymin, ymax) sets the ranges of the internally generated plots. If any of the arguments is the string "auto" the value is determined by the appropriate value from the current points.

A new function plot_pts(xcol, start, npts) plots the current data from the built-in plot array either on the screen if graphics mode is off, or on the high-resolution graphics screen or window if graphics mode is on. The plot starts with point number start and uses npts points. The xcol parameter will be used in the future, when the number of values stored for each point is increased, to designate which value to use for x.

A new function yesno([ s, ] x) prompts the user with the optional string s, for a yes or no response. The function returns 1 if the user answers with a string beginning with Y, y or 1. The function returns -1 if the user answers with a string beginning with something else. The value of x is returned if the user simply enters a return. Usage might be,

flag = yesno("Show updated moving", flag)

which produces (if flag is nonzero),

Show updated moving (YES)?

GEOMETRY CODE

The geometry code and macros for the various surf diffractometer configurations, as used at NSLS X20 and X22, CEA in France and at Exxon have been rearranged to ease maintenance and installation of each version.

The NSLS X20 monochromator macros and geometry code have been isolated from the four-circle code, so that references to the monochromator will only be made if the monochromator option is selected at installation time.

The four-circle code now allows sector 1 to be used in modes 4, 5 and 6.

The four-circle code now prints an error message when a user tries to calculate reciprocal lattice positions with both chi and phi at zero in zone mode, as the current method of doing the calculations cannot handle that case.

The three-circle mode with phi=0 has been generalized to a phi-fixed mode. Also, the frozen modes now include phi fixed.

A new scan macro, aziscan, is available in four-circle mode to scan the azimuthal angle in azimuthal mode.

Bugs in the zaxis geometry code calculations have been fixed.

HARDWARE

The internal code implementing hardware support in spec has been substantially revised to simplify adding support for new types of hardware. The revisions for the most part should be transparent to the user. If a particular hardware device fails to perform as it did in previous versions, notify CSS at once, (unless the difference is an improvement).

Support for the Kinetic Systems 3912 CAMAC crate controller is now provided on DEC Q-Bus based systems.

Support for the Kinetic Systems 3988 GPIB CAMAC crate controller is now included. This module can only be used if a National Instruments GPIB controller is also installed. The board can be used in either interrupt-driven or polled mode. Interrupt driven mode is preferred, but if interrupts are lost in the GPIB driver, polled mode can be selected.

Support for the Ortec 974/994/995 counters and counter/timers is now provided over both GPIB and RS-232C interfaces.

Support for the Klinger MC4 motor controller is now provided over both GPIB and RS-232C interfaces.

Support for the Advanced Control Systems MCU-2 motor controller is now provided over an RS-232C interface.

Persistent timing problems with the Kinetic Systems 3388 GPIB CAMAC module seem to be fixed now.

spec now recognizes the Joerger SMC 2601 otor controller, which allows for programmable velocity and acceleration.

The code for the TS201 CAMAC timer/counter model now uses timer 2 to gate counter 2, making it no longer necessary to use an external cable to gate counter 2.

The "new and improved" E500 modules that use the F(10) A(0) command to clear the module LAM are now supported.

The E500 LAM service routine has been modified to use fewer FNA commands and to recheck for additional LAMs from the E500 before returning. The latter change improves performance when several motors in the same E500 complete their motions at nearly the same time.

The code that reads the LeCroy 2301 MCA unit has been changed to read the device faster. (On a 25 MHz 386 using the DSP 6001, the change is from 0.36 seconds previously to 0.16 seconds now for reading 1024 channels.)

Many options for use of the National Instruments GPIB controllers formerly set by each site using the ibconf program are now set by spec at run time. Specifically, spec sets the timeout period to 3 seconds, the EOS byte to a newline ('\n'), reads to be terminated on EOS using an eight-bit compare, REN to be asserted and the board to be the system controller. The board's primary address is set to 0 and the signal to be sent on service request (if using the board with a GPIB-to-CAMAC controller) is set appropriately. You may still use ibconf to set whether EOI will be asserted with EOS and/or with the last byte of a write.

The length of a string that can be read using gpib_get() has been increased from 64 to 255 bytes.

The GPIB functions gpib_get() and gpib_put() no longer generate an interface clear (IFC) message on the bus, unless a previous transaction had resulted in an error. The old code that sent an IFC before each transaction not only slowed down I/O, but also caused some devices to time out. In addition, a brief delay is inserted after an IFC is sent to accommodate slow devices. (These devices did not follow GPIB standards and used the IFC message to reset internal functions rather than just interface functions. The device were often not yet ready to respond to the next interface message after the IFC period was over.)

If the National Instruments GPIB code has errors on two transactions in a row, the GPIB device is reset by closing and reopening the /dev/gpib0 (or whatever is configured) special file. If this feature causes more problems then it solves, inform CSS immediately so we may begin work on alternatives.

Use of the ser_get() function to read RS-232C devices has been changed to increase its flexibility. See the serial help file for details.

spec used to silently enforce a rule that only one GPIB controller, MCA or timer was allowed at a time. A message is now printed if the config file requests more than one GPIB controller, CAMAC controller, timer or MCA. The first device of each type encountered in the config file is the one that will be used.

Now that scaler numbers are assigned in the config file, it is possible to configure more than one type of scaler device at a time. Each scaler should use hardware gating from the master timer. Software gating does take place, although there can be substantial latency between receipt of the time-complete signal from the master timer and disabling of the scalers. Note also that for a number of combined timer/counter units, the scaler assignment for the seconds and monitor channel are hard coded into spec.

For versions of spec on most platforms, memory is allocated for the maximum number of motors (and scalers) at program startup, so that it is no longer necessary to restart the program to increase the number of motors (or scalers) after editing the config file.

UTILITIES

A stand-alone version of the C-PLOT scans.4 user function, called scans, is now provided for extracting a data set from a spec data file. See the README file in the aux subdirectory of the distribution.

ADMINISTRATION

Version 2.14 has a new installation procedure, that is based on the new Install script in the distribution directory. A README file explains the use of the script.

The CAMAC drivers on all systems should be replaced with the new versions in the drivers subdirectory of the distribution. Versions of spec prior to version 2.14 should work with the new drivers, but spec 2.14 will not work with old versions of the drivers. Changes to the drivers are as follows: The new drivers can be configured at run time for the signal to send to the user process when a LAM is generated. The Q and X response of each dataway transaction is now communicated by the driver to the user process in a way that does not depend on which CAMAC controller is installed.

The camac.h include file has been revised to accommodate CAMAC drivers on BSD 4.3 and ULTRIX operating systems and to include added functionality. The copy of camac.h in the directory /usr/include will be updated automatically if you install the new CAMAC driver.

On System V/386 systems, a new nap driver is included that performs fractional second sleeps. Run the shell script install_nap in the drivers subdirectory as super user to perform the installation.

The GPIB driver for the National Instruments PCII board for the VENIX 286 system must be replaced with the new version of the driver in this release. Run the script install_gpib in the drivers subdirectory as super user to perform the installation.

Another command file can be automatically read on startup. This file is named site.mac and resides in the auxiliary file directory (SPEC) as, for example, /usr/lib/spec.d/site.mac. If this file exists, it will be read every time a user starts the program, not just when starting fresh. The site.mac file is also read when the newmac macro is run.

More work has been done on the edconf program. In particular, if you exit before saving any changes, you will be asked to confirm whether you really want to quit. Also, there is now a fourth screen used to configure scaler assignments. The number of configurable scalers on the devices screen has been increased to three. The CAMAC slot assignments in the config file now begin with CA_ rather than C_, as in the old versions. The old format is still recognized on reading, but the new form will be written out. Arrow key sequences are now read from the terminal capability data base, and so edconf can be used with arrow keys on non-vt100-compatible terminals. In addition the vi hjkl motion keys are now recognized.

The hardware support in spec has been completely modularized. The u_hdw.c file contains a simplified hook mechanism to select the installed hardware. All other references to a particular hardware device are now contained in a single source file, allowing sites to add support for new devices, without requiring access to the complete source code. (At present the edconf program cannot be changed at site to add new hardware types.)

When spec starts out it executes a call to nice(-20). This call raises the priority of the process, but only when being run by root or if the process is owned by root and has set-user-id execute mode set. After raising the priority, spec resets the effective user and group ids to that of the real user, so there is no danger of the user spawning subshells or creating files as root. If spec is not set-user-id root, it will behave as before.

If the settings file can't be opened for writing when spec starts up, or if there are read or write errors accessing that file, spec switches to simulate mode and suggests the user get assistance.

MISCELLANEOUS

spec is now available for the IBM PS/2 running the AIX 1.2 operating system. CAMAC support is currently only through a Kinetic Systems 3988 GPIB-to-CAMAC crate controller.

spec is now available for DEC MicroVax computers running ULTRIX or UCB operating systems. CAMAC drivers are available for either the Kinetic Systems 3912 or DSP DCC-11 crate controllers.

spec is now available for SCO Xenix 286 2.2.3 and SCO Xenix 2.3.2 operating systems. (Use on a 286 platform is discouraged, though.)

The motor number indirection array mA[] is now reinitialized when the config macro is invoked, using the _assign macro that is defined in each geometry's standard macro file. Thus, if motor numbers are reassigned while editing the config file, the macros that list motors in specific order (wa, wh, ...) will still list the motors in the same order after _assign is run.

The print command with no arguments will now print a newline. In previous versions, such usage was reported as a syntax error.

The number of command files that may be queued for reading has been increased from five to eight.

BUG FIXES

A design flaw, introduced in version 2.11, and having to do with reads of the motor controller registers, has been corrected. The problem was that spec could lose track of motor positions if the motor controller registers were changed using a remote control pod, or if they were cleared due to loss of power, while spec was running. If any of the commands that read the controller registers (getangles) or changed the settings file (chg_dial(), chg_offset()), were executed before executing a sync command, the motor positions would likely have gotten scrambled.

A bug, whereby the results calculated using the background subtraction feature were incorrect, has been fixed.

All motor mnemonics are now freed when executing the reconfig command and then reestablished on rereading of the config file. Previously, a motor mnemonic, not used in the geometry code, that was removed from the config file would remain as an immutable symbol until you ran spec with the -f flag for a fresh start.

A bug where motor control would hang when trying to start a motor on a Joerger SMC motor controller that had both limits open has been fixed.

A bug with the TS201 timer/counter where LAMs would sometimes be lost during updated counting has been fixed.

A bug with the TS201 timer/counter where readings of certain count times (30 seconds, for example) would indicate the wrong period (although the period over which the module counted was correct) has been fixed.

A bug where values assigned to variables declared local within a statement block sometimes affected variables of the same name outside the statement block has been fixed.

A potential bug where defining a macro recursively would cause a program crash has been fixed by limiting the amount of input push back to 64 Kbytes. (This limit is arbitrary and can be increased by CSS if found to be too low.)

A bug where log file names containing a slash were not treated as log files has been fixed.

An old bug, where reference to the string constant and then a number constant of the same value, particularly with a value of zero, would cause unexpected results, has been fixed. In previous versions, the code:

{
  a = "0"
  b = 0
  if (b) print "This should not happen"
}

would result in the message being printed.

DESCRIPTION

These notes summarize the modifications made for spec release 2.13, as finalized on March 3, 1990.

USER INTERFACE

The commands lscmd, syms, lsdef and prdef now allow arguments containing the metacharacters ? and *, which have the conventional meanings. Thus, for example, typing lsdef *scan will list all the macros whose names end with the characters scan.

Commands recalled using the history feature can now be modified using a subset of the standard csh history-feature syntax. Appending :s/left/right/ to a history recalled item will modify the first occurrence of the string left in the recalled command to the characters right. The delimiter of the left and right strings may be any character. The final delimiter is optional. If left is empty, the last entered left string is used as the pattern to match. In addition, ^left^right^ is short hand for !-1:s/left/right/. In this case the circumflex (^) must be used as the delimiter.

The debugging messages printed with DEBUG=1024 have been revised to show more clearly the input text after macro expansion.

The help files have been reformatted in the style of the standard UNIX manual pages, and many new help topics have been added.

MACROS

The startup macro has been expanded to ask for values for most of the variables and mode settings a user normally might change. Besides prompting for the title, printer device and data file, as before, the startup macro now also invokes the starttemp, setscans, setplot and startgeo macros. It also prompts for values for the default count time (COUNT), the user's command file directory (DO_DIR) and the frequency of screen updates during updated moving and counting (UPDATE).

The startup and newfile macros now test if the specified printer or data file can be opened, before assigning values to PRINTER and DATAFILE. Also, the startup macro insists the printer name must begin with the characters /dev/. One can still assign an arbitrary file or device to the printer, though, by assigning a value to PRINTER.

The macros have been revised to place the geometry-dependent parts in the specific geometry macro source files. In particular, the standard scan macros no longer have four-circle motor names built in.

Most of the macros now explicitly declare local variables as local to minimize name conflicts when macros are nested or new variable names are used.

Most instances of getangles in the standard macros are now preceded by a waitmove. Previously, macros such as hscan, kscan, etc., would read the current angles, even if a motor was moving, when determining the starting reciprocal space coordinates of the scan.

An updated-count macro uct has been added. It continuously displays scaler contents during the counting interval.

A new setscans macro asks the user to configure scan options. A new scan option allows a user to eliminate the possibly time-consuming prescan limit check performed for reciprocal space scans. Another option causes the motor positioning and counting during scans to use updated moving and counting in the style of the umv and uct macros. (On VENIX 286 systems with CAMAC, these updated moves appear to sometimes hang. VENIX 286 users are advised to not rely on updated moves during unattended operation.)

The setplot macro has been substantially revised to reflect a number of new plotting options available, including updated plots during scans, a logarithmic y axis and pinning the minimum y value at zero. See the plot help file for details.

The information displayed above the screen plots can now be modified by the user by redefining the macros rplot_res and splot_res. The first of these prints out information during the real-time screen plotting, while the second is for the final screen plot.

A mvd macro moves a motor with the position argument specified in dial units.

There has been a difference in opinion among spec users as to whether the ca macro should leave the calculated positions in H, K, L and A[], or whether these variables should be restored to the current diffractometer position after printing the results of the calculation. To accommodate both classes of users, a new macro cal is provided that leaves the calculated positions in the appropriate variables. The ca macro will restore the variables to the current spectrometer position.

A new savcmd macro sends the output of any command to a file. The first argument to savcmd is the command to save, the second argument is the file name. Multiple commands or multi-word commands can be saved by enclosing them in quotes, as in savcmd "wm th tth" motor_file.

The debug macro now examines its argument or the prompted-for value for an initial + or -. A + adds the specified level to the current debugging variable, while a - removes the specified level.

FUNCTIONS

The built-in commands open, close, on and off have been replaced by the functions open(), close(), on() and off(). Functions are more versatile than commands as their return values can be used in expressions. Macros that open files can now look at the return value of the open() function and take appropriate action if the file can't be opened, rather than be reset to command level. See the files help file for details of the new usage. All standard macros have been adapted to the new usage.

The sleep() function now takes fractional-valued arguments to specify sleep periods of sub-second resolution. Periods greater than five seconds are rounded to the nearest second. The previous syntax that used negative integer arguments to specify sleeps in units of a sixtieth of a second will continue to be recognized for the time being.

The tcount() function now accepts nonintegral count times.

A new function, motor_par(), returns configuration parameters for a particular motor. Presently, only the step-size parameter is returned. See the motors help file for usage.

A new function, pl_dump(), efficiently prints all or a portion of the built-in plot array to output devices and files. See the plot help file for details.

The pl_anal() function now returns the sum of the squares of the y values when called with an argument of 12. The macro pl_SUMSQ is defined to be this quantity.

The pl_anal() function can now do a simple linear-background subtraction before doing the standard analyses. The linear background is calculated from the scan endpoints. The new built-in variable BGPTS can be set to the number of points from each end of the scan to average together before calculating the linear background. The macros, pl_bgMAX, pl_bgUHMX, pl_bgLHMX, pl_bgSUM, pl_bgFWHM, pl_bgCFWHM and pl_bgxMAX have been defined as appropriate calls of pl_anal(). The setplot macro can be used to select the background subtraction mode. See the plot help file for more information. This is a trial feature, implemented in response to a specific user request and may be modified substantially in future releases.

GEOMETRY CODE

The four-circle phi-zero geometry mode has been changed to a phi-fixed mode. To recover the previous operation, use the freeze macro to freeze the value of phi at zero.

The macros for the four-circle lattice-parameter-refinement feature (or the fitting-the-orientation-matrix feature) have been renamed from beg_reflex, add_reflex and end_reflex to reflex_beg, reflex and reflex_end.

Support for a new geometry configuration, zaxis (see J.M. Bloch, J. Appl. Cryst. (1985) 18, 33-36), is included. The source code is in the file geo_zaxis.c.

The code for the surf geometry configuration has been expanded to accommodate a similar spectrometer used at Saclay.

HARDWARE

Support for the DSP TS-201 counter/timer CAMAC module is included. Count intervals can only be specified to within 1.5 percent when counting to time and to a power of two when counting to monitor. When counting to monitor, gating requires software intervention, causing an unavoidable latency in disabling the counter, resulting in variable count intervals.

Code to support the LeCroy CAMAC Model 2301 interface for the QVT Multichannel Analyzer used with a wire linear detector is now included. The getmca() command is used to read the MCA. See the counting help file for more information. The tcount() and mcount() functions will clear, start and stop the MCA using the configured timing generator. The software gating will not interfere with hardware gating, if hardware gating is present.

The code for the Joerger SMC CAMAC motor controller has been expanded to support Model SMC-LP, which has programmable velocity and acceleration registers. The edconf program now accepts these parameters for all SMC controllers, although the values entered are ignored for the other models.

Timing problems with the Kinetic Systems 3388 GPIB CAMAC module on fast 386 computers have been fixed.

PC counting boards based on the Am9513 counter/timer chip, such as the MetraByte CTM-05 and the Scientific Solutions Lab Master, may now be used with spec. Presently, the board is handled using user-level busy-wait loops. In the future, an interrupt-driven driver will be provided.

The Advanced Control Systems Step Pak RS-232C motor controllers are now supported.

Timeout errors on the National Instrument GPIB interface no longer cause a return to command level. On a timeout error, a gpib_get() will return an empty string, and a gpib_put() will return zero. Other errors, such as no GPIB listener, still reset to command level.

Trailing newlines and carriage returns are now stripped from the strings returned by gpib_get() when using the National Instruments GPIB board. Code for the other supported GPIB hardware has always done this.

The CAMAC driver for VENIX 286 can now be installed to support the modified DSP 6001/2 crate controllers by invoking the install_dsp script with the -M flag.

UTILITIES

A new utility command to be run from the shell called showscans is included. The showscans utility uses the C-PLOT package and the show.awk script (introduced in release 2.11) to produce summary plots of scans. When you install spec, showscans (and also contents) are now also installed automatically. A new file aux/README describes showscans and the other auxiliary files included with the spec package.

ADMINISTRATION

The distribution no longer comes with a prelinked version of the fourc executable. When you install the software for the first time, several source files will be compiled and all the object modules linked to produce the target executable.

The edconf program has been revised to accommodate the increasing number of hardware devices that spec supports. Most of these changes affect the format of the device screen.

Changes in the way edconf backs up the config and settings files should lesson instances of accidental total loss of motor positions through user inattention. The files are now backed up only once when running edconf, and then only when you try to write out the files, not when starting up.

There is also a new undocumented security feature offered by edconf that implements an additional level of protection to prevent unauthorized users from changing the configuration of selected motors. spec administrators who require this additional security should contact CSS for instructions.

It is now possible to link versions of spec that contain only the hardware modules that will be used by a specific site. You must edit Makefile and u_hdw.c in the the distribution directory and relink the appropriate binaries. See the site_eg target in Makefile for an example.

MISCELLANEOUS

A newly revised and indexed manual is included in this release of spec.

When spec in invoked with the -s flag, it is no longer possible to turn off simulate mode without restarting the program from the shell. This eliminates ambiguities about whether or not the configured hardware devices are opened and properly initialized when simulate mode is turned off.

When simulate mode is in effect, the reconfig command will read the settings file, but will not read the config file or change the hardware configuration.

The names of the state files in the userfiles subdirectories have been changed to use more characters from the user's login and terminal name.

When invoking spec from the shell the tty part of the .BI "-t" " tty" option must now contain the complete name of the device, either as /dev/tty12 or as tty12.

The memory arena routines have been rewritten to accommodate an arena twice as large on the VENIX LMC version of spec. Users can now include entire scans within single statement blocks without running out of memory.

The distributed version of spec is now compiled for 40 motors.

BUG FIXES

A bug that caused unintended motor movement under a particular scenario has been fixed. If you had commanded a move involving several motors (with the br macro, for example) and one of the motors was out of limits the move would be canceled. However, the next time you moved a motor, the motors that were not out of limits in the previous move would move to the previously commanded positions under some conditions. This rather serious bug has been fixed.

A bug where the next command typed in after hitting a hard motor limit was ignored has been fixed. Previously, any type ahead from the keyboard would be flushed after hitting a hard limit. Type ahead is no longer flushed, although command files are still closed after hitting a limit.

In previous versions, there were small intervals of time where keyboard interrupts (^C's) were ignored to prevent critical code from being disturbed. Ignoring interrupts is poor programming, as it makes the program response unpredictable to the user. In addition, on rare occasions, spec would enter a state where ^C's were ignored while motors were moving or counters were counting. In this release, the critical code is protected in ways other than ignoring ^C's. The method now used still has flaws due to fundamental limitations in the system calls being used. In the next release, the code will employ system calls available on systems other than VENIX for the 286 and PDP 11/73 to enable much more robust interrupt handling. Users of VENIX will, unfortunately, not benefit from those changes.

A bug in the grammar where expressions using the Boolean operators !, && and || reported syntax errors in a number of contexts has been fixed.

A bug, whereby number values obtained from strings (returned by input(), for example) were not scanned for octal or hexadecimal prefixes has been fixed.

The implementation of the local command has been totally revised to fix numerous bugs, the most serious of which made a built-in variable disappear if it was declared local.

Error messages are now printed if you use the global, unglobal or constant commands with built-in symbols.

A bug, whereby the code that calculated the values returned by pl_anal() for the FWHM and the center of the FWHM did poorly for certain unusual sets of data points, has been fixed.

A bug, where trying to print a very long string using print, printf or sprintf, would cause a core dump, has been fixed.

DESCRIPTION

These notes summarize the modifications made for spec release 2.12, as finalized on May 23, 1989.

CHANGES

A new scan-plotting option has been added at the macro level. You can choose to have a continuously updated plot made on the video screen as the points of the scan are collected. Use the setplot macro to select this mode.

The history-substitution mechanism has been expanded a bit. You may now append text to recalled items.

History is now retained when you exit the program and restored when you restart. The savstate command will include command history in the state file, and the getstate command will restore the command history from the last issued savstate.

A new powder-averaging mode for scans is available. When powder mode is on, the selected powder-average motor is run at its base rate a selected width about each point in each scan. The scalers are automatically enabled for counting during the time the motor is in motion. Powder mode works with all the angle scans and HKL scans. Use the macro setpowder to turn powder mode on and off. See the powder help file for details.

The command move_cnt has been added to make powder mode work. This command works similarly to move_all except the motors are moved at the base rate, no backlash is performed and the scalers are automatically gated while the motors move.

All the scan macros required slight modifications to make powder mode work. New global variables, _stype0 and _stype1 are assigned values to indicate the type of scan in progress. In addition, some of the statements in each scan loop have been gathered into a new macro named scan_move. The scan_move macro is assigned a different definition in powder mode. Also, the count macro called by all the scans has been made redefinable to accommodate powder mode. Study the macro files scans.mac, count.mac and powder.mac to see just how these things are done.

A new four-circle geometry mode has been added called phi fixed. This mode is similar to the existing three-circle (phi-zero) mode, except the value of phi no longer needs to be fixed at zero.

A new geometry configuration, named r2d2 after the high-vacuum surface chamber that it describes, is included in the distribution. The geometry code is in the file geo_r2d2.c.

spec has two distinct phases during the process of interpreting user commands: the parse phase and the execution phase. Previously, a macro definition assigned with def would be carried out in the execution phase, making the definition unavailable until the entire enclosing statement block had been read in and parsed. This method of handling macro definitions made it impossible to enclose any of the recently (release 2.10) redesigned standard scan macros within a statement block, since the same macro was both defined and invoked with the scan macro. To solve this problem, macro-definition assignments are now made as they are encountered during the parse phase. However, since several spec macros still require macro definitions to be made during the execution (or run) phase, a new command called rdef has been introduced. This new command behaves now like def used to. See the macros setplot, setpowder, lup or _head for examples of the use of rdef.

The maximum macro length has been increased a bit from 1536 to 1920 bytes.

Clock-tick sleeps are now available with spec on non-VENIX systems. Clock-tick sleeps are sleeps with sixtieth of a second resolution. New versions of either of the drivers dsp.c or oms.c must be installed, though, and the clock-tick sleeps will only work when the corresponding device has been opened. Clock-tick sleeps work well with the sleep-time variable UPDATE used in updated-move macros such as umv, umk and uwm.

spec is now supported on the AT&T 6386 platform running UNIX version 3.2.

The National Instruments GPIB boards are now supported for VENIX 286 and for the various 386 systems. Drivers for the 386 systems must be obtained directly from National Instruments.

The Scientific Solutions (Tecmar) GPIB support code has been rewritten following the sample programs provided by the manufacturer. In addition, this board can now be used on the 386 systems. On the 386 systems a supplied program called io_enable is automatically run the first time the board is used in order to enable the IO ports used by the board to be accessible from user-level programs.

The code to support the Kinetic Systems CAMAC GPIB board (KS3388) has been fixed. A timing problem in the code that rarely, if ever, manifested itself on the PDP and 80286 systems had made the module unusable on the 386 systems.

The driver files, formerly distributed in the subdirectories camac and oms are now distributed in the subdirectory drivers. Three master installation scripts, install_vnx, install_386, and install_att, are supplied that are invoked by driver-specific scripts, such as install_dsp for the DSP CAMAC driver, install_oms for the Oregon Micro Systems PCX driver and install_gpib for the National Instruments PCII GPIB driver.

A problem on the 386 systems, where using a number larger than the largest long integer in a print statement or expression would cause a floating exception and possibly a core dump, has been fixed.

DESCRIPTION

These notes summarize the modifications made for spec release 2.11, as finalized on February 6, 1989.

CHANGES

If the command file /usr/lib/spec.d/site.mac exists, it will be read each time any user runs spec. Site administrators are encouraged to put site-specific commands in this file, for example, commands to assign synchrotron-beamline monochromator parameters.

The ascan and a2scan macros now include the values of H, K and L at each data point in the data file.

In the prescan limit checking for the various hkl scans, a check for motor-limit problems at the last point of the scan has been added before the limit checking at the rest of the points in the scan. Thus, a limit problem that occurs at the extreme points in H, K and L will be caught earlier.

New scan macros a3scan and d3scan are included for scanning three motors at a time.

A new scan macro hklmesh is provided that does a mesh scan of any two of H, K and L.

The scan_on macro that restarts aborted scans now also works with mesh scans.

A setplot macro is now included that lets you configure the output generated at the conclusion of a scan. You can choose from several combinations of printer and screen output.

The do and qdo macros have been modified to look for command files in a directory given by the global variable DO_DIR if they can't be found in the current directory.

A new macro scan_tail, defined by default as _tail, is called at the end of each scan. This construction is similar to the scan_head and scan_loop macros already in place and is related to the setplot macro described above.

New macros for the folks at X-20 NSLS related to setting the X-ray beam energy are included in the standard distribution. These macros are set_E, get_E, move_E and Escan.

The config macro now does a waitall and a sync before invoking the edconf program.

The CAMAC driver for the VENIX system on the AT computers has been changed to solve a problem with losing LAM interrupts that come in during servicing of a prior LAM interrupt. The bug would manifest itself with spec being hung and DSP 6001 LAM lights being lit. (Affected sites should be sure to install the new driver.) (The problem does not occur on PDP systems.)

For folks running spec using VENIX on AT clones, spec is now compiled using the large-model compiler. This gives a larger memory arena than otherwise available. The added memory comes at a slight loss of execution speed, though. (The regular-model version is still available.)

spec now allows you to use more than one kind of motor controller at a time. (This feature entailed revising much motor-related code - please inform CSS if you notice any new bug manifestations.)

The edconf program (invoked by the config macro) has undergone some changes. A third screen is used to configure the device names. The order of the screens is changed so that the motor screen appears first. A new parameter for each motor indicates the type of controller to be used for that motor.

A presence check is now performed on all types of motor controllers, not just on the E500. The check is performed with the reconfig command now, rather than with the sync command. When a controller fails the presence test, the associated motors are marked as unusable.

The "clearing remaining steps" message that occurred on ^C aborts of E500 motors has been eliminated from normal operation. The message will appear when hardware debugging is turned on, though.

A bug with using the mcount() function (counting to monitor) with the RTC-018 controller has been fixed. Previously the monitor counts would be off by a factor of 64.

The first draft of general serial device routines, ser_get() and ser_put() is now available. See the serial help file for more information.

A bug where spec tended to dump core after you typed three ^C's to stop motors and got the message

Giving up on waiting.

If motor control is hung, type `sync'.

is fixed.

A bug where spec would screw up if you had more than nine arguments in a macro has been fixed.

A bug where macro definitions very close to the maximum length caused spec to screw up badly has been fixed.

To aid in debugging and testing new versions of spec, a new command line argument, .BI -D " specdir" is available. It selects the name of the auxiliary file directory to be used instead of the compiled in directory, normally /usr/lib/spec.d. It is also possible to change the compiled in directory name when remaking spec on site. See the comments at the top of the file u_hook.c for an explanation of how.

There is an awk script, aux/show.awk in the distribution directory that can be used with C-PLOT to produce summary plots of scans, twelve per page. The file contains comments explaining its usage.

The scripts to install kernel drivers, install_dsp and install_386, now take several command-line options. See the README file in the camac subdirectory of the distribution for details.

DESCRIPTION

These notes summarize the modifications made for spec release 2.10, as finalized on October 21, 1988.

CHANGES

Typing scan_on continues a scan that was aborted. Presently, mesh scans cannot be restarted. Also restarted delta scans (lup dscan and d2scan) will not return the scanned motors to the center position after the restarted portion of the scan completes.

Four-circle users may now assign cut points for angles set by the geometry calculation code. The macro cuts does the assignment. Presently, cut points are used with th, phi, chi and omega. The user specifies the lesser cut point in degrees (integers only), and the angles will be set between that point and that point plus 360 degrees. The azimuth has a pseudo-cut point. If its value is less than zero, the calculated azimuth will be between -180 and 0, otherwise the azimuth will be between 0 and +180.

This release supports the old VENIX operating system on PDP 11/73 computers. See the pdp help file.

DESCRIPTION

These notes summarize the modifications made for spec release 2.9, as finalized on October 10, 1988.

CHANGES

Invoking spec with -y will force the motor registers to be changed to agree with the settings file when the program starts up. If you are confident the settings file is okay, and know the motor registers have been wiped out, say by shutting off crate power, then this option ought to be just the thing.

The message noting the discrepancy between motor-controller registers and program memory now shows the values of each in user units (angles) in addition to steps.

Hitting a hard motor limit will cause the program to reset to command level, whether in a scan or in a command file. Previously, although motor motion was aborted on a hard limit, command execution continued.

The prdef command now shows backslashes associated with escaped delimiter characters within a macro definition, as in:

def silly 'print "Who\'s on first?"'

Previously, these backslashes were not shown.

All instances of the command move_all in the standard macros have been replaced by the macro move_em. The default definition of move_em is simply move_all. The purpose of move_em is to make it easy for the user to include limit checks of moves that involve more than one motor by redefining move_em.

A new macro mesh that performs a mesh scan of any two motors is included.

The wm and uwm macros now check that their arguments are valid motor names.

A new built-in command local (with the same syntax as the global command) can be used to reuse a preexisting variable name and give the new instance of that name scope only within and below the curly-bracketed block in which it is defined. A known bug with the current implementation is that you cannot use the global keyword at the same level or lower to unlocalize use of a previously local-declared variable name.

The motor screen for the edconf configuration and settings editor now wraps around when changing motor columns instead of sticking at motor 0 or at the last motor.

The CAMAC drivers can be optionally compiled either to allow only the super user to issue a Z or to allow any user to issue a Z. Previously, it was only super-user only.

This release supports the 386/ix operating system on 80386-based machines. See the 386 help file.

DESCRIPTION

These notes summarize the modifications made for spec release 2.8, as finalized on August 6, 1988.

CHANGES

The four-circle motors are now consistently referred to in the order tth th chi phi throughout spec. (Previously, the order of chi and phi was reversed.) The macros with changed usage are pl, upl and ci. All the macros that produce output (wh, the scans, etc.) use the new ordering convention.

The global variable referring to the data file has been changed from FILENAME to the more revealing DATAFILE.

The order of arguments in the built-in functions dial(), user(), chg_dial() and chg_offset() has been changed to make the motor number the first argument in each case. This change makes the argument ordering of these four functions consistent with the functions get_lim() and set_lim().

A new function named motor_mne(i) returns the mnemonic assigned to motor number i in the config file. The internal _check0 macro, called by all standard macros that allow a motor number or mnemonic as an argument, now checks its argument against all valid mnemonics, rather than just that for motor 0, as it had previously.

Most scans macros now include prescan motor-limit checks.

Previously, certain of the calc() calls to the geometry code (calcA and calcAB, in particular) filled the A[] array with the current motor positions. That no longer happens.

The four-circle geometry code has been made more robust (we like to think).

DESCRIPTION

These notes summarize the modifications made for spec release 2.7, as finalized on July 8, 1988.

CHANGES

GPIB support for the Tecmar board in the AT is now included. The user must have read and write permission for /dev/iomem. The board must be installed at base address 300. If the config file assigns a slot to the Kinetic Systems 3388 GPIB CAMAC module, the Tecmar board will be unavailable.

A presence test is performed when the E500 is first opened and when the user types sync or reconfig. (reconfig is called by the config macro.) If the presence test fails, all associated motors are marked unusable. Once marked unusable, the program must be restarted to make them usable. Trying to move an unusable motor produces an error message.

The E500 "remaining steps", usually resulting from aborting motion, are noted and cleared in the LAM routine. Thus "clearing remaining steps" messages seldom occur when initiating a move.

When there is a discrepancy between privileged motor settings and the controller registers, the registers are now changed, rather than the settings.

When there is a discrepancy between writable motors and controller settings, the user must type either y or n. No default is allowed. (Y or 1 and N or n are also acceptable input.)

The getangles and getdials commands now read and return the current contents of the controller registers, not the program's idea of the motor positions. (However, at present, the program's idea of the motor position is not changed by these two commands-that still occurs the same way as in previous versions.)

SIMULATE is no longer a built-in variable. Instead, a new function, set_sim() is used to turn simulation mode on and off, where set_sim(0) turns the mode off and set_sim(1) turns the mode on. Both wait for moving and counting to finish before changing the mode, and both return the previous mode. set_sim(-1) returns the current value of simulation mode without changing it. Whenever simulation mode is turned off, the motor settings file is reread to restore the motor positions.

Negative arguments to sleep() are allowed. They represent clock ticks, where a clock tick is 1/60th of a second, e.g., sleep(-10) pauses for approximately a sixth of a second.

move has been renamed move_all to make it harder for a user to start motors moving by accident.

edconf has been revised, due to popular demand. Changes include the following: When invoked with the -s option, edconf is put into simulation mode where nothing can be changed and files can't be written. Also, if the user doesn't have write permission to the config file, no configuration parameters can be changed, and only the settings and/or limits of the configured writable motors can be changed. System error messages are now shown giving the reason for failures when opening, closing, reading and writing the files. Also, the motor settings can now be put outside the limits, although a warning message will be printed when the user writes out the files. The dial setting is now maintained when changing the number-of-steps parameter. Finally, there is always at least one motor.

The tweak macro tw has been changed to only output to the printer at the beginning and end of the tweaking process.

The set_dial macro no longer changes the limits. However the macro refuses to set the dial outside of the current limits.

The format of motor positions written to the data file by the scan macros has been compressed. The motor names are no longer printed. The motor positions are printed eight per line with the format

#P0 (*eight motors*)

#P1 (*another eight motors*)

etc.

The config macro invokes edconf with the -s flag if spec is in simulation mode.

New macros display motor positions while motors are moving. Their names are uwm, umv, umvr, uan, upl, ubr and umk. Except for the update feature, they are identical to wm, mv, mvr, an, pl, br and mk. The global variable UPDATE contains the sleep time between screen updates and can be changed by the user.

The Makefile for installing spec has a new variable PERMS that contains the permissions to assign to the config file. The default is to make the config file writable by everyone. (Typing make install_x20 will install the BNL X20 spec automatically giving the config file restricted access.)

A bug whereby CAMAC interrupts that arrived during a sleep() sometimes caused the sleep() to not wake up is fixed. A bug whereby assigning string values to the motor position array, A[], used to produce surprising results is fixed.

DESCRIPTION

These notes summarize the modifications made for spec release 2.6, as finalized on June 6, 1988.

CHANGES

The User Manual, Reference Manual and Administrator's Guide are now relatively complete. The User Manual contains an introductory tutorial chapter on basic diffractometer operation.

The scan macros are substantially rewritten. Refer to the Reference Manual for a discussion of their present form.

The temperature control macros are substantially rewritten. Refer to the Reference Manual. In addition, thermistor conversions are now handled entirely within the macros.

The plot-results output is now generated in a macro named plot_res, that can be invoked separately and can be easily modified by the user.

The motor name unused is special. Motors with that name won't appear on any of the standard-macro generated output.

Bugs in the code for two CAMAC modules, the RTC018 clock and Joerger SMC motor controller, have been fixed.

Bugs in the code for the four-circle frozen modes have been fixed.

The geometry-specific standard macro file is now kept in spec.d/ rather than spec.d/conf/. The four-circle file is called /usr/lib/spec.d/four.mac.

The modulus operator (%) now correctly converts its operands to integers before operating.

New options for pl_anal() return the minimum and maximum values of x.

The names gpset, saveusr and savegeo replace _gpset, _saveusr and _savegeo.

DESCRIPTION

These notes summarize the modifications made for spec release 2.5, as finalized on May 11, 1988.

CHANGES

Each motor now has three levels of security: 1) no protection, 2) limits cannot be changed and 3) motor cannot be moved.

When using edconf to alter the configuration file, limits no longer track changes to the accumulator, however they still follow changes to the dial setting.

The name of the standard macro file has been changed from /usr/lib/spec.d/spec.mac to /usr/lib/spec.d/standard.mac.

The DSP CAMAC driver has been fixed to enable slot 16 to work. In addition, each time a process opens the driver when no other process has it open, a CAMAC Z (initialization command) is issued.

A new macro wm, "where motor", prints positions and limits for up to six motors.

A new macro vi invokes the editor called vi.

A new macro mail invokes the mailer called mailx.

A new macro bug lets the user enter a message that is then mailed to the administrator, spec_adm.

A new macro splot plots the current data on the video screen.

The geometry status macros wh, ca, ci, etc., will now only print the positions of the four-circle motors.

MOTORS is now a built-in symbol, automatically set to the number of configured motors when the config file is read.

On first reading of the standard macros, if the four-circle motors are not configured in the standard positions (0-3), the motor indirection array (_A[]) is automatically initialized.

The four-circle diffractometer macro set and C code has been improved, including better diagnostics when trying to go to unreachable positions and bug fixes. The Reference Manual now contains a complete description of the four-circle interface. Among the new four-circle macros to set geometry parameters (each will prompt if invoked without arguments) are setmode to set the mode, setsector to set the sector, setlat to set the crystal lattice parameters and setaz to set the azimuthal reference vector.

The state file is no longer saved if the user exits using ^Z.

The plotting interface has been revised. Consult the Reference Manual for details.

The wait() function can now be invoked to return a value indicating if any asynchronous activity is going on.

New built-in functions exp10(x) and pow(x, y) are available. The former returns 10 to the x, the latter, x to the y.