changes

Highlights for spec release 6.02

(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().