1.2.3. - Setting Motor Positions and Moving Motors
When spec is used to control an X-ray diffractometer, the
wh
(where)
macro is available to
show the positions of the most interesting
angles and the diffractometer
position
in reciprocal space coordinates.
With the four-circle diffractometer, the output is as follows:
1.FOURC> wh
H K L = 0 0 1 Alpha = 30 Beta = 30 Azimuth = 90 Omega = 0 Lambda = 1.54 Two Theta Theta Chi Phi 60.0000 30.0000 -90.0000 0.0000 2.FOURC>
The incident and scattered angles for surface diffraction (
ALPHA
and
BETA
), the
AZIMUTH
angle used in advanced modes (see the
Four-Circle Reference)
and the incident X-ray wavelength,
LAMBDA
, are also listed.
The angular positions listed above are the user angles. You set user angles during diffractometer alignment to satisfy the premises of the geometry calculations, such as the positions of the zeroes of the angles. Dial angles keep track of hardware limits and prevent complete loss of angles from alignment errors or computer failure. The dial angles are generally made to agree with a physical indicator on each motor, such as a dial. User angles are related to the dial angles through the equation:
user = sign × dial + offsetRedefining a user angle changes the internal value of offset. Dial angles are directly proportional to the values contained in the hardware controller registers. The sign of motion is set in the configuration file by the spec administrator and normally isn't changed.
The
set_dial motor position
macro is used to set the
dial
position of a motor.
The argument
motor
is the motor number or mnemonic.
All motors have short mnemonics,
such as
tth
, th
, chi
, and
phi
. 1.FOURC> set_dial tth 24.526
Mon Feb 15 01:42:10 1994. Two Theta dial reset from 0 to 24.526. 2.FOURC>
The
set motor position
macro is used to set the
user
position of a motor (i.e., to change
offset).
If you had a slit motor with mnemonic
ts1
, you might enter
1.FOURC> set ts1 .5
Mon Feb 15 01:43:31 1994. Top Slit1 reset from 0 to .5. 2.FOURC>
The
wa
(where all) macro
lists both the user and dial positions
of all configured motors.
1.FOURC> wa
Current Positions (user, dial) Two Theta Theta Chi Phi Top Slit1 Bot Slit1 tth th chi phi ts1 bs1 24.6310 12.3155 90.0000 0.0000 0.5000 -0.5000 24.5260 12.2155 89.7865 0.0950 0.5000 -0.5000 2.FOURC>
spec also keeps track of software motor limits. These limits are always checked before any motors are moved. The
lm
macro lists these limits in both user and dial angles, as well as the
current positions of the motors.
1.FOURC> lm
USER Limits (high, current, low): Two Theta Theta Chi Phi Top Slit1 Bot Slit1 180.1050 90.1000 135.2135 179.9050 5.0000 0.0000 24.6310 12.3155 90.0000 0.0000 0.5000 -0.5000 -179.8950 -89.9000 -134.7865 -180.0950 0.0000 -5.0000 DIAL Limits (high, current, low): Two Theta Theta Chi Phi Top Slit1 Bot Slit1 180.0000 90.0000 135.0000 180.0000 5.0000 0.0000 24.5260 12.2155 89.7865 0.0950 0.5000 -0.5000 -180.0000 -90.0000 -135.0000 -180.0000 0.0000 -5.0000 2.FOURC>
The macro
set_lm motor low high
changes the software limits
for a single motor.
The values for
low
and
high
are given in
user
angles (although they are stored internally in
dial
angles).
The
wm motor [motor ...]
macro lists complete information for up to six motors given as arguments.
1.FOURC> wm tth th
Two Theta Theta tth th User High 180.1050 90.1000 Current 24.6310 12.3155 Low -179.8950 -89.9000 Dial High 180.0000 90.0000 Current 24.5260 12.2155 Low -180.0000 -90.0000 2.FOURC>
Once the diffractometer has been aligned, you can move to any allowed reciprocal space position using the
br H K L
(Bragg)
macro.
1.FOURC> br 2 0 0
2.FOURC> wh
H = 2 K = 0 L = 0 ALPHA = -25.251 BETA = 25.251 AZIMUTH = 90 LAMBDA = 1.54 Two Theta Theta Chi Phi 50.5030 25.2515 90.0000 0.0000 3.FOURC>
You can see where the motors would move for particular values of (H,K,L) using the
ca H K L
(calculate)
macro.
1.FOURC> ca 2 1 1
Calculated Positions: H = 2 K = 1 L = 1 ALPHA = -25.252 BETA = 25.252 AZIMUTH = -90 LAMBDA = 1.54 Two Theta Theta Chi Phi 62.9960 31.4980 54.7355 135.0000 2.FOURC>
Conversely, spec will display the (H,K,L ) that corresponds to a particular set of motor positions using the
ci tth th chi phi
(calculate inverse)
macro.
A single motor may be moved in real space using the
mv motor position
macro.
For example,
1.FOURC> mv tth 50
2.FOURC>
will move the 2θ motor to 50°. You are prompted for more input immediately, even though the motors are still moving.
You can tell when the motor has stopped moving by using the
w
macro.
The program
will pause until the motor has stopped moving and then generate
a beep on the terminal.
Alternatively, you can have the motor position displayed on the
screen as it is moving by invoking the
umv
(updated-move)
macro
instead of
mv
. To stop the
motors before they have finished moving, type
the interrupt
character, usually a
^C
.
You can use the
mvr motor relative_position
macro to move a motor relative to its current position.
1.FOURC> mvr th 1
2.FOURC>
will move θ by one degree.
The
tw motor delta
(tweak)
macro
is useful when lining up the
diffractometer or when searching for the beam.
1.FOURC> tw th .1
Indicate direction with + (or p) or - (or n) or enter new step size. Type something else (or ^C) to quit. th = 26.2515, which way (+)? <return> th = 26.3515, which way (+)? <return> th = 26.4515, which way (+)? <return> th = 26.5515, which way (+)? <return> th = 26.6515, which way (+)? - th = 26.5515, which way (-)? <return> th = 26.4515, which way (-)? ^C 2.FOURC>
Each time you hit
<return>
,
the motor moves
delta
in the
plus or minus direction.