spec

Software for Diffraction

Hardware in spec

spec, a UNIX-based software package for instrument control and data acquisition, includes built-in support for a wide variety of motor controllers, counters, timers and other 1D and 2D data acquisition devices, allowing great flexibility in a site's hardware configuration. spec's spread-sheet styled configuration editor makes it easy for the spec user or the site's spec administrator to select or modify the hardware configuration.

Refer to the currently supported hardware page for a list of the specific devices that work with spec. Support for additional devices is continually being added.

Support for all the hardware options is included with each spec distribution, except, of course, for limitations based on the hardware platform. For example, PCI devices are only supported on Linux platforms.

For maximum flexibility, spec also provides direct access to generic interfaces such as RS-232C, GPIB, CAMAC, VME, PC port and socket interfaces. The functions available to do this are described below.

CSS has adapted spec to work in the distributed computing environments TACO and TANGO as used at the European Synchrotron Radiation Facility (ESRF) and elsewhere.

Support for the EPICS distributed computing environment, as is used at many beamlines at the Advanced Photon Source (APS) at Argonne National Lab and elsewhere, is also in place. Support for the alternative SCIPE distributed computing environment, as has been used at the DND-CAT at the APS, is included.

CSS has also developed support for the equipment manager RPC-based Ethernet control of hardware used at the SPring-8 synchrotron.

To use spec with EPICS, TACO or TANGO, the associated libraries and utilities must already be installed on the platform.

Contact CSS for information on customization to other special environments.

Also, please contact CSS for specific hardware recommendations, or to discuss adding support for other interfaces, devices or computer platforms.

USER ACCESS TO HARDWARE DEVICES

spec provides built-in support and a consistent user interface for motor controllers, counters, timers and MCA-type devices, using commands such as tcount(), getangles, move_all, etc. Basic user-level access to serial, GPIB, CAMAC, PC I/O port and socket interfaces is available using the following functions.

The functions ser_put() and ser_get() read strings from and write strings to selected serial devices. Baud rate and various line characteristics such as raw or cooked mode and parity are set using spec's configuration editor. Additional parameters can be set with the ser_par() funciton.

Direct GPIB access is through the functions gpib_get(), gpib_put(), gpib_poll() and gpib_cntl(). The first function reads arbitrary strings or binary values from the addressed GPIB device, the second function writes strings, while the third one obtains serial poll status. The last function is used to send the DCL, SDC, GET, GTL and LLO messages, and to assert IFC.

User-level CAMAC access is through the functions ca_cntl(), ca_get(), ca_put() and ca_fna(). The first allows sending the CAMAC Z or C commands and setting or releasing crate inhibit. The next two read or write 24-bit data using function codes of 0 and 16, respectively, while the last function allows arbitrary transactions to a selected module.

On PCs, direct access to I/O ports is provided with the functions port_get(), port_put(), port_getw() and port_putw(). The first two use byte instructions, while the latter two use word instructions.

When a VME controller is present, the functions vme_get(), vme_put(), vme_get32(), vme_put32() and vme_move() allow direct access to the VME bus addresses, with the last function allowing DMA transfers.

To reach hardware connected by ethernet, spec provides the functions sock_get(), sock_put() and sock_par(), to send and receive strings to the socket specified by a hostname and port number.

In the TACO version of spec, the functions taco_io(), taco_db() and taco_dc() give the user access to most of the device servers, the resource database and the data collector, respectively. The functions tango_io(), tango_put() and tango_get() provice access to TANGO properties and attributes.

In the EPICS version of spec, the functions epics_get(), epics_put() and epics_par() allow arbitrary channel access.

In the equipment manager environment, the function em_io() allows arbitrary access to the RPC communication.