SPEC Macros


This is a list of commonly used SPEC macros for controling the Brockhouse beamlines.  It includes standard macros and those we have developed ourselves.  All distances are in millimeters.  Crtl C stops any running macro.


wa:  stands for "where at" and lists the current names and postions of all motors


wm "motor":  gives the current position and other details of a motor


mv "motor" "position":  moves the motor to the position, example (mv sz 50) would move the motor sz to the absolute position of 50


mvr "motor" "distance":  moves the motor a relatve distance from it's current location, example (mvr sz 0.5) moves the sz motor by 0.5 mm in the positive direction from it's current position.


umv "motor" "position":  same as the mv command but tracks the move


mvr "motor" "distance":  same as the mvr command but tracks the move


tw "motor" "distance":  tweaks the motor by distance listed, useful for repetative small moves, can use +/- to switch directions


ct:  gives the value of the counter (could be a detector or a furnace temperature)


counter:  chooses the active counter


ascan "motor" "initial absolute position" "final absolute position" "number of step" "time per step":  Does a scan. This is how scans are initiated for the Huber high resolution powder diffraction station. Also useful for centering as it plots the results.


jiggle "time":  A homemade script which continously moves the sample changer in SOE2 up and down from the inital position by 100 um.  The "time" is how long it runs, which is approximately but not exacty in seconds.  Useful for grainy samples as it samples over three positions.


mythen 0 and mythen 1 – turn the detector off and on at the Huber station in SOE1


Ccd_on - Enables CCD image acquisition through spec. ct will take CCD image, and any scan will take CCD image and save it at each scan point.


Ccd_off - Disables CCD acquisition. For sample alignment (height/angle adjustment), usually it is not necessary to take CCD.


Ccd_setup - select CCD to use (only one choice for now) and start setup. Change the file name here.


fsopen – Opens fast shutter until fsclose excuted. The fast shutter remains closed normally.  Specific to SOE1.


spin "rate":  In SOE1 makes the capillary spinner run a the rate in Hz (range is 1-5).  Use 0 or spin end to stop.