spec

Software for Diffraction

changes

highlights of modifications for spec release 4.04

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.