spec

Software for Diffraction

changes

highlights of modifications for spec release 2.7

DESCRIPTION

These notes summarize the modifications made for spec release 2.7, as finalized on July 8, 1988.

CHANGES

GPIB support for the Tecmar board in the AT is now included. The user must have read and write permission for /dev/iomem. The board must be installed at base address 300. If the config file assigns a slot to the Kinetic Systems 3388 GPIB CAMAC module, the Tecmar board will be unavailable.

A presence test is performed when the E500 is first opened and when the user types sync or reconfig. (reconfig is called by the config macro.) If the presence test fails, all associated motors are marked unusable. Once marked unusable, the program must be restarted to make them usable. Trying to move an unusable motor produces an error message.

The E500 "remaining steps", usually resulting from aborting motion, are noted and cleared in the LAM routine. Thus "clearing remaining steps" messages seldom occur when initiating a move.

When there is a discrepancy between privileged motor settings and the controller registers, the registers are now changed, rather than the settings.

When there is a discrepancy between writable motors and controller settings, the user must type either y or n. No default is allowed. (Y or 1 and N or n are also acceptable input.)

The getangles and getdials commands now read and return the current contents of the controller registers, not the program's idea of the motor positions. (However, at present, the program's idea of the motor position is not changed by these two commands-that still occurs the same way as in previous versions.)

SIMULATE is no longer a built-in variable. Instead, a new function, set_sim() is used to turn simulation mode on and off, where set_sim(0) turns the mode off and set_sim(1) turns the mode on. Both wait for moving and counting to finish before changing the mode, and both return the previous mode. set_sim(-1) returns the current value of simulation mode without changing it. Whenever simulation mode is turned off, the motor settings file is reread to restore the motor positions.

Negative arguments to sleep() are allowed. They represent clock ticks, where a clock tick is 1/60th of a second, e.g., sleep(-10) pauses for approximately a sixth of a second.

move has been renamed move_all to make it harder for a user to start motors moving by accident.

edconf has been revised, due to popular demand. Changes include the following: When invoked with the -s option, edconf is put into simulation mode where nothing can be changed and files can't be written. Also, if the user doesn't have write permission to the config file, no configuration parameters can be changed, and only the settings and/or limits of the configured writable motors can be changed. System error messages are now shown giving the reason for failures when opening, closing, reading and writing the files. Also, the motor settings can now be put outside the limits, although a warning message will be printed when the user writes out the files. The dial setting is now maintained when changing the number-of-steps parameter. Finally, there is always at least one motor.

The tweak macro tw has been changed to only output to the printer at the beginning and end of the tweaking process.

The set_dial macro no longer changes the limits. However the macro refuses to set the dial outside of the current limits.

The format of motor positions written to the data file by the scan macros has been compressed. The motor names are no longer printed. The motor positions are printed eight per line with the format

#P0 (*eight motors*)

#P1 (*another eight motors*)

etc.

The config macro invokes edconf with the -s flag if spec is in simulation mode.

New macros display motor positions while motors are moving. Their names are uwm, umv, umvr, uan, upl, ubr and umk. Except for the update feature, they are identical to wm, mv, mvr, an, pl, br and mk. The global variable UPDATE contains the sleep time between screen updates and can be changed by the user.

The Makefile for installing spec has a new variable PERMS that contains the permissions to assign to the config file. The default is to make the config file writable by everyone. (Typing make install_x20 will install the BNL X20 spec automatically giving the config file restricted access.)

A bug whereby CAMAC interrupts that arrived during a sleep() sometimes caused the sleep() to not wake up is fixed. A bug whereby assigning string values to the motor position array, A[], used to produce surprising results is fixed.