StadiVari
STOE StadiVari Four-Circle Instrument
DESCRIPTION
The STOE StadiVari is an X-ray diffraction system normally controlled by STOE software. spec includes limited support for the system, which enables positioning most of the axes. The interface is Modbus over Ethernet. Certain functionality, such as finding an axis home position or moving an axis off a limit requires use of the STOE software.
CONFIGURATION
Currently, only one configuration of the StadiVari is supported. Specifically, a four-circle instrument with two detector translations, only one of which is accessible to spec.
Use spec's config macro to run the the edconf hardware configuration editor. Configure modbus on the Interface screen as follows:
Interface Configuration FIELD DEVICE ADDR <>BAUD <>TYPE 0 YES 10.0.1.10 MODBUS over TCP/IP
The DEVICE field contains the IP address or a resolvable host name for the StadiVari instrument.
On the Device screen, configure the controller as follows:
Motor and Counter Device Configuration (Not CAMAC) MOTORS DEVICE ADDR <>MODE NUM <>TYPE U# 0 YES 0 6 STOE StadiVari (modbus)
The ADDR field is unit number on the Interface screen.
On the Motor screen, configure the motors along these lines:
Number: <>Controller 0: STOE 1: STOE 2: STOE Unit/[Module/]Channel 0/1 0/2 0/3 Name Two Theta Theta Chi Mnemonic tth th chi Steps per degree/mm 2000 2000 2000 Sign of user * dial 1 1 1 Backlash [steps] 0 0 0 Steady-state rate [Hz] 10000 10000 10000 Base rate [Hz] 0 0 0 Acceleration time [msec] 125 125 125 Motor accumulator 0 0 0 Restrictions <> NONE NONE NONE Number: <>Controller 3: STOE 4: STOE 5: STOE Unit/[Module/]Channel 0/4 0/5 0/6 Name Phi Det1 Det2 Mnemonic phi det1 det2 Steps per degree/mm 2000 [200] 200 Sign of user * dial 1 [1] 1 Backlash [steps] 0 0 0 Steady-state rate [Hz] 30000 300 300 Base rate [Hz] 0 0 0 Acceleration time [msec] 125 125 125 Motor accumulator 0 [0] 0 Restrictions <> NONE CAN'T MOVE NONE
Important parameters are the unit/channel numbers, the steps per degree/mm and the steady-state rate. The parameters shown for those should be used. The controller works in natural units, but the steps per degree/mm determines the resolution that spec displays. The backlash parameter should be set to zero. Base rate and acceleration parameters are unused. The det1 motor should be configured, but restricted as CAN'T MOVE.
The hardware read mode should be set to PR + NQ on the second standard optional motor configuration screen (type m twice).
There is no hardware timer included with the instrument. Unless another hardware timer is available, configure the software timer on the Devices screen. On the Scalers screen, only the Seconds timer needs to be configured. Run-time region of interest counters can be configured using the acq_setup macro when a supported area detector is in use. See the acq help file.
LIMITATIONS
spec has limited access to the instrument's functionality. spec can position motors and can open and close the shutter. However, spec cannot synchronize (home) motors. That must be done using the STOE software. If a motor encounters a limit, spec cannot move any motors until the STOE software has been used to move the motor away from the limit. Certain moves may violate the collision map associated with the instrument. The only way spec can detect that is by seeing that a motor isn't moving after being sent move commands, as the instrument returns no errors in that situation. When that happens, spec abandons the move and informs the user.
When spec reads a register that reports an unsynchronized axes or a limit condition, spec prints a message that the StadiVari software must be used to correct the problem before spec can move any of the motors again.
The det2 motion does not have a status register. The end of a move is detected by comparing the current position to the target position. If the difference is less than two steps, the move is considered complete. Two steps is the default value. If the "slop" parameter is set and is greater than zero, that value is used. Note, the comparison depends on an appropriate value being configured for steps per mm.
SHUTTER
The one motor_par() function specific to the StadiVari instrument is as follows:
- motor_par(mne, "shutter" [, 1|0])
- Reports the state of the shutter if no arguments, 1 for open and 0 for closed. Opens the shutter with an argument of 1. Closes the shutter with an argument of 0. The mnemonic mne is any motor mnemonic associated with the instrument.
A macro along the following lines can be used to open or close the shutter:
def shutter '{
local t
if ($# == 0) {
t = motor_par(tth, "shutter")
if (t < 0)
exit
printf("Shutter is %s\n", t? "open":"closed")
} else {
t = tolower("$1")
if (t == "1" || t == "open" || t == "on")
t = 1
else
t = 0
motor_par(tth, "shutter", t)
}
}'
