This page summarizes SPICE commands commonly used for experiments at HODACA.
Commands are entered in the command input field at the bottom of the SPICE window. Command names, motor names, and upper- and lower-case letters are not case-sensitive.
In the command syntax below, text enclosed in [ ] should be replaced by the appropriate motor name, value, or other argument.
drive
Syntax: drive [motor1] [target1] [motor2] [target2] ...
Examples:
drive c2 -23.1
drive c2 -23.1 a2 -40.2
Moves one or more real or virtual motors to the specified absolute positions. Multiple motors can be specified simultaneously.
Aliases: mv, umv
driverel
Syntax: driverel [motor] [relative change]
Example: driverel c2 -1
Moves the specified motor relative to its current position.
Aliases: mvr, umvr
qu
Syntax: qu [motor1] [motor2] ...
Example: qu c2 a2
Displays the current values of the specified motors. Without arguments, it displays the configured motor values.
Aliases: wh, wa
hold
Syntax: hold [motor1] [0 or 1] [motor2] [0 or 1] ...
Examples:
hold rx 1
hold rx 0
Holds (1) or releases (0) a motor in reciprocal-space calculations. This is useful, for example, for preventing rx or ry from being recalculated after the sample tilt has been adjusted.
br
Syntax: br [h] [k] [l]
Example: br 1 1 0
Moves to the Bragg condition for the specified reciprocal-lattice point using the current UB matrix.
Alias: ubr
bre
Syntax: bre [h] [k] [l]
Example: bre 1 1 0
Moves to the specified reciprocal-lattice point while setting the energy transfer to e = 0.
cabr
Syntax: cabr [h] [k] [l]
Example: cabr 1 1 0
Calculates the motor positions for the specified reciprocal-lattice point without moving the motors. Useful for checking accessibility before moving.
Alias: ca
cabre
Syntax: cabre [h] [k] [l]
Example: cabre 1 1 0
Calculates the motor positions for the specified reciprocal-lattice point with e = 0, without moving the motors.
count
Syntax: count preset [time or monitor or mcu] [value]
Examples:
count preset time 5
count preset monitor 100000
count preset mcu 3
Counts neutrons using the specified time, monitor, or mcu condition. Time is specified in seconds. When using mcu, first define the monitor count corresponding to 1 mcu with the mcu command.
Aliases: ct, uct, co
preset
Syntax: preset [time or monitor or mcu] [value]
Example: preset time 5
Sets the default counting condition used by subsequent count and scan commands.
mcu
Syntax: mcu [monitor value]
Example: mcu 30000
Defines the monitor count corresponding to 1 mcu (monitor count unit). This command itself does not start a measurement.
scan
Syntax: scan [motor1] [start1] [end1] [step1] [motor2] [start2] [end2] [step2] ... preset [time or monitor or mcu] [value]
Examples:
scan c2 -52 -50 0.1 preset time 5
scan h 1.02 0.98 -0.002 k 0 l 0 preset time 10
Performs an absolute scan. Multiple motors or reciprocal-space coordinates can be specified simultaneously. For reciprocal-space scans, explicitly specify indices that should remain fixed when necessary.
The number of points can be specified instead of the step size using n=.
Example: scan c2 -1 1 n=21 preset time 5
scansim
Syntax: scansim [motor1] [start1] [end1] [step1] ... preset [time or monitor or mcu] [value]
Examples:
scansim c2 -52 -50 0.1 preset time 5
scansim h 1.02 0.98 -0.002 k 0 l 0 preset time 10
Simulates a scan using the same syntax as scan. It displays the scan range, number of points, and calculated positions without moving motors or collecting data. Recommended before an actual scan.
ascan
Syntax: ascan [motor] [start] [end] [number of points] [counting time]
Example: ascan c2 -52 -50 21 5
Performs an absolute one-dimensional scan. Counting time is specified in seconds per point.
dscan
Syntax: dscan [motor] [relative start] [relative end] [number of points] [counting time]
Example: dscan c2 -1 1 21 5
Performs a one-dimensional scan relative to the current position. The motor returns to its original position after the scan.
scanrel
Syntax: scanrel [motor] [relative start] [relative end] [step]
Example: scanrel c2 -1 1 0.1
Performs a relative scan using the counting condition defined by preset. The motor returns to its original position after the scan.
scanrelt
Syntax: scanrelt [motor] [relative start] [relative end] [step] [counting time]
Example: scanrelt c2 -1 1 0.1 5
Performs a relative scan using the specified counting time in seconds per point. The motor returns to its original position after the scan.
scanrelm
Syntax: scanrelm [motor] [relative start] [relative end] [step] [monitor value]
Example: scanrelm c2 -1 1 0.1 100000
Performs a relative scan using the specified monitor count. The motor returns to its original position after the scan.
th2th
Syntax: th2th [relative start of A2] [relative end of A2] [step of A2]
Example: th2th -2 2 0.2
Performs a relative theta–2theta scan. The specified range and step correspond to A2; C2 moves over half the A2 range with half the A2 step. The counting condition defined by preset is used.
th2tht
Syntax: th2tht [relative start of A2] [relative end of A2] [step of A2] [counting time]
Example: th2tht -2 2 0.2 5
Performs the same theta–2theta scan with the specified counting time in seconds per point.
th2thm
Syntax: th2thm [relative start of A2] [relative end of A2] [step of A2] [monitor value]
Example: th2thm -2 2 0.2 100000
Performs the same theta–2theta scan using the specified monitor count.
defcount
Syntax: defcount [counter channel]
Example: defcount detector
Selects the counter channel displayed as the default y axis of scan plots.
scanpars
Syntax: scanpars
Displays the center of mass, FWHM, integrated intensity, and their uncertainties for the most recent scan.
com
Syntax: com [motor]
Example: com c2
Moves the specified motor to the center-of-mass position obtained from the most recent scan analysis.
top
Syntax: top [motor]
Example: top c2
Moves the specified motor to the peak-top position obtained from the most recent peak analysis.
ei
Syntax: ei [energy in meV]
Example: ei 8.0
Sets the spectrometer to fixed-incident-energy mode and specifies the incident neutron energy.
ef
Syntax: ef [energy in meV]
Example: ef 3.635
Sets the spectrometer to fixed-final-energy mode and specifies the final neutron energy. HODACA is normally operated in fixed-Ef mode.
lattice
Syntax: lattice [a] [b] [c] [alpha] [beta] [gamma]
Example: lattice 5.0 5.0 5.0 90 90 90
Sets the sample lattice constants and lattice angles. Lengths are in angstroms and angles in degrees.
sample
Syntax: sample type [powder or crystal] name "[sample name]" mosaic [value]
Example: sample type crystal name "sample1" mosaic 30
Sets sample information including sample type, name, and mosaic. Mosaic is specified in arcminutes. Only required parameters need to be specified.
spv
Syntax: spv [h1] [k1] [l1] [h2] [k2] [l2]
Example: spv 1 0 0 0 1 0
Defines two reciprocal-lattice vectors spanning the scattering plane.
peak1 / peak2
Syntax:
peak1 [h] [k] [l]
peak2 [h] [k] [l]
Examples:
peak1 1 0 0
peak2 0 1 0
Registers the first and second reflections used for calculating the UB matrix. If motor angles are omitted, the current motor positions are used.
addpeak
Syntax: addpeak [h] [k] [l]
Example: addpeak 1 1 0
Adds a reflection for refinement of the UB matrix. If motor angles are omitted, the current motor positions are used.
ubcalc
Syntax: ubcalc [mode]
Example: ubcalc 1
Calculates the UB matrix from the lattice parameters, scattering plane, and registered reflections.
Modes:
1 — scattering-plane vectors + one reflection
2 — two independent reflections
3 — three or more reflections using least-squares refinement
An existing UB configuration can be loaded using:
ubcalc file [path]
calc
Syntax: calc [motor or pseudo-motor] [value] ...
Example: calc h 1 k 1 l 0 e 0
Calculates the corresponding motor positions without moving the motors.
plusminus
Syntax: plusminus [+ or -] [+ or -] [+ or -]
Example: plusminus + - +
Sets the scattering senses of the monochromator, sample, and analyzer. Normally configured by instrument staff.
monochromator / analyzer
Syntax:
monochromator [name]
analyzer [name]
Examples:
monochromator pg002
analyzer pg002
Selects a registered monochromator or analyzer crystal configuration. Normally configured by instrument staff.
collimation
Syntax: collimation [source-mono] [mono-sample] [sample-analyzer] [analyzer-detector]
Example: collimation 40 40 60 120
Records the instrument collimation values in arcminutes as part of the measurement conditions.
showlat
Syntax: showlat
Displays the currently defined lattice constants and lattice angles.
te
Syntax: te [set point in K]
Example: te 10
Sets the temperature set point of loop 1 of the Lake Shore 335 controller.
ter
Syntax: ter [monitoring channel: a or b] [set point in K] [dT in K] [holding time in s] [timeout in s]
Example: ter b 10 0.5 30 600
Sets the temperature and waits until the monitored channel remains within set point ± dT for the specified holding time. If the timeout is reached, the sequence proceeds even if stabilization has not been achieved.
The stop condition is checked approximately every 10 seconds, so a STOP operation may take up to about 10 seconds to terminate the command.
ls335status
Syntax: ls335status
Displays the Lake Shore 335 settings and status, including output type, heater resistance, maximum current, PID parameters, heater range, heater output, and set point.
ls335range
Syntax: ls335range [0 to 3]
Example: ls335range 2
Sets the heater range.
0 — Off
1 — Low
2 — Medium
3 — High
Use the heater range appropriate for the installed sample environment.
ls335pid
Syntax: ls335pid [P] [I] [D]
Example: ls335pid 50 50 10
Sets the PID parameters of the Lake Shore 335 controller. Appropriate values depend on the installed sample environment.
wait
Syntax: wait [seconds]
Example: wait 60
Waits for the specified time before executing the next command.
Hours, minutes, and seconds can also be specified as:
wait [hours]:[minutes]:[seconds]
Example: wait 1:30:00
help
Syntax: help [command]
Example: help scan
Displays help for the specified built-in command or alias.
scantitle
Syntax: scantitle "[scan title]"
Example: scantitle "C2 scan at 10 K"
Sets the title attached to subsequent scans.
title / exptitle
Syntax: title "[experiment title]"
Example: title "sample1"
Sets the experiment title.
Alias: exptitle
users
Syntax: users "[user names]"
Example: users "User A, User B"
Records the experiment users.
contact
Syntax: contact "[local contact]"
Example: contact "Local Contact"
Records the local contact for the experiment.
comment
Syntax: comment "[text]"
Example: comment "sample environment changed"
Adds a comment to the measurement log.
run
Syntax: run [macro name] [argument1] [argument2] ...
Runs a registered SPICE macro. Required arguments depend on the macro.
begin
Syntax: begin
Starts a new experiment. An input window opens for entering or confirming information such as experiment number, sample information, and users. HODACA_SPICE_commands_web_draft
c1, a1 — Monochromator angles
c2, a2 — Sample angle and sample scattering angle
c3, a3 — Analyzer angle and analyzer scattering angle
c3-01 ... c3-24 — Individual HODACA analyzer axes
rx, ry — Sample tilt
xs, ys — Sample-position adjustment
1l, 1r, 1t, 1b — Left, right, top, and bottom blades of the first slit
fm, rxm, xm — Monochromator adjustment axes
rxa, xa — Analyzer adjustment axes
h, k, l — Reciprocal-lattice coordinates
q — Magnitude of the scattering vector
ei, ef, e — Incident energy, final energy, and energy transfer
time — Counting time in seconds
monitor — Monitor counts
mcu — Scaled monitor count
detector — Detector counts
The following commands are implemented in SPICE but are normally not required for routine user measurements. Some of them affect instrument configuration or hardware settings.
scanon / scanoff
Starts and ends a custom scan constructed from combinations of drive and count commands.
stepbegin / stepend
Defines the beginning and end of each measurement point within a custom scan.
countheader / defxy
Defines data-column names and the default x and y axes for a custom scan.
calibrate / calibsim
Runs or simulates instrument calibration. Normally used by instrument staff.
initialize / init
Reloads configuration files and reinitializes the hardware and software. Do not use during a measurement.
zero / setpos / upperlimit / lowerlimit / tolerance / hide
Changes motor zero positions, display settings, software limits, or positioning tolerances. These commands affect the instrument configuration and should not normally be used during routine user operation. HODACA_SPICE_commands_web_draft