12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

set_lim(motor_number, low, high) and get_lim(motor_number, flag) functions.With the latter, the lower limit is returned if flag is less than zero, otherwise theupper limit is returned.If a move_all command would take any motor outside of its limits, an error messageis printed and no motors are moved. The limit values are stored in dial angles sincethey correspond to physical limitations to the motion. The limit values are thereforepreserved as the user-angle offsets are changed. The set_lm macro can be used toset a single motor’s limits:62.FOURC> set_lm tth 0 360Two theta limits set to 0 360 (dial units).63.FOURC>The angle arguments to the macro set_lm are given in user angles. (In this example,dial and user angles are the same.)Diffractometer GeometryYoucan operate a two-circle diffractometer in terms of angles alone. However, for afour-circle diffractometer (and others such as the z-axis or liquid-surface diffractometers)it makes more sense to work in three-dimensional reciprocal space coordinates.It is therefore necessary to be able to calculate angles according to the diffractometergeometry.<strong>spec</strong> is designed to accommodate a variety of diffractometer configurations. The particularcalculations are contained in geometry code (the source for which is includedin the standard <strong>spec</strong> package.) accessible through the calc() function. The argumentsto calc() determine the particular code that is called. For example, a calcAmacro is defined as calc(1) . Its purpose is to load the A[] array with the angles correspondingto the current reciprocal space coordinates. The four-circle configurationrepresents the three reciprocal space coordinates as the first elements of the built-inarray Q[] .For convenience, the following definitions are made:def H ’Q[0]’def K ’Q[1]’def L ’Q[2]’Thus, to move to a position in reciprocal space such as the point [100], the appropriatecommands would be63.FOURC> H = 1; K = L = 0; waitmove; getangles; calcA; move_all64.FOURC>INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION USER MANUAL AND TUTORIALS 31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!