spec

Software for Diffraction

changes

highlights of modifications for spec release 6.00

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.