changes
highlights of modifications for spec release 4
RELEASE 4 - text in preparation
These notes describe the general features added to spec for release 4.
Introduction
spec release 4 has been in the works for many months. It includes many new features to make the program easier to use and to support new hardware devices. One of the main reasons for the new release is to accommodate two-dimensional detectors. To that end, a new array data type has been added, along with functions and operators to work on the arrays.
Preliminary support for a number of CCD cameras is already available, including models from Princeton Instruments and Photometrics.
Descriptions of the new features in release 4 follow.
New Macro Functions
Macro function are now available. Macros can now be defined to return values and can be used as operands in expressions. The macro definition can include function arguments, which then become available to the body of the macro function. For example,
def factorial(n) '{ if (n <= 1) return(1); return(n * factorial(n-1)) }'
New Array Data Type
A new type of data array has been created. Besides eventually replacing the never-popular data groups in the standard macros, the new arrays add new capabilities to spec. Unlike spec's traditional associative arrays, which can be indexed by arbitrary numbers or strings and which store elements in no particular order and not particularly efficiently, the new array data types are indexed by consecutive integers starting from zero and store data in contiguous memory, allowing efficient access. The new arrays must be declared and dimensioned with the new array keyword to allow spec to allocate memory for the array and to distinguish the new arrays from the associative arrays. See the arrays help file for detailed information.
New CCD Camera Support
Support for image acquisition using CCD cameras is now part of spec. Currently hardware support is available for a Photometrics model on an HP 700 platform, several Princeton Instruments models on Sun platforms using an S-Bus SDV interface card and for the ESRF Frelon camera over several interfaces. Support for additional cameras will be added as user needs are made known to CSS.
The image_get(), image_put() and image_par() functions are available for reading the image and controlling the hardware. Also, the new functions fmt_write() and fmt_read() allow the array data from the CCD cameras to be written to and read from binary data files.
New Password Protection For Designated Motors
A new option to the spec_par() function allows spec administrators to gain access to motors locked out in the config file to ordinary users. This features allows the administrator to position the motors without having first to go into the configuration editor to change access modes. Entering spec_par("specwiz", 1) causes spec to prompt for the "Wizard's password". If entered correctly, the characters _WIZ are appended to the prompt to remind the user of the special powers, and motors configured with protected status can be moved. Entering spec_par("specwiz", 0) disables the special mode. The encrypted specwiz password is taken from the /etc/passwd file, just as with the specwiz feature for the configuration editor.
New srand() Function
The new function srand(value) sets the seed value for the random number generator used by the rand() function to the integer value. This feature allows the same sequence of random numbers to be generated reproducibly by resetting the seed to the same value.
whatis() Function Enhanced
The whatis() function now produces a text description of the object specified by its first argument, if a second nonzero argument is supplied. The whats macro takes advantage of the new syntax.
New MCA Features
mca_par("disable")mca_get(array)mca_put(array)mca_spar(), mca_sput(), mca_sget()numbering is fixed in config file with @numbering needn't be consecutivemca_sel("?")ROI support
PCA-II, PCA-3, PCA Multiport implements array get/put
Can Dynamically Assign Monitor Channel
For certain counters, the scaler channel used for the monitor preset can be changed using the command counter_par(mne, "monitor"). Counters that currently support this feature are the KS 3640 CAMAC counter, the Joerger VSC16/8 VME scaler and the generic EPICS scaler.
Unlimited String Length For printf() Family
There is no longer a limit to the lengths of strings that can be printed or formatted using the print, printf(), sprintf() and fprintf() functions.
ser_get(), ser_put() Revised
The ser_get() function has been revised, rationalized ser_par(sel, "timeout")
Macro Facility Internals Rewritten
The internal code for handling macros has been entirely rewritten. Also, the internal copies of the macros are now saved in the same file with the other state information. There are no more userfiles/user_tty#M in the auxiliary file directory
New Version of GNU Readline Library Bundled
A newer version of the GNU readline library is now bundled with spec.
Obsolete Functions and Commands Are Gone
The long-obsolete fixstate and getstate commands are gone (although the once-related savstate command still exists). The obsolete functions pl_xget(), pl_yget(), pl_put(), pl_anal(), pl_dump() and plot_pts() have been eliminated from the program, although, for the sake of way-backwards compatibility, the file macros/compat.mac contains replacement definitions for the functions.
New Hardware Support
Highland Tech VME HLV 544 motor controller
BI9000 correlator support
Many improvements to ESRF support
new config screen for MCA/CCD
other config changes ....