1 Subroutines
2 Primitives
3 Count
Subroutine Count(time) - Initiates a count for 'time' seconds.
3 Do_drive
Subroutine Do_drive(i,xp,degpm) - Issues drive command to PDP for
motor 'i' to target angle 'xp', at 'degpm' degrees per minute.
3 Getexp
Subroutine Getexp(time) - This routine returns the current exposure time
in seconds.
3 Istats
Integer Function Istats() - Routine to return status of interface
VALUE INTERPRETATION
0 nothing busy
1 1 or more motors driving
2 scaler running
3 motors and scaler busy
-1 limit
3 Kcinit
Subroutine Kcinit - Routine to initialise communications with PDP.
3 Ldmtr
Subroutine Ldmtr(i,x) - Routine to initialize the position of motor
'i' to a value of 'x'
3 Mtrhlt
Subroutine Mtrhlt(i) - This routine halts motor 'i'.
3 Ofattn
Subroutine Ofattn - Routine to turn attenuator off.
3 Ofbeam
Subroutine Ofbeam - Routine to close shutter.
3 Ofchart
Subroutine Ofchart - Routine to turn chart drive off.
3 Oftest
Subroutine Oftest - Routine to turn test mode off.
3 Onattn
Subroutine Onattn - Routine to turn attenuator on.
3 Onbeam
Subroutine Onbeam - Routine to open shutter.
3 Onchart
Subroutine Onchart - Routine to turn chart drive on.
3 Ontest
Subroutine Ontest - Routine to turn test mode on.
3 RdAllMtr
Subroutine RdAllMtr(angl) - This routine returns the current positions
of all 4 motors in the real array 'angl', which must have at least 4 elements.
3 Rdmtr
Real Function Rdmtr(i) - This routine returns the current position of
motor 'i'.
3 Rdsclr
Real Function Rdsclr() - This function returns the current value of the
scaler, in counts.
3 Rdtime
Real Function Rdtime() - This function returns the current value of the
timer, in seconds.
3 Sclhlt
Subroutine Sclhlt - This routine halts the scaler immediately.
3 Setexp
Subroutine Setexp(time) - This routine initializes the crystal exposure
time to 'time' seconds.
3 Stpall
Subroutine Stpall - This routine halts the scaler and all motors.
3 Wait
Subroutine Wait - This routine waits for the scaler and all motors to
finish.
3 Wtmtr
Subroutine Wtmtr(i) - This routine waits for motor 'i' to finish.
2 Application_Routines
3 Allowed
Subroutine Allowed(iabsent) - Checks for reflection in 'fh' (in
common/single/) allowed by space group symmetry. Returns
'iabsent' zero if allowed, 1 otherwise.
3 Angcal
Subroutine Angcal - Calculates setting angles for a reflection from
keyboard input indices.
3 Angletable
Subroutine Angletable - Produces a table of inter-reflection angles
from entries in the reflection list with IUSE set to 1.
3 AutoIn
Subroutine AutoIn - This routine autoindexes the angle data in the
reflection list to determine a reduced unit cell consistent with the
data.
See also BRAV for interpreting the reduced cell.
3 CalcA
Subroutine CalcA(hphi,angl,ierr) - This routine calculates the
diffractometer angles 'angl' corresponding to a vector 'hphi' in
diffractometer coordinates. Softlimits are called and the error
flag, 'ierr', will be set non-zero if the reflection is inaccessible.
3 CalcB
Subroutine CalcB(cell,b) - This routine uses the unit-cell parameters
in 'cell' to calculate the matrix, 'b', the transforms from
crystallographic to cartesian coordinates.
3 CalcH
Subroutine CalcH(angl,hphi) - This subroutine uses the diffractometer
angles 'angl' to calculate a vector 'hphi' in diffractometer
coordinates. Note: Angle #2 must be the deviation from bisecting
position.
3 CalCom
Subroutine CalCom - Keyboard supervised calculation of orientation
matrix. Data can either be taken from list items or input.
3 CalPhi
Subroutine CalPhi(h,hphi) - This routine calculates a vector, 'hphi',
in diffractometer coordinates from a real vector of Miller indices,
'h', and the orientation matrix.
3 Center
Subroutine Center(ifnd,ityp,width,tthzero) - Carries out centering
of a single reflection, at +/-2theta if 'ityp'=1, current position
only if 'ityp'=0. If no peak is found, 'ifnd' is set non-zero. On
succesful centering 'ifnd' is set zero, and 'width' is set to the
omega width of the reflection. If 'ityp'=1 then tthzero has an
estimate of the 2theta zero error.
3 Cntr
Subroutine Cntr(iflag) - Initiates centering from the keyboard of
a single reflection at the current diffractometer position.
If 'iflag' is zero only the current position is centered,
if 1 the reflection is centered at +/- 2theta.
3 Cone
Subroutine Cone - Performs a cone search at a specified angle
around the current position.
3 Conv
Subroutine Conv(n,pi,d,c,t,ierr) - Performs edge convergence on
reflection with motor 'n'. 'pi' is the initial position, returned
as centered position, 'd' is the initial axis offset, 'c' is the
count rate to be found, 't' is the count time per step. 'Ierr'
is returned non-zero if set by subroutine drive.
3 Device_Update
Subroutine Device_Update - Allows the user to set the device-type,
and thus the diffraction mode and soft-limits for the diffractometer.
3 Drive
Subroutine Drive(i,x,degpm,ichk,ierr) - Initiates a motor drive for unit
'i' (0